ss-component-new 1.3.76 → 1.3.77
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-DYLUvPra.js → MTLLoader-DJIR3bGD.js} +1 -1
- package/dist/{MTLLoader-D1uo8mcW.cjs → MTLLoader-Dyl6PN5d.cjs} +1 -1
- package/dist/{OrbitControls-B4mz4dJ8.cjs → OrbitControls-CyFs1bm5.cjs} +1 -1
- package/dist/{OrbitControls-Cd9ZVfIV.js → OrbitControls-Dlw97WCj.js} +1 -1
- package/dist/{URDFLoader-BfRhERaC.js → URDFLoader-BRpoQyw2.js} +2 -2
- package/dist/{URDFLoader-BnH2w4x6.cjs → URDFLoader-DrNlUBtJ.cjs} +1 -1
- package/dist/{animationData-CO_7EKV4.js → animationData-C69CJGus.js} +2 -2
- package/dist/{animationData-CjVloDDN.cjs → animationData-Dm6x95MK.cjs} +1 -1
- package/dist/{array-Xb-5MHCa.js → array-CmRfs-24.js} +6 -6
- package/dist/{array-DtmeNOPn.cjs → array-lMkg06O4.cjs} +1 -1
- package/dist/{iconfont-CD3omIZU.js → iconfont-CUaAeb62.js} +2 -2
- package/dist/{iconfont-CkpU7gNh.cjs → iconfont-KwmsNAe-.cjs} +1 -1
- package/dist/{index-X_HnLtRC.js → index-6WE1wXNU.js} +1 -1
- package/dist/{index-DYqVJN3W.js → index-B5vwnwpW.js} +2 -2
- package/dist/{index-B_uWA5AJ.js → index-BEh5MTEf.js} +1 -1
- package/dist/{index-lz-ekKYh.js → index-BHrQS0PO.js} +1 -1
- package/dist/{index-j1S7YTh5.cjs → index-BL_f9rch.cjs} +1 -1
- package/dist/{index-C55GyDvp.js → index-BNtvoveb.js} +2 -2
- package/dist/{index-BLqnYCsi.js → index-BPmWhs0O.js} +2 -2
- package/dist/{index-pWdzgg-b.cjs → index-BQ5LLLCI.cjs} +1 -1
- package/dist/{index-BulgFj9c.cjs → index-BVPMO2zY.cjs} +1 -1
- package/dist/index-BX61i13K.cjs +11 -0
- package/dist/{index-BQEvzo4s.cjs → index-BeyHZLtG.cjs} +1 -1
- package/dist/{index-BFtGkyJf.js → index-BgV00fCC.js} +4963 -5011
- package/dist/{index-CFCn1Gpd.cjs → index-BjDreAqp.cjs} +1 -1
- package/dist/{index-nlfIt66y.cjs → index-BkmVU8a_.cjs} +1 -1
- package/dist/{index-BrLLsp39.js → index-BpPz543G.js} +2 -2
- package/dist/{index-0HSo1RHX.js → index-BsiDSvt3.js} +5 -5
- package/dist/{index-Cfzc5_ZK.js → index-BuZA4yzT.js} +4 -4
- package/dist/{index-CAD9KqHl.cjs → index-BvtucSN7.cjs} +1 -1
- package/dist/{index-BLeSUjbB.js → index-BwPcbO5s.js} +4 -4
- package/dist/{index-CVCJuzlD.cjs → index-C036vLtM.cjs} +1 -1
- package/dist/{index-DMfz6Qrm.js → index-C5PQL9cL.js} +2 -2
- package/dist/index-C5pQXH0_.cjs +11 -0
- package/dist/index-CPLj-52w.js +8139 -0
- package/dist/{index-C-iUVY59.js → index-CPg8HLR1.js} +22 -23
- package/dist/{index-BRyE_Lab.cjs → index-CRBCoILA.cjs} +1 -1
- package/dist/{index-DbFGGKSI.cjs → index-CUqebPpG.cjs} +1 -1
- package/dist/{index-CMdeEau9.js → index-CXaJ4hd1.js} +4 -4
- package/dist/{index-DJg5d7ei.cjs → index-CZfv7TSl.cjs} +1 -1
- package/dist/{index-u7JCx5KX.cjs → index-Cd0X7-qe.cjs} +1 -1
- package/dist/{index-B_kCqo4M.cjs → index-CjM4iX0P.cjs} +1 -1
- package/dist/{index-D03MbrNK.cjs → index-Ck3e5w1T.cjs} +1 -1
- package/dist/{index-C3gtImRs.js → index-CmS5GOiC.js} +2 -2
- package/dist/{index-B-A_4_n_.cjs → index-D0V8Wq5-.cjs} +1 -1
- package/dist/{index-Dysx8GkS.js → index-D0VCuSp4.js} +3 -3
- package/dist/{index-CI_UVQ4Z.js → index-D0aKEqnU.js} +4 -4
- package/dist/{index-jiFqoYN9.js → index-D1coeANk.js} +8 -8
- package/dist/{index-5dvr_F6Q.cjs → index-D7GkHVm4.cjs} +1 -1
- package/dist/{index-DhSdgyHz.cjs → index-D8DcUSsZ.cjs} +1 -1
- package/dist/{index-COyNONVE.js → index-D9hditHi.js} +11 -7
- package/dist/{index-DcqWejmU.cjs → index-DHdrBDP4.cjs} +1 -1
- package/dist/{index-B-nrai8J.cjs → index-DQUHH-Fm.cjs} +1 -1
- package/dist/{index-C5WqP8vL.cjs → index-DQWchc4Q.cjs} +1 -1
- package/dist/{index-IYg_iR8H.cjs → index-DRtwXN5G.cjs} +1 -1
- package/dist/{index-DxGZaHuy.js → index-DVdbO-ck.js} +6 -6
- package/dist/{index-DtJC43XK.cjs → index-DjJzpaj0.cjs} +1 -1
- package/dist/{index-CeXyg5Rl.cjs → index-Dlob1bxY.cjs} +1 -1
- package/dist/index-Dn8fWhFv.cjs +19 -0
- package/dist/{index-BkipVGFw.js → index-Dugr3nzy.js} +4 -4
- package/dist/{index-wv1wwLNX.cjs → index-Dx8_UO1H.cjs} +1 -1
- package/dist/{index-B5i-XCGU.js → index-Dyhg1YNv.js} +1 -1
- package/dist/{index-DPjDv9Ws.cjs → index-EzAyKU_n.cjs} +13 -13
- package/dist/{index-ChBgkXqb.js → index-G0nsjixB.js} +8 -8
- package/dist/{index-BYyFrGfX.js → index-JAXzKk2F.js} +1 -1
- package/dist/{index-jkHlUTog.js → index-K1n-pA4G.js} +2545 -2616
- package/dist/{index-vURW-4ky.js → index-PGQiH6e8.js} +12 -12
- package/dist/index-TvWbGp-2.cjs +1 -0
- package/dist/{index-sHmgudEg.js → index-XSETNP_T.js} +1 -1
- package/dist/{index-CW-lwsDk.cjs → index-Z0QzHXTu.cjs} +1 -1
- package/dist/{index--D0Thf0J.js → index-_YLcZ1t9.js} +1 -1
- package/dist/{index-BfOeLrc4.cjs → index-fwa9LBX5.cjs} +1 -1
- package/dist/{index-mdJtPr2-.js → index-q6nspJX5.js} +1 -1
- package/dist/index-sJ80M1T1.js +12857 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs → index.vue_vue_type_style_index_0_scoped_75a8935f_lang-Ceq-4YAl.cjs} +49 -49
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CU0erI7U.js → index.vue_vue_type_style_index_0_scoped_75a8935f_lang-DljCMBcU.js} +2076 -2071
- package/dist/{index.vue_vue_type_style_index_1_lang-CCQPqKHr.js → index.vue_vue_type_style_index_1_lang-CmNA8ulW.js} +5 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs → index.vue_vue_type_style_index_1_lang-qqb75Ddw.cjs} +1 -1
- package/dist/{isString-DhPkQDQg.cjs → isString-Cdf6R00a.cjs} +1 -1
- package/dist/{isString-Bn5VcA2n.js → isString-D4Yi9bDE.js} +1 -1
- package/dist/{main-j2YKSWX-.cjs → main-DFF2Ml9R.cjs} +3 -3
- package/dist/{main-BLk4Mfi1.js → main-u2k3TQrH.js} +4 -4
- package/dist/{menuIndex-D332F0dw.cjs → menuIndex-BVHXKOLk.cjs} +1 -1
- package/dist/{menuIndex-BJ1CSzli.js → menuIndex-BvSKgV5f.js} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +13 -13
- package/dist/{threeModel-v33sxEBl.js → threeModel-B04Pg2W0.js} +6 -6
- package/dist/{threeModel-C3N_ghfY.cjs → threeModel-Dk7qv8zl.cjs} +1 -1
- package/dist/{threePreview-Dif-1kRY.cjs → threePreview-BOYQbFek.cjs} +1 -1
- package/dist/{threePreview-DNw547cG.js → threePreview-DtTiTGwA.js} +5 -5
- package/dist/{threeSceneView-BkGy9bnz.js → threeSceneView-Cyz0VcYF.js} +11 -11
- package/dist/{threeSceneView-iXMcW_Z9.cjs → threeSceneView-zbf5qddT.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bjimwk9q.cjs → threeSceneViewForCPMPIP-k7hZw-es.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-qP-6IJzE.js → threeSceneViewForCPMPIP-t9KFm3E8.js} +9 -9
- package/dist/{threeTrackPathView-wK0hwn3B.js → threeTrackPathView-DKfc1ch-.js} +6 -6
- package/dist/{threeTrackPathView-Cqrx2pEK.cjs → threeTrackPathView-DcNa_KHp.cjs} +1 -1
- package/dist/{threeViewerHost-B2fHt8c2.js → threeViewerHost-BEk2aQE4.js} +3 -3
- package/dist/{threeViewerHost-RuZpxQGN.cjs → threeViewerHost-x6ut_8Rr.cjs} +1 -1
- package/dist/{urdfTree-i-8eGN0m.js → urdfTree-1CqRUMjW.js} +1 -1
- package/dist/{urdfTree-CnVw_qic.cjs → urdfTree-DB7SQ7Nk.cjs} +1 -1
- package/dist/{workpieceTreePanel-Cy1eCrLl.js → workpieceTreePanel-BV2LpHGy.js} +4 -4
- package/dist/{workpieceTreePanel-auNIy7t8.cjs → workpieceTreePanel-CdWOqLMh.cjs} +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-BGuyjj26.cjs +0 -1
- package/dist/index-CLTriF5O.cjs +0 -11
- package/dist/index-CSUpvfmH.js +0 -12750
- package/dist/index-CcJb2uXu.js +0 -8191
- package/dist/index-Dc6Q0f3F.cjs +0 -11
- package/dist/index-HCKkRTvn.cjs +0 -19
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const oa=require("./index-Dn8fWhFv.cjs"),e=require("vue"),C=require("./index-fwa9LBX5.cjs"),Nt=require("./index-EzAyKU_n.cjs"),ct=require("./index-C5pQXH0_.cjs"),Me=require("./index.vue_vue_type_style_index_0_scoped_75a8935f_lang-Ceq-4YAl.cjs"),Gt=require("./index-BvtucSN7.cjs"),No=require("./threeViewerHost-x6ut_8Rr.cjs");require("./index.vue_vue_type_style_index_1_lang-qqb75Ddw.cjs");const Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-Cdf6R00a.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-DRtwXN5G.cjs"),bl=require("./index-BVaHwt5f.cjs"),Hr=require("./index-BL_f9rch.cjs"),Ba=require("./index-TvWbGp-2.cjs"),qr=require("./index-BpPyaNFa.cjs"),Xr=require("vue-router"),wn=require("./index-9hspBVrQ.cjs"),Yr=require("./menuIndex-BVHXKOLk.cjs"),to=require("./index-D8DcUSsZ.cjs");var Gr=/\s/;function Jr(a){for(var r=a.length;r--&&Gr.test(a.charAt(r)););return r}var Zr=/^\s+/;function Qr(a){return a&&a.slice(0,Jr(a)+1).replace(Zr,"")}var Mo=NaN,ei=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ai=/^0o[0-7]+$/i,ni=parseInt;function zo(a){if(typeof a=="number")return a;if(ct.isSymbol(a))return Mo;if(ct.isObject(a)){var r=typeof a.valueOf=="function"?a.valueOf():a;a=ct.isObject(r)?r+"":r}if(typeof a!="string")return a===0?a:+a;a=Qr(a);var i=ti.test(a);return i||ai.test(a)?ni(a.slice(2),i?2:8):ei.test(a)?Mo:+a}var ao=function(){return ct.root.Date.now()},oi="Expected a function",li=Math.max,ri=Math.min;function kl(a,r,i){var l,c,s,y,h,p,m=0,D=!1,_=!1,N=!0;if(typeof a!="function")throw new TypeError(oi);r=zo(r)||0,ct.isObject(i)&&(D=!!i.leading,_="maxWait"in i,s=_?li(zo(i.maxWait)||0,r):s,N="trailing"in i?!!i.trailing:N);function j(S){var b=l,ce=c;return l=c=void 0,m=S,y=a.apply(ce,b),y}function B(S){return m=S,h=setTimeout(L,r),D?j(S):y}function Q(S){var b=S-p,ce=S-m,Ie=r-b;return _?ri(Ie,s-ce):Ie}function M(S){var b=S-p,ce=S-m;return p===void 0||b>=r||b<0||_&&ce>=s}function L(){var S=ao();if(M(S))return F(S);h=setTimeout(L,Q(S))}function F(S){return h=void 0,N&&l?j(S):(l=c=void 0,y)}function g(){h!==void 0&&clearTimeout(h),m=0,l=p=c=h=void 0}function T(){return h===void 0?y:F(ao())}function v(){var S=ao(),b=M(S);if(l=arguments,c=this,p=S,b){if(h===void 0)return B(p);if(_)return clearTimeout(h),h=setTimeout(L,r),j(p)}return h===void 0&&(h=setTimeout(L,r)),y}return v.cancel=g,v.flush=T,v}var ii="[object Boolean]";function xl(a){return a===!0||a===!1||ct.isObjectLike(a)&&ct.baseGetTag(a)==ii}function si(a){return a===void 0}const ci={class:"statistics-cards-container"},ui={class:"statistics-label"},di={class:"statistics-value"},pi=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:c},[e.createElementVNode("div",ui,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",di,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),fi=Pt._export_sfc(pi,[["__scopeId","data-v-f54ed8af"]]),hi={class:"static-form-card"},vi={key:0,class:"static-form-body"},mi={class:"static-form-label"},gi={class:"static-form-value"},yi={key:1},bi={key:1,class:"static-form-empty"},ki=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},compName:{default:""},title:{default:""}},setup(a){const r=a,i=c=>{switch(c){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},l=e.computed(()=>{var y;const c=(y=r.itemData)==null?void 0:y.find(h=>(h==null?void 0:h.key)==="formContent");return((c==null?void 0:c.contents)||[]).filter(h=>!(h!=null&&h.isFormColHidden)&&(h==null?void 0:h.label)).map(h=>{let p=h==null?void 0:h.value;Array.isArray(p)&&(p=p.map(N=>N==null?"":typeof N=="object"?N.label??N.value??N.name??JSON.stringify(N):String(N)).filter(Boolean).join(",")),p!=null&&typeof p=="object"&&(p=p.label??p.value??p.name??JSON.stringify(p));const m=h.label??"",D=p??"",_=m==="使用状态";return{label:m,value:D,isStatus:_,tagType:_?i(D):""}})});return(c,s)=>{const y=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",hi,[l.value.length?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"static-form-item"},[e.createElementVNode("div",mi,e.toDisplayString(h.label)+": ",1),e.createElementVNode("div",gi,[h.isStatus?(e.openBlock(),e.createBlock(y,{key:0,type:h.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",yi,e.toDisplayString(h.value??"-"),1))])]))),128))])):(e.openBlock(),e.createElementBlock("div",bi," 暂无数据 "))])}}}),wl=Pt._export_sfc(ki,[["__scopeId","data-v-d92a85c0"]]),xi={class:"form-content"},wi={title:"选择标签"},Di={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},_i={class:"col-operate-wrap"},Ei={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Ci={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:r}){const i=()=>{y.value=!1,h.value=!1,p.value=[]},l=a;e.computed(()=>{var Y;const K=(Y=z.value)==null?void 0:Y.split("/");return(K==null?void 0:K.some(we=>(we==null?void 0:we.includes("updateLoading"))||(we==null?void 0:we.includes("loading"))))?!1:P.value==="view"});const c=r,s=e.ref([]),y=e.ref(!1),h=e.ref(!1),p=e.ref([]),{getFileExtension:m}=No.useThreeSystem(),D=e.ref(),_=e.ref(!1),N=e.ref(!1),j=Me.useUnit(C.pinia),{chooseTitle:B}=C.storeToRefs(j),Q=e.ref([]),M=e.ref(),L=e.ref(!1),F=e.ref([]),g=oa.useFormToTableComp(C.pinia),T=oa.useFormComp(C.pinia),v=e.ref(!1),S=e.ref(),b=C.useLoginState(C.pinia),{loginUserInfo:ce}=C.storeToRefs(b),Ie=e.ref(),Qe=e.ref(!0),ke=C.useModelComp(C.pinia),{tableViewContents:Pe,itemData:Re,isEdit:P,routeToChildPath:U,lockingPage:G}=C.storeToRefs(ke),ie=e.ref(null),Ee=e.ref(!1),Ze=e.ref(!1),Z=C.useMenuState(),{activeMenuPath:z}=C.storeToRefs(Z),ue=Me.useOriginalState(C.pinia),{originalPath:be}=C.storeToRefs(ue),Ce=e.computed(()=>z.value==="设备管理/试验设备"&&l.compName==="设备概要"),Se=e.ref([]),qe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ee=async K=>{Ze.value=K,await J("disabled",null,K,!0)},ae=async K=>{await J("operable",null,K,!0)};e.watch(()=>z.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const w=()=>{e.nextTick(()=>{te()})},Ne=K=>{var H;s.value=(H=s.value)==null?void 0:H.map(Y=>({...Y,isFormColHidden:!(K!=null&&K.includes(Y.label))}))};e.onUnmounted(()=>{ie.value=null});const _e=K=>{c("clickTrigger",K)},ve=async K=>{var H,Y,we,me,q,he;if(K===""){let re="";(H=s.value)==null||H.forEach($=>{$!=null&&$.isMain&&(re=$==null?void 0:$.value)});let Ve=await Me.getItemData(U.value,sessionStorage.getItem("systemKey"),"");re=((he=(q=(me=(we=(Y=Ve==null?void 0:Ve[0])==null?void 0:Y.compData)==null?void 0:we.find($=>($==null?void 0:$.key)==="mainRouters"))==null?void 0:me.contents)==null?void 0:q[0])==null?void 0:he.routerContent)+be.value+re;let Be=await Me.getItemData(re,sessionStorage.getItem("systemKey"),"");L.value=!0,F.value=Be==null?void 0:Be.filter($=>($==null?void 0:$.comp)!=="methodButton"),c("routeUrl",F.value)}},te=()=>{var H;const K=(H=ie.value)==null?void 0:H.$el;K&&Me.Sortable.create(K,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Y=>{const{oldIndex:we,newIndex:me}=Y;if(we===me)return;const q=s.value.splice(we,1)[0];s.value.splice(me,0,q)}})},J=async(K,H,Y,we=!1)=>{try{ke.setRefreshCurStructure(!1)}catch{ct.ElMessage.error("编辑处理失败")}},se=async(K,H)=>{await J()},fe=async(K,H)=>{K&&await J()},Fe=async(K,H,Y)=>{await J(H,Y,K,!1)},dt=(K,H)=>{Ie.value===H?Qe.value=!1:Qe.value=!0,Ie.value=H==null?void 0:H.changeProp},k=async K=>{var Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge,We,st,Ge;let H=[];if((Y=K==null?void 0:K.toString())!=null&&Y.includes(".urdf")){if(K.includes(",")){ct.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:K,extension:m(K)}],h.value=!0,y.value=!0;return}if((we=K==null?void 0:K.toString())!=null&&we.includes(".stl")||(me=K==null?void 0:K.toString())!=null&&me.includes(".STL")||(q=K==null?void 0:K.toString())!=null&&q.includes(".obj")||(he=K==null?void 0:K.toString())!=null&&he.includes(".mtl")){const Ae=((re=K==null?void 0:K.toString())==null?void 0:re.split(",")).map(pt=>({url:pt,extension:m(pt)}));p.value=Ae,h.value=!1,y.value=!0;return}if((Ve=K==null?void 0:K.toString())!=null&&Ve.includes(".stl")||(pe=K==null?void 0:K.toString())!=null&&pe.includes(".STL")||(Be=K==null?void 0:K.toString())!=null&&Be.includes(".obj")||($=K==null?void 0:K.toString())!=null&&$.includes(".mtl")){let tt,Ae=[],pt={};if(Array.isArray(K)?tt=K:tt=K==null?void 0:K.split(","),tt==null||tt.forEach(Je=>{Je.includes(".mtl")?Ae.push(Je):pt.blob=pt.blob?pt.blob+","+Je:Je}),(Ae==null?void 0:Ae.length)>0&&(pt.mtlBlobs=Ae),(ge=(Oe=Object.values(pt))==null?void 0:Oe[0])!=null&&ge.includes("http:"))H.push(pt);else{const Je=new Blob([pt.blob],{type:"application/octet-stream;charset=UTF-8"});let Le=URL.createObjectURL(Je),rt="";(We=K==null?void 0:K.split("/"))==null||We.forEach((mt,wt)=>{var He;wt===((He=K==null?void 0:K.split("/"))==null?void 0:He.length)-1&&(rt=mt)}),(st=pt.blob)!=null&&st.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),M.value=[{name:rt,blobUrl:Le}],N.value=!0}}else{const tt=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ae=await ct.axios.get(K,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{tt.close()}),pt=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});let Je=URL.createObjectURL(pt),Le="";(Ge=K==null?void 0:K.split("/"))==null||Ge.forEach((rt,mt)=>{var wt;mt===((wt=K==null?void 0:K.split("/"))==null?void 0:wt.length)-1&&(Le=rt)}),M.value=[{name:Le,blobUrl:Je}],N.value=!0}(H==null?void 0:H.length)>0&&T.setBlobUrls(H)},A=()=>{N.value=!1},X=K=>{var q,he,re,Ve;const H=(he=(q=C.cloneDeep(l.itemData))==null?void 0:q.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:he.contents,Y=C.cloneDeep(K.content);let we={};Y&&((re=Object.values(Y))==null?void 0:re.length)>0&&((Ve=Object.values(Y))==null||Ve.forEach((pe,Be)=>{we[H[Be].key]=pe}));const me={content:we,index:l==null?void 0:l.index,buttonName:K==null?void 0:K.buttonName};c("change",me)},oe=e.computed(()=>"http://222.92.178.198:62001"),I=async K=>{var Oe,ge,We,st,Ge,tt,Ae,pt,Je,Le,rt,mt,wt,He,ot,yt;if(!K)return;(ge=(Oe=l==null?void 0:l.itemData)==null?void 0:Oe.find(je=>(je==null?void 0:je.key)==="parentFormPath"))==null||ge.contents;let H=Pe.value;(H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(je=>{var Ye,Te,O,ye;let Ke=(Ye=je==null?void 0:je.key)==null?void 0:Ye.split("/");return(l==null?void 0:l.compName)===(Ke==null?void 0:Ke[0])&&(Te=s.value)!=null&&Te.find(xe=>(xe==null?void 0:xe.prop)===(Ke==null?void 0:Ke[1]))&&(je.value=(ye=(O=s.value)==null?void 0:O.find(xe=>(xe==null?void 0:xe.prop)===(Ke==null?void 0:Ke[1])))==null?void 0:ye.value),je}),ke.setTableViewContents(H));const Y=C.cloneDeep(l.itemData);let we=Y==null?void 0:Y.map(je=>{var Ke;return(je==null?void 0:je.key)==="formContent"&&((Ke=je.contents)==null||Ke.map((Ye,Te)=>{var O,ye,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt,Rt,Kt,Ht,Jt,ta;return Ye.type=(ye=(O=s.value)==null?void 0:O.find(Ft=>(Ft==null?void 0:Ft.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:ye.type,Ye.options=Ye!=null&&Ye.options?Ye.options:((et=(at=(xe=Ye==null?void 0:Ye.key)==null?void 0:xe.split("$"))==null?void 0:at[1])==null?void 0:et.length)>0?(ft=(ut=oa.formGetOptions((_t=(Et=Ye==null?void 0:Ye.key)==null?void 0:Et.split("$"))==null?void 0:_t[1]))==null?void 0:ut.split(","))==null?void 0:ft.map(Ft=>({label:Ft,value:Ft})):[],(vt=Ye==null?void 0:Ye.key)!=null&&vt.includes("$")&&(Ye.key=(Lt=(gt=Ye==null?void 0:Ye.key)==null?void 0:gt.split("$"))==null?void 0:Lt[0]),Ye.signature=(zt=(bt=s.value)==null?void 0:bt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:zt.signature,Ye.isLoginUser=(Kt=(Rt=s.value)==null?void 0:Rt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:Kt.isLoginUser,Ye.value=(Ht=Object.values(K))==null?void 0:Ht[Te],Ye.isFormColHidden=(ta=(Jt=s.value)==null?void 0:Jt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:ta.isFormColHidden,Ye})),je}),me=s.value,q=(st=(We=C.cloneDeep(we))==null?void 0:We.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:st.contents;if(me=me==null?void 0:me.map(je=>{var Ke;return je.value=(Ke=q==null?void 0:q.find((Ye,Te)=>((Ye==null?void 0:Ye.id)??Te)===(je==null?void 0:je.id)))==null?void 0:Ke.value,je}),!Qe.value){c("contentChange",{contents:we,index:l.index});return}let he="",re=(Ae=(tt=(Ge=C.cloneDeep(we))==null?void 0:Ge.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ae.find((je,Ke)=>{var Ye,Te,O;return(je==null?void 0:je.label)===Ie.value||Ke.toString()===((O=(Te=(Ye=Ie.value)==null?void 0:Ye.split("t"))==null?void 0:Te[1])==null?void 0:O.toString())}),Ve=(pt=re==null?void 0:re.optionUrl)==null?void 0:pt.menuSelect,pe=!0;if((rt=(Le=(Je=C.cloneDeep(we))==null?void 0:Je.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:Le.contents)==null||rt.forEach(je=>{var Ke,Ye,Te,O,ye,xe;pe&&((Te=(Ye=(Ke=je==null?void 0:je.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:Ye[1])!=null&&Te.includes("["))&&(he=(ye=(O=je==null?void 0:je.optionUrl)==null?void 0:O.groupSelect)==null?void 0:ye[1],JSON.stringify(Ve)===JSON.stringify((xe=je==null?void 0:je.optionUrl)==null?void 0:xe.menuSelect)&&(pe=!1))}),(mt=re==null?void 0:re.optionUrl)!=null&&mt.menuSelect&&Qe.value){let je=await oa.getSelectRow(re),Ke,Ye=(wt=re==null?void 0:re.optionUrl)==null?void 0:wt.menuSelect;if(je==null||je.forEach(Te=>{var O,ye,xe,at,et,Et,_t,ut,ft,vt;he===((ye=(O=re==null?void 0:re.optionUrl)==null?void 0:O.groupSelect)==null?void 0:ye[1])&&((et=(at=(xe=re==null?void 0:re.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:at[1])!=null&&et.includes("["))&&((vt=C.cloneDeep(Te))==null?void 0:vt[(ft=(ut=(_t=(Et=re==null?void 0:re.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:_t[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:ft.replaceAll("]","")])===(re==null?void 0:re.value)&&(Ke=Te)}),Ke){let Te=C.cloneDeep(me);Te=Te==null?void 0:Te.map(ye=>{var xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt;return(Ke!=null&&Ke[ye==null?void 0:ye.label]||Ke!=null&&Ke[(Et=(et=(at=(xe=ye==null?void 0:ye.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:at[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Et.replaceAll("]","")])&&((ft=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.groupSelect)==null?void 0:ut[1])!=null&&ft.includes("["))&&Ye!=null&&Ye.every(zt=>{var Rt,Kt;return(Kt=(Rt=ye==null?void 0:ye.optionUrl)==null?void 0:Rt.menuSelect)==null?void 0:Kt.includes(zt)})&&(ye.value=(Ke==null?void 0:Ke[ye==null?void 0:ye.label])||(Ke==null?void 0:Ke[(bt=(Lt=(gt=(vt=ye==null?void 0:ye.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:gt[1])==null?void 0:Lt.replaceAll("[",""))==null?void 0:bt.replaceAll("]","")]),Array.isArray(ye.value)&&ye.value.every(zt=>(zt==null?void 0:zt.url)&&(zt==null?void 0:zt.name))&&(ye.type="Upload")),ye}),Te=Te==null?void 0:Te.map(ye=>{var xe,at,et;return(xe=ye==null?void 0:ye.optionUrl)!=null&&xe.oldMenuSelect&&(ye.optionUrl.menuSelect=(et=(at=C.cloneDeep(ye))==null?void 0:at.optionUrl)==null?void 0:et.oldMenuSelect),ye}),s.value=C.cloneDeep(Te);let O=C.cloneDeep(Te);O=O==null?void 0:O.map(ye=>{var xe,at,et,Et,_t,ut;return(at=(xe=ye==null?void 0:ye.optionUrl)==null?void 0:xe.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))&&(ye.optionUrl.oldMenuSelect=(Et=(et=C.cloneDeep(ye))==null?void 0:et.optionUrl)==null?void 0:Et.menuSelect,ye.optionUrl.menuSelect=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:ut.map(ft=>{var vt,gt,Lt,bt;if(ft!=null&&ft.includes("[")){let zt=(gt=(vt=ft==null?void 0:ft.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:gt[1];ft=(bt=(Lt=C.cloneDeep(Te))==null?void 0:Lt.find(Rt=>(Rt==null?void 0:Rt.label)===zt))==null?void 0:bt.value}return ft})),ye}),s.value=O}else s.value=me;we=we==null?void 0:we.map(Te=>{var O;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(O=Te.contents)==null?void 0:O.map(ye=>{var xe,at,et,Et;return ye.value=((at=(xe=s.value)==null?void 0:xe.find(_t=>(_t==null?void 0:_t.label)===(ye==null?void 0:ye.key)))==null?void 0:at.value)??(ye==null?void 0:ye.value),ye.type=((Et=(et=s.value)==null?void 0:et.find(_t=>(_t==null?void 0:_t.prop)===(ye==null?void 0:ye.key)))==null?void 0:Et.type)??(ye==null?void 0:ye.type),ye})),Te})}Qe.value=!1,c("contentChange",{contents:we,index:l.index});let Be=[],$=[];if((ot=C.cloneDeep((He=we==null?void 0:we.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:He.contents))==null||ot.forEach(je=>{var Ke;Array.isArray(je==null?void 0:je.value)&&((Ke=je==null?void 0:je.value)!=null&&Ke.find(Ye=>{var Te;return(Te=Ye==null?void 0:Ye.url)==null?void 0:Te.includes(".obj")}))&&($=je==null?void 0:je.value)}),($==null?void 0:$.length)>0){const je=(yt=C.cloneDeep($))==null?void 0:yt.filter(Ke=>{var Ye;return(Ye=Ke==null?void 0:Ke.url)==null?void 0:Ye.includes(".obj")});je==null||je.forEach(Ke=>{var Te,O,ye,xe;const Ye=(Te=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Te.map(at=>at==null?void 0:at.url);Be.push({objUrl:Ke==null?void 0:Ke.url,mtlUrls:((O=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:O.length)===1?(xe=(ye=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ye[0])==null?void 0:xe.url:Ye})}),T.setObjUrl(Be)}},de=K=>{if(!K)return;const H=[];let Y="";for(let we of K)(we.includes("[")||Y.includes("["))&&(Y+=we.trim(),C.cloneDeep(Y).split("【").length-1===C.cloneDeep(Y).split("】").length-1&&C.cloneDeep(Y).split("[").length-1===C.cloneDeep(Y).split("]").length-1&&(H.push(Y.replace(/\/\*[\s\S]*?\*\//g,"")),Y=""));return H},ze=(K,H,Y)=>{let we="";const me=H==null?void 0:H.map(q=>{var he;return(he=q==null?void 0:q.value)==null?void 0:he.pageData});return me==null||me.forEach(q=>{var he;(q==null?void 0:q.name)===(K==null?void 0:K[0])&&((he=q==null?void 0:q.compData)==null||he.forEach(re=>{var Ve;(re==null?void 0:re.key)==="formContent"&&((Ve=re==null?void 0:re.contents)==null||Ve.forEach(pe=>{var Be;(pe==null?void 0:pe.prop)===(K==null?void 0:K[1])&&(we=(pe==null?void 0:pe.value)===""?Me.judgeContents((Be=C.cloneDeep(pe))==null?void 0:Be.optionUrl,Y):pe==null?void 0:pe.value)}))}))}),we},le=(K,H,Y,we)=>{var re,Ve;let me="",q="";(re=C.cloneDeep(H))==null||re.forEach((pe,Be)=>{pe!=null&&pe.includes("[")?q=q+be.value+K[Be]:q=q===""?q+pe:q+"/"+pe});let he=(Ve=we[q])==null?void 0:Ve.map(pe=>{var Be;return(Be=pe==null?void 0:pe.value)==null?void 0:Be.pageData});return he==null||he.forEach(pe=>{var Be;(pe==null?void 0:pe.name)===(Y==null?void 0:Y[0])&&((Be=pe==null?void 0:pe.compData)==null||Be.forEach($=>{var Oe;($==null?void 0:$.key)==="formContent"&&((Oe=$==null?void 0:$.contents)==null||Oe.forEach(ge=>{(ge==null?void 0:ge.prop)===(Y==null?void 0:Y[1])&&(me=ge==null?void 0:ge.value)}))}))}),me};return e.watch(()=>l.itemData,async()=>{var he,re,Ve,pe,Be,$,Oe,ge,We,st,Ge,tt,Ae,pt,Je,Le,rt,mt,wt;const K=(he=l.itemData)==null?void 0:he.find(He=>(He==null?void 0:He.key)==="formContent"),H=(re=C.cloneDeep(l.itemData))==null?void 0:re.find(He=>(He==null?void 0:He.key)==="formButton"),Y=(Ve=C.cloneDeep(l.itemData))==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="formFlex"),we=(pe=C.cloneDeep(l.itemData))==null?void 0:pe.find(He=>(He==null?void 0:He.key)==="formWrap"),me=(Be=C.cloneDeep(l.itemData))==null?void 0:Be.find(He=>(He==null?void 0:He.key)==="enableWrap");if((we==null?void 0:we.contents)==="纵向"?_.value=!1:_.value=!0,v.value=(me==null?void 0:me.contents)===void 0?!1:me==null?void 0:me.contents,S.value=typeof(Y==null?void 0:Y.contents)!="boolean"?!(!(Y!=null&&Y.contents)===""||(($=Y==null?void 0:Y.contents)==null?void 0:$.toUpperCase())==="VERTICAL"):Y==null?void 0:Y.contents,((Oe=K==null?void 0:K.contents)==null?void 0:Oe.length)>0&&Array.isArray(K==null?void 0:K.contents)){let He=l.allMapContents;const ot=(We=(ge=C.cloneDeep(K))==null?void 0:ge.contents)==null?void 0:We.map((O,ye)=>{var zt,Rt,Kt,Ht,Jt,ta,Ft,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma;let xe=(O==null?void 0:O.label)??(O==null?void 0:O.key)??"",at=(O==null?void 0:O.type)??"",et=(O==null?void 0:O.options)??[];if((zt=O==null?void 0:O.key)!=null&&zt.includes("$")&&(xe=(Rt=C.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Rt[0],((Ht=(Kt=C.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Kt[1])==null?void 0:Ht.length)>0)){const[Ct,aa]=(ta=(Jt=C.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Jt[1])==null?void 0:ta.split(/[()]/);at=((Ft=Me.FormType.find(nt=>(nt==null?void 0:nt.key)===Ct))==null?void 0:Ft.value)??"",((Fa=aa==null?void 0:aa.split(","))==null?void 0:Fa.length)>0&&(et=(wa=aa==null?void 0:aa.split(","))==null?void 0:wa.map(nt=>({label:nt,value:nt})))}let Et=[];O!=null&&O.contents&&!Array.isArray(O==null?void 0:O.contents)&&(Et=(Da=(ja=O==null?void 0:O.contents)==null?void 0:ja.split(","))==null?void 0:Da.map(Ct=>({label:Ct,value:Ct}))),((Ua=O==null?void 0:O.optionUrl)==null?void 0:Ua.selectRelateType)==="自定义绑定"&&(Et=(Wa=(Ka=O==null?void 0:O.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Wa.map(Ct=>({label:Ct,value:Ct})));let _t=!1,ut=(O==null?void 0:O.isFormColHidden)??!1,ft=Me.judgeContents((Ha=C.cloneDeep(O))==null?void 0:Ha.optionUrl,He),vt=ft!==void 0&&ft!==""?ft:O!=null&&O.originalContent&&(O==null?void 0:O.originalContent)!==""?O.originalContent:O!=null&&O.value?O.value:(et==null?void 0:et.length)>0?(qa=et==null?void 0:et[0])==null?void 0:qa.value:(O==null?void 0:O.value)??"",gt=!1,Lt=ft!==void 0||at===""?"Input":at;if((Array.isArray(ft)&&(ft!=null&&ft.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&(Lt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||O!=null&&O.isLoginUser)_t=!0,vt=((Na=ce.value)==null?void 0:Na.姓名)||((ya=ce.value)==null?void 0:ya.account)||((fa=ce.value)==null?void 0:fa.账号)||((_a=ce.value)==null?void 0:_a.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||O!=null&&O.signature||O!=null&&O.isShow)if(gt=!0,(O==null?void 0:O.isShow)==="originalSignature")Lt="image",vt=oe.value+"/"+((ba=ce.value)==null?void 0:ba.signature);else{let Ct=[...new Set(de(O.isShow))].map(St=>{var It,Mt,$t,At;return{key:(At=($t=(Mt=(It=St==null?void 0:St.split("["))==null?void 0:It[1])==null?void 0:Mt.split("]"))==null?void 0:$t[0])==null?void 0:At.split(":"),value:""}});(ca=Re.value)==null||ca.forEach(St=>{Ct==null||Ct.forEach((Dt,It)=>{var $t;let Mt=Dt==null?void 0:Dt.key;(St==null?void 0:St.name)===(Mt==null?void 0:Mt[0].replaceAll("'",""))&&(($t=St==null?void 0:St.compData)==null||$t.forEach(At=>{var na;(At==null?void 0:At.key)==="formContent"&&((na=At==null?void 0:At.contents)==null||na.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Mt==null?void 0:Mt[1].replaceAll("'",""))&&(Ct[It].value=Yt==null?void 0:Yt.value)}))}))})});let aa=Ct==null?void 0:Ct.map(St=>{var Dt;return St.key="["+((Dt=St.key)==null?void 0:Dt.join(":"))+"]",St}),nt=O==null?void 0:O.isShow;aa==null||aa.forEach(St=>{St!=null&&St.value?nt=nt.replaceAll(St==null?void 0:St.key,"'"+(St==null?void 0:St.value)+"'"):nt=nt.replaceAll(St==null?void 0:St.key,"undefined")}),nt!=null&&nt.includes("(")||(nt!=null&&nt.includes("==")?nt=((ma=nt==null?void 0:nt.split("==="))==null?void 0:ma[0])+"==='"+((Xa=nt==null?void 0:nt.split("==="))==null?void 0:Xa[1])+"'":nt=((Aa=nt==null?void 0:nt.split("="))==null?void 0:Aa[0])+"='"+((Va=nt==null?void 0:nt.split("="))==null?void 0:Va[1])+"'"),nt!=null&&nt.includes("=")&&!(nt!=null&&nt.includes("=="))&&!(nt!=null&&nt.includes("==="))&&(nt=nt==null?void 0:nt.replaceAll("=","==")),new Function(`if (${nt}) { return true } else { return false }`)()?(ut=!1,Lt="image",vt=oe.value+"/"+((Ea=ce.value)==null?void 0:Ea.signature)):vt=""}return Array.isArray(vt)&&vt.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(O.type="Upload"),O!=null&&O.isMainUrl&&(Lt="Url"),{label:xe??"",name:"t"+ye,prop:C.cloneDeep(O==null?void 0:O.key),type:Lt,value:O!=null&&O.isSync?((Ga=(Ya=B.value)==null?void 0:Ya[0])==null?void 0:Ga.value)??((Ma=(Oa=z==null?void 0:z.value)==null?void 0:Oa.split("/"))==null?void 0:Ma[((Za=(Ja=z==null?void 0:z.value)==null?void 0:Ja.split("/"))==null?void 0:Za.length)-1]):O!=null&&O.isNewDate&&vt===""?new Date:vt,id:(O==null?void 0:O.id)??ye,contents:(Et==null?void 0:Et.length)>0?Et:et??[],width:(O==null?void 0:O.width)??1,isLoginUser:_t,config:O==null?void 0:O.config,optionUrl:(O==null?void 0:O.optionUrl)??O,isFormColHidden:ut,signature:gt,isMain:O==null?void 0:O.isMain,isMainUrl:O==null?void 0:O.isMainUrl,operable:(O==null?void 0:O.operable)??!1,disabled:(O==null?void 0:O.disabled)??!1,isSync:O==null?void 0:O.isSync}}),yt=ot==null?void 0:ot.map(O=>O==null?void 0:O.value);let je="";yt==null||yt.forEach(O=>{O!==""&&O!==void 0&&(je=je===""?O:je+"/"+O)}),g.setSelectArray(yt),g.setSelectString(je);let Ke=(st=C.cloneDeep(ot))==null?void 0:st.map(O=>(O!=null&&O.value&&Me.IsJson(O==null?void 0:O.value)&&Array.isArray(JSON.parse(O==null?void 0:O.value))&&(O.value=JSON.parse(O.value)),O));Ke=Ke==null?void 0:Ke.map(O=>{var ye,xe,at,et,Et,_t,ut,ft;if((xe=(ye=O==null?void 0:O.optionUrl)==null?void 0:ye.menuSelect)!=null&&xe.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";O.optionUrl.oldMenuSelect=(et=(at=C.cloneDeep(O))==null?void 0:at.optionUrl)==null?void 0:et.menuSelect,O.optionUrl.menuSelect=(_t=(Et=O==null?void 0:O.optionUrl)==null?void 0:Et.menuSelect)==null?void 0:_t.map(gt=>{var Lt,bt,zt,Rt,Kt,Ht;if(gt!=null&>.includes("[")){let Jt=(bt=(Lt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Lt.split(":"))==null?void 0:bt[1];vt=ze((zt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:zt.split(":"),He==null?void 0:He[z.value],He),gt=((Kt=(Rt=C.cloneDeep(Ke))==null?void 0:Rt.find(ta=>(ta==null?void 0:ta.label)===Jt))==null?void 0:Kt.value)||ze((Ht=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),He==null?void 0:He[z.value],He)}return gt}),vt!==""&&O.value===""&&(O.value=le(O.optionUrl.menuSelect,O.optionUrl.oldMenuSelect,(ut=O==null?void 0:O.optionUrl)==null?void 0:ut.groupSelect,He),Array.isArray(O.value)&&((ft=O.value)!=null&&ft.every(gt=>gt==null?void 0:gt.url))&&(O.type="UPLOAD"))}return O}),s.value=Ke,Ze.value=((Ge=s.value)==null?void 0:Ge.every(O=>O==null?void 0:O.disabled))||G.value===z.value,Ee.value=(tt=s.value)==null?void 0:tt.every(O=>O==null?void 0:O.operable),Se.value=(Ae=s.value)==null?void 0:Ae.map(O=>O==null?void 0:O.label);let Ye=[],Te=[];if((pt=C.cloneDeep(s.value))==null||pt.forEach(O=>{var ye;Array.isArray(O==null?void 0:O.value)&&((ye=O==null?void 0:O.value)!=null&&ye.find(xe=>{var at;return(at=xe==null?void 0:xe.url)==null?void 0:at.includes(".obj")}))&&(Te=O==null?void 0:O.value)}),(Te==null?void 0:Te.length)>0){const O=(Je=C.cloneDeep(Te))==null?void 0:Je.filter(ye=>{var xe;return(xe=ye==null?void 0:ye.url)==null?void 0:xe.includes(".obj")});O==null||O.forEach(ye=>{var at,et,Et,_t;const xe=(at=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:at.map(ut=>ut==null?void 0:ut.url);Ye.push({objUrl:ye==null?void 0:ye.url,mtlUrls:((et=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:et.length)===1?(_t=(Et=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Et[0])==null?void 0:_t.url:xe})}),T.setObjUrl(Ye)}(Le=C.cloneDeep(s.value))==null||Le.forEach(O=>{var ye,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt;if((xe=(ye=O==null?void 0:O.value)==null?void 0:ye.toString())!=null&&xe.includes(".stl")||(et=(at=O==null?void 0:O.value)==null?void 0:at.toString())!=null&&et.includes(".STL")||(_t=(Et=O==null?void 0:O.value)==null?void 0:Et.toString())!=null&&_t.includes(".obj")||(ft=(ut=O==null?void 0:O.value)==null?void 0:ut.toString())!=null&&ft.includes(".mtl")||(gt=(vt=O==null?void 0:O.value)==null?void 0:vt.toString())!=null&>.includes(".urdf")){let Rt={},Kt=[],Ht;Array.isArray(O==null?void 0:O.value)?Ht=O==null?void 0:O.value:Ht=(Lt=O==null?void 0:O.value)==null?void 0:Lt.split(","),Ht==null||Ht.forEach(Jt=>{Jt.includes(".mtl")?Kt.push(Jt):Rt.blob=Rt.blob==="undefined"?Jt:Rt.blob+","+Jt}),(Kt==null?void 0:Kt.length)>0&&(Rt.mtlBlobs=Kt),(zt=(bt=Object.values(Rt))==null?void 0:bt[0])!=null&&zt.includes("http:")}})}else s.value=[];let q=Pe.value;if((q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(He=>{var yt,je,Ke,Ye;let ot=(yt=He==null?void 0:He.key)==null?void 0:yt.split("/");return(l==null?void 0:l.compName)===(ot==null?void 0:ot[0])&&(je=s.value)!=null&&je.find(Te=>(Te==null?void 0:Te.prop)===(ot==null?void 0:ot[1]))&&(He.value=(Ye=(Ke=s.value)==null?void 0:Ke.find(Te=>(Te==null?void 0:Te.prop)===(ot==null?void 0:ot[1])))==null?void 0:Ye.value),He}),ke.setTableViewContents(q)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let He={};(rt=C.cloneDeep(s).value)==null||rt.forEach(ot=>{(ot==null?void 0:ot.isMain)===!0&&(He[(ot==null?void 0:ot.prop)??(ot==null?void 0:ot.name)]=[{required:!0,message:`${(ot==null?void 0:ot.prop)||(ot==null?void 0:ot.name)}不能为空`}])}),D.value=He}if(((mt=H==null?void 0:H.contents)==null?void 0:mt.length)>0){const He=[];(wt=H==null?void 0:H.contents)==null||wt.forEach((ot,yt)=>{(ot==null?void 0:ot.label)!==""&&He.push({label:(ot==null?void 0:ot.label)??"",id:(ot==null?void 0:ot.id)??yt,type:(ot==null?void 0:ot.type)??"",background:ot==null?void 0:ot.background})}),Q.value=He}else Q.value=[]},{deep:!0,immediate:!0}),e.watch(()=>G.value,K=>{Ze.value=K===z.value},{immediate:!0}),(K,H)=>{var re,Ve;const Y=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-switch"),me=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-popover"),he=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xi,[v.value===!1?(e.openBlock(),e.createBlock(fi,{key:0,items:(Ve=(re=s.value)==null?void 0:re.filter(pe=>!(pe!=null&&pe.isFormColHidden)))==null?void 0:Ve.map(pe=>({label:pe==null?void 0:pe.label,value:pe==null?void 0:pe.value}))},null,8,["items"])):Ce.value?(e.openBlock(),e.createBlock(wl,{key:1,itemData:a.itemData,compName:a.compName},null,8,["itemData","compName"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":v.value})},[e.createVNode(Nt.ssForm,{rowContents:s.value,formRules:D.value,buttonValue:Q.value,isRowFlex:!1,isEnableWrap:v.value,onOnButtonClick:X,onChange:I,formDisabled:Ze.value,formLabelsOperable:Ee.value,isButtonRow:_.value,onPreview:k,onBlurChange:dt,onHandleColEditChange:se,onHandleColTypeChange:fe,onRouteUrl:ve,onClickTrigger:_e},{operateCol:e.withCtx(({renderColumns:pe,formDisabled:Be,formLabelsOperable:$})=>[e.createVNode(q,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:w},{reference:e.withCtx(()=>[e.createElementVNode("span",wi,[e.createVNode(Y,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Di,[H[1]||(H[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(we,{"model-value":Be,"active-text":"禁用","inactive-text":"",onChange:ee,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(we,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:ae},null,8,["model-value"]),H[2]||(H[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(he,{modelValue:Se.value,"onUpdate:modelValue":H[0]||(H[0]=Oe=>Se.value=Oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ie,onChange:Ne},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe,Oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oe.label},[e.createVNode(me,{value:Oe.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Oe.label),1)]),_:2},1032,["value"]),e.createVNode(q,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(Y,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ge;return[e.createElementVNode("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=Object.keys(Oe))==null?void 0:ge.filter(We=>{var st;return(st=qe.value)==null?void 0:st.find(Ge=>(Ge==null?void 0:Ge.value)===We)}),We=>{var st,Ge;return e.openBlock(),e.createElementBlock("div",{key:We},[e.createVNode(Nt._sfc_main$1,{value:Oe==null?void 0:Oe[We],"active-text":(Ge=(st=qe.value)==null?void 0:st.find(tt=>(tt==null?void 0:tt.value)===We))==null?void 0:Ge.label,inactiveText:"",onChange:tt=>Fe(tt,We,Oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ei,[e.createVNode(Y,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"])],2)),N.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:3,fileDataList:M.value,onDestroy:A},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:4,visible:y.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:p.value,onGetAnimationData:K.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ro=Pt._export_sfc(Ci,[["__scopeId","data-v-354b0fba"]]),Fn=e.ref(0),Dl=a=>{var r;return!a||(a==null?void 0:a.length)===0?[]:(r=C.cloneDeep(a))==null?void 0:r.map(l=>(Fn.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Fn.value,children:Dl(l==null?void 0:l.children)},l))},Si=a=>{var i;return(i=C.cloneDeep(a))==null?void 0:i.map(l=>(Fn.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Fn.value,children:Dl(l==null?void 0:l.children)},l))},_l=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===r)?(i=C.cloneDeep(a))==null?void 0:i.filter(c=>(c==null?void 0:c.id)!==r):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,r),l)),a)},El=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=C.cloneDeep(a))==null?void 0:i.map(c=>((c==null?void 0:c.id)===(r==null?void 0:r.id)&&(c=r),c)):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,r),l)),a)},Cl=(a,r)=>{var i;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)})?(i=C.cloneDeep(a))==null?void 0:i.map(c=>{var s;return(c==null?void 0:c.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)&&(c=r==null?void 0:r.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,r),l)),a)},Sl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=C.cloneDeep(a))==null?void 0:i.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)):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,r),l)),a)},Ot=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],Ti=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Bi=[{label:"新增",value:"add"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Bi},{key:"background",label:"按钮背景色",type:"Color"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ti},{key:"textColor",label:"按钮颜色",type:"Color"}],Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,c=e.ref(!1),s=e.ref(""),y=Me.useTableComp(C.pinia),{tableIndex:h}=C.storeToRefs(y);e.ref(0);const p=e.ref(""),m=e.ref([]),D=e.ref([]),_=g=>{var v;c.value=!0;let T=[];Ot==null||Ot.forEach(S=>{let b=C.cloneDeep(h.value)+1;y.setTableIndex(b),T.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:g[S.key],id:h.value,contents:S==null?void 0:S.options})}),g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0&&T.push({children:g==null?void 0:g.children,isFormColHidden:!0}),p.value=g==null?void 0:g.id,m.value=T,D.value=T},N=g=>{l("fixChange",C.cloneDeep(g))},j=g=>{l("deleteChange",C.cloneDeep(g))},B=g=>{c.value=!0;let T=[];Ot==null||Ot.forEach(v=>{let S=C.cloneDeep(h.value)+1;y.setTableIndex(S),T.push({label:v==null?void 0:v.label,name:v==null?void 0:v.label,type:v.type,value:"",id:h.value,contents:v==null?void 0:v.options})}),s.value=g==null?void 0:g.id,m.value=T,D.value=T},Q=g=>{let T=C.cloneDeep(D.value);T=T==null?void 0:T.map(v=>(v.children||(v.value=g==null?void 0:g[v.name]),v)),D.value=T},M=()=>{var T,v;m.value=D.value;let g={};if(p.value!=="")g.id=p.value,(T=m.value)==null||T.forEach(S=>{const b=Ot==null?void 0:Ot.find(ce=>(ce==null?void 0:ce.label)===(S==null?void 0:S.label));b?g[b.key]=S.value:S!=null&&S.children&&S.children.length>0&&(g.children=S.children)}),c.value=!1,l("fixChange",{contents:C.cloneDeep(g),id:s.value,type:"fix"});else{let S=C.cloneDeep(h.value)+1;y.setTableIndex(S),g.id="id"+h.value,(v=m.value)==null||v.forEach(b=>{const ce=Ot==null?void 0:Ot.find(Ie=>(Ie==null?void 0:Ie.label)===(b==null?void 0:b.label));ce?g[ce.key]=b.value:b!=null&&b.children&&b.children.length>0&&(g.children=b.children)}),c.value=!1,l("fixChange",{contents:C.cloneDeep(g),id:s.value,type:"add"})}p.value="",m.value=[],D.value=[]},L=()=>{c.value=!1,p.value="",s.value="",m.value=[],D.value=[]},F=g=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",g),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(g,T)=>{const v=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(S,b)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(S.label),1),e.createElementVNode("div",Oi,[e.createVNode(v,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>B(S)},null,8,["onClick"]),e.createVNode(v,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>_(S)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>F(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Tl,{tableChildContents:S==null?void 0:S.children,onDeleteChange:j,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:L,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:M},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pi=Pt._export_sfc(Ri,[["__scopeId","data-v-e0fef72d"]]),Li={class:"table-header-child"},$i={class:"table-header-child-main"},Fi={class:"table-header-child-content"},ji={class:"table-header-child-content-item"},Ui={class:"fix-button"},Ki={key:0},Wi={class:"form-content"},Hi={class:"dialog-footer"},qi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,c=e.ref(!1),s=e.ref(""),y=Me.useTableComp(C.pinia),{tableIndex:h}=C.storeToRefs(y),p=e.ref(""),m=e.ref([]),D=e.ref([]),_=g=>{l("fixChange",C.cloneDeep(g))},N=g=>{var v;c.value=!0;let T=[];Ot==null||Ot.forEach(S=>{let b=C.cloneDeep(h.value)+1;y.setTableIndex(b),T.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:g[S.key],id:h.value,contents:S==null?void 0:S.options})}),g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0&&T.push({children:g==null?void 0:g.children,isFormColHidden:!0}),p.value=g==null?void 0:g.id,m.value=T,D.value=T},j=g=>{c.value=!0;let T=[];Ot==null||Ot.forEach(v=>{let S=C.cloneDeep(h.value)+1;y.setTableIndex(S),T.push({label:v==null?void 0:v.label,name:v==null?void 0:v.label,type:v.type,value:"",id:h.value,contents:v==null?void 0:v.options})}),s.value=g==null?void 0:g.id,m.value=T,D.value=T},B=g=>{let T=C.cloneDeep(D.value);T=T==null?void 0:T.map(v=>(v.children||(v.value=g==null?void 0:g[v.name]),v)),D.value=T},Q=()=>{var T,v;m.value=D.value;let g={};if(p.value!=="")g.id=p.value,(T=m.value)==null||T.forEach(S=>{const b=Ot==null?void 0:Ot.find(ce=>(ce==null?void 0:ce.label)===(S==null?void 0:S.label));b?g[b.key]=S.value:S!=null&&S.children&&S.children.length>0&&(g.children=S.children)}),c.value=!1,l("fixChange",{contents:C.cloneDeep(g),id:s.value,type:"fix"});else{let S=C.cloneDeep(h.value)+1;y.setTableIndex(S),g.id="idChild"+h.value,(v=m.value)==null||v.forEach(b=>{const ce=Ot==null?void 0:Ot.find(Ie=>(Ie==null?void 0:Ie.label)===(b==null?void 0:b.label));ce?g[ce.key]=b.value:b!=null&&b.children&&b.children.length>0&&(g.children=b.children)}),c.value=!1,l("fixChange",{contents:C.cloneDeep(g),id:s.value,type:"add"})}p.value="",m.value=[],D.value=[]},M=()=>{c.value=!1,p.value="",s.value="",m.value=[],D.value=[]},L=g=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",g),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=g=>{l("deleteChange",g)};return(g,T)=>{const v=e.resolveComponent("svg-icon"),S=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(b,ce)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("div",Fi,[e.createElementVNode("div",ji,e.toDisplayString(b.label),1),e.createElementVNode("div",Ui,[e.createVNode(v,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ie=>j(b)},null,8,["onClick"]),e.createVNode(v,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ie=>N(b)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ie=>L(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",Ki,[e.createVNode(Pi,{tableChildContents:b==null?void 0:b.children,onDeleteChange:F,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:M,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(S,{onClick:M,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>T[0]||(T[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(S,{class:"ok-button button",onClick:Q,id:"themeButton"},{default:e.withCtx(()=>T[1]||(T[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Pt._export_sfc(qi,[["__scopeId","data-v-ebd68fa1"]]),Xi={class:"table-operate-content"},Yi={class:"table-operate-item"},Gi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={key:0},as={class:"operate-title"},ns={class:"operate-content"},os={class:"fix-content"},ls={class:"fix-content-label"},rs={class:"fix-button"},is={class:"operate-title"},ss={class:"operate-content"},cs={class:"fix-content"},us={class:"fix-content-label"},ds={class:"fix-button"},ps={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-content-label"},ms={class:"fix-button"},gs={class:"operate-content"},ys={style:{display:"flex","justify-content":"space-between"}},bs={class:"form-content"},ks={class:"dialog-footer"},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},_s={class:"dialog-footer"},Es={class:"form-content"},Cs={class:"dialog-footer"},Ss={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.ref([]),s=e.ref(!1),y=e.ref(!1),h=e.ref([]),p=e.ref(!1),m=e.ref([]),D=e.ref(!1),_=e.ref([]),N=e.ref(""),j=e.ref(""),B=e.ref([]),Q=e.ref([]),M=e.ref([]),L=e.ref([]),F=e.ref(!1),g=e.ref([]),T=e.ref([]),v=e.ref(0),S=e.ref([]),b=e.ref([]),ce=e.ref([]),Ie=()=>{F.value=!0;let k=[];Sa==null||Sa.forEach(A=>{v.value++,k.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:(A==null?void 0:A.key)==="background"?"var(--ssComponent-primary-color)":"",id:v.value,contents:A==null?void 0:A.options})}),g.value=k,T.value=k},Qe=()=>{var A,X,oe;y.value=!0;let k=[];(oe=(X=(A=Me.FormContent)==null?void 0:A.find(I=>(I==null?void 0:I.key)==="Input"))==null?void 0:X.value)==null||oe.forEach(I=>{v.value++,k.push({label:I==null?void 0:I.label,name:(I==null?void 0:I.name)||(I==null?void 0:I.label),type:I.type,value:(I==null?void 0:I.label)==="类型"?"Input":"",id:v.value,contents:I==null?void 0:I.options})}),S.value=k,b.value=k},ke=k=>{k||(S.value=b.value)},Pe=async k=>{var A,X,oe,I,de,ze,le,K,H,Y,we,me;if((k==null?void 0:k.类型)!==((X=(A=b.value)==null?void 0:A.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:X.value)){let q=[],he=await((de=(I=(oe=Me.FormContent)==null?void 0:oe.find(re=>(re==null?void 0:re.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:I.value)==null?void 0:de.value)?await((Y=(H=(K=Me.FormContent)==null?void 0:K.find(re=>(re==null?void 0:re.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:H.value)==null?void 0:Y.value):(le=(ze=Me.FormContent)==null?void 0:ze.find(re=>(re==null?void 0:re.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:le.value;if(he==null||he.forEach(re=>{v.value++,q.push({label:re==null?void 0:re.label,name:(re==null?void 0:re.name)||(re==null?void 0:re.label),type:re.type,value:re!=null&&re.属性名?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):(k==null?void 0:k[re.label])??"",id:v.value,contents:re==null?void 0:re.options,prop:(re==null?void 0:re.prop)||(re==null?void 0:re.name)||(re==null?void 0:re.label)})}),k!=null&&k.菜单选项&&((we=k==null?void 0:k.菜单选项)==null?void 0:we.length)>0){const re=await Me.menuToContentType(k==null?void 0:k.菜单选项);q=q==null?void 0:q.map(Ve=>((Ve==null?void 0:Ve.name)==="组信息选项"&&(Ve.contents=re),Ve))}b.value=await Me.selectToBase(C.cloneDeep(q)),S.value=await Me.selectToBase(C.cloneDeep(q))}else{let q=C.cloneDeep(S.value);if(q=q==null?void 0:q.map(he=>(he.value=k==null?void 0:k[he.name],he)),k!=null&&k.菜单选项&&((me=k==null?void 0:k.菜单选项)==null?void 0:me.length)>0){const he=await Me.menuToContentType(k==null?void 0:k.菜单选项);q=q==null?void 0:q.map(re=>((re==null?void 0:re.name)==="组信息选项"&&(re.contents=he),re))}q=Me.formToOptionsContents(q),b.value=await Me.selectToBase(C.cloneDeep(q))}},Re=async k=>{await Pe(k),S.value=b.value},P=(k,A)=>{if((A==null?void 0:A.type)=="Select"&&(k==null?void 0:k.key)==="selectRelateType"){const X=A==null?void 0:A.optionUrl;return(X==null?void 0:X.selectRelateType)||A[k.key]}if((A==null?void 0:A.type)=="Select"&&(k==null?void 0:k.key)==="menuSelect"){const X=A==null?void 0:A.optionUrl;return(X==null?void 0:X.menuSelect)||A[k.key]}if((A==null?void 0:A.type)=="Select"&&(k==null?void 0:k.key)==="groupSelect"){const X=A==null?void 0:A.optionUrl;return(X==null?void 0:X.groupSelect)||A[k.key]}if((A==null?void 0:A.type)=="Select"&&(k==null?void 0:k.key)==="originalContent")return(A==null?void 0:A.value)||A[k.key];if((A==null?void 0:A.type)=="Select"&&(k==null?void 0:k.key)==="multiple"){const X=A[k.key];return xl(X)?X:k.default}return(k==null?void 0:k.label)==="类型"&&A[k.key]===""?"Input":(k==null?void 0:k.key)==="isFormColHidden"&&!A[k.key]?!1:A[k.key]},U=async k=>{var oe,I,de,ze,le,K,H,Y,we;y.value=!0;let A=[];const X=await((de=(I=(oe=Me.FormContent)==null?void 0:oe.find(me=>(me==null?void 0:me.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:I.value)==null?void 0:de.value)?await((Y=(H=(K=Me.FormContent)==null?void 0:K.find(me=>(me==null?void 0:me.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:H.value)==null?void 0:Y.value):(le=(ze=Me.FormContent)==null?void 0:ze.find(me=>(me==null?void 0:me.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:le.value;if(X==null||X.forEach(me=>{v.value++,A.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.name)||(me==null?void 0:me.label),type:me.type,value:(me==null?void 0:me.label)==="属性名"?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):P(me,k),id:v.value,contents:me==null?void 0:me.options})}),k!=null&&k.menuSelect&&((we=k==null?void 0:k.menuSelect)==null?void 0:we.length)>0){const me=await Me.menuToContentType(k==null?void 0:k.menuSelect);A=A==null?void 0:A.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=me),q))}N.value=k==null?void 0:k.id,S.value=await Me.selectToBase(Me.formToOptionsContents(A)),b.value=await Me.selectToBase(Me.formToOptionsContents(A))},G=k=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,X;ce.value=(A=C.cloneDeep(ce.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(k==null?void 0:k.id)),l("change",(X=C.cloneDeep(i.originalItemContents))==null?void 0:X.map(oe=>((oe==null?void 0:oe.key)==="tableToForm"&&(oe.contents=ce.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=()=>{y.value=!1,S.value=[],N.value=""},Ee=async()=>{var oe,I,de,ze,le,K,H,Y,we,me;S.value=b.value;let k={};N.value!==""?k.id=N.value:(v.value++,k.id="id"+v.value);let A=await((de=(I=(oe=Me.FormContent)==null?void 0:oe.find(q=>{var he,re;return(q==null?void 0:q.key)===(((re=(he=S.value)==null?void 0:he.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:I.value)==null?void 0:de.value)??((le=(ze=Me.FormContent)==null?void 0:ze.find(q=>{var he,re;return(q==null?void 0:q.key)===(((re=(he=S.value)==null?void 0:he.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:le.value);if((K=S.value)==null||K.forEach(q=>{const he=A==null?void 0:A.find(re=>(re==null?void 0:re.label)===(q==null?void 0:q.label));he&&(k[he.key]=q.value)}),k.name=k.label,(H=ce.value)!=null&&H.find(q=>q.id===k.id))ce.value=(Y=ce.value)==null?void 0:Y.map(q=>(q.id===k.id&&(q=k),q));else{let q=C.cloneDeep(ce.value);ce.value||(ce.value=[]),q.push(k),ce.value=q}ce.value=ce.value.map(({id:q,...he})=>he),y.value=!1,N.value="";let X=C.cloneDeep(i.originalItemContents);(we=C.cloneDeep(i.originalItemContents))!=null&&we.find(q=>(q==null?void 0:q.key)==="tableToForm")?X=(me=C.cloneDeep(i.originalItemContents))==null?void 0:me.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=ce.value),q)):X.push({key:"tableToForm",contents:ce.value}),l("change",X)},Ze=k=>{F.value=!0;let A=[];Sa==null||Sa.forEach(X=>{v.value++,A.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:k[X.key],id:v.value,contents:X==null?void 0:X.options})}),N.value=k==null?void 0:k.id,g.value=A,T.value=A};e.watch(()=>D.value,()=>{var A,X;let k=C.cloneDeep(i.originalItemContents);(A=C.cloneDeep(i.originalItemContents))!=null&&A.find(oe=>(oe==null?void 0:oe.key)==="page")?k=(X=C.cloneDeep(i.originalItemContents))==null?void 0:X.map(oe=>((oe==null?void 0:oe.key)==="page"&&(oe.contents=D.value),oe)):k.push({key:"page",contents:D.value}),l("change",k)},{deep:!0});const Z=k=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,X;Q.value=(A=C.cloneDeep(Q.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(k==null?void 0:k.id)),l("change",(X=C.cloneDeep(i.originalItemContents))==null?void 0:X.map(oe=>((oe==null?void 0:oe.key)==="extraButton"&&(oe.contents=Q.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var X,oe,I,de,ze;g.value=T.value;let k={};if(N.value!==""?k.id=N.value:(v.value++,k.id="id"+v.value),(X=g.value)==null||X.forEach(le=>{const K=Sa==null?void 0:Sa.find(H=>(H==null?void 0:H.label)===(le==null?void 0:le.label));K?k[K.key]=le.value:le!=null&&le.children&&le.children.length>0&&(k.children=le.children)}),(oe=Q.value)!=null&&oe.find(le=>le.id===k.id))Q.value=(I=Q.value)==null?void 0:I.map(le=>(le.id===k.id&&(le=k),le));else{let le=C.cloneDeep(Q.value)??[];le.push(k),Q.value=le}F.value=!1,N.value="";let A=C.cloneDeep(i.originalItemContents);(de=C.cloneDeep(i.originalItemContents))!=null&&de.find(le=>(le==null?void 0:le.key)==="extraButton")?A=(ze=C.cloneDeep(i.originalItemContents))==null?void 0:ze.map(le=>((le==null?void 0:le.key)==="extraButton"&&(le.contents=Q.value),le)):A.push({key:"extraButton",contents:Q.value}),l("change",A)},ue=k=>{let A=C.cloneDeep(T.value);A=A==null?void 0:A.map(X=>(X.children||(X.value=k==null?void 0:k[X.name]),X)),T.value=A},be=()=>{F.value=!1,g.value=[],N.value=""},Ce=k=>{p.value=!0;let A=[];Ta==null||Ta.forEach(X=>{v.value++,A.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:k[X.key],id:v.value,contents:X==null?void 0:X.options})}),N.value=k==null?void 0:k.id,M.value=A,L.value=A},Se=k=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,X;B.value=(A=C.cloneDeep(B.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(k==null?void 0:k.id)),l("change",(X=C.cloneDeep(i.originalItemContents))==null?void 0:X.map(oe=>((oe==null?void 0:oe.key)==="rowButton"&&(oe.contents=B.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},qe=()=>{s.value=!0;let k=[];Ot==null||Ot.forEach(A=>{v.value++,k.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:v.value,contents:A==null?void 0:A.options})}),m.value=k,_.value=k},ee=()=>{p.value=!0;let k=[];Ta==null||Ta.forEach(A=>{v.value++,k.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:v.value,contents:A==null?void 0:A.options})}),M.value=k,L.value=k},ae=k=>{let A=C.cloneDeep(L.value);A=A==null?void 0:A.map(X=>(X.children||(X.value=k==null?void 0:k[X.name]),X)),L.value=A},w=()=>{var X,oe,I,de,ze;M.value=L.value;let k={};if(N.value!==""?k.id=N.value:(v.value++,k.id="id"+v.value),(X=M.value)==null||X.forEach(le=>{const K=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(le==null?void 0:le.label));K?k[K.key]=le.value:le!=null&&le.children&&le.children.length>0&&(k.children=le.children)}),(oe=B.value)!=null&&oe.find(le=>le.id===k.id))B.value=(I=B.value)==null?void 0:I.map(le=>(le.id===k.id&&(le=k),le));else{let le=C.cloneDeep(B.value);le.push(k),B.value=le}p.value=!1,N.value="";let A=C.cloneDeep(i.originalItemContents);(de=C.cloneDeep(i.originalItemContents))!=null&&de.find(le=>(le==null?void 0:le.key)==="rowButton")?A=(ze=C.cloneDeep(i.originalItemContents))==null?void 0:ze.map(le=>((le==null?void 0:le.key)==="rowButton"&&(le.contents=B.value),le)):A.push({key:"rowButton",contents:B.value}),l("change",A)},Ne=()=>{p.value=!1,N.value="",L.value=[],M.value=[]},_e=k=>{s.value=!0;let A=[];Ot==null||Ot.forEach(X=>{v.value++,A.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:v.value,contents:X==null?void 0:X.options})}),m.value=A,j.value=k==null?void 0:k.id,_.value=A},ve=k=>{var A;h.value=_l(C.cloneDeep(h.value),k==null?void 0:k.id),l("change",(A=C.cloneDeep(i.originalItemContents))==null?void 0:A.map(X=>{var oe;return(X==null?void 0:X.key)==="header"&&(X.contents=(oe=h.value)!=null&&oe.some(I=>I==null?void 0:I.children)?[h.value]:h.value),X}))},te=k=>{var X,oe,I;k.type==="fix"?k.id!==""?h.value=Cl(h.value,k):h.value=El(h.value,k==null?void 0:k.contents):h.value=Sl(h.value,k),h.value=(X=h.value)!=null&&X.some(de=>de==null?void 0:de.children)?[h.value]:h.value,N.value="";let A=C.cloneDeep(i.originalItemContents);(oe=C.cloneDeep(i.originalItemContents))!=null&&oe.find(de=>(de==null?void 0:de.key)==="header")?A=(I=C.cloneDeep(i.originalItemContents))==null?void 0:I.map(de=>((de==null?void 0:de.key)==="header"&&(de.contents=h.value),de)):A.push({key:"header",contents:h.value}),l("change",A)},J=k=>{var X;s.value=!0;let A=[];Ot==null||Ot.forEach(oe=>{v.value++,A.push({label:oe==null?void 0:oe.label,name:oe==null?void 0:oe.label,type:oe.type,value:k[oe.key],id:v.value,contents:oe==null?void 0:oe.options})}),k!=null&&k.children&&((X=k==null?void 0:k.children)==null?void 0:X.length)>0&&A.push({children:k==null?void 0:k.children,isFormColHidden:!0}),N.value=k==null?void 0:k.id,j.value="",m.value=A,_.value=A},se=k=>{let A=C.cloneDeep(_.value);A=A==null?void 0:A.map(X=>(X.children||(X.value=k==null?void 0:k[X.name]),X)),_.value=A},fe=()=>{s.value=!1,N.value="",j.value="",_.value=[]},Fe=()=>{var X,oe,I,de,ze,le;m.value=_.value;let k={};if(N.value!==""?k.id=N.value:(v.value++,k.id="id"+v.value),(X=m.value)==null||X.forEach(K=>{const H=Ot==null?void 0:Ot.find(Y=>(Y==null?void 0:Y.label)===(K==null?void 0:K.label));H?k[H.key]=K.value:K!=null&&K.children&&K.children.length>0&&(k.children=K.children)}),(oe=h.value)!=null&&oe.find(K=>K.id===k.id))h.value=(I=h.value)==null?void 0:I.map(K=>(K.id===k.id&&(K=k),K));else{let K=C.cloneDeep(h.value)??[];j.value===""?K.push(k):K=K==null?void 0:K.map(H=>(H.id===j.value&&(H.children||(H.children=[]),H.children.push(k)),H)),h.value=K}h.value=(de=h.value)!=null&&de.some(K=>K==null?void 0:K.children)?[h.value]:h.value,s.value=!1,N.value="",j.value="";let A=C.cloneDeep(i.originalItemContents);(ze=C.cloneDeep(i.originalItemContents))!=null&&ze.find(K=>(K==null?void 0:K.key)==="header")?A=(le=C.cloneDeep(i.originalItemContents))==null?void 0:le.map(K=>((K==null?void 0:K.key)==="header"&&(K.contents=h.value),K)):A.push({key:"header",contents:h.value}),l("change",A)},dt=k=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,X;h.value=(A=C.cloneDeep(h.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(k==null?void 0:k.id)),l("change",(X=C.cloneDeep(i.originalItemContents))==null?void 0:X.map(oe=>{var I;return(oe==null?void 0:oe.key)==="header"&&(oe.contents=(I=h.value)!=null&&I.some(de=>de==null?void 0:de.children)?[h.value]:h.value),oe})),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var k,A,X,oe,I,de,ze,le,K,H,Y,we,me,q,he,re,Ve,pe,Be;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(c.value=C.cloneDeep(i.originalItemContents),h.value=(A=(k=c.value)==null?void 0:k.find($=>($==null?void 0:$.key)==="header"))==null?void 0:A.contents,B.value=(oe=(X=c.value)==null?void 0:X.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:oe.contents,Q.value=(de=(I=c.value)==null?void 0:I.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:de.contents,D.value=(le=(ze=c.value)==null?void 0:ze.find($=>($==null?void 0:$.key)==="page"))!=null&&le.contents?!!((H=(K=c.value)==null?void 0:K.find($=>($==null?void 0:$.key)==="page"))!=null&&H.contents):!1,ce.value=(we=(Y=c.value)==null?void 0:Y.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:we.contents,h.value=(me=h.value)==null?void 0:me.map(($,Oe)=>(Array.isArray($)?$=Si($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??Oe,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),h.value=(q=h.value)!=null&&q.every($=>Array.isArray($))?(he=h.value)==null?void 0:he[0]:h.value,B.value=(re=B.value)==null?void 0:re.map(($,Oe)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??Oe}),Q.value=(Ve=Q.value)==null?void 0:Ve.map(($,Oe)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??Oe}),ce.value)ce.value=(Be=ce.value)==null?void 0:Be.map($=>{v.value++;let Oe=$;return Oe.id=v.value,Oe});else{let $=[];const Oe=(pe=Me.getColumnChild(C.cloneDeep(h.value)))==null?void 0:pe.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Oe==null||Oe.forEach(ge=>{var We;v.value++,$.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:v.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(We=ge==null?void 0:ge.groupSelect)==null?void 0:We.split(":"),selectRelateType:"关联绑定列"})}),ce.value=$}},{deep:!0,immediate:!0}),(k,A)=>{const X=e.resolveComponent("svg-icon"),oe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("div",Yi,[e.createElementVNode("div",Gi,[A[2]||(A[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(oe,{class:"icon-content",onClick:qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[1]||(A[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(I,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",es,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>_e(I)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>J(I)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>dt(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(Tl,{tableChildContents:I==null?void 0:I.children,onDeleteChange:ve,onFixChange:te},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",as,[A[4]||(A[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:ee},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[3]||(A[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(I,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",os,[e.createElementVNode("div",ls,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",rs,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>Ce(I)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Se(I)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",is,[A[6]||(A[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Ie},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[5]||(A[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",ss,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(I,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",ds,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>Ze(I)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Z(I)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ps,[A[8]||(A[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[7]||(A[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(I,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",ms,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>U(I)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>G(I)},null,8,["onClick"])])])]))),128))]),A[10]||(A[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",gs,[e.createElementVNode("div",ys,[A[9]||(A[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:D.value,"onUpdate:modelValue":A[0]||(A[0]=I=>D.value=I)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ks,[e.createVNode(oe,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[11]||(A[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(oe,{class:"ok-button button",onClick:Fe,id:"themeButton"},{default:e.withCtx(()=>A[12]||(A[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:Ne,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(oe,{onClick:Ne,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[13]||(A[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(oe,{class:"ok-button button",onClick:w,id:"themeButton"},{default:e.withCtx(()=>A[14]||(A[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:F.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createVNode(oe,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[15]||(A[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(oe,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>A[16]||(A[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:y.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Es,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:Pe,onChangeVisible:ke,onBlurChange:Re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Cs,[e.createVNode(oe,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[17]||(A[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(oe,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>A[18]||(A[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Ts=Pt._export_sfc(Ss,[["__scopeId","data-v-7a6b87b5"]]),Bs=C.useModelComp(C.pinia),{pageMapState:Is}=C.storeToRefs(Bs),Ns=C.useMenuState(C.pinia),{activeMenuPath:As}=C.storeToRefs(Ns),Vs=e.ref(24),Os=e.ref(6),Ms=e.ref(70),zs=e.ref(.18),Rs=e.ref(45),Ps=(a,r,i,l)=>{var c,s,y,h,p,m,D,_,N,j,B,Q,M,L,F,g;return{x:((s=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:s.x)||r%2*12,y:((h=(y=a==null?void 0:a.value)==null?void 0:y.tableData)==null?void 0:h.y)||r,w:((m=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:m.w)||Vs.value,h:((_=(D=a==null?void 0:a.value)==null?void 0:D.tableData)==null?void 0:_.h)||i,minW:((j=(N=a==null?void 0:a.value)==null?void 0:N.tableData)==null?void 0:j.minW)||Os.value,minH:((Q=(B=a==null?void 0:a.value)==null?void 0:B.tableData)==null?void 0:Q.minH)||zs.value,maxH:((L=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:L.maxH)||Rs.value,i:((g=(F=a==null?void 0:a.value)==null?void 0:F.tableData)==null?void 0:g.i)||r,id:(a==null?void 0:a.id)||r+"",component:l}},Ls=(a,r)=>{var l,c,s,y,h,p,m,D;let i=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((y=(s=(c=a==null?void 0:a.compData)==null?void 0:c.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:y.length)===0)return 2}else((h=a==null?void 0:a.comp)==null?void 0:h.toUpperCase())==="FORM"&&(i=((D=(m=(p=a==null?void 0:a.compData)==null?void 0:p.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:m.contents)==null?void 0:D.length)/5);return i*2},Bl=(a,r,i)=>{var y,h;const l=(h=(y=Is.value)==null?void 0:y[As.value])==null?void 0:h.filter(p=>{var m;return((m=p==null?void 0:p.key)==null?void 0:m.type)==="gridLayout"}),c=l==null?void 0:l.find(p=>{var m,D,_;return((_=(D=(m=p==null?void 0:p.value)==null?void 0:m.tableData)==null?void 0:D.component)==null?void 0:_.id)===a.id}),s=Ls(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((p,m)=>Bl(p,m))),{...Ps(c,r,s,a)}},$s=(a,r)=>{if((a==null?void 0:a.length)===0)return[];const i=C.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,c)=>Bl(l,c)):[]},Fs=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),js=(a,r)=>a==null?void 0:a.map(i=>{for(const l in r)if(l===(i==null?void 0:i.prop))return{...i,value:r[l]};return i}),Us=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.ref([]);e.watch(()=>i.compType,h=>{var D;const p=Fs(i==null?void 0:i.optionItems),m=h?(D=p[h==null?void 0:h.toUpperCase()])==null?void 0:D[i==null?void 0:i.target]:[];c.value=m==null?void 0:m.map(_=>{for(const[N,j]of Object.entries((i==null?void 0:i.comp)||{}))if((_==null?void 0:_.prop)===N)return{..._,value:j};return _})},{immediate:!0});const s=h=>Nt.getComponent(h),y=h=>{var p,m;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?c.value=(p=c.value)==null?void 0:p.map(D=>{var _;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(_=D==null?void 0:D.options)==null?void 0:_.map(N=>({...N,disabled:!0}))}:(D==null?void 0:D.prop)==="isGridLayout"?{...D,disabled:!0}:D}):c.value=(m=c.value)==null?void 0:m.map(D=>{var _;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(_=D==null?void 0:D.options)==null?void 0:_.map(N=>({...N,disabled:!1}))}:(D==null?void 0:D.prop)==="isGridLayout"?{...D,disabled:!1}:D}),l("change",{target:i==null?void 0:i.target,styleConfigs:c.value,prop:h==null?void 0:h.prop})};return(h,p)=>{const m=e.resolveComponent("el-col"),D=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(D,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(_.type)),{modelValue:_.value,"onUpdate:modelValue":N=>_.value=N,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:N=>y(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ks=Pt._export_sfc(Us,[["__scopeId","data-v-6c233914"]]),Ws=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:r}){const i=a,l=r,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),y=L=>L==null?void 0:L.reduce((F,g)=>(F[g==null?void 0:g.prop]=g==null?void 0:g.rule,F),{}),h=e.computed(()=>({formRules:y(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),p=e.ref([]),m=e.ref(""),D=(L,F,g)=>{var S;let T=[];(i==null?void 0:i.activeTabName)==="任务配置"?(T=[{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:L},{label:"按钮名称",value:"按钮名称",children:F}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(T=[{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:(S=i==null?void 0:i.relatedData)==null?void 0:S.map(b=>({label:b==null?void 0:b.任务名称,value:b==null?void 0:b.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let v;return g&&(g==null?void 0:g.length)>0?v=[...T,..._(L,F,g)]:v=T,v},_=(L,F,g)=>{const T=[{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 g?T==null?void 0:T.filter(v=>g==null?void 0:g.includes(v==null?void 0:v.prop)):T},N=(L,F)=>{var b,ce,Ie,Qe,ke,Pe,Re,P,U;const g=((ke=(Qe=(Ie=(ce=(b=i==null?void 0:i.comp)==null?void 0:b.compData)==null?void 0:ce.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:Ie.contents)==null?void 0:Qe.filter(G=>(G==null?void 0:G.label)!=="操作"))==null?void 0:ke.map(G=>({value:G==null?void 0:G.prop,label:G.label})))||[],T=/button/i,v=((U=(P=(Re=(Pe=i==null?void 0:i.comp)==null?void 0:Pe.compData)==null?void 0:Re.filter(G=>T.test(G==null?void 0:G.key)))==null?void 0:P.flatMap(G=>G==null?void 0:G.contents))==null?void 0:U.map(G=>({value:G==null?void 0:G.label,label:G.label})))||[],S=D(g,v,L);p.value=F?js(S,F):S,L&&(L==null?void 0:L.length)>0&&s.value.push(...L==null?void 0:L.map(G=>({prop:G,rule:c})))};e.onMounted(()=>{N(null,i==null?void 0:i.extendItem)});const j=L=>{const F=L==null?void 0:L[m.value];if(m.value==="执行任务"){if(!(F!=null&&F.join("/")))return;const g=F==null?void 0:F.join("/");N(g==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:g==="进度设置/进度条"?["进度关键词"]:null,L)}},B=L=>{l("change",{target:i==null?void 0:i.target,extendConfigs:L})},Q=(L,F)=>{m.value=F==null?void 0:F.changeProp,j(L)},M=L=>{l("onButtonClick",L)};return(L,F)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:B,onBlurChange:Q,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue"]))}}),Hs=Pt._export_sfc(Ws,[["__scopeId","data-v-7c660c1f"]]),qs={};function Xs(a,r){return null}const Ys=Pt._export_sfc(qs,[["render",Xs]]),Gs={class:"form-operate-content"},Js={class:"form-operate-item"},Zs={class:"operate-title"},Qs={class:"operate-content"},ec={class:"fix-content"},tc={class:"fix-button"},ac={class:"operate-title"},nc={class:"operate-content"},oc={class:"fix-content"},lc={class:"fix-button"},rc={style:{display:"flex","justify-content":"space-between"}},ic={class:"form-content"},sc={class:"dialog-footer"},cc={class:"form-content"},uc={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.ref(!1),s=e.ref([]),y=e.ref([]),h=e.ref(!1),p=e.ref([]),m=e.ref([]),D=e.ref(""),_=e.ref(!1),N=e.ref(0),j=e.ref([]),B=e.ref([]),Q=(P,U)=>{if((U==null?void 0:U.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const G=U==null?void 0:U.optionUrl;return(G==null?void 0:G.selectRelateType)||U[P.key]}if((U==null?void 0:U.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const G=U==null?void 0:U.optionUrl;return(G==null?void 0:G.menuSelect)||U[P.key]}if((U==null?void 0:U.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const G=U==null?void 0:U.optionUrl;return(G==null?void 0:G.groupSelect)||U[P.key]}if((U==null?void 0:U.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(U==null?void 0:U.value)||U[P.key];if((U==null?void 0:U.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const G=U[P.key];return xl(G)?G:P.default}return(P==null?void 0:P.label)==="类型"&&U[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!U[P.key]?!1:U[P.key]},M=async P=>{var ie,Ee,Ze,Z,z,ue;c.value=!0;let U=[];const G=await((Ze=(Ee=(ie=Me.FormContent)==null?void 0:ie.find(be=>(be==null?void 0:be.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ee.value)==null?void 0:Ze.value)??((z=(Z=Me.FormContent)==null?void 0:Z.find(be=>(be==null?void 0:be.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:z.value);if(G==null||G.forEach(be=>{N.value++,U.push({label:be==null?void 0:be.label,name:be==null?void 0:be.label,type:be.type,prop:be==null?void 0:be.prop,value:Q(be,P),id:N.value,contents:be==null?void 0:be.options,width:(P==null?void 0:P.width)??1})}),P!=null&&P.menuSelect&&((ue=P==null?void 0:P.menuSelect)==null?void 0:ue.length)>0){const be=await Me.menuToContentType(P==null?void 0:P.menuSelect);U=U==null?void 0:U.map(Ce=>((Ce==null?void 0:Ce.name)==="组信息选项"&&(Ce.contents=be),Ce))}D.value=P==null?void 0:P.id,s.value=await Me.selectToBase(Me.formToOptionsContents(U)),y.value=await Me.selectToBase(Me.formToOptionsContents(U))},L=P=>{var G;h.value=!0;let U=[];(G=Me.FormButton)==null||G.forEach(ie=>{N.value++,U.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)==="类型"&&P[ie.key]===""?"normal":P[ie.key],id:N.value,contents:ie==null?void 0:ie.options})}),j.value=U,B.value=U,D.value=P==null?void 0:P.id};e.watch(()=>_.value,()=>{var U,G;let P=C.cloneDeep(i.originalItemContents);(U=C.cloneDeep(i.originalItemContents))!=null&&U.find(ie=>(ie==null?void 0:ie.key)==="enableWrap")?P=(G=C.cloneDeep(i.originalItemContents))==null?void 0:G.map(ie=>((ie==null?void 0:ie.key)==="enableWrap"&&(ie.contents=!_.value),ie)):P.push({key:"enableWrap",contents:!_.value}),l("change",P)},{deep:!0});const F=()=>{var G,ie,Ee,Ze,Z;j.value=B.value;let P={};if(D.value!==""?P.id=D.value:(N.value++,P.id="id"+N.value),(G=j.value)==null||G.forEach(z=>{var be;const ue=(be=Me.FormButton)==null?void 0:be.find(Ce=>(Ce==null?void 0:Ce.label)===(z==null?void 0:z.label));ue&&(P[ue.key]=z.value)}),(ie=p.value)!=null&&ie.find(z=>z.id===P.id))p.value=(Ee=p.value)==null?void 0:Ee.map(z=>(z.id===P.id&&(z=P),z));else{let z=C.cloneDeep(p.value);p.value||(p.value=[]),z.push(P),p.value=z}h.value=!1,D.value="";let U=C.cloneDeep(i.originalItemContents);(Ze=C.cloneDeep(i.originalItemContents))!=null&&Ze.find(z=>(z==null?void 0:z.key)==="formButton")?U=(Z=C.cloneDeep(i.originalItemContents))==null?void 0:Z.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=p.value),z)):U.push({key:"formButton",contents:p.value}),l("change",U)},g=P=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,G;m.value=(U=C.cloneDeep(m.value))==null?void 0:U.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),l("change",(G=C.cloneDeep(i.originalItemContents))==null?void 0:G.map(ie=>((ie==null?void 0:ie.key)==="formContent"&&(ie.contents=m.value),ie))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=P=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,G;p.value=(U=C.cloneDeep(p.value))==null?void 0:U.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),l("change",(G=C.cloneDeep(i.originalItemContents))==null?void 0:G.map(ie=>((ie==null?void 0:ie.key)==="formButton"&&(ie.contents=p.value),ie))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=()=>{var U;h.value=!0;let P=[];(U=Me.FormButton)==null||U.forEach(G=>{N.value++,P.push({label:G==null?void 0:G.label,name:G==null?void 0:G.label,type:G.type,value:(G==null?void 0:G.label)==="类型"?"normal":"",id:N.value,contents:G==null?void 0:G.options})}),j.value=P,B.value=P},S=()=>{var U,G,ie;c.value=!0;let P=[];(ie=(G=(U=Me.FormContent)==null?void 0:U.find(Ee=>(Ee==null?void 0:Ee.key)==="Input"))==null?void 0:G.value)==null||ie.forEach(Ee=>{N.value++,P.push({label:Ee==null?void 0:Ee.label,name:Ee==null?void 0:Ee.label,type:Ee.type,value:(Ee==null?void 0:Ee.label)==="类型"?"Input":"",id:N.value,contents:Ee==null?void 0:Ee.options})}),s.value=P,y.value=P},b=P=>{let U=C.cloneDeep(B.value);U=U==null?void 0:U.map(G=>(G.value=P==null?void 0:P[G.name],G)),B.value=U},ce=P=>{const U=P.find(Ee=>(Ee==null?void 0:Ee.name)==="类型");if((U==null?void 0:U.value)!="Select")return;const G=P.find(Ee=>(Ee==null?void 0:Ee.name)==="多选"),ie=P.find(Ee=>(Ee==null?void 0:Ee.name)==="初始值");G!=null&&G.value&&Ao.isString(ie.value)&&(ie.value=[ie.value]),!(G!=null&&G.value)&&!Ao.isString(ie.value)&&(ie.value="")},Ie=async P=>{var U,G,ie,Ee,Ze,Z,z,ue,be,Ce,Se,qe;if((P==null?void 0:P.类型)!==((G=(U=y.value)==null?void 0:U.find(ee=>(ee==null?void 0:ee.label)==="类型"))==null?void 0:G.value)){let ee=[];const ae=await((Ze=(Ee=(ie=Me.FormContent)==null?void 0:ie.find(w=>(w==null?void 0:w.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ee.value)==null?void 0:Ze.value)?await((Ce=(be=(ue=Me.FormContent)==null?void 0:ue.find(w=>(w==null?void 0:w.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:be.value)==null?void 0:Ce.value):(z=(Z=Me.FormContent)==null?void 0:Z.find(w=>(w==null?void 0:w.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:z.value;if(ae==null||ae.forEach(w=>{var _e,ve;N.value++;const Ne=si(w==null?void 0:w.default)?(P==null?void 0:P[w.label])??w.value??"":w==null?void 0:w.default;ee.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:Ne,prop:w==null?void 0:w.prop,id:N.value,contents:w==null?void 0:w.options,width:((ve=(_e=y.value)==null?void 0:_e[0])==null?void 0:ve.width)??1})}),P!=null&&P.菜单选项&&((Se=P==null?void 0:P.菜单选项)==null?void 0:Se.length)>0){const w=await Me.menuToContentType(P==null?void 0:P.菜单选项);ee=ee==null?void 0:ee.map(Ne=>((Ne==null?void 0:Ne.name)==="组信息选项"&&(Ne.contents=w),Ne))}ce(ee),y.value=await Me.selectToBase(C.cloneDeep(ee)),s.value=await Me.selectToBase(C.cloneDeep(ee))}else{let ee=C.cloneDeep(y.value);if(ee=ee==null?void 0:ee.map(ae=>(ae.value=P==null?void 0:P[ae.name],ae)),P!=null&&P.菜单选项&&((qe=P==null?void 0:P.菜单选项)==null?void 0:qe.length)>0){const ae=await Me.menuToContentType(P==null?void 0:P.菜单选项);ee=ee==null?void 0:ee.map(w=>((w==null?void 0:w.name)==="组信息选项"&&(w.contents=ae),w))}ee=Me.formToOptionsContents(ee),ce(ee),y.value=await Me.selectToBase(C.cloneDeep(ee))}},Qe=P=>{P||(s.value=y.value)},ke=async P=>{await Ie(P),s.value=y.value},Pe=kl(async()=>{var ie,Ee,Ze,Z,z,ue,be,Ce,Se,qe,ee,ae;s.value=y.value;let P={};P.width=((Ee=(ie=s.value)==null?void 0:ie[0])==null?void 0:Ee.width)??1,D.value!==""?P.id=D.value:(N.value++,P.id="id"+N.value);let U=await((z=(Z=(Ze=Me.FormContent)==null?void 0:Ze.find(w=>{var Ne,_e;return(w==null?void 0:w.key)===(((_e=(Ne=s.value)==null?void 0:Ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:_e.value)??"label")}))==null?void 0:Z.value)==null?void 0:z.value)??((be=(ue=Me.FormContent)==null?void 0:ue.find(w=>{var Ne,_e;return(w==null?void 0:w.key)===(((_e=(Ne=s.value)==null?void 0:Ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:_e.value)??"label")}))==null?void 0:be.value);if((Ce=s.value)==null||Ce.forEach(w=>{const Ne=U==null?void 0:U.find(_e=>(_e==null?void 0:_e.label)===(w==null?void 0:w.label));Ne&&(P[Ne.key]=w.value)}),P.width=P.width?P.width:1,P.key=P==null?void 0:P.label,P.isFormColHidden=P==null?void 0:P.isFormColHidden,(Se=m.value)!=null&&Se.find(w=>w.id===P.id))m.value=(qe=m.value)==null?void 0:qe.map(w=>(w.id===P.id&&(w=P),w));else{let w=C.cloneDeep(m.value);w.push(P),m.value=w}m.value=m.value.map(({id:w,...Ne})=>Ne),c.value=!1,D.value="";let G=C.cloneDeep(i.originalItemContents);(ee=C.cloneDeep(i.originalItemContents))!=null&&ee.find(w=>(w==null?void 0:w.key)==="formContent")?G=(ae=C.cloneDeep(i.originalItemContents))==null?void 0:ae.map(w=>((w==null?void 0:w.key)==="formContent"&&(w.contents=m.value),w)):G.push({key:"formContent",contents:m.value}),l("change",G)},300),Re=()=>{c.value=!1,h.value=!1,D.value="",y.value=[],B.value=[]};return e.watch(()=>i.originalItemContents,()=>{var U,G,ie,Ee,Ze,Z;if(!i.originalItemContents||i.originalItemContents.length===0)return;const P=C.cloneDeep(i.originalItemContents);m.value=((U=P==null?void 0:P.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:U.contents)??[],p.value=((G=P==null?void 0:P.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:G.contents)??[],_.value=(ie=P==null?void 0:P.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ie.contents?!((Ee=P==null?void 0:P.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ee.contents):!0,m.value=(Ze=C.cloneDeep(m.value))==null?void 0:Ze.map((z,ue)=>{var Ce;let be=z;return be.id=(z==null?void 0:z.id)??ue,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((Ce=z==null?void 0:z.options)==null?void 0:Ce.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,be}),m.value=Me.formToOptionsContents(m.value),p.value=(Z=p.value)==null?void 0:Z.map((z,ue)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:ue})},{deep:!0,immediate:!0}),(P,U)=>{const G=e.resolveComponent("svg-icon"),ie=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Js,[e.createElementVNode("div",Zs,[U[2]||(U[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:S},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Ee,Ze)=>(e.openBlock(),e.createElementBlock("div",{key:Ze},[e.createElementVNode("div",ec,[e.createElementVNode("div",null,e.toDisplayString(Ee.label),1),e.createElementVNode("div",tc,[e.createVNode(G,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>M(Ee)},null,8,["onClick"]),e.createVNode(G,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>g(Ee)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ac,[U[4]||(U[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:v},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[3]||(U[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(Ee,Ze)=>(e.openBlock(),e.createElementBlock("div",{key:Ze},[e.createElementVNode("div",oc,[e.createElementVNode("div",null,e.toDisplayString(Ee.label),1),e.createElementVNode("div",lc,[e.createVNode(G,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>L(Ee)},null,8,["onClick"]),e.createVNode(G,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>T(Ee)},null,8,["onClick"])])])]))),128))]),U[6]||(U[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",rc,[U[5]||(U[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":U[0]||(U[0]=Ee=>_.value=Ee)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:Re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ic,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Ie,onChangeVisible:Qe,onBlurChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",sc,[e.createVNode(ie,{onClick:Re,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>U[7]||(U[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ie,{class:"ok-button button",onClick:e.unref(Pe),id:"themeButton"},{default:e.withCtx(()=>U[8]||(U[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:Re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:j.value,key:j.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Re,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Po=Pt._export_sfc(uc,[["__scopeId","data-v-20850524"]]),dc={class:"step-module content"},pc={class:"module-data"},fc={class:"step-module layout"},hc={class:"form-content"},vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=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}]),s=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"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),m=e.ref({}),D=e.ref([]),_=M=>{var L;m.value=M,l("change",(L=B())==null?void 0:L.compData)},N=(M,L)=>{var F,g;switch(M){case"create":(F=s.value)==null||F.forEach(T=>{T.value=""}),p.value="create",h.visible=!0;break;case"update":(g=s.value)==null||g.forEach(T=>{T.value=L[T==null?void 0:T.prop]}),p.value="update",h.visible=!0;break;case"delete":D.value.splice(L,1),p.value="delete";break}},j=M=>{var L,F,g;if((M==null?void 0:M.buttonName)==="确认"){const T=C.cloneDeep(M==null?void 0:M.content);switch(Object.keys(T).forEach(v=>{T[v]===""&&delete T[v]}),p.value){case"create":D.value.push({...T,index:((L=D.value)==null?void 0:L.length)+1});break;case"update":D.value=(F=D.value)==null?void 0:F.map(v=>v.index===(T==null?void 0:T.index)?{...v,title:T==null?void 0:T.title,description:T==null?void 0:T.description}:v);break}l("change",(g=B())==null?void 0:g.compData),h.visible=!1}else h.visible=!1},B=()=>({comp:"Step",compData:[{key:"stepList",contents:D.value},{key:"stepConfig",contents:m.value}]}),Q=()=>{h.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,M=>{var L,F;M&&(m.value=((L=M==null?void 0:M.find(g=>g.key==="stepConfig"))==null?void 0:L.contents)??{},D.value=((F=M==null?void 0:M.find(g=>g.key==="stepList"))==null?void 0:F.contents)??[])},{immediate:!0}),(M,L)=>{const F=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=T=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(T,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(T==null?void 0:T.title),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:S=>N("update",{...T,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:S=>N("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",fc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Q,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),mc=Pt._export_sfc(vc,[["__scopeId","data-v-7dbd17f2"]]),gc={class:"step-module content"},yc={class:"module-data"},bc={class:"step-module layout"},kc={class:"form-content"},xc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.ref("create"),s=e.ref({}),y=e.ref([]),h=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),p=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),D=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=M=>{var L;s.value=M,l("change",(L=B())==null?void 0:L.compData)},N=(M,L)=>{var F,g;switch(M){case"create":(F=p.value)==null||F.forEach(T=>{T.value=""}),c.value="create",D.visible=!0;break;case"update":(g=p.value)==null||g.forEach(T=>{T.value=L[T==null?void 0:T.prop]}),c.value="update",D.visible=!0;break;case"delete":y.value.splice(L,1),c.value="delete";break}},j=M=>{var L,F,g,T;if((M==null?void 0:M.buttonName)==="确认"){const v=C.cloneDeep(M==null?void 0:M.content);switch(Object.keys(v).forEach(S=>{v[S]===""&&delete v[S]}),c.value){case"create":(F=y.value)==null||F.push({...v,index:((L=y.value)==null?void 0:L.length)+1});break;case"update":y.value=(g=y.value)==null?void 0:g.map(S=>S.index===(v==null?void 0:v.index)?{...S,content:v==null?void 0:v.content,timestamp:v==null?void 0:v.timestamp}:S);break}l("change",(T=B())==null?void 0:T.compData),D.visible=!1}else D.visible=!1},B=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:s.value}]}),Q=()=>{D.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,M=>{var L,F;M&&(s.value=((L=M==null?void 0:M.find(g=>g.key==="timeLineConfig"))==null?void 0:L.contents)??{},y.value=((F=M==null?void 0:M.find(g=>g.key==="timeLineList"))==null?void 0:F.contents)??[])},{immediate:!0}),(M,L)=>{const F=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=T=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(T,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(T==null?void 0:T.content),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:S=>N("update",{...T,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:S=>N("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",bc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:h.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:D.visible,title:D.title,onBeforeDestroy:Q,width:D.width},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),wc=Pt._export_sfc(xc,[["__scopeId","data-v-39ffc861"]]),Dc={};function _c(a,r){return e.openBlock(),e.createElementBlock("div")}const Ec=Pt._export_sfc(Dc,[["render",_c]]),Cc={class:"extra-content"},Sc={key:0},Tc={key:1},Bc={class:"dialog-footer"},Ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:r}){const i=a,l=e.ref(0),c=e.ref(),s=e.ref(),y=r,h=e.ref(!1),p=e.ref({}),m=e.ref({}),D=e.ref();e.watch(()=>[i.itemData],()=>{var T;const g=C.cloneDeep(i.itemData);c.value=(T=C.cloneDeep(g))==null?void 0:T.map(v=>{var S;if(v.key==="extra"){let b=[];(S=v.value)==null||S.forEach(ce=>{var Ie;b.push((Ie=Object.values(ce))==null?void 0:Ie[0])}),v.value=b}return v})},{deep:!0,immediate:!0});const _=(g,T,v,S)=>{var ce;let b={};((ce=g==null?void 0:g[0])==null?void 0:ce.contents)==="详情"&&(h.value=!0,b[T]=g,s.value=g==null?void 0:g.filter(Ie=>(Ie==null?void 0:Ie.key)!=="tableContentName"),p.value=b,m.value=v,D.value=S.id)},N=g=>{var Ie,Qe,ke,Pe;const T=(Qe=(Ie=Object.values(C.cloneDeep(p.value)))==null?void 0:Ie[0])==null?void 0:Qe.filter(Re=>(Re==null?void 0:Re.key)==="tableContentName"),v=(Pe=(ke=Object.values(C.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(Re=>(Re==null?void 0:Re.key)!=="tableContentName"),S=v==null?void 0:v.map((Re,P)=>{var U;return P===g.index&&(Re==null?void 0:Re.comp)==="Table"&&(Re.compData=(U=Re.compData)==null?void 0:U.map(G=>{var ie,Ee;return(G==null?void 0:G.key)==="tableContents"&&(G.contents=(Ee=(ie=g.content)==null?void 0:ie.map(Ze=>{let Z={};for(let z in Ze)z!=="id"&&(Z[z]=Ze[z]);return Z}))==null?void 0:Ee.map(Ze=>Object.values(Ze))),G})),Re});S.unshift(T==null?void 0:T[0]);let b=C.cloneDeep(p.value),ce={};for(let Re in b)ce[Re]=S;p.value=ce},j=()=>{h.value=!1,p.value={},m.value={},D.value=void 0,l.value++},B=g=>{var Ie,Qe,ke,Pe;const T=(Qe=(Ie=Object.values(C.cloneDeep(p.value)))==null?void 0:Ie[0])==null?void 0:Qe.filter(Re=>(Re==null?void 0:Re.key)==="tableContentName"),v=(Pe=(ke=Object.values(C.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(Re=>(Re==null?void 0:Re.key)!=="tableContentName"),S=v==null?void 0:v.map((Re,P)=>(P===g.index&&(Re.compData=g.contents),Re));S.unshift(T==null?void 0:T[0]);let b=C.cloneDeep(p.value),ce={};for(let Re in b)ce[Re]=S;p.value=ce},Q=()=>{var T,v;let g={};for(let S in m.value)S===((T=Object.keys(p.value))==null?void 0:T[0])?g[S]=(v=Object.values(p.value))==null?void 0:v[0]:g[S]=m.value[S];y("change",{buttonName:"编辑",index:D.value,singleContent:g},"methodData"),h.value=!1,p.value={},m.value={},D.value=void 0},M=()=>{h.value=!1,p.value={},m.value={},D.value=void 0},L=g=>{y("change",g,"methodData")},F=g=>sn(g);return(g,T)=>{const v=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(S,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(S==null?void 0:S.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Sc)):(e.openBlock(),e.createElementBlock("div",Tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(S.comp)),{itemData:S==null?void 0:S.compData,childItemData:S==null?void 0:S.itemChildData,key:b,index:(S==null?void 0:S.id)??b,onContentClick:_,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:M},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(S,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(S.comp)),{itemData:S==null?void 0:S.compData,onChange:N,childItemData:S==null?void 0:S.itemChildData,key:b,onContentChange:B,index:(S==null?void 0:S.id)??b,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",Bc,[e.createVNode(v,{class:"cancel-button footer-button",onClick:j,id:"themeBorderButton"},{default:e.withCtx(()=>T[0]||(T[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(v,{class:"confirm-button footer-button",onClick:Q,id:"themeButton"},{default:e.withCtx(()=>T[1]||(T[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Nc=Pt._export_sfc(Ic,[["__scopeId","data-v-2d9c5ab2"]]),Ac={key:0,class:"method-content"},Vc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const r=e.ref([]),i=Me.useOriginalState(C.pinia),{originalPath:l}=C.storeToRefs(i),c=a,s=e.ref(!1),y=e.ref(),h=Me.useTableComp(C.pinia),{multipleTableConst:p}=C.storeToRefs(h),m=C.useModelComp(C.pinia),D=e.ref(!1),_=C.useMenuState(C.pinia),N=C.useLoginState(C.pinia),{itemData:j,isEdit:B,routeToChildPath:Q,tableViewContents:M,lockingPage:L,payloadTypes:F}=C.storeToRefs(m),{activeMenuPath:g,platform:T,childMenu:v}=C.storeToRefs(_),{loginUserInfo:S}=C.storeToRefs(N),b=e.ref(!1),ce=async()=>{var Z,z;(Z=r.value)!=null&&Z.find(ue=>(ue==null?void 0:ue.buttonName)==="保存")&&await G((z=r.value)==null?void 0:z.find(ue=>(ue==null?void 0:ue.buttonName)==="保存")),await Me.onSaveBack()};e.watch(()=>j.value,async()=>{B.value==="view"&&!b.value&&await Ze(C.cloneDeep(c.itemData)),b.value=!1},{deep:!0});const Ie=()=>{s.value=!1,y.value=void 0},Qe=Z=>Z.map(z=>{const ue={};for(const be in z){const Ce=z[be];if(be.includes(p.value)){const Se=be.split(p.value);let qe=ue;Se.forEach((ee,ae)=>{ae===Se.length-1?qe[ee]=Ce:(qe[ee]||(qe[ee]={}),qe=qe[ee])})}else ue[be]=Ce}return ue}),ke=async(Z,z,ue=[])=>{var Ce,Se,qe,ee,ae,w,Ne,_e,ve,te,J,se,fe,Fe,dt;let be=(Ce=C.cloneDeep(z))==null?void 0:Ce.filter(k=>(k==null?void 0:k.comp)!=="methodButton");if(Z!=null&&Z.includes("[")){let k=(w=(ae=(ee=(qe=(Se=C.cloneDeep(Z))==null?void 0:Se.split("["))==null?void 0:qe[1])==null?void 0:ee.split("]"))==null?void 0:ae[0])==null?void 0:w.split(":"),A="";if(k!=null&&k[0]){let X=(Ne=be==null?void 0:be.find(oe=>(oe==null?void 0:oe.name)===(k==null?void 0:k[0])))==null?void 0:Ne.compData;if(!X){let oe=(_e=Z==null?void 0:Z.split("["))==null?void 0:_e[0],I=await Me.getItemData(oe,sessionStorage.getItem("systemKey"),"",!1,"","",ue);X=(ve=I==null?void 0:I.find(de=>(de==null?void 0:de.name)===(k==null?void 0:k[0])))==null?void 0:ve.compData}X==null||X.forEach(oe=>{var I,de,ze,le,K,H;if((oe==null?void 0:oe.key)==="formContent")(I=oe==null?void 0:oe.contents)==null||I.forEach(Y=>{var we;(Y==null?void 0:Y.key)===(k==null?void 0:k[1])&&(Array.isArray(Y==null?void 0:Y.value)?A=Y==null?void 0:Y.value:A=(we=Y==null?void 0:Y.value)==null?void 0:we.toString())});else if((oe==null?void 0:oe.key)==="tableContents"){let Y=[],we=(de=X==null?void 0:X.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:de.contents,me=(k==null?void 0:k[1])??"";if(we!=null&&we.every(q=>Array.isArray(q))){let q=Me.getColumnChild((K=we==null?void 0:we[0])==null?void 0:K.filter(he=>(he==null?void 0:he.label)!=="操作"));(H=oe.contents)==null||H.forEach(he=>{let re={};he=he==null?void 0:he.filter(Ve=>!(Ve!=null&&Ve.id)),q==null||q.forEach((Ve,pe)=>{let Be=he[pe];typeof he[pe]=="number"&&(Be=he[pe].toString()),(me===""||me===Ve.prop)&&(re[Ve.prop]=Be)}),Y.push(re)}),Y=Qe(Y)}else{let q=(ze=we==null?void 0:we.map(he=>he==null?void 0:he.label))==null?void 0:ze.filter(he=>he!=="操作");(le=oe.contents)==null||le.forEach(he=>{let re={};he=he==null?void 0:he.filter(Ve=>!(Ve!=null&&Ve.id)),q==null||q.forEach((Ve,pe)=>{let Be=he[pe];typeof he[pe]=="number"&&(Be=he[pe].toString()),(me===""||me===Ve)&&(re[Ve]=Be)}),Y.push(re)})}A=Y}})}return A}else if(Z!=null&&Z.includes("/")){let k={};return(te=C.cloneDeep(be))==null||te.forEach((A,X)=>{var oe,I,de,ze,le,K,H,Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge;if((A==null?void 0:A.comp)==="Table"){let We=Array.isArray((de=(I=(oe=A==null?void 0:A.compData)==null?void 0:oe.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:I.contents)==null?void 0:de[0])?(H=(K=(le=(ze=A==null?void 0:A.compData)==null?void 0:ze.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:le.contents)==null?void 0:K[0])==null?void 0:H.some(Ae=>Ae==null?void 0:Ae.children):[],st=(me=(we=(Y=A==null?void 0:A.compData)==null?void 0:Y.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:we.contents)==null?void 0:me.map(Ae=>(Ae!=null&&Ae.find(pt=>pt==null?void 0:pt.id)&&(Ae=Ae.slice(1)),Ae)),Ge=(pe=(Ve=(re=(he=(q=A==null?void 0:A.compData)==null?void 0:q.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:he.contents)==null?void 0:re[0])==null?void 0:Ve[0])==null?void 0:pe.label,tt=($=(Be=A==null?void 0:A.compData)==null?void 0:Be.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:$.contents;if(We)(We==null?void 0:We.length)===0?k[A.name]=k!=null&&k[A.name]?k[A.name]:Me.tableToForm(st,tt):k[Ge]=Me.tableToForm(st,tt);else{const Ae=[];tt=tt.slice(1,tt.length-1),tt==null||tt.forEach((pt,Je)=>{st==null||st.forEach(Le=>{Ae.push({key:pt.label+Le[0],value:Le[Je+1]})})}),k["form"+X]=Ae}}else{const We=(ge=(Oe=A.compData)==null?void 0:Oe.find(Ge=>(Ge==null?void 0:Ge.key)==="formContent"))==null?void 0:ge.contents;k!=null&&k.form||(k.form=[]);const st=[];We==null||We.forEach(Ge=>{Ge.key!==""&&(Ge={key:(Ge==null?void 0:Ge.key)??(Ge==null?void 0:Ge.label),value:Ge==null?void 0:Ge.value},st.push(Ge))}),k.form=[...st,...C.cloneDeep(k==null?void 0:k.form)]}}),k}else{if(Z==="createInsofDataApi"){let k=(J=C.cloneDeep(z))==null?void 0:J[0];return k={comp:(se=C.cloneDeep(k))==null?void 0:se.comp,compData:(fe=C.cloneDeep(k))==null?void 0:fe.compData,name:(Fe=C.cloneDeep(k))==null?void 0:Fe.name,isShow:(dt=C.cloneDeep(k))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:g.value},value:{pageData:k}}}return Z}},Pe=async(Z,z,ue)=>{var Se,qe,ee;let be=await Me.getItemData(z,sessionStorage.getItem("systemKey"),""),Ce=be==null?void 0:be.find(ae=>(ae==null?void 0:ae.name)===(ue==null?void 0:ue[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let ae={};for(let se in C.cloneDeep(Z))C.cloneDeep(Z)[se]!=="loginUser"?ae[se]=C.cloneDeep(Z)[se]:ae[se]=((Se=S.value)==null?void 0:Se.account)||((qe=S.value)==null?void 0:qe.账号);let w=[],Ne=ae;Array.isArray(Z)||(Ne=[ae]),Ne==null||Ne.forEach(se=>{w.push({[se[ue[1]]]:se})});let _e=[],ve=w==null?void 0:w.map(se=>{var fe;return(fe=Object.keys(se))==null?void 0:fe[0]});be==null||be.forEach(se=>{var fe;(se==null?void 0:se.name)===(ue==null?void 0:ue[0])&&((fe=se==null?void 0:se.compData)==null||fe.forEach(Fe=>{var dt;(Fe==null?void 0:Fe.key)==="tableContents"&&((dt=Fe==null?void 0:Fe.contents)==null||dt.forEach(k=>{k!=null&&k.some(A=>ve.includes(A))&&_e.push({[k.find(A=>A.id).id]:k.find(A=>ve.includes(A))})}))}))});let te=_e==null?void 0:_e.map(se=>{var fe;return(fe=Object.keys(se))==null?void 0:fe[0]}),J=[];if(te==null||te.forEach(se=>{var dt;let fe=(dt=_e==null?void 0:_e.find(k=>{var A;return((A=Object.keys(k))==null?void 0:A[0].toString())===se.toString()}))==null?void 0:dt[se],Fe=w==null?void 0:w.find(k=>{var A;return((A=Object.keys(k))==null?void 0:A[0])===fe});J.push({id:parseInt(se),value:{tableData:Fe[fe]}})}),(J==null?void 0:J.length)>0)return J}else if((Ce==null?void 0:Ce.comp)==="Form"){let ae=C.cloneDeep(Ce);ae.compData=(ee=ae.compData)==null?void 0:ee.map(_e=>{var ve;return(_e==null?void 0:_e.key)==="formContent"&&(_e.contents=(ve=_e.contents)==null?void 0:ve.map(te=>((te==null?void 0:te.key)===(ue==null?void 0:ue[1])&&(te.value=(Z==null?void 0:Z[te==null?void 0:te.prop])||Z),te))),_e});let w={};for(let _e in ae)_e!=="id"&&(w[_e]=ae[_e]);let Ne=[];if(Ne.push({id:Ce==null?void 0:Ce.id,keyType:ue==null?void 0:ue[1],value:{pageData:w}}),(Ne==null?void 0:Ne.length)>0)return Ne}}},Re=async(Z,z,ue)=>{var Se,qe,ee,ae,w,Ne,_e,ve,te,J;let be=await Me.getItemData(z,sessionStorage.getItem("systemKey"),""),Ce=be==null?void 0:be.find(se=>(se==null?void 0:se.name)===(ue==null?void 0:ue[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let se={};for(let fe in C.cloneDeep(Z))C.cloneDeep(Z)[fe]!=="loginUser"?se[fe]=C.cloneDeep(Z)[fe]:se[fe]=((Se=S.value)==null?void 0:Se.account)||((qe=S.value)==null?void 0:qe.账号);await ct.createInsofDataApi({key:{type:"data",pageKey:z,tableId:Ce==null?void 0:Ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:se}})}else if((Ce==null?void 0:Ce.comp)==="Form"){let se=C.cloneDeep(Ce),fe=Object.keys(Z),Fe="";(ae=(ee=C.cloneDeep(se))==null?void 0:ee.compData)==null||ae.forEach(I=>{var de,ze;(I==null?void 0:I.key)==="formContent"&&((ze=(de=C.cloneDeep(I))==null?void 0:de.contents)==null||ze.forEach(le=>{var K;fe.includes(le==null?void 0:le.key)&&(le==null?void 0:le.value)===((K=S.value)==null?void 0:K.姓名)&&(Fe=le==null?void 0:le.key)}))});let dt=[];(w=Object.values(Z[Fe]))==null||w.forEach(I=>{I!=null&&I.includes("(")&&dt.push(I)}),dt=[...new Set(dt)];const k=dt==null?void 0:dt.map(async I=>{var H,Y,we,me,q,he,re,Ve,pe,Be,$,Oe;let de="";(he=(q=(me=(we=(Y=(H=C.cloneDeep(I))==null?void 0:H.split("("))==null?void 0:Y[1])==null?void 0:we.split(")"))==null?void 0:me[0])==null?void 0:q.split(":"))==null||he.forEach(ge=>{de=de===""?de+ge.replaceAll("'",""):de+"/"+ge.replaceAll("'","")});let ze=[];(Oe=($=(Be=(pe=(Ve=(re=C.cloneDeep(I))==null?void 0:re.split("<"))==null?void 0:Ve[1])==null?void 0:pe.split(">"))==null?void 0:Be[0])==null?void 0:$.split(":"))==null||Oe.forEach(ge=>{ze.push(ge.replaceAll("'",""))});const le=await Me.getItemData(de,sessionStorage.getItem("systemKey"),"");let K="";return le==null||le.forEach(ge=>{var We;ge.name===(ze==null?void 0:ze[0])&&((We=ge==null?void 0:ge.compData)==null||We.forEach(st=>{var Ge;(st==null?void 0:st.key)==="formContent"&&((Ge=st.contents)==null||Ge.forEach(tt=>{(tt==null?void 0:tt.key)===(ze==null?void 0:ze[1])&&(K=tt==null?void 0:tt.value)}))}))}),{[I]:K}}),A=await Promise.all(k);se.compData=(_e=(Ne=C.cloneDeep(se))==null?void 0:Ne.compData)==null?void 0:_e.map(I=>{var de,ze;return(I==null?void 0:I.key)==="formContent"&&(I.contents=(ze=(de=C.cloneDeep(I))==null?void 0:de.contents)==null?void 0:ze.map(le=>{var K,H,Y,we;return(K=Z[Fe])!=null&&K[le==null?void 0:le.key]&&(Z[Fe][le==null?void 0:le.key].includes("(")?le.value=(H=A==null?void 0:A.find(me=>{var q;return((q=Object.keys(me))==null?void 0:q[0])===Z[Fe][le==null?void 0:le.key]}))==null?void 0:H[Z[Fe][le==null?void 0:le.key]]:le.value=(we=(Y=C.cloneDeep(Z))==null?void 0:Y[Fe])==null?void 0:we[le==null?void 0:le.key]),le})),I});const X=await ct.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((ve=X==null?void 0:X.data)==null?void 0:ve.type)==="success"&&((J=(te=X==null?void 0:X.data)==null?void 0:te.result)==null||J.forEach(I=>{var de,ze;((ze=(de=I==null?void 0:I.value)==null?void 0:de.pageData)==null?void 0:ze.name)===(ue==null?void 0:ue[0])&&(oe=I.id)}),await ct.updateInsofDataApi({id:oe,value:{pageData:se}}))}}},P=(Z,z="",ue={})=>{for(const[be,Ce]of Object.entries(Z)){const Se=z?`${z}.${be}`:be;Ce!==null&&typeof Ce=="object"&&!Array.isArray(Ce)&&Object.prototype.toString.call(Ce)!=="[object Date]"?P(Ce,Se,ue):ue[Se]=Ce}return ue},U=async(Z,z,ue,be)=>{var qe,ee,ae,w,Ne,_e,ve,te,J,se,fe,Fe,dt,k,A,X,oe,I,de,ze,le,K,H,Y,we;let Ce=await Me.getItemData(z,sessionStorage.getItem("systemKey"),""),Se=Ce==null?void 0:Ce.find(me=>(me==null?void 0:me.name)===(ue==null?void 0:ue[0]));if(Se){if(!(ue!=null&&ue[1])&&(Se==null?void 0:Se.comp)==="Table"){let me={},q=[],he=(ee=(qe=Se==null?void 0:Se.compData)==null?void 0:qe.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:ee.contents;he!=null&&he.every(pe=>Array.isArray(pe))?q=(w=Me.getColumnChild((ae=he==null?void 0:he[0])==null?void 0:ae.filter(pe=>(pe==null?void 0:pe.label)!=="操作")))==null?void 0:w.map(pe=>pe==null?void 0:pe.prop):q=he==null?void 0:he.map(pe=>pe==null?void 0:pe.label);for(let pe in C.cloneDeep(Z))if(C.cloneDeep(Z)[pe]!=="loginUser"){let Be=P(C.cloneDeep(Z)[pe]),$={};for(let Oe in Be)if(q!=null&&q.find(ge=>ge===Oe))$[Oe]=Be[Oe];else if(q!=null&&q.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()))){let ge=q==null?void 0:q.find(We=>(We==null?void 0:We.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()));$[ge]=Be[Oe]}me[pe]=$}else me[pe]=((Ne=S.value)==null?void 0:Ne.account)||((_e=S.value)==null?void 0:_e.账号);let re=await ct.getInsofDataApi({keyLikes:{tableId:Se==null?void 0:Se.id}});if(((te=(ve=re==null?void 0:re.data)==null?void 0:ve.result)==null?void 0:te.length)>0){let pe=(se=(J=re==null?void 0:re.data)==null?void 0:J.result)==null?void 0:se.map(Be=>Be==null?void 0:Be.id);(pe==null?void 0:pe.length)>0&&await ct.batchDeleteInsofDataApi({ids:pe})}let Ve=[];if((fe=Se==null?void 0:Se.compData)!=null&&fe.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")&&((k=(dt=(Fe=Se==null?void 0:Se.compData)==null?void 0:Fe.find(pe=>(pe==null?void 0:pe.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&k.includes("["))){const pe=await ct.getInsofDataApi({id:Se==null?void 0:Se.tableId});let Be=((I=(oe=(X=(A=pe==null?void 0:pe.data)==null?void 0:A.result)==null?void 0:X[0])==null?void 0:oe.key)==null?void 0:I.pageKey)??"";(de=Object.values(me))==null||de.forEach($=>{Ve.push({key:{type:"data",pageKey:Be,tableId:Se==null?void 0:Se.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(ze=Object.values(me))==null||ze.forEach(pe=>{Ve.push({key:{type:"data",pageKey:z,tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})});(Ve==null?void 0:Ve.length)>0&&await ct.batchAddInsofDataApi({dataList:Ve})}else if(!(ue!=null&&ue[1])&&(Se==null?void 0:Se.comp)==="Form"){let me=C.cloneDeep(Se);me.compData=(K=(le=C.cloneDeep(me))==null?void 0:le.compData)==null?void 0:K.map(re=>{var Ve,pe;return(re==null?void 0:re.key)==="formContent"&&(re.contents=(pe=(Ve=C.cloneDeep(re))==null?void 0:Ve.contents)==null?void 0:pe.map(Be=>{var $,Oe;return($=C.cloneDeep(Z))!=null&&$[Be==null?void 0:Be.key]&&(Be.value=(Oe=C.cloneDeep(Z))==null?void 0:Oe[Be==null?void 0:Be.key]),Be})),re});const q=await ct.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let he="";((H=q==null?void 0:q.data)==null?void 0:H.type)==="success"&&((we=(Y=q==null?void 0:q.data)==null?void 0:Y.result)==null||we.forEach(re=>{var Ve,pe;((pe=(Ve=re==null?void 0:re.value)==null?void 0:Ve.pageData)==null?void 0:pe.name)===(ue==null?void 0:ue[0])&&(he=re.id)}),await ct.updateInsofDataApi({id:he,value:{pageData:me}}))}}},G=async Z=>{var z,ue,be,Ce,Se,qe,ee,ae,w,Ne,_e,ve,te,J,se,fe;_.setImportLoading(!0);try{if(Z.api){let Fe=new WeakMap;(ue=(z=(await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:F.value})).data.result)==null?void 0:z.filter(H=>{var Y,we;return((Y=H==null?void 0:H.key)==null?void 0:Y.pageKey)!=="menu"&&((we=H==null?void 0:H.key)==null?void 0:we.pageKey)!=="secret"}))==null||ue.forEach(H=>{Fe[H.key.pageKey]?Fe[H.key.pageKey]=[...Fe[H.key.pageKey],H]:Fe[H.key.pageKey]=[H]});let k=await Me.getItemData((v==null?void 0:v.value)===""?g.value:v==null?void 0:v.value,sessionStorage.getItem("systemKey"),"",!1,"","",Fe),A="";if(k=k==null?void 0:k.map(H=>{var Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge;if((H==null?void 0:H.comp)==="Form")H.compData=(Y=H.compData)==null?void 0:Y.map(We=>{var st;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(st=We.contents)==null?void 0:st.map(Ge=>{var tt;if((Ge==null?void 0:Ge.value)===""&&(Ge==null?void 0:Ge.type)==="Select"){let Ae=Me.judgeContents((tt=C.cloneDeep(Ge))==null?void 0:tt.optionUrl,Fe);Ge.value=Ge.value||Ae}return Ge})),We});else if((H==null?void 0:H.comp)==="Table"&&(we=H.compData)!=null&&we.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(q=(me=H.compData)==null?void 0:me.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:q.contents,st=((re=(he=H.compData)==null?void 0:he.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:re.contents)??"",Ge=(Be=(pe=(Ve=We==null?void 0:We.split("["))==null?void 0:Ve[1])==null?void 0:pe.split("]"))==null?void 0:Be[0];A=(($=We==null?void 0:We.split("["))==null?void 0:$[0])+((ge=(Oe=M.value)==null?void 0:Oe.find(Ae=>(Ae==null?void 0:Ae.key)===Ge))==null?void 0:ge.value)}return H}),!(A===""||A==="")){const H=await Me.getItemData(A,sessionStorage.getItem("systemKey"),"",!1,"","",Fe);k=k==null?void 0:k.map(Y=>{var we,me,q,he,re,Ve,pe,Be,$,Oe,ge,We,st;if((Y==null?void 0:Y.comp)==="Table"&&(we=Y.compData)!=null&&we.find(Ge=>(Ge==null?void 0:Ge.key)==="pageColumn")){let Ge=(q=(me=Y.compData)==null?void 0:me.find(Le=>(Le==null?void 0:Le.key)==="pageColumn"))==null?void 0:q.contents,tt=((re=(he=Y.compData)==null?void 0:he.find(Le=>(Le==null?void 0:Le.key)==="pageGroup"))==null?void 0:re.contents)??"",Ae=(Be=(pe=(Ve=Ge==null?void 0:Ge.split("["))==null?void 0:Ve[1])==null?void 0:pe.split("]"))==null?void 0:Be[0],pt=(($=Ge==null?void 0:Ge.split("["))==null?void 0:$[0])+((ge=(Oe=M.value)==null?void 0:Oe.find(Le=>(Le==null?void 0:Le.key)===Ae))==null?void 0:ge.value),Je=(We=H==null?void 0:H.find(Le=>(Le==null?void 0:Le.name)===(tt===""?c==null?void 0:c.compName:tt)))==null?void 0:We.compData;Y.compData=(st=Y.compData)==null?void 0:st.map(Le=>{var rt;return(Le==null?void 0:Le.key)==="tableContents"&&(Le.contents=(rt=Je==null?void 0:Je.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:rt.contents),Le})}return Y})}let X={};if(((Ce=(be=Z==null?void 0:Z.extraValues)==null?void 0:be.input)==null?void 0:Ce.length)>0){const H=(qe=(Se=Z==null?void 0:Z.extraValues)==null?void 0:Se.input)==null?void 0:qe.map(async Y=>{var we;ie!=null&&ie.find(me=>me===Y)?X=await ke(Y,k):X[Object.keys(Y)[0]]=await ke((we=Object.values(Y))==null?void 0:we[0],k,Fe)});await Promise.all(H)}else X=await ke("/",k);let oe=!1;(ae=(ee=Z==null?void 0:Z.extraValues)==null?void 0:ee.output)==null||ae.forEach(H=>{var Y,we;(we=(Y=Object.values(H))==null?void 0:Y[0])!=null&&we.includes(".doc")&&(oe=!0)});let I;if(oe){const H=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});I=await ct.axios.post(Z.api,X,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else I=await ct.axios.post(Z.api,X,{headers:{"Content-Type":"application/json"}});let de=(ve=(_e=(Ne=(w=C.cloneDeep(Z))==null?void 0:w.extraValues)==null?void 0:Ne.output)==null?void 0:_e.map(H=>{var Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge,We,st,Ge,tt;if(!((we=(Y=Object.values(H))==null?void 0:Y[0])!=null&&we.includes(".doc"))){let Ae=($=(Be=(pe=(q=C.cloneDeep((me=Object.values(H))==null?void 0:me[0]))==null?void 0:q.split("["))==null?void 0:pe[((Ve=(re=C.cloneDeep((he=Object.values(H))==null?void 0:he[0]))==null?void 0:re.split("["))==null?void 0:Ve.length)-1])==null?void 0:Be.split("]"))==null?void 0:$[0],pt=Ae==null?void 0:Ae.split(":"),Je=(We=C.cloneDeep((Oe=Object.values(H))==null?void 0:Oe[0]))==null?void 0:We.substring(0,C.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]).lastIndexOf("["));if(Je=(Ge=C.cloneDeep(Je))==null?void 0:Ge.slice(0,((st=C.cloneDeep(Je))==null?void 0:st.length)-1),Je!=null&&Je.includes("[")){let Le="";if((tt=Me.contentTransArrayToAll(Je,"/"))==null||tt.forEach(rt=>{var mt,wt,He,ot,yt,je,Ke;if(!(rt!=null&&rt.includes("[")))Le=Le===""?Le+rt.replaceAll("/",""):Le+"/"+rt.replaceAll("/","");else{let Ye=C.cloneDeep(rt).slice(1,((mt=C.cloneDeep(rt))==null?void 0:mt.length)-1),Te=(je=(yt=(ot=(He=(wt=C.cloneDeep(Ye))==null?void 0:wt.split("["))==null?void 0:He[1])==null?void 0:ot.split("]"))==null?void 0:yt[0])==null?void 0:je.split(":"),O="",ye=(Ke=k==null?void 0:k.find(xe=>(xe==null?void 0:xe.name)===(Te==null?void 0:Te[0])))==null?void 0:Ke.compData;ye==null||ye.forEach(xe=>{var at;(xe==null?void 0:xe.key)==="formContent"&&((at=xe==null?void 0:xe.contents)==null||at.forEach(et=>{(et==null?void 0:et.key)===(Te==null?void 0:Te[1])&&(O=et==null?void 0:et.value)}))}),Le=Le===""?Le+O.replaceAll("/",""):Le+"/"+O.replaceAll("/","")}}),Je=Le,Je[(Je==null?void 0:Je.length)-1]!=="/")return Je}}}))==null?void 0:ve.filter(H=>H);de=[...new Set(C.cloneDeep(de))];let ze=de==null?void 0:de.map(async H=>{let Y=await Me.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Fe);if((Y==null?void 0:Y.length)===0)return await Me.getParentContents(H)});await Promise.all(ze);let le=[],K=(se=(J=(te=C.cloneDeep(Z))==null?void 0:te.extraValues)==null?void 0:J.output)==null?void 0:se.map(async H=>{var pe,Be,$,Oe,ge,We,st,Ge,tt,Ae,pt,Je,Le,rt,mt,wt,He,ot,yt,je,Ke,Ye,Te,O,ye,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt,Rt,Kt,Ht,Jt,ta,Ft,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma,Ct;if((Be=(pe=Object.values(H))==null?void 0:pe[0])!=null&&Be.includes(".doc")){var Y=new Blob([I.data],{type:"application/octet-stream;charset=UTF-8"}),we=I.headers["content-disposition"],me=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=me.exec(we),he=q==null?void 0:q[1],re=document.createElement("a"),Ve=window.URL.createObjectURL(Y);y.value=[{name:he,blobUrl:Ve}],s.value=!0}else{let aa=(Ae=(tt=(Ge=(Oe=C.cloneDeep(($=Object.values(H))==null?void 0:$[0]))==null?void 0:Oe.split("["))==null?void 0:Ge[((st=(We=C.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]))==null?void 0:We.split("["))==null?void 0:st.length)-1])==null?void 0:tt.split("]"))==null?void 0:Ae[0],nt=aa==null?void 0:aa.split(":"),qt=(Le=C.cloneDeep((pt=Object.values(H))==null?void 0:pt[0]))==null?void 0:Le.substring(0,C.cloneDeep((Je=Object.values(H))==null?void 0:Je[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(mt=C.cloneDeep(qt))==null?void 0:mt.slice(0,((rt=C.cloneDeep(qt))==null?void 0:rt.length)-1):qt===""&&(qt=g.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Dt="";(wt=Me.contentTransArrayToAll(qt,"/"))==null||wt.forEach((It,Mt)=>{var $t,At,na,Yt,za,Qa,Ra,en,Tn,cn,yn;if(!(It!=null&&It.includes("[")))Dt=Dt===""?Dt+It.replaceAll("/",""):Dt+"/"+It.replaceAll("/","");else{let un="",ha="";($t=C.cloneDeep(It))!=null&&$t.includes("]")?(un=C.cloneDeep(It).slice(1,((At=C.cloneDeep(It))==null?void 0:At.length)-1),ha=(Ra=(Qa=(za=(Yt=(na=C.cloneDeep(un))==null?void 0:na.split("["))==null?void 0:Yt[1])==null?void 0:za.split("]"))==null?void 0:Qa[0])==null?void 0:Ra.split(":")):(un=C.cloneDeep(It).slice(1,(en=C.cloneDeep(It))==null?void 0:en.length),ha=(Tn=C.cloneDeep(un))==null?void 0:Tn.split("/"));let tn="",dn=(cn=k==null?void 0:k.find(ua=>(ua==null?void 0:ua.name)===(ha==null?void 0:ha[0])))==null?void 0:cn.compData;dn==null||dn.forEach(ua=>{var Bn;(ua==null?void 0:ua.key)==="formContent"&&((Bn=ua==null?void 0:ua.contents)==null||Bn.forEach(Pa=>{(Pa==null?void 0:Pa.key)===(ha==null?void 0:ha[1])&&(tn=Pa==null?void 0:Pa.value)}))}),((yn=Me.contentTransArrayToAll(qt,"/"))==null?void 0:yn.length)-1!==Mt?Dt=Dt===""?Dt+tn.replaceAll("/",""):Dt+"/"+tn.replaceAll("/",""):Dt=Dt+l.value+tn.replaceAll("/","")}}),(He=g.value)!=null&&He.includes(Dt)?qt=g.value:qt=Dt}let St=C.cloneDeep((ot=Object.keys(H))==null?void 0:ot[0]);if(((yt=I==null?void 0:I.data)==null?void 0:yt.statusCode)===200||((je=I==null?void 0:I.data)==null?void 0:je.code)===200){if(((Ye=(Ke=I==null?void 0:I.data)==null?void 0:Ke.data)!=null&&Ye[St]||(O=(Te=I==null?void 0:I.data)==null?void 0:Te.result)!=null&&O[St])&&(nt==null?void 0:nt.length)===1)return await U(((xe=(ye=I==null?void 0:I.data)==null?void 0:ye.data)==null?void 0:xe[St])||((et=(at=I==null?void 0:I.data)==null?void 0:at.result)==null?void 0:et[St]),C.cloneDeep(qt),nt,A);if((_t=(Et=I==null?void 0:I.data)==null?void 0:Et.data)!=null&&_t[St]||(ft=(ut=I==null?void 0:I.data)==null?void 0:ut.result)!=null&&ft[St]){let Dt=await Pe(((gt=(vt=I==null?void 0:I.data)==null?void 0:vt.data)==null?void 0:gt[St])||((bt=(Lt=I==null?void 0:I.data)==null?void 0:Lt.result)==null?void 0:bt[St]),C.cloneDeep(qt),nt);return Dt&&(le=[...le,...Dt]),Dt}else{if(!((zt=I==null?void 0:I.data)!=null&&zt.data)){let Dt=await Me.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,"","",Fe);Dt=Dt==null?void 0:Dt.map(Mt=>{var $t;return(Mt==null?void 0:Mt.name)===(nt==null?void 0:nt[0])&&(Mt.compData=($t=Mt.compData)==null?void 0:$t.map(At=>{var na;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(na=At.contents)==null?void 0:na.map(Yt=>{var za,Qa;return(Yt==null?void 0:Yt.key)===(nt==null?void 0:nt[1])&&(Yt.value=(Qa=(za=I==null?void 0:I.data)==null?void 0:za.result)==null?void 0:Qa[St==null?void 0:St.replaceAll(":","")]),Yt})),At})),Mt});let It=[];(Rt=Dt==null?void 0:Dt.filter(Mt=>(Mt==null?void 0:Mt.comp)==="Form"))==null||Rt.forEach(async Mt=>{let $t={};for(let At in Mt)At!=="id"&&($t[At]=Mt[At]);It.push({id:Mt==null?void 0:Mt.id,value:{pageData:$t}})}),(It==null?void 0:It.length)>0&&await ct.batchUpdateInsofDataApi({dataList:It});return}if((nt==null?void 0:nt.length)===1){const Dt=(Jt=(Ht=(Kt=I==null?void 0:I.data)==null?void 0:Kt.data)==null?void 0:Ht.path)==null?void 0:Jt.path;let It="";(ja=(wa=(Fa=(Ft=(ta=Dt==null?void 0:Dt.split("("))==null?void 0:ta[1])==null?void 0:Ft.split(")"))==null?void 0:Fa[0])==null?void 0:wa.split(":"))==null||ja.forEach(At=>{var na,Yt;It=It===""?It+((na=At==null?void 0:At.replaceAll("'",""))==null?void 0:na.trim()):It+"/"+((Yt=At==null?void 0:At.replaceAll("'",""))==null?void 0:Yt.trim())});let Mt=[(Ha=(Wa=(Ka=(Ua=(Da=Dt==null?void 0:Dt.split("<"))==null?void 0:Da[1])==null?void 0:Ua.split(">"))==null?void 0:Ka[0])==null?void 0:Wa.replaceAll("'",""))==null?void 0:Ha.trim()],$t;return(ya=(Na=(qa=I==null?void 0:I.data)==null?void 0:qa.data)==null?void 0:Na.data)!=null&&ya[nt==null?void 0:nt[0]]?$t=await U((ba=(_a=(fa=I==null?void 0:I.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ba[nt==null?void 0:nt[0]],It,nt,A):$t=await Re((ma=(ca=I==null?void 0:I.data)==null?void 0:ca.data)==null?void 0:ma.data,It,Mt,Fe),$t}else{const Dt=(Va=(Aa=(Xa=I==null?void 0:I.data)==null?void 0:Xa.data)==null?void 0:Aa.path)==null?void 0:Va.path;let It="";return(Ja=(Oa=(Ga=(Ya=(Ea=Dt==null?void 0:Dt.split("("))==null?void 0:Ea[1])==null?void 0:Ya.split(")"))==null?void 0:Ga[0])==null?void 0:Oa.split(":"))==null||Ja.forEach($t=>{var At,na;It=It===""?It+((At=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:At.trim()):It+"/"+((na=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:na.trim())}),await Pe((Ct=(Ma=(Za=I==null?void 0:I.data)==null?void 0:Za.data)==null?void 0:Ma.data)==null?void 0:Ct[nt==null?void 0:nt[0]],It,nt)}}}}});if(await Promise.all(K),(le==null?void 0:le.length)>0){let H=[];le==null||le.forEach(me=>{H!=null&&H.find(q=>{var he,re,Ve,pe;return((re=(he=q==null?void 0:q.value)==null?void 0:he.pageData)==null?void 0:re.name)===((pe=(Ve=me==null?void 0:me.value)==null?void 0:Ve.pageData)==null?void 0:pe.name)})||H.push(me)});let Y=[];H==null||H.forEach(me=>{var re,Ve,pe,Be;let q=C.cloneDeep(me);q.value.pageData.compData=(re=q.value.pageData.compData)==null?void 0:re.map($=>{var Oe;return($==null?void 0:$.key)==="formContent"&&($.contents=(Oe=$.contents)==null?void 0:Oe.map(ge=>{var st,Ge,tt,Ae;let We=(st=C.cloneDeep(le))==null?void 0:st.find(pt=>(pt==null?void 0:pt.keyType)===(ge==null?void 0:ge.key));if(We){let pt=(Ae=(tt=(Ge=We.value.pageData.compData)==null?void 0:Ge.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ae.find(Je=>(Je==null?void 0:Je.key)===(ge==null?void 0:ge.key));ge.value=pt==null?void 0:pt.value}return ge})),$}),Y.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let he=[];(Be=(pe=(Ve=q==null?void 0:q.value)==null?void 0:Ve.pageData)==null?void 0:pe.compData)==null||Be.forEach($=>{var Oe;($==null?void 0:$.key)==="formContent"&&((Oe=$==null?void 0:$.contents)==null||Oe.forEach(ge=>{var We,st,Ge,tt,Ae,pt;if((st=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.menuSelect)!=null&&st.find(Je=>Je==null?void 0:Je.includes("[")))if(he!=null&&he.find(Je=>{var Le,rt,mt;return((Le=Je==null?void 0:Je.key)==null?void 0:Le.join(","))===((mt=(rt=ge==null?void 0:ge.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:mt.join(","))})){let Je=(Ge=he==null?void 0:he.find(Le=>{var rt,mt,wt;return((rt=Le==null?void 0:Le.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))}))==null?void 0:Ge.value;Je.push({key:ge==null?void 0:ge.prop,groups:(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.groupSelect,value:ge==null?void 0:ge.value}),he=he==null?void 0:he.map(Le=>{var rt,mt,wt;return((rt=Le==null?void 0:Le.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))&&(Le.value=Je),Le})}else he.push({key:(Ae=ge==null?void 0:ge.optionUrl)==null?void 0:Ae.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(he==null?void 0:he.length)>0&&(he=he==null?void 0:he.map($=>{var ge;let Oe="";return(ge=$==null?void 0:$.key)==null||ge.forEach(We=>{var st;if(!(We!=null&&We.includes("[")))Oe=Oe===""?Oe+We:Oe+"/"+We;else{let Ge="",tt=(st=We==null?void 0:We.replaceAll("[","").replaceAll("]",""))==null?void 0:st.split(":");k==null||k.forEach(Ae=>{var pt;(Ae==null?void 0:Ae.name)===(tt==null?void 0:tt[0])&&((pt=Ae==null?void 0:Ae.compData)==null||pt.forEach(Je=>{var Le;(Je==null?void 0:Je.key)==="formContent"&&((Le=Je==null?void 0:Je.contents)==null||Le.forEach(rt=>{(rt==null?void 0:rt.prop)===(tt==null?void 0:tt[1])&&(Ge=rt==null?void 0:rt.value)}))}))}),Oe=Oe+l.value+Ge}}),$.key=Oe,$})),he==null||he.forEach($=>{var st,Ge,tt;let Oe=(st=Fe[$.key])==null?void 0:st.find(Ae=>{var pt,Je,Le,rt,mt,wt,He;return((Je=(pt=Ae==null?void 0:Ae.value)==null?void 0:pt.pageData)==null?void 0:Je.name)===((mt=(rt=(Le=$==null?void 0:$.value)==null?void 0:Le[0])==null?void 0:rt.groups)==null?void 0:mt[0])&&((He=(wt=Ae==null?void 0:Ae.value)==null?void 0:wt.pageData)==null?void 0:He.name)!==void 0}),ge=Oe==null?void 0:Oe.id,We=(Ge=Oe==null?void 0:Oe.value)==null?void 0:Ge.pageData;We.compData=(tt=We.compData)==null?void 0:tt.map(Ae=>{var pt;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(pt=Ae.contents)==null?void 0:pt.map(Je=>{var rt;let Le=(rt=$.value)==null?void 0:rt.find(mt=>(mt==null?void 0:mt.key)===(Je==null?void 0:Je.prop));return Le&&(Je.value=Le.value),Je})),Ae}),Y.push({id:ge,value:{pageData:We}})})});let we=(fe=C.cloneDeep(le))==null?void 0:fe[0];(Y==null?void 0:Y.length)>0&&await ct.batchUpdateInsofDataApi({dataList:Y})}m.setFreshContent(!0)}_.setImportLoading(!1)}catch{ct.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}b.value=!0},ie=["createInsofDataApi"],Ee=kl(async Z=>{G(Z)},100),Ze=async Z=>{var ee,ae,w,Ne,_e;const z=C.cloneDeep(Z);let ue,be=new WeakMap,Ce=await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:F.value});(ae=(ee=Ce.data.result)==null?void 0:ee.filter(ve=>{var te,J;return((te=ve==null?void 0:ve.key)==null?void 0:te.pageKey)!=="menu"&&((J=ve==null?void 0:ve.key)==null?void 0:J.pageKey)!=="secret"}))==null||ae.forEach(ve=>{be[ve.key.pageKey]?be[ve.key.pageKey]=[...be[ve.key.pageKey],ve]:be[ve.key.pageKey]=[ve]}),Z!=null&&Z[0].path&&(ue=await(z==null?void 0:z.map(async(ve,te)=>{var X,oe,I,de,ze,le,K,H,Y,we,me,q,he,re,Ve,pe;const se=(X=be[ve==null?void 0:ve.path])==null?void 0:X.filter(Be=>{var $;return(($=Be==null?void 0:Be.key)==null?void 0:$.type)==="data"});let fe="";const Fe=await Me.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);se==null||se.forEach(Be=>{var $,Oe,ge,We,st;((Oe=($=Be==null?void 0:Be.value)==null?void 0:$.tableData)==null?void 0:Oe.算法名称)===((ge=z==null?void 0:z[te])==null?void 0:ge.method)&&(fe=(st=(We=Be==null?void 0:Be.value)==null?void 0:We.tableData)==null?void 0:st.算法体)});const dt=await Me.getItemData(ve==null?void 0:ve.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);let k="",A=(ze=(de=(I=(oe=dt==null?void 0:dt[0])==null?void 0:oe.compData)==null?void 0:I.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:de.contents)==null?void 0:ze.findIndex(Be=>(Be==null?void 0:Be.prop)==="算法体");return(K=(le=dt==null?void 0:dt[0])==null?void 0:le.compData)==null||K.forEach(Be=>{var $;(Be==null?void 0:Be.key)==="tableContents"&&(($=Be==null?void 0:Be.contents)==null||$.forEach(Oe=>{Oe!=null&&Oe.find(ge=>ge===(ve==null?void 0:ve.method))&&(k=Oe[A])}))}),{buttonName:((H=z==null?void 0:z[te])==null?void 0:H.method)||((me=(we=(Y=se==null?void 0:se[0])==null?void 0:Y.value)==null?void 0:we.tableData)==null?void 0:me.算法名称),api:(fe===""?(re=(he=(q=se==null?void 0:se[0])==null?void 0:q.value)==null?void 0:he.tableData)==null?void 0:re.算法体:fe)||k,content:Fe==null?void 0:Fe.filter(Be=>Be.comp!=="methodButton"),extraContent:(Ve=C.cloneDeep(ve.value))==null?void 0:Ve.slice(1),methodName:(ve==null?void 0:ve.path)??"",extraValues:(pe=z==null?void 0:z[te])==null?void 0:pe.data}})));const Se=z==null?void 0:z.map(async ve=>{var dt,k,A,X,oe,I;const te=(dt=Ce.data.result)==null?void 0:dt.filter(de=>{var ze,le,K;return((ze=de==null?void 0:de.key)==null?void 0:ze.parentTable)===""&&((le=de==null?void 0:de.key)==null?void 0:le.type)==="method"&&((K=de==null?void 0:de.key)==null?void 0:K.methodName)===de.method}),J=te==null?void 0:te[0],se=(k=Ce.data.result)==null?void 0:k.filter(de=>{var ze,le;return((ze=de==null?void 0:de.key)==null?void 0:ze.type)==="methodData"&&((le=de==null?void 0:de.key)==null?void 0:le.tableId)===(J==null?void 0:J.id)}),fe=await Me.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be),Fe=se==null?void 0:se[0];return{buttonName:(A=J==null?void 0:J.key)==null?void 0:A.methodKey,api:(oe=(X=Fe==null?void 0:Fe.value)==null?void 0:X.tableData)==null?void 0:oe[0],content:fe==null?void 0:fe.filter(de=>de.comp!=="methodButton"),extraContent:(I=C.cloneDeep(ve.value))==null?void 0:I.slice(1),methodName:(ve==null?void 0:ve.method)??""}}),qe=(w=Z==null?void 0:Z[0])!=null&&w.path&&((Ne=Z==null?void 0:Z[0])==null?void 0:Ne.path)!==""?await Promise.all(ue):await Promise.all(Se);r.value=qe==null?void 0:qe.filter(ve=>ve==null?void 0:ve.extraContent),(_e=r.value)==null||_e.forEach(ve=>{var te;ve.api===""&&((te=ve.content)==null||te.forEach(J=>{var se;J.comp=="Table"&&m.setExtraContents(Me.methodTableToContent(J.compData,(se=ve.extraContent)==null?void 0:se[0]))}))})};return e.watch(()=>c.itemData,async()=>{B.value=="view"&&!b.value&&await Ze(C.cloneDeep(c.itemData)),b.value=!1},{immediate:!0,deep:!0}),(Z,z)=>{var ue,be,Ce;return e.unref(B)!=="edit"?(e.openBlock(),e.createElementBlock("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=r.value)==null?void 0:ue.filter(Se=>(Se==null?void 0:Se.buttonName)!=="保存"),Se=>{var qe;return e.openBlock(),e.createElementBlock("div",null,[Se.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(L)===e.unref(g)&&!((qe=Se==null?void 0:Se.buttonName)!=null&&qe.includes("预览")),class:"calculator-content",modelValue:Se.buttonName,onClickTrigger:ee=>e.unref(Ee)(Se),loading:D.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Q)!==""&&((Ce=e.unref(g))==null?void 0:Ce[((be=e.unref(g))==null?void 0:be.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ce,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:Ie},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oc=Pt._export_sfc(Vc,[["__scopeId","data-v-11fca7e0"]]),Mc={};function zc(a,r){return" 567 "}const Rc=Pt._export_sfc(Mc,[["render",zc]]),Pc={class:"module content"},Lc={class:"module data"},$c={class:"module layout"},Fc={class:"form-content"},jc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),p=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),D=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:D.value},{key:"signConfig",contents:m.value}]}),N=M=>{var L;m.value=C.cloneDeep(M),l("change",(L=_())==null?void 0:L.compData)},j=M=>{var L,F;if((M==null?void 0:M.buttonName)==="确认"){const g=C.cloneDeep(M==null?void 0:M.content);switch(s.value){case"create":D.value.push({...g,index:((L=D.value)==null?void 0:L.length)+1});break}l("change",(F=_())==null?void 0:F.compData),c.visible=!1}else c.visible=!1},B=(M,L)=>{var F,g;switch(M){case"create":(F=p.value)==null||F.forEach(T=>{T.value=""}),s.value="create",c.visible=!0;break;case"update":(g=p.value)==null||g.forEach(T=>{T.value=L[T==null?void 0:T.prop]}),s.value="update",c.visible=!0;break;case"delete":D.value.splice(L,1),s.value="delete";break}},Q=()=>{c.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,M=>{var L,F;M&&(m.value=((L=M==null?void 0:M.find(g=>g.key==="signConfig"))==null?void 0:L.contents)??{},D.value=((F=M==null?void 0:M.find(g=>g.key==="signTypeList"))==null?void 0:F.contents)??[])},{immediate:!0}),(M,L)=>{const F=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=T=>B("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(T,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(T==null?void 0:T.label),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:S=>B("update",{...T,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:S=>B("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",$c,[e.createVNode(Nt.ssForm,{rowContents:h.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Q,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Uc=Pt._export_sfc(jc,[["__scopeId","data-v-487e0536"]]),Kc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:r}){const i=a,l=r,c=e.ref(1),s=e.computed(()=>{var _,N;return(_=i==null?void 0:i.stepConfig)!=null&&_.allowTrigger?c.value:(N=i==null?void 0:i.stepConfig)==null?void 0:N.active}),y=(_,N)=>{c.value=N,l("clickStep",_,N)},h=_=>Nt.getComponent(_),p=()=>{var N;const _=(N=i==null?void 0:i.stepList)==null?void 0:N.find((j,B)=>B+1===s.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},m=_=>{l("clickTrigger",_)},D=_=>{l("changeTrigger",_)};return(_,N)=>{var Q,M,L,F,g;const j=e.resolveComponent("el-step"),B=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(B,{direction:(Q=a.stepConfig)==null?void 0:Q.direction,active:s.value,"finish-status":"success",simple:(M=a.stepConfig)==null?void 0:M.simple,"align-center":((L=a.stepConfig)==null?void 0:L.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(T,v)=>(e.openBlock(),e.createBlock(j,{key:v,class:"step-item",onClick:S=>y(T,v+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:T==null?void 0:T.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:T==null?void 0:T.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(F=a.stepConfig)!=null&&F.allowTrigger&&((g=a.stepConfig)!=null&&g.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(T,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(T==null?void 0:T.type)),{modelValue:T.value,"onUpdate:modelValue":S=>T.value=S,onClickTrigger:m,onChangeTrigger:D,content:T==null?void 0:T.content},e.createSlots({_:2},[e.renderList(_.$slots,(S,b)=>({name:b,fn:e.withCtx(ce=>[e.renderSlot(_.$slots,b,e.mergeProps({ref_for:!0},ce||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Wc=Pt._export_sfc(Kc,[["__scopeId","data-v-d7c99969"]]),Hc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:r}){const i=a,l=r,c=e.ref({}),s=e.ref([]),y=(h,p)=>{l("clickStep",h,p)};return e.watch(()=>i==null?void 0:i.itemData,h=>{var p,m;s.value=(p=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepList"))==null?void 0:p.contents,c.value=(m=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepConfig"))==null?void 0:m.contents},{immediate:!0,deep:!0}),(h,p)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Wc,{stepConfig:c.value,stepList:s.value,onClickStep:y},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:D})=>[e.createTextVNode(e.toDisplayString(D),1)]),description:e.withCtx(({description:D})=>[e.createTextVNode(e.toDisplayString(D),1)]),_:1},8,["stepConfig","stepList"])}}}),qc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(r,i)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,y)=>(e.openBlock(),e.createBlock(l,{key:y,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Xc=Pt._export_sfc(qc,[["__scopeId","data-v-4172a886"]]),Yc={class:"line-content"},Gc={class:"line-time"},Jc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const r=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,c=>{var s,y;l.value=(s=c==null?void 0:c.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:s.contents,i.value=(y=c==null?void 0:c.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:y.contents},{immediate:!0}),(c,s)=>(e.openBlock(),e.createBlock(Xc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:y,timestamp:h})=>[e.createElementVNode("span",Yc,e.toDisplayString(y),1),e.createElementVNode("span",Gc,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Zc=Pt._export_sfc(Jc,[["__scopeId","data-v-b4d9deed"]]),Qc={class:"tabs-content"},eu={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const r=a,i=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,l=>{const c=l.find(s=>(s==null?void 0:s.key)=="stepList");c?i.value=c.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})):i.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Qc,[e.createVNode(Nt.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},tu=Pt._export_sfc(eu,[["__scopeId","data-v-279085ed"]]),Gn=C.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),au={class:"type-select"},nu=["onClick"],ou={class:"list-icon"},lu={__name:"modelSelect",setup(a){const r=Gn(C.pinia),{itemData:i}=C.storeToRefs(r),l=c=>{const s=C.cloneDeep(i.value);s.push({comp:c.comp,name:c.name,compData:[]}),r.setItemData(s)};return(c,s)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(fr),(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:m=>l(h)},[e.createElementVNode("div",ou,[e.createVNode(y,{name:h.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(h.name),1)],8,nu)]))),128))])}}},ru=Pt._export_sfc(lu,[["__scopeId","data-v-91799bf8"]]),iu={class:"fill-content"},su={class:"operate-content"},cu={class:"collapse-title-content"},uu={class:"collapse-title-item"},du={key:1},pu=["onClick"],fu={class:"icon-content"},hu={key:0,class:"edit-content"},vu=["onClick"],mu={class:"comp-child"},gu={__name:"modelFill",setup(a){const r=Gn(C.pinia),{itemData:i,originalData:l}=C.storeToRefs(r),c=e.ref([]);e.ref([]);const s=e.ref([]),y=e.ref([]),h=j=>{var Q;let B=(Q=C.cloneDeep(y.value))==null?void 0:Q.map((M,L)=>(j===L&&(M.content=!0),M));y.value=B},p=j=>{var Q;let B=(Q=C.cloneDeep(y.value))==null?void 0:Q.map((M,L)=>(j===L&&(M.content=!1),M));y.value=B,c.value=C.cloneDeep(i.value)},m=(j,B)=>{var F;let Q=(F=C.cloneDeep(y.value))==null?void 0:F.map((g,T)=>(j===T&&(g.content=!1),g));y.value=Q;const M=C.cloneDeep(i.value),L=M==null?void 0:M.filter((g,T)=>(T===j&&(g.name=B),g));r.setOriginalData(L),r.setItemData(L)};e.watch(()=>i.value,()=>{var j,B,Q;!i.value||((j=i.value)==null?void 0:j.length)===0?c.value=[]:c.value=(B=C.cloneDeep(i.value))==null?void 0:B.filter(M=>(M==null?void 0:M.comp)!=="methodButton"),s.value=c.value,y.value=(Q=C.cloneDeep(s.value))==null?void 0:Q.map((M,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const D=j=>sn(j),_=(j,B,Q)=>{var L,F;if(!j)return;let M=C.cloneDeep(i.value);M=(L=M==null?void 0:M.map((g,T)=>(T===Q&&(g.compData=j),g)))==null?void 0:L.filter(g=>(g==null?void 0:g.comp)!=="methodButton"),y.value=(F=C.cloneDeep(M))==null?void 0:F.map((g,T)=>({id:T,content:!1})),r.setOriginalData(M),r.setItemData(M)},N=j=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=C.cloneDeep(i.value),Q=B==null?void 0:B.filter((M,L)=>L!==j);r.setOriginalData(Q),r.setItemData(Q),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(j,B)=>{const Q=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",iu,[B[1]||(B[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",su,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:M,index:L})=>{var F,g,T,v,S,b,ce,Ie,Qe,ke;return[e.createElementVNode("div",cu,[e.createElementVNode("div",uu,[(g=(F=y.value)==null?void 0:F.find(Pe=>Pe.id===L))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:M.name&&M.name!==""?"8px":"0px"})},e.toDisplayString(M.name),5)),(v=(T=y.value)==null?void 0:T.find(Pe=>Pe.id===L))!=null&&v.content?(e.openBlock(),e.createElementBlock("div",du,[e.createVNode(Nt._sfc_main$2,{modelValue:M.name,"onUpdate:modelValue":Pe=>M.name=Pe,onClick:B[0]||(B[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(b=(S=y.value)==null?void 0:S.find(Pe=>Pe.id===L))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Pe=>h(L),["stop"]),class:"icon-content"},[e.createVNode(Q,{name:"Edit",style:{width:"16px",height:"16px"}})],8,pu))]),e.createElementVNode("div",fu,[(Ie=(ce=y.value)==null?void 0:ce.find(Pe=>Pe.id===L))!=null&&Ie.content?(e.openBlock(),e.createElementBlock("div",hu,[e.createVNode(Q,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Pe=>p(L),["stop"])},null,8,["onClick"]),e.createVNode(Q,{name:"Save",onClick:e.withModifiers(Pe=>m(L,M.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ke=(Qe=y.value)==null?void 0:Qe.find(Pe=>Pe.id===L))!=null&&ke.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Pe=>N(L),["stop"]),class:"icon-content"},[e.createVNode(Q,{name:"Delete",style:{width:"16px",height:"16px"}})],8,vu))])])]}),content:e.withCtx(({item:M,index:L})=>{var F,g;return[e.createElementVNode("div",mu,[e.createTextVNode(e.toDisplayString(D(M.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:(g=(F=s.value)==null?void 0:F.find((T,v)=>v===L))==null?void 0:g.compData,onChange:T=>_(T,M,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},yu=Pt._export_sfc(gu,[["__scopeId","data-v-a46a44b9"]]),bu={key:0,class:"show-content"},ku={style:{display:"flex"}},xu={__name:"modelShow",setup(a){const r=Gn(C.pinia),{itemData:i}=C.storeToRefs(r),l=e.ref([]);e.watch(()=>i.value,()=>{var s;!i.value||((s=i.value)==null?void 0:s.length)===0?l.value=[]:l.value=C.cloneDeep(i.value)},{deep:!0,immediate:!0});const c=s=>sn(s);return(s,y)=>{var h;return((h=l.value)==null?void 0:h.length)>0?(e.openBlock(),e.createElementBlock("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",ku,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},wu=Pt._export_sfc(xu,[["__scopeId","data-v-3f3e863e"]]),Du={class:"tabs-header"},_u={class:"tabs-list"},Eu={class:"tab-name"},Cu={class:"tab-actions"},Su=["onClick"],Tu=["onClick"],Bu=["onClick"],Iu={class:"model-operate"},Nu={class:"model-select",style:{display:"unset"}},Au={class:"existing-components"},Vu={class:"component-list"},Ou=["onClick"],Mu={class:"component-info"},zu={class:"component-type"},Ru={class:"component-name"},Pu={class:"model-fill"},Lu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.ref([]),s=e.ref(!1),y=e.ref(""),h=e.ref({title:""}),p=e.ref(-1),m=e.ref(!1),D=e.ref(-1),_=e.ref(new WeakMap),N=e.ref(null),j=Gn(C.pinia),{itemData:B}=C.storeToRefs(j),Q=()=>{y.value="新增标签页",h.value.title="",p.value=-1,s.value=!0},M=Z=>{y.value="修改标签页",h.value.title=c.value[Z].title,p.value=Z,s.value=!0},L=Z=>{const z=T(Z);_.value.delete(z),c.value.splice(Z,1),Ze()},F=()=>{if(h.value.title.trim()){if(p.value===-1){const Z={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:g()};c.value.push(Z)}else c.value[p.value].title=h.value.title,c.value[p.value].value=h.value.title,c.value[p.value].label=h.value.title;s.value=!1,Ze()}},g=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,T=Z=>{const z=c.value[Z];return z.id||(z.id=g()),z.id},v=Z=>{var be;D.value=Z;const z=T(Z);N.value=C.cloneDeep(B.value);let ue=_.value.get(z);!ue&&((be=c.value[Z].children)==null?void 0:be.length)>0&&(ue=Ie(c.value[Z].children)),ue?j.setItemData(C.cloneDeep(ue)):j.setItemData([]),m.value=!0},S=e.computed(()=>{const Z=C.useModelComp(C.pinia),z=C.storeToRefs(Z).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(ue=>{var be;if(ue.comp==="Tabs"&&D.value>=0){const Ce=T(D.value);if((be=ue.compData)==null?void 0:be.some(qe=>{var ee;return qe.key==="stepList"&&((ee=qe.contents)==null?void 0:ee.some(ae=>ae.id===Ce))}))return!1}return!0})}),b=Z=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Z]||Z,ce=Z=>{var z;try{const ue=C.cloneDeep(Z);ue.id=Date.now()+Math.random(),ue.comp==="Tabs"&&((z=ue.compData)==null||z.forEach(Ce=>{Ce.key==="stepList"&&Ce.contents&&Ce.contents.forEach(Se=>{Se.id=g()})}));const be=C.cloneDeep(B.value);be.push(ue),j.setItemData(be)}catch(ue){console.error("添加组件失败:",ue)}},Ie=Z=>Z.map(z=>{var ue;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:Qe(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:ke(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((ue=z.content)==null?void 0:ue.originalData)||[]}}}),Qe=Z=>{if(!Z)return[];const z=[];return Z.rowContents&&z.push({key:"formContent",contents:Z.rowContents}),Z.buttonValue&&z.push({key:"formButton",contents:Z.buttonValue}),typeof Z.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:Z.isEnableWrap}),z},ke=Z=>[],Pe=()=>{if(D.value>=0&&D.value<c.value.length){const Z=T(D.value);_.value.set(Z,C.cloneDeep(B.value)),c.value[D.value].children=U(B.value),console.log("保存后的数据",U(B.value))}m.value=!1,D.value=-1,N.value=null,Ze()},Re=()=>{N.value&&j.setItemData(C.cloneDeep(N.value)),m.value=!1,D.value=-1,N.value=null},P=()=>{m.value&&Re()},U=Z=>{if(!Array.isArray(Z))throw new Error("sourceData must be an array");return Z.map((z,ue)=>{if(!z||typeof z!="object")return z;const{comp:be,name:Ce,compData:Se}=z;switch(be){case"Form":return{type:"form",content:G(Se||[]),value:"表单"};case"Table":return{type:"table",content:ie(Se||[]),value:"表格"};default:return{type:"xxx",content:Ee(Se||[]),value:""}}})},G=Z=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ue={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Z.forEach((be,Ce)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${Ce}:`,be);return}const{key:Se,contents:qe}=be,ee=ue[Se];if(!ee){console.warn(`Unknown Form config key: ${Se}`);return}Se==="enableWrap"?z[ee]=!!qe:z[ee]=Array.isArray(qe)?qe:[]}),z},ie=Z=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ue={header:"columns",tableContents:"tableData"};return Z.forEach((be,Ce)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${Ce}:`,be);return}const{key:Se,contents:qe}=be,ee=ue[Se];if(!ee){console.warn(`Unknown Table config key: ${Se}`);return}z[ee]=Array.isArray(qe)?qe:[]}),z},Ee=Z=>(console.log("Default conversion logic - to be implemented"),{originalData:Z,processed:!1,componentType:"unknown"}),Ze=()=>{const Z=[{key:"stepList",contents:c.value}];l("change",Z)};return e.watch(()=>i.itemContents,Z=>{if(Z&&Z.length>0){const z=Z.find(ue=>ue.key==="stepList");z&&z.contents&&(c.value=z.contents.map(ue=>({title:ue.title||"",value:ue.value||ue.title||"",label:ue.label||ue.title||"",children:ue.children||[],id:ue.id||g()})))}},{immediate:!0,deep:!0}),(Z,z)=>{const ue=e.resolveComponent("svg-icon"),be=e.resolveComponent("el-input"),Ce=e.resolveComponent("el-form-item"),Se=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Du,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Q},[e.createVNode(ue,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(qe,ee)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ee},[e.createElementVNode("span",Eu,e.toDisplayString(qe.title),1),e.createElementVNode("div",Cu,[e.createElementVNode("button",{onClick:ae=>M(ee)},"修改标题",8,Su),e.createElementVNode("button",{onClick:ae=>v(ee)},"布局调整",8,Tu),e.createElementVNode("button",{onClick:ae=>L(ee)},"删除",8,Bu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":z[2]||(z[2]=qe=>s.value=qe),title:y.value,onBeforeDestroy:z[3]||(z[3]=qe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=qe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:F},"确定")]),default:e.withCtx(()=>[e.createVNode(Se,{model:h.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ce,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(be,{modelValue:h.value.title,"onUpdate:modelValue":z[0]||(z[0]=qe=>h.value.title=qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:m.value,"onUpdate:modelValue":z[4]||(z[4]=qe=>m.value=qe),title:"布局调整",fullScreen:"",onBeforeDestroy:P},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Re},"取消"),e.createElementVNode("button",{onClick:Pe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Iu,[e.createElementVNode("div",Nu,[e.createVNode(ru),e.createElementVNode("div",Au,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,qe=>(e.openBlock(),e.createElementBlock("div",{key:qe.id,class:"component-item",onClick:ee=>ce(qe)},[e.createElementVNode("div",Mu,[e.createElementVNode("span",zu,e.toDisplayString(b(qe.comp)),1),e.createElementVNode("span",Ru,e.toDisplayString(qe.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Ou))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Z.innerWidth},[e.createVNode(wu)])),e.createElementVNode("div",Pu,[e.createVNode(yu)])])]),_:1},8,["modelValue"])])}}},$u=Pt._export_sfc(Lu,[["__scopeId","data-v-9096ed0d"]]);function Fu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function ju(a){return{type:"line",...a}}function Uu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function Ku(a){return{type:"bar",barWidth:"60%",...a}}function Wu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Hu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Ia={line:{initBaseoptions:Fu,initSeries:ju},bar:{initBaseoptions:Uu,initSeries:Ku},pie:{initBaseoptions:Wu,initSeries:Hu}},Lo=C.useMenuState(C.pinia),Il=(a,r)=>{var D;const i=[],l=[],{group:c,nameCol:s,valueCol:y}=r||{},h=a==null?void 0:a.find(_=>{const{name:N}=_;return N===c});if(!h)return{names:i,values:l};const p=(D=h==null?void 0:h.compData)==null?void 0:D.find(_=>{const{key:N}=_;return N==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(_=>{const N=_==null?void 0:_[0];let j=!1;ct.isObject(N)&&(N!=null&&N.id)&&(j=!0);let B=s,Q=y;j&&(B=B+1,Q=Q+1);const M=_==null?void 0:_[B],L=_==null?void 0:_[Q];i.push(M),l.push(L)}),{names:i,values:l}},qu=async a=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:c,detailValueCol:s,isSelfDetail:y}=a||{};let h=null;const p=sessionStorage.getItem("systemKey");if(y&&Lo.activeMenuPath&&(h=await Me.getItemData(`${Lo.activeMenuPath}`,p,"")),!y){const m=r==null?void 0:r.join("/");h=await Me.getItemData(`${m}^${i}`,p,"")}return Il(h,{group:l,nameCol:c,valueCol:s})},Xu=async a=>{const{menu:r,group:i,nameCol:l,valueCol:c}=a||{},s=r==null?void 0:r.join("/"),y=sessionStorage.getItem("systemKey"),h=await Me.getItemData(s,y,"");return Il(h,{group:i,nameCol:l,valueCol:c})},ko=async(a,r)=>{const i={names:[],values:[]},{menu:l,group:c,nameCol:s,valueCol:y}=a||{};if(!l.length||!c)return i;const{mainKey:h,group:p,nameCol:m,valueCol:D,isSelfDetail:_}=r||{};return h&&p&&Nt.isNumber(m)&&Nt.isNumber(D)?await qu({menu:l,mainKey:h,detailGroup:p,detailNameCol:m,detailValueCol:D,isSelfDetail:_}):Nt.isNumber(s)&&Nt.isNumber(y)?await Xu({menu:l,group:c,nameCol:s,valueCol:y}):i},Yu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=c??"";const{names:m,values:D}=await ko(r,i);if(!m||!D)return p;p.xAxis.data=m;const _=h({data:D});return p.series.push(_),p},Gu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=c??"";const{names:m,values:D}=await ko(r,i);if(!m||!D)return p;p.xAxis.data=m;const _=h({data:D});return p.series.push(_),p},Ju=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=c??"";const{names:m,values:D}=await ko(r,i);if(!m||!D)return p;const _=[];for(let j=0;j<m.length;j++){const B=m[j],Q=D[j];_.push({name:B,value:Q})}const N=h({data:_});return p.series.push(N),p},Zu=async(a=[])=>{var y,h,p;const r=((y=a==null?void 0:a.find(m=>m.key==="chartBaseConfig"))==null?void 0:y.contents)??{},i=((h=a==null?void 0:a.find(m=>m.key==="chartDataConfig"))==null?void 0:h.contents)??{},l=((p=a==null?void 0:a.find(m=>m.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:c}=r;let s={};return c==="line"&&(s=await Yu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),c==="bar"&&(s=await Gu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),c==="pie"&&(s=await Ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s},Qu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const r=a,i=e.ref({});e.onMounted(async()=>{const c=r==null?void 0:r.itemData;i.value=await Zu(c)});const l=e.computed(()=>(r==null?void 0:r.height)||"300px");return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Hr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),ed=Pt._export_sfc(Qu,[["__scopeId","data-v-d4c081e8"]]),td={class:"chart-module layout"},ad={class:"chart-module content"},nd={class:"chart-module content"},od={class:"form-content"},ld={class:"dialog-footer"},rd={class:"form-content"},id={class:"dialog-footer"},sd={class:"form-content"},cd={class:"dialog-footer"},ud=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=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:""}],h=e.ref({}),p=()=>{var te;s.value=y(),(te=s.value)==null||te.forEach(J=>{var fe;const se=J==null?void 0:J.prop;J.value=(fe=h==null?void 0:h.value)==null?void 0:fe[se]}),c.visible=!0},m=te=>{h.value=te},D=()=>{var te;c.visible=!1,l("change",(te=_e())==null?void 0:te.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),N=e.ref([]),j=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],B=e.ref({}),Q=()=>{const te=N.value,J=C.cloneDeep(te);return J==null||J.forEach(se=>{var Fe;const fe=se==null?void 0:se.prop;se.value=(Fe=B.value)==null?void 0:Fe[fe]}),J},M=te=>{var se;B.value=te;const J=Q();N.value=J,l("change",(se=_e())==null?void 0:se.compData)},L=async()=>{const te=await Me.getMenusContent(),J=Q();J==null||J.forEach(se=>{(se==null?void 0:se.prop)==="menu"&&(se.contents=te)}),N.value=J,_.visible=!0,await qe(B.value.menu),await w(B.value.group)},F=e.reactive({visible:!1,width:"840",title:"详情页配置"}),g=e.ref([]),T=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],v=e.ref({}),S=()=>{const te=g.value,J=C.cloneDeep(te);return J==null||J.forEach(se=>{var Fe;const fe=se==null?void 0:se.prop;se.value=(Fe=v.value)==null?void 0:Fe[fe]}),J},b=te=>{var se;v.value=te;const J=S();g.value=J,l("change",(se=_e())==null?void 0:se.compData)},ce=async()=>{await P();const te=C.cloneDeep(Ie.value),J=S();J==null||J.forEach(se=>{var Fe;const fe=se==null?void 0:se.prop;se.value=(Fe=v==null?void 0:v.value)==null?void 0:Fe[fe],fe==="mainKey"&&(se.contents=te)}),g.value=J,F.visible=!0},Ie=e.ref([]),Qe=e.ref([]),ke=e.ref({}),Pe=e.ref({}),Re=()=>{const{compData:te}=be.value||{},J=te==null?void 0:te.find(X=>{const{key:oe}=X;return oe==="header"}),se=(J==null?void 0:J.contents)||[],fe=se==null?void 0:se.filter((X,oe)=>{const{label:I}=X;return I!=="操作"}),Fe=fe==null?void 0:fe.findIndex((X,oe)=>{const{isMainKey:I}=X;return I});if(Fe<0)return[];const dt=te==null?void 0:te.find(X=>{const{key:oe}=X;return oe==="tableContents"}),k=(dt==null?void 0:dt.contents)||[];return k==null?void 0:k.map(X=>{const oe=X==null?void 0:X[0];let I=Fe;ct.isObject(oe)&&(oe!=null&&oe.id)&&(I=I+1);const de=X==null?void 0:X[I];return{label:de,value:de}})},P=async()=>{const te=await Re();Ie.value=te},U=async te=>{const J=sessionStorage.getItem("systemKey");return await Me.getItemData(te,J,"")},G=async te=>{const J=te;Qe.value=J==null?void 0:J.map(se=>{const{name:fe}=se;return ke.value[fe]=se,{label:fe,value:fe}})},ie=te=>{const{comp:J,compData:se}=Pe.value||{};if(J==="Table"){let fe=S();fe=fe.filter(Fe=>{const{prop:dt}=Fe;return dt!=="formItems"}),ee(fe,se),g.value=fe}},Ee=async()=>{var se,fe;const te=(se=v==null?void 0:v.value)==null?void 0:se.mainKey,J=(fe=B==null?void 0:B.value)==null?void 0:fe.menu;if(te){const dt=`${J==null?void 0:J.join("/")}^${te}`,k=await U(dt);await G(k);const A=S();A==null||A.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=Qe.value)}),g.value=A}};e.watch(()=>{var te;return(te=v==null?void 0:v.value)==null?void 0:te.mainKey},async(te,J)=>{te!=J&&te&&await Ee()});const Ze=async te=>{const J=ke.value[te];Pe.value=J,await ie()};e.watch(()=>{var te;return(te=v==null?void 0:v.value)==null?void 0:te.group},async(te,J)=>{te!=J&&te&&Ze(te)});const Z=async()=>{var J;await Ee();const te=(J=v.value)==null?void 0:J.group;await Ze(te)},z=e.ref([]),ue=e.ref({}),be=e.ref({}),Ce=async te=>{const J=te==null?void 0:te.join("/"),se=sessionStorage.getItem("systemKey");return await Me.getItemData(J,se,"")},Se=async te=>{const J=await Ce(te);z.value=J==null?void 0:J.map(se=>{const{name:fe}=se;return ue.value[fe]=se,{label:fe,value:fe}})},qe=async(te,J)=>{await Se(te);const se=Q();se==null||se.forEach(fe=>{(fe==null?void 0:fe.prop)==="group"&&(fe.contents=z.value)}),N.value=se};e.watch(()=>{var te;return(te=B==null?void 0:B.value)==null?void 0:te.menu},async(te,J)=>{const se=te==null?void 0:te.join("/"),fe=J==null?void 0:J.join("/");se!=fe&&await qe(te)});const ee=(te,J)=>{const se=J==null?void 0:J.find(k=>{const{key:A}=k;return A==="header"}),fe=(se==null?void 0:se.contents)||[],Fe=fe==null?void 0:fe.filter((k,A)=>{const{label:X}=k;return X!=="操作"}),dt=Fe==null?void 0:Fe.map((k,A)=>{const{label:X}=k;return{label:X,value:A}});te==null||te.forEach(k=>{const A=k==null?void 0:k.prop;(A==="nameCol"||A==="valueCol")&&(k.contents=dt)})},ae=te=>{const{comp:J,compData:se}=be.value||{};if(J==="Table"){B.value.formItems=[];let fe=Q();fe=fe.filter(Fe=>{const{prop:dt}=Fe;return dt!=="formItems"}),ee(fe,se),N.value=fe}},w=async te=>{const J=ue.value[te];be.value=J,await ae()};e.watch(()=>{var te;return(te=B==null?void 0:B.value)==null?void 0:te.group},async(te,J)=>{te!=J&&w(te)});const Ne=async()=>{var se,fe;const te=(se=B.value)==null?void 0:se.menu;await qe(te);const J=(fe=B.value)==null?void 0:fe.group;await w(J)},_e=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:B.value},{key:"chartDetailConfig",contents:v.value}]}),ve=()=>{c.visible=!1,_.visible=!1,F.visible=!1};return e.onMounted(async()=>{var J,se,fe;N.value=j(),g.value=T();const te=i==null?void 0:i.itemContents;h.value=((J=te==null?void 0:te.find(Fe=>Fe.key==="chartBaseConfig"))==null?void 0:J.contents)??{},B.value=((se=te==null?void 0:te.find(Fe=>Fe.key==="chartDataConfig"))==null?void 0:se.contents)??{},await Ne(),v.value=((fe=te==null?void 0:te.find(Fe=>Fe.key==="chartDetailConfig"))==null?void 0:fe.contents)??{},await Z()}),(te,J)=>{const se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",td,[J[4]||(J[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(se,{id:"themeButton",onClick:J[0]||(J[0]=fe=>p())},{default:e.withCtx(()=>J[3]||(J[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",ad,[J[6]||(J[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:J[1]||(J[1]=fe=>L())},{default:e.withCtx(()=>J[5]||(J[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",nd,[J[8]||(J[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:J[2]||(J[2]=fe=>ce())},{default:e.withCtx(()=>J[7]||(J[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ve,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",od,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createVNode(se,{class:"cancel-button button",onClick:ve,id:"themeBorderButton"},{default:e.withCtx(()=>J[9]||(J[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(se,{class:"ok-button button",onClick:D,id:"themeButton"},{default:e.withCtx(()=>J[10]||(J[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ve,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",rd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",id,[e.createVNode(se,{class:"cancel-button button",onClick:ve,id:"themeBorderButton"},{default:e.withCtx(()=>J[11]||(J[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(se,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>J[12]||(J[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:F.visible,title:F.title,onBeforeDestroy:ve,width:F.width},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cd,[e.createVNode(se,{class:"cancel-button button",onClick:ve,id:"themeBorderButton"},{default:e.withCtx(()=>J[13]||(J[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(se,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>J[14]||(J[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),dd=Pt._export_sfc(ud,[["__scopeId","data-v-fe119645"]]),pd=(a,r)=>{let i;a.replaceAll(" ",`\r
|
|
2
|
+
`).replaceAll(`
|
|
3
|
+
`,`\r
|
|
4
|
+
`).includes(`\r
|
|
5
|
+
`)?i=a.replaceAll(`
|
|
6
|
+
`,`\r
|
|
7
|
+
`).replaceAll(" ",`\r
|
|
8
|
+
`).split(`\r
|
|
9
|
+
`).filter(s=>s.trim()!==""):i=a.replaceAll(" ",`\r
|
|
10
|
+
`).split(`
|
|
11
|
+
`).filter(s=>s.trim()!==""),i=i==null?void 0:i.map(s=>(s=s==null?void 0:s.replaceAll("\r",""),s));const l=[];let c="";for(const s of i)s.includes("{")||c.includes("{")||s.includes("[")||c.includes("[")||s.includes("【")||c.includes("【")||s.includes("(")||c.includes("(")||s.includes("(")||c.includes("(")||s.includes("/*")||c.includes("/*")?(c+=s.trim(),c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1&&!(r!=null&&r.find(y=>y===c[c.length-1]))?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):c!=null&&c.includes("*/")&&(c=c.replace(/\/\*[\s\S]*?\*\//g,""))):r!=null&&r.find(y=>y===s[s.length-1])?c+=s.trim():l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},Ut=(a,r)=>{let i=a;const l=[];let c="",s=0;for(const y of i)s++,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(),c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1&&c[c.length-1]===r?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):s===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=y.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===r&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},fd=(a,r)=>a===r||a.length===r.length&&a.every((i,l)=>i===r[l]),hd=a=>a.reduce((r,i)=>{var c;const l=(((c=r.at(-1))==null?void 0:c.total)??0)+i;return r.push({key:i,total:l}),r},[]),vd=a=>{for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a},md=a=>{let r=a;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1))};let xt="$R",gd="[Any]";const yd=a=>{var y,h;let r={},i=a==null?void 0:a[0],l=(h=(y=i==null?void 0:i.replace("{",xt))==null?void 0:y.split(xt))==null?void 0:h[0];(l==null?void 0:l[0])==="*"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length)),l=l==null?void 0:l.split(":"),r.group=l;let c=a==null?void 0:a[1],s=c==null?void 0:c.replaceAll(gd,"");return(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),r.filter=s,r},bd=a=>{var m,D,_,N,j,B,Q,M,L;let r=[],i=[],l=a==null?void 0:a.map(F=>{var T;let g=(T=Ut(F,"@"))==null?void 0:T[0];return(g==null?void 0:g[(g==null?void 0:g.length)-1])==="@"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g}),c=Ut(l==null?void 0:l[0],":");i=(m=c==null?void 0:c.filter(F=>!(F!=null&&F.includes("{"))&&!(F!=null&&F.includes("["))))==null?void 0:m.join(""),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":");let s=c==null?void 0:c.filter(F=>(F==null?void 0:F.includes("{"))||(F==null?void 0:F.includes("["))),y=(_=s==null?void 0:s[0])==null?void 0:_.slice(1,((D=s==null?void 0:s[0])==null?void 0:D.length)-1);y=(N=Ut(y,","))==null?void 0:N.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F));let h="@"+((Q=(B=(j=a==null?void 0:a[0])==null?void 0:j.replace("@",xt))==null?void 0:B.split(xt))==null?void 0:Q[1]);((M=Ut(h,":"))==null?void 0:M.length)>1&&(r=Jn((L=Ut(h,":"))==null?void 0:L[1]),r=[r]);let p=y==null?void 0:y.map((F,g)=>{var Ie,Qe,ke,Pe,Re,P,U,G,ie,Ee,Ze,Z;let T=(Ie=F==null?void 0:F.split("=="))==null?void 0:Ie[0],v=(Qe=F==null?void 0:F.split("=="))==null?void 0:Qe[1],S=[],b=[],ce=[];return(v==null?void 0:v[0])==="$"&&(v=v==null?void 0:v.slice(1,v==null?void 0:v.length),S=(Pe=(ke=v==null?void 0:v.split("*"))==null?void 0:ke[0])==null?void 0:Pe.split(":"),b=(Ee=(ie=(G=(U=(P=(Re=v==null?void 0:v.split("*"))==null?void 0:Re[1])==null?void 0:P.replace("{",xt))==null?void 0:U.split(xt))==null?void 0:G[0])==null?void 0:ie.split(":"))==null?void 0:Ee.filter(z=>z!==""),ce=(Z=(Ze=v==null?void 0:v.replace("{",xt))==null?void 0:Ze.split(xt))==null?void 0:Z[1],ce=ce==null?void 0:ce.replaceAll("}",""),ce=ce==null?void 0:ce.split(":")),{prop:T,label:T,value:"",menuPath:S,groups:b,columns:ce,width:y==null?void 0:y.length}});return{groupName:i,formContents:p,contents:r}},Jn=a=>{var l,c;let r=[],i=a.slice(1,(a==null?void 0:a.length)-1);if((i==null?void 0:i[0])!=="[")(l=Ut(i,","))==null||l.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),r.push(s??"")});else{let s=[];(c=Ut(i,","))==null||c.forEach(y=>{(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),s.push(Jn(y))}),r=s}return r},fo=(a,r)=>{var _,N,j,B,Q,M,L,F,g,T,v,S,b,ce,Ie,Qe,ke,Pe,Re,P,U,G,ie,Ee,Ze,Z,z,ue,be,Ce,Se,qe,ee;let i,l=[],c=[],s=[],y=[],h=[],p=[],m="Input",D;if(a!=null&&a.includes("@Pam")||a!=null&&a.includes("==")||a!=null&&a.includes("="))if(a!=null&&a.includes("@Pam")){i=(N=(_=a==null?void 0:a.replace("@Pam",xt))==null?void 0:_.split(xt))==null?void 0:N[0];let ae=(B=(j=a==null?void 0:a.replace("@Pam",xt))==null?void 0:j.split(xt))==null?void 0:B[1];ae=ae==null?void 0:ae.slice(1,(ae==null?void 0:ae.length)-1),ae=(Q=Ut(ae,","))==null?void 0:Q.map(w=>(w="@"+w,w)),D=ae==null?void 0:ae.find(w=>w==null?void 0:w.includes("@IdentName")),D=D?(L=(M=D==null?void 0:D.replace("=",xt))==null?void 0:M.split(xt))==null?void 0:L[1]:i}else{if(i=(F=a==null?void 0:a.split("=="))==null?void 0:F[0],D=(g=a==null?void 0:a.split("=="))==null?void 0:g[0],a!=null&&a.includes("=")&&!(a!=null&&a.includes("==")))i=(T=a==null?void 0:a.split("="))==null?void 0:T[0],D=i,l=(b=(S=(v=a==null?void 0:a.split("="))==null?void 0:v[1])==null?void 0:S.split("/"))==null?void 0:b.map(ae=>({label:ae,value:ae}));else if((Ie=(ce=a==null?void 0:a.split("=="))==null?void 0:ce[1])!=null&&Ie.includes("||")){let ae=[];(Pe=(ke=(Qe=a==null?void 0:a.split("=="))==null?void 0:Qe[1])==null?void 0:ke.split("||"))==null||Pe.forEach(w=>{var Ne,_e,ve;c.push((_e=(Ne=w==null?void 0:w.split("@Filter"))==null?void 0:Ne[0])==null?void 0:_e.split("/")),ae.push((ve=w==null?void 0:w.split("@Filter"))==null?void 0:ve[1])}),s=ae==null?void 0:ae.map(w=>(w=w==null?void 0:w.slice(1,(w==null?void 0:w.length)-1),w))}else{let ae=(P=a==null?void 0:a.split("=="))==null?void 0:P[((Re=a==null?void 0:a.split("=="))==null?void 0:Re.length)-1];if(!(ae!=null&&ae.includes("&"))){let w=(U=ae==null?void 0:ae.replace("*",xt))==null?void 0:U.split(xt),Ne=(w==null?void 0:w[0])===""?r==null?void 0:r.value:w==null?void 0:w[0];Ne=Ne==null?void 0:Ne.replaceAll("[Any]",""),(Ne==null?void 0:Ne[0])==="$"&&(Ne=(G=Ne==null?void 0:Ne.slice(1,Ne==null?void 0:Ne.length))==null?void 0:G.replaceAll(":","/")),y=Ne==null?void 0:Ne.split("/");let _e=(Ee=(ie=w==null?void 0:w[1])==null?void 0:ie.replace("{",xt))==null?void 0:Ee.split(xt),ve=_e==null?void 0:_e[0];(ve==null?void 0:ve[(ve==null?void 0:ve.length)-1])===":"&&(ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1)),h=ve==null?void 0:ve.split(":"),p=(ue=(z=(Z=(Ze=_e==null?void 0:_e[1])==null?void 0:Ze.replace("}",xt))==null?void 0:Z.split(xt))==null?void 0:z[0])==null?void 0:ue.split(":");let te=(Se=(Ce=(be=_e==null?void 0:_e[1])==null?void 0:be.replace("}",xt))==null?void 0:Ce.split(xt))==null?void 0:Se[1];te!==""&&md(te)}}m="Select"}else i=a,D=a;return i!=null&&i.includes("@Pam")&&(i=(ee=(qe=a==null?void 0:a.replace("@Pam",xt))==null?void 0:qe.split(xt))==null?void 0:ee[0],D=i),{label:i,prop:D,options:l,allContents:c,filterContents:s,menus:y,groups:h,words:p,align:"center",formType:m}},ho=(a,r)=>{var l,c,s,y,h,p,m,D,_,N,j,B,Q,M,L,F,g;let i=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((y=(s=(c=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.replace(":",xt))==null?void 0:c.split(xt))==null?void 0:s[0])!=null&&y.includes(","))){let T=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),v=(h=T==null?void 0:T.replace(":",xt))==null?void 0:h.split(xt);if(((p=Ut(v==null?void 0:v[1],"="))==null?void 0:p.length)===1){let S=v==null?void 0:v[0];i==null||i.push({label:S,prop:S,children:ho((D=v==null?void 0:v[1])==null?void 0:D.slice(1,((m=v==null?void 0:v[1])==null?void 0:m.length)-1),r),align:"center"})}else(L=(M=(Q=(B=(j=(N=(_=T==null?void 0:T.replace("{",xt))==null?void 0:_.split(xt))==null?void 0:N[1])==null?void 0:j.replace("}",xt))==null?void 0:B.split(xt))==null?void 0:Q[0])==null?void 0:M.split(","))==null||L.forEach(S=>{i==null||i.push({label:S,prop:S,align:"center"})})}else if((a==null?void 0:a[0])==="{")(F=Ut(a,","))==null||F.forEach(T=>{var v,S,b,ce,Ie,Qe,ke,Pe,Re,P,U;if((T==null?void 0:T[(T==null?void 0:T.length)-1])===","&&(T=T==null?void 0:T.slice(0,(T==null?void 0:T.length)-1)),(T==null?void 0:T[0])==="{"){let G=Ut(T,"="),ie=G==null?void 0:G[(G==null?void 0:G.length)-1],Ee=[],Ze=[],Z=[],z=(v=ie==null?void 0:ie.replace("*",xt))==null?void 0:v.split(xt),ue=(z==null?void 0:z[0])===""?r==null?void 0:r.value:z==null?void 0:z[0];ue=ue==null?void 0:ue.replaceAll("[Any]",""),(ue==null?void 0:ue[0])==="$"&&(ue=(S=ue==null?void 0:ue.slice(1,ue==null?void 0:ue.length))==null?void 0:S.replaceAll(":","/")),Ee=ue==null?void 0:ue.split("/");let be=(ce=(b=z==null?void 0:z[1])==null?void 0:b.replace("{",xt))==null?void 0:ce.split(xt),Ce=be==null?void 0:be[0];(Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])===":"&&(Ce=Ce==null?void 0:Ce.slice(0,(Ce==null?void 0:Ce.length)-1)),Ze=Ce==null?void 0:Ce.split(":"),Z=(Pe=(ke=(Qe=(Ie=be==null?void 0:be[1])==null?void 0:Ie.replace("}",xt))==null?void 0:Qe.split(xt))==null?void 0:ke[0])==null?void 0:Pe.split(",");let Se=(P=G==null?void 0:G[0])==null?void 0:P.slice(1,((Re=G==null?void 0:G[0])==null?void 0:Re.length)-2);(U=Se==null?void 0:Se.split(","))==null||U.forEach((qe,ee)=>{var ae;i.push({label:qe,prop:qe,align:"center",menus:Ee,groups:Ze,words:(ae=Z==null?void 0:Z[ee])==null?void 0:ae.split(":"),formType:(Ee==null?void 0:Ee.length)>0?"Select":"Input"})})}else i.push({label:T,prop:T,align:"center"})});else{let T=(g=Ut(a,","))==null?void 0:g.map(v=>((v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),v));T==null||T.forEach(v=>{i.push(fo(v,r))})}return i},kd=(a,r)=>{var y,h,p,m,D;let i=a;if(!a)return;let l="";((y=Ut(a,"}"))==null?void 0:y.length)>1&&(i=(h=Ut(a,"}"))==null?void 0:h[0],l=(p=Ut(a,"}"))==null?void 0:p[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1));let c=[],s=[];return c.push({label:"排序",prop:"sort"}),(m=Ut(i,","))==null||m.forEach(_=>{var N;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(N=ho(_,r))==null||N.forEach(j=>{c.push(j)}):c.push(fo(_,r))}),l!==""&&((l==null?void 0:l[0])=="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),(D=Ut(l,","))==null||D.forEach(_=>{var N;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(N=ho(_,r))==null||N.forEach(j=>{s.push(j)}):s.push(fo(_,r))})),{columns:c,secondColumns:s}},$o=a=>{var r,i,l;if(a!=null&&a.includes("@Filter"))return a;{let c=(i=(r=a==null?void 0:a.replace("(",xt))==null?void 0:r.split(xt))==null?void 0:i[1];return c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),c=(l=Ut(c,","))==null?void 0:l.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),"@"+s)),c=c==null?void 0:c.join(","),a!=null&&a.includes("@Quote")&&(c!=null&&c.includes("@Type")||(c=c===""?c+"@Type:Manual":c+",@Type:Manual"),c!=null&&c.includes("@SonSync")||(c=c===""?c+"@SonSync:No":c+",@SonSync:No"),c!=null&&c.includes("@FatherSync")||(c=c===""?c+"@FatherSync:Yes":c+",@FatherSync:Yes")),c}},xd=(a,r,i="")=>{var N,j,B,Q,M,L,F,g,T,v,S,b,ce,Ie,Qe,ke,Pe,Re,P;let l=[];if(((N=a==null?void 0:a[0])==null?void 0:N[0])!=="*"&&((j=a==null?void 0:a[0])==null?void 0:j[0])!=="$")return;let c=Ut(a==null?void 0:a[0],":");l=(B=c==null?void 0:c.filter(U=>!(U!=null&&U.includes("{"))&&!(U!=null&&U.includes("["))))==null?void 0:B.join("");let s="";(l==null?void 0:l[(l==null?void 0:l.length)-1])===":"&&(l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1)),(l==null?void 0:l[0])==="*"?(l=l==null?void 0:l.slice(1,l==null?void 0:l.length),l=l==null?void 0:l.split(":")):(s=C.cloneDeep(l)+":",l=[]);let y=c==null?void 0:c.filter(U=>!(!(U!=null&&U.includes("{"))&&!(U!=null&&U.includes("["))));s=s+((y==null?void 0:y[0])??"");let h=y==null?void 0:y[1];(s==null?void 0:s[0])==="["&&(h=C.cloneDeep(s)+(h??""),s="");let p=h?Jn(h):[];!(p!=null&&p.every(U=>Array.isArray(U)))&&(p==null?void 0:p.length)>0&&(p=[p]);let m=(Q=Ut(s,"@"))!=null&&Q[1]?"@"+((M=Ut(s,"@"))==null?void 0:M[1]):"";if(s=(L=Ut(s,"@"))==null?void 0:L[0],(s==null?void 0:s[0])==="$"&&(m=C.cloneDeep(s)+(m??""),s=""),i!==""&&(m=i),m!==""){(m==null?void 0:m[0])==="$"&&(m=m==null?void 0:m.slice(1,m==null?void 0:m.length)),(m==null?void 0:m[(m==null?void 0:m.length)-1])===":"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1));let U="";if(m!=null&&m.includes("(@")){U=(g=(F=m==null?void 0:m.replace("(@",xt))==null?void 0:F.split(xt))==null?void 0:g[0];let G=(v=(T=m==null?void 0:m.replace("(@",xt))==null?void 0:T.split(xt))==null?void 0:v[1];G="@"+(G==null?void 0:G.slice(0,(G==null?void 0:G.length)-1));let ie=(S=Ut(G,","))==null?void 0:S.map(Ee=>((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])===","&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),$o(Ee)));m=U+"("+(ie==null?void 0:ie.join(","))+")"}else{U=(ce=(b=m==null?void 0:m.replace("@",xt))==null?void 0:b.split(xt))==null?void 0:ce[0];let G=(Qe=(Ie=m==null?void 0:m.replace("@",xt))==null?void 0:Ie.split(xt))==null?void 0:Qe[1];if(G){G="@"+G;let ie=(ke=Ut(G,","))==null?void 0:ke.map(Ee=>$o(Ee));m=U+"("+(ie==null?void 0:ie.join(","))+")"}else m=U}}(s==null?void 0:s[(s==null?void 0:s.length)-1])==="@"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[(s==null?void 0:s.length)-1])===":"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1));let D=kd(s,r),_=s===""?[]:(D==null?void 0:D.columns)??[];return _!=null&&_.some(U=>{var G;return Array.isArray(U==null?void 0:U.children)&&((G=U==null?void 0:U.children)==null?void 0:G.length)>0})&&(_=[_]),(p==null?void 0:p.length)>0&&(Array.isArray(p==null?void 0:p[0])&&((Pe=p==null?void 0:p[0])!=null&&Pe.every(U=>Array.isArray(U)))?p=p==null?void 0:p.map((U,G)=>(U=U.map((ie,Ee)=>(ie.unshift((Ee+1).toString()),ie)),U)):p=p==null?void 0:p.map((U,G)=>(U.unshift((G+1).toString()),U))),D!=null&&D.secondColumns&&((Re=D==null?void 0:D.secondColumns)==null?void 0:Re.length)>0&&((p==null?void 0:p.length)>0?p=p==null?void 0:p.map((U,G)=>{var ie,Ee;return Array.isArray(U==null?void 0:U[0])?U=U==null?void 0:U.map((Ze,Z)=>{var z,ue;return Ze.unshift((ue=(z=D==null?void 0:D.secondColumns)==null?void 0:z[Z])==null?void 0:ue.prop),Ze}):U.unshift((Ee=(ie=D==null?void 0:D.secondColumns)==null?void 0:ie[G])==null?void 0:Ee.prop),U}):p=(P=D==null?void 0:D.secondColumns)==null?void 0:P.map((U,G)=>(U=[U==null?void 0:U.label],U.push(G),U)),_.unshift({label:"",prop:"disabled",sortable:!1})),{groupName:l,tableColumns:_,tableFilter:m,tableContents:p,columns:(D==null?void 0:D.secondColumns)??[]}};let Xt="$R";const hn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1}],wd=a=>{var i;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(i=a==null?void 0:a.contents)==null?void 0:i.map(l=>{var c;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(c=l.contents)==null?void 0:c.slice(0,parseInt(a==null?void 0:a.filter))),l})},Dd=a=>{var r;return(a==null?void 0:a.filter)==="Random"?(r=a==null?void 0:a.contents)==null?void 0:r.map(l=>((l==null?void 0:l.key)==="tableContents"&&(l.contents=vd(l.contents)),l)):((a==null?void 0:a.filter)==="Ordin"&&(a==null?void 0:a.contents).push({key:"enableWrap",contents:!0}),a==null?void 0:a.contents)},_d=a=>{var l,c,s,y;let r=a==null?void 0:a.filter;if(r!=null&&r.includes("*")&&(r="({"+((c=(l=r==null?void 0:r.replace("{",Xt))==null?void 0:l.split(Xt))==null?void 0:c[1])),r=(s=r==null?void 0:r.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return a==null?void 0:a.contents;let i=Me.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let h=[];return i==null||i.forEach(m=>{let D={};for(let _ in m){let N=_;N!=null&&N.includes("[")||(D[N]=m[_])}h.push(D)}),(y=a==null?void 0:a.contents)==null?void 0:y.map(m=>{var _,N,j;let D=(N=(_=a==null?void 0:a.contents)==null?void 0:_.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:N.contents;if(D=(j=Me.getEqualChild(D))==null?void 0:j.filter(B=>(B==null?void 0:B.label)!=="操作"),(m==null?void 0:m.key)==="tableContents"){let Q=Me.tableToForm(m==null?void 0:m.contents,D);h==null||h.forEach(M=>{var L,F;for(let g in M)!((L=Q==null?void 0:Q[0])!=null&&L.find(T=>{var v;return(T==null?void 0:T.key)===g||((v=T==null?void 0:T.key)==null?void 0:v.includes(g))}))&&!(Q!=null&&Q.find(T=>{var v;return(T==null?void 0:T.key)===g||((v=T==null?void 0:T.key)==null?void 0:v.includes(g))}))||(((F=M[g])==null?void 0:F[0])!=="!"?Q=Q==null?void 0:Q.filter(T=>{var v,S;return((v=T==null?void 0:T.find(b=>{var ce;return(b==null?void 0:b.key)===g||((ce=b==null?void 0:b.key)==null?void 0:ce.includes(g))}))==null?void 0:v.value)===M[g]&&!Array.isArray(M==null?void 0:M[g])||Array.isArray(M==null?void 0:M[g])&&((S=M==null?void 0:M[g])==null?void 0:S.find(b=>{var ce;return((ce=T==null?void 0:T.find(Ie=>{var Qe;return(Ie==null?void 0:Ie.key)===g||((Qe=Ie==null?void 0:Ie.key)==null?void 0:Qe.includes(g))}))==null?void 0:ce.value)===b}))}):Q=Q==null?void 0:Q.filter(T=>{var v;return((v=T==null?void 0:T.find(S=>{var b;return(S==null?void 0:S.key)===g||((b=S==null?void 0:S.key)==null?void 0:b.includes(g))}))==null?void 0:v.value)!==M[g]}))}),(Q==null?void 0:Q.length)===0?m.contents=[]:m.contents=Q==null?void 0:Q.map(M=>{let L={};return M==null||M.forEach(F=>{L[F==null?void 0:F.key]=F==null?void 0:F.value}),L})}return m})}return a==null?void 0:a.contents},Ed=a=>a==null?void 0:a.contents,Cd=a=>a==null?void 0:a.contents,Sd=a=>a==null?void 0:a.contents,Td=a=>{var i;let r=(a==null?void 0:a.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>{var s;return(c==null?void 0:c.key)==="extraButton"&&(c.contents=(s=r==null?void 0:r.split(","))==null?void 0:s.map(y=>({label:y,prop:y}))),c}):a==null?void 0:a.contents},Bd=a=>a==null?void 0:a.contents,Id=a=>{var i;let r=(a==null?void 0:a.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>{var s;return(c==null?void 0:c.key)==="rowButton"&&(c.contents=(s=r==null?void 0:r.split(","))==null?void 0:s.map(y=>({label:y,prop:y}))),c}):a==null?void 0:a.contents},Nd=a=>{var i;let r=(a==null?void 0:a.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let l=a==null?void 0:a.contents,c=(i=r==null?void 0:r.split(","))==null?void 0:i.map(s=>({label:s,prop:s}));return l.push({key:"bottomButton",contents:c}),l}return a==null?void 0:a.contents},Ad=a=>{var r,i,l,c;if(((r=a==null?void 0:a.filter)==null?void 0:r[0])!=="[")return(i=a==null?void 0:a.contents)==null?void 0:i.map(y=>{var h;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(h=y.contents)==null?void 0:h.map(p=>(p.width=parseInt(a==null?void 0:a.filter),p))),y});if(((l=a==null?void 0:a.filter)==null?void 0:l[0])==="["){let s=Jn(a==null?void 0:a.filter),y=s==null?void 0:s.map(p=>parseInt(p));return y=hd(y),(c=a==null?void 0:a.contents)==null?void 0:c.map((p,m)=>{var D;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(D=p.contents)==null?void 0:D.map(_=>{var N;return _.width=(N=y==null?void 0:y.find(j=>(j==null?void 0:j.total)>m+1))==null?void 0:N.key,_})),p})}return a==null?void 0:a.contents},Vd=a=>{var r;if((a==null?void 0:a.filter)!==""){let i=a==null?void 0:a.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split(","),(r=a==null?void 0:a.contents)==null?void 0:r.map(c=>{var s,y,h;return(c==null?void 0:c.key)==="header"&&(Array.isArray((s=c==null?void 0:c.contents)==null?void 0:s[0])?c.contents[0]=(h=c.contents[0])==null?void 0:h.map(p=>(i!=null&&i.find(m=>m===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):c.contents=(y=c.contents)==null?void 0:y.map(p=>(i!=null&&i.find(m=>m===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),c})}return a==null?void 0:a.contents},Od=async a=>{var l,c,s,y,h,p,m,D,_,N,j;const r=Me.useUnit(C.pinia),{chooseTitle:i}=C.storeToRefs(r);if((a==null?void 0:a.filter)==="true"){let B=await mn((c=(l=i==null?void 0:i.value)==null?void 0:l[0])==null?void 0:c.parentContent,!1),Q=(y=(s=i==null?void 0:i.value)==null?void 0:s[0])==null?void 0:y.value;B=(h=B==null?void 0:B[0])==null?void 0:h.compData;let M=(p=B==null?void 0:B.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:p.contents;M=((m=M==null?void 0:M.find(g=>g==null?void 0:g.isMainKey))==null?void 0:m.prop)??((D=M==null?void 0:M[0])==null?void 0:D.prop);let L=(N=(_=B==null?void 0:B.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:N.find(g=>(g==null?void 0:g[M])===Q);return(j=a==null?void 0:a.contents)==null?void 0:j.map(g=>{var T;return(g==null?void 0:g.key)==="formContent"&&(g.contents=(T=g.contents)==null?void 0:T.map(v=>(v.value=L==null?void 0:L[v==null?void 0:v.prop],v))),g})}return a==null?void 0:a.contents},Nl={onNumSlice:wd,onRandomContents:Dd,onConditionContents:_d,onFatherPaceContents:Ed,onPaceContents:Cd,onMainTagContents:Sd,onButtonContents:Td,onPamButtonContents:Bd,onRowButtonContents:Id,onRelated:Od,onRowNum:Ad,onFixRow:Vd,onBottomButtonContents:Nd},Md=async a=>{var c,s,y,h,p,m,D,_,N,j,B,Q,M,L,F,g,T,v,S;let r="";if(((c=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(s=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(h=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:h[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ut(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=a;for(let b in i){let ce,Ie="";(m=i==null?void 0:i[b])!=null&&m.includes("(")?(ce=(N=(_=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:_.split(Xt))==null?void 0:N[0],Ie="("+((Q=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Q[1])):(ce=(F=(L=(M=i==null?void 0:i[b])==null?void 0:M.replace("=",Xt))==null?void 0:L.split(Xt))==null?void 0:F[0],Ie=(v=(T=(g=i==null?void 0:i[b])==null?void 0:g.replace("=",Xt))==null?void 0:T.split(Xt))==null?void 0:v[1]);let Qe=(S=hn==null?void 0:hn.find(ke=>(ke==null?void 0:ke.key)===ce))==null?void 0:S.value;if(Qe){const ke=Nl[Qe];l=await ke({contents:l,filter:Ie})}}return l},zd=async a=>{var c,s,y,h,p,m,D,_,N,j,B,Q,M,L,F,g,T,v,S;let r="";if(((c=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(s=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(h=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:h[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ut(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=a;for(let b in i){let ce,Ie="";(m=i==null?void 0:i[b])!=null&&m.includes("(")?(ce=(N=(_=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:_.split(Xt))==null?void 0:N[0],Ie="("+((Q=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Q[1])):(ce=(F=(L=(M=i==null?void 0:i[b])==null?void 0:M.replace("=",Xt))==null?void 0:L.split(Xt))==null?void 0:F[0],Ie=(v=(T=(g=i==null?void 0:i[b])==null?void 0:g.replace("=",Xt))==null?void 0:T.split(Xt))==null?void 0:v[1]);let Qe=(S=hn==null?void 0:hn.find(ke=>(ke==null?void 0:ke.key)===ce))==null?void 0:S.value;if(Qe){const ke=Nl[Qe];l=await ke({contents:l,filter:Ie})}}return l};let no=["新增","导入","导出"],oo=["查看","编辑","复制新增","删除"],lo=["导入","导出"],ro=["查看","编辑"];const Fo=async a=>{var y,h;const r=C.useMenuState(C.pinia),{activeMenuPath:i,currentMenuPath:l}=C.storeToRefs(r);let c=[],s=a==null?void 0:a.map(async p=>{var j,B,Q,M,L,F,g,T,v,S,b,ce,Ie,Qe,ke,Pe,Re,P,U,G,ie,Ee,Ze,Z,z,ue,be,Ce,Se,qe,ee,ae,w,Ne;let m=(M=(Q=(B=(j=p==null?void 0:p.contents)==null?void 0:j.find(_e=>{var ve;return(ve=_e==null?void 0:_e.key)==null?void 0:ve.includes("struct")}))==null?void 0:B.value)==null?void 0:Q[0])==null?void 0:M.类型,D=Object.values(p==null?void 0:p.name);D=D==null?void 0:D.reverse();let _=(L=p==null?void 0:p.contents)==null?void 0:L.map(_e=>_e==null?void 0:_e.key),N={comp:m,isShow:p==null?void 0:p.is_show,name:D==null?void 0:D[0],id:p==null?void 0:p.object_id,relatedTables:_};for(let _e in D)parseInt(_e)>=1&&(N[`name${parseInt(_e)-1}`]=D[_e]);if(m==="Table"){let _e=(F=p==null?void 0:p.contents)==null?void 0:F.find(fe=>{var Fe;return(Fe=fe==null?void 0:fe.key)==null?void 0:Fe.includes("content")}),ve=[];_e.value=(g=_e==null?void 0:_e.value)==null?void 0:g.sort((fe,Fe)=>parseInt(fe==null?void 0:fe.id)-parseInt(Fe==null?void 0:Fe.id)),ve.push({key:"tableContents",contents:_e==null?void 0:_e.value});let te=(ce=(b=(S=(v=(T=p==null?void 0:p.contents)==null?void 0:T.find(fe=>{var Fe;return(Fe=fe==null?void 0:fe.key)==null?void 0:Fe.includes("struct")}))==null?void 0:v.value)==null?void 0:S[0])==null?void 0:b.结构)==null?void 0:ce.contents;Array.isArray(te==null?void 0:te[0])?te[0]=(Ie=te==null?void 0:te[0])==null?void 0:Ie.filter(fe=>(fe==null?void 0:fe.prop)!=="sort"):te=te==null?void 0:te.filter(fe=>(fe==null?void 0:fe.prop)!=="sort"),ve.push({key:"header",contents:te}),ve.push({key:"filter",contents:(P=(Re=(Pe=(ke=(Qe=p==null?void 0:p.contents)==null?void 0:Qe.find(fe=>{var Fe;return(Fe=fe==null?void 0:fe.key)==null?void 0:Fe.includes("struct")}))==null?void 0:ke.value)==null?void 0:Pe[0])==null?void 0:Re.引用)==null?void 0:P.contents});let J=no==null?void 0:no.map(fe=>({label:fe})),se=oo==null?void 0:oo.map(fe=>({label:fe}));!Array.isArray(te==null?void 0:te[0])&&((U=te==null?void 0:te[0])==null?void 0:U.prop)==="disabled"&&(J=lo==null?void 0:lo.map(fe=>({label:fe})),se=ro==null?void 0:ro.map(fe=>({label:fe}))),ve.push({key:"extraButton",contents:J}),ve.push({key:"rowButton",contents:se}),N.compData=await zd(ve)}else if(m==="Form"){let _e=[],ve=(Ee=(ie=(G=p==null?void 0:p.contents)==null?void 0:G.find(J=>{var se;return(se=J==null?void 0:J.key)==null?void 0:se.includes("content")}))==null?void 0:ie.value)==null?void 0:Ee[0],te=(Se=(Ce=(be=(ue=(z=(Z=(Ze=p==null?void 0:p.contents)==null?void 0:Ze.find(J=>{var se;return(se=J==null?void 0:J.key)==null?void 0:se.includes("struct")}))==null?void 0:Z.value)==null?void 0:z[0])==null?void 0:ue.结构)==null?void 0:be.contents)==null?void 0:Ce.map(J=>(J.value=ve==null?void 0:ve[J==null?void 0:J.prop],J)))==null?void 0:Se.filter(J=>(J==null?void 0:J.prop)!=="sort");_e.push({key:"filter",contents:(Ne=(w=(ae=(ee=(qe=p==null?void 0:p.contents)==null?void 0:qe.find(J=>{var se;return(se=J==null?void 0:J.key)==null?void 0:se.includes("struct")}))==null?void 0:ee.value)==null?void 0:ae[0])==null?void 0:w.引用)==null?void 0:Ne.contents}),_e.push({key:"formContent",contents:te}),N.compData=await Md(_e)}return N});c=await Promise.all(s);try{if(!(i.value==="设备管理/试验设备"&&l.value&&l.value.split("/").length===3&&l.value.startsWith("设备管理/试验设备/")))return c;const m=["检校记录","维保记录","使用记录"],D=c.filter(_=>(_==null?void 0:_.comp)==="Table"&&m.includes(_==null?void 0:_.name));if(D.length===m.length){const _=m.map(N=>D.find(j=>(j==null?void 0:j.name)===N)).filter(Boolean);if(_.length===m.length){const N=_.map(M=>{var v,S;const L=(v=M==null?void 0:M.compData)==null?void 0:v.find(b=>(b==null?void 0:b.key)==="tableContents"),F=(S=M==null?void 0:M.compData)==null?void 0:S.find(b=>(b==null?void 0:b.key)==="header"),g=(L==null?void 0:L.contents)??[],T=(F==null?void 0:F.contents)??[];return{title:M==null?void 0:M.name,label:M==null?void 0:M.name,value:M==null?void 0:M.name,children:[{type:"Table",value:M==null?void 0:M.name,content:{value:M==null?void 0:M.name,columns:T,tableData:g,currentPage:1,pageSize:10,total:g.length,isShowPagination:!0,isMoveColumn:!1}}]}}),j={comp:"Tabs",isShow:((y=_==null?void 0:_[0])==null?void 0:y.isShow)??!0,name:"设备记录",id:((h=_==null?void 0:_[0])==null?void 0:h.id)??"equip_record_tabs",relatedTables:_.reduce((M,L)=>(Array.isArray(L==null?void 0:L.relatedTables)&&M.push(...L.relatedTables),M),[]),compData:[{key:"stepList",contents:N}]},B=c.findIndex(M=>(M==null?void 0:M.comp)==="Table"&&(M==null?void 0:M.name)===m[0]),Q=c.filter(M=>!((M==null?void 0:M.comp)==="Table"&&m.includes(M==null?void 0:M.name)));if(B>=0){const M=Q.slice(0,B),L=Q.slice(B);c=[...M,j,...L]}else c=[...Q,j]}}}catch(p){console.error(p)}return c},Rd=C.useLoginState(C.pinia),{loginUserInfo:sa}=C.storeToRefs(Rd),Pd=C.useMenuState(C.pinia),{activeMenuPath:jo,currentMenuPath:Ld}=C.storeToRefs(Pd),Al=Me.useUnit(C.pinia),{selectTitle:io}=C.storeToRefs(Al),$d=async(a,r)=>{var y,h,p,m,D,_,N,j,B,Q,M,L,F;let i=jo.value,l="",c=((y=io==null?void 0:io.value)==null?void 0:y.find(g=>(g==null?void 0:g.condition)==="child"&&!(g!=null&&g.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(i=r?i:(h=a==null?void 0:a[0])==null?void 0:h.object_name,l=(p=a==null?void 0:a[0])==null?void 0:p.father_name);let s=[];if(l!==""){let g=l;(g==null?void 0:g[(g==null?void 0:g.length)-1])==="/"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1));let T=await mn(g,!1);T=(m=T==null?void 0:T[0])==null?void 0:m.compData;let v=(D=T==null?void 0:T.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:D.contents;v=((_=v==null?void 0:v.find(b=>b==null?void 0:b.isMainKey))==null?void 0:_.prop)??((N=v==null?void 0:v[0])==null?void 0:N.prop);let S=(B=(j=T==null?void 0:T.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:B.map(b=>({label:b==null?void 0:b[v],value:b==null?void 0:b[v]}));s=(Q=l==null?void 0:l.split("/"))==null?void 0:Q.map(b=>(b===""?c?(c.isShow=!0,b=c):b={value:b,condition:"child",options:S,parentContent:(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"?l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1):l,isShow:!0}:b={condition:"parent",value:b.trim(),isShow:!0},b))}if(i!==""){let g=(M=i==null?void 0:i.split("/"))==null?void 0:M.map(T=>(T={condition:"normal",value:T.trim(),isShow:!0},T));((L=g==null?void 0:g[0])==null?void 0:L.value)===((F=s==null?void 0:s[0])==null?void 0:F.value)&&(g=g==null?void 0:g.filter((T,v)=>v!==0)),s=[...s,...g??[]]}l===""&&c&&((c==null?void 0:c.parentContent)!==jo.value&&(c.isShow=!1),(c==null?void 0:c.value)!==""&&s.push(c)),Al.setSelectTitle(s)},Fd=async a=>{var c,s;let r=await Ba.getPageDataApi({platId:parseInt((c=sa==null?void 0:sa.value)==null?void 0:c.plat_id),pageName:"menu"}),i=(s=r==null?void 0:r.data)==null?void 0:s.result,l=i==null?void 0:i.filter(y=>(y==null?void 0:y.object_name)===Ld.value+"/");return(l==null?void 0:l.length)>0&&(a=a==null?void 0:a.map(y=>{var h;return(y==null?void 0:y.comp)==="Table"&&(y.compData=(h=y==null?void 0:y.compData)==null?void 0:h.map(p=>{var m;return(p==null?void 0:p.key)==="header"&&(p.contents=(m=p.contents)==null?void 0:m.map((D,_)=>(_===0&&(D.isExistChild=!0),D))),p})),y})),a},mn=async(a,r,i={})=>{var y,h,p,m,D,_,N,j,B,Q,M,L;let l=await Ba.getPageDataApi({platId:parseInt((y=sa==null?void 0:sa.value)==null?void 0:y.plat_id),pageName:a}),c=(h=l==null?void 0:l.data)==null?void 0:h.result;if((c==null?void 0:c.length)===0&&(i!=null&&i.originPath)&&(i==null?void 0:i.originPath)!==a){let F=await Ba.getPageDataApi({platId:parseInt((p=sa==null?void 0:sa.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((D=(m=F==null?void 0:F.data)==null?void 0:m.result)==null?void 0:D.length)>0){let g=await Fo((_=F==null?void 0:F.data)==null?void 0:_.result);g=g==null?void 0:g.map(S=>{var Ie,Qe,ke,Pe,Re,P,U,G,ie,Ee,Ze,Z,z,ue,be,Ce,Se,qe;let b=[],ce=(Ie=Object.keys(S))==null?void 0:Ie.filter(ee=>ee==null?void 0:ee.includes("name"));for(let ee in S)ce!=null&&ce.find(ae=>ae===ee)&&b.push(S==null?void 0:S[ee]);if(b=b.reverse(),(S==null?void 0:S.comp)==="Table"){let ee=(Pe=(ke=(Qe=S==null?void 0:S.compData)==null?void 0:Qe.find(w=>(w==null?void 0:w.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:Pe.map(w=>{let Ne={};for(let _e in w)_e!=="id"&&(Ne[_e]=w==null?void 0:w[_e]);return w=Object.values(Ne),w}),ae=(P=(Re=S==null?void 0:S.compData)==null?void 0:Re.find(w=>(w==null?void 0:w.key)==="header"))==null?void 0:P.contents;Array.isArray(ae==null?void 0:ae[0])?(ae[0].unshift({label:"排序",prop:"sort"}),(U=ae[0])!=null&&U.find(w=>(w==null?void 0:w.prop)==="disabled")&&(ae[0]=(G=ae[0])==null?void 0:G.filter(w=>(w==null?void 0:w.prop)!=="disabled"),ae[0].unshift({label:"",prop:"disabled",sortable:!1}))):(ae.unshift({label:"排序",prop:"sort"}),ae!=null&&ae.find(w=>(w==null?void 0:w.prop)==="disabled")&&(ae=ae==null?void 0:ae.filter(w=>(w==null?void 0:w.prop)!=="disabled"),ae.unshift({label:"",prop:"disabled",sortable:!1}))),S={filter:(Ee=(ie=S==null?void 0:S.compData)==null?void 0:ie.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:Ee.contents,key:S==null?void 0:S.comp,name:b,tableColumns:ae,tableContents:ee}}else{let ee=(z=(Z=(Ze=S==null?void 0:S.compData)==null?void 0:Ze.find(w=>(w==null?void 0:w.key)==="formContent"))==null?void 0:Z.contents)==null?void 0:z.map(w=>(w==null?void 0:w.value)??"");ee=[ee];let ae=(Ce=(be=(ue=S==null?void 0:S.compData)==null?void 0:ue.find(w=>(w==null?void 0:w.key)==="formContent"))==null?void 0:be.contents)==null?void 0:Ce.map(w=>(w.value="",w));S={contents:ee,filter:(qe=(Se=S==null?void 0:S.compData)==null?void 0:Se.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:qe.contents,key:S==null?void 0:S.comp,name:b,value:ae}}return S.isShow=!1,S});let T=[{key:"menuPath",contents:[{path:a,fatherPath:(B=(j=(N=F==null?void 0:F.data)==null?void 0:N.result)==null?void 0:j[0])==null?void 0:B.father_name,isShow:!1}]},{key:a,contents:g}];await Ba.createPlatFormDataApi({platId:parseInt((Q=sa==null?void 0:sa.value)==null?void 0:Q.plat_id),changeData:T});let v=await Ba.getPageDataApi({platId:parseInt((M=sa==null?void 0:sa.value)==null?void 0:M.plat_id),pageName:a});c=(L=v==null?void 0:v.data)==null?void 0:L.result}}r&&await $d(c,!!(i!=null&&i.originPath));let s=await Fo(c);return r&&(s=await Fd(s)),s};var Pn={exports:{}},jd=Pn.exports,Uo;function Ud(){return Uo||(Uo=1,function(a,r){(function(i,l){l()})(jd,function(){function i(m,D){return typeof D>"u"?D={autoBom:!1}:typeof D!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),D={autoBom:!D}),D.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(m.type)?new Blob(["\uFEFF",m],{type:m.type}):m}function l(m,D,_){var N=new XMLHttpRequest;N.open("GET",m),N.responseType="blob",N.onload=function(){p(N.response,D,_)},N.onerror=function(){console.error("could not download file")},N.send()}function c(m){var D=new XMLHttpRequest;D.open("HEAD",m,!1);try{D.send()}catch{}return 200<=D.status&&299>=D.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var D=document.createEvent("MouseEvents");D.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(D)}}var y=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Me.commonjsGlobal=="object"&&Me.commonjsGlobal.global===Me.commonjsGlobal?Me.commonjsGlobal:void 0,h=y.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=y.saveAs||(typeof window!="object"||window!==y?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(m,D,_){var N=y.URL||y.webkitURL,j=document.createElement("a");D=D||m.name||"download",j.download=D,j.rel="noopener",typeof m=="string"?(j.href=m,j.origin===location.origin?s(j):c(j.href)?l(m,D,_):s(j,j.target="_blank")):(j.href=N.createObjectURL(m),setTimeout(function(){N.revokeObjectURL(j.href)},4e4),setTimeout(function(){s(j)},0))}:"msSaveOrOpenBlob"in navigator?function(m,D,_){if(D=D||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(i(m,_),D);else if(c(m))l(m,D,_);else{var N=document.createElement("a");N.href=m,N.target="_blank",setTimeout(function(){s(N)})}}:function(m,D,_,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof m=="string")return l(m,D,_);var j=m.type==="application/octet-stream",B=/constructor/i.test(y.HTMLElement)||y.safari,Q=/CriOS\/[\d]+/.test(navigator.userAgent);if((Q||j&&B||h)&&typeof FileReader<"u"){var M=new FileReader;M.onloadend=function(){var g=M.result;g=Q?g:g.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=g:location=g,N=null},M.readAsDataURL(m)}else{var L=y.URL||y.webkitURL,F=L.createObjectURL(m);N?N.location=F:location.href=F,N=null,setTimeout(function(){L.revokeObjectURL(F)},4e4)}});y.saveAs=p.saveAs=p,a.exports=p})}(Pn)),Pn.exports}Ud();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-EzAyKU_n.cjs")).then(a=>a.index));jn.install=a=>{a.component("ssMenu",jn)};const Vl={__name:"index",props:{name:String},setup(a){const r=a,i=e.computed(()=>ct.ElIcons[r.name]);return e.onMounted(()=>{}),(l,c)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))]),_:1})}}},Ol=(a,r,i=0)=>{let l=a;return l!=null&&l.every(c=>Array.isArray(c))&&(l!=null&&l.every(c=>Array.isArray(c)&&c.length===1)?l=l==null?void 0:l.filter(c=>(c==null?void 0:c[0])!==(r==null?void 0:r[i])):l=l==null?void 0:l.map(c=>{if(c!=null&&c.find(s=>s===(r==null?void 0:r[i]))&&(r==null?void 0:r.length)!==1){let s=C.cloneDeep(r),y=c==null?void 0:c.filter(D=>D!==(s==null?void 0:s[i])),h=i+1,p=Ol(y,s,h),m=[];m.push(c==null?void 0:c[0]),p==null||p.forEach(D=>{m.push(D)}),c=m}return c})),l},Ml=(a,r,i,l=0)=>{let c=a;return c!=null&&c.every(s=>Array.isArray(s))&&(c!=null&&c.every(s=>Array.isArray(s)&&s.length===1)?c.push([i]):c=c==null?void 0:c.map(s=>{if(s!=null&&s.find(y=>y===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let y=C.cloneDeep(r),h=s==null?void 0:s.filter(_=>_!==(y==null?void 0:y[l])),p=l+1,m=Ml(h,y,i,p),D=[];D.push(s==null?void 0:s[0]),m==null||m.forEach(_=>{D.push(_)}),s=D}return s})),c},zl=(a,r,i,l,c=0)=>{let s=a;return s!=null&&s.every(y=>Array.isArray(y))&&(s!=null&&s.every(y=>Array.isArray(y)&&y.length===1)?s=s==null?void 0:s.map(y=>((y==null?void 0:y[0])===i&&(y=[l]),y)):s=s==null?void 0:s.map(y=>{if(y!=null&&y.find(h=>h===(r==null?void 0:r[c]))&&(r==null?void 0:r.length)!==1){let h=C.cloneDeep(r),p=y==null?void 0:y.filter(N=>N!==(h==null?void 0:h[c])),m=c+1,D=zl(p,h,i,l,m),_=[];_.push(y==null?void 0:y[0]),D==null||D.forEach(N=>{_.push(N)}),y=_}return y})),s};function Rl(a="menu"){return{name:a,components:{SvgIcon:qr.SvgIcon,ssMenu:jn,DynamicIcon:Vl,ssDialog:Gt.ssDialog,ssInput:Nt._sfc_main$2},setup(r,{emit:i}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),c=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=C.useMenuState(),y=C.useModelComp(C.pinia),h=C.useLoginState(C.pinia),{loginUserInfo:p}=C.storeToRefs(h),m=e.ref(0),D=Xr.useRouter(),_=e.ref(),{asideMenus:N,menuTriggerType:j,platform:B}=C.storeToRefs(s),{fixMenuStatus:Q}=C.storeToRefs(y),M=e.computed(()=>l==null?void 0:l.mode),L=ee=>ee==null?void 0:ee.map(w=>{var Ne,_e;return!(w!=null&&w.children)||((Ne=w==null?void 0:w.children)==null?void 0:Ne.length)===0?w.config=c.value:w!=null&&w.children&&((_e=w==null?void 0:w.children)==null?void 0:_e.length)>0&&(w.children=L(w.children)),w}),F=e.computed(()=>{let ee=[...N.value];if((ee==null?void 0:ee.length)===0)return D.push("/"),[];const ae=ce(ee,b.value);return ae.isFlag||(ee=ae==null?void 0:ae.data),ee=ee==null?void 0:ee.map(w=>{var Ne,_e;return!(w!=null&&w.children)||((Ne=w==null?void 0:w.children)==null?void 0:Ne.length)===0?w.config=c.value:w!=null&&w.children&&((_e=w==null?void 0:w.children)==null?void 0:_e.length)>0&&(w.children=L(w.children)),w}),ee}),g=async(ee,ae)=>{y.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(ee==null?void 0:ee.path),s.setActiveAsideMenu(ee),ee.isRouter?D.push(ee.path):D.push("/"),i("node-click",ee,ae)},T=async ee=>{const ae=Yr.findNodeByPropInTree(F.value,"path",ee);s.setActiveAsideMenu(ae),y.setRouteToChildPath(""),Q.value?y.setFixMenuStatus(!1):(Se.value&&(j.value="open"),j.value==="click"?m.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(ee):Se.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(ee))),ee!=null&&ee.startsWith("/")?D.push(ee):D.push("/"),m.value++},v=ee=>{Se.value||s.setActiveMenuPath(ee)},S=ee=>{const ae=document.documentElement;ee==null||ee.forEach(w=>{ae.style.setProperty(w.name,w.value)})};e.onMounted(()=>{m.value=1});const b=e.computed(()=>{const ee=sessionStorage.getItem("authority");return ee?JSON.parse(ee):[]});e.watch(()=>B.value,ee=>{ee==="browser"?S(wn.browserVerticalMenuClasses):ee==="client"?(S(wn.clientHorizontalMenuClasses),S(wn.clientVerticalMenuClasses)):ee==="three"&&(S(wn.threeHorizontalMenuClasses),S(wn.threeVerticalMenuClasses))},{immediate:!0});const ce=(ee,ae)=>({isFlag:!0}),Ie=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Qe=ee=>sn(ee),ke=e.ref({}),Pe=e.ref([]),Re=e.ref({}),P=e.ref({}),U=ee=>{switch(ee){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},G=e.ref({}),ie=ee=>{s.setCacheInputMenu({type:Ie.type,data:ee}),s.setIsRefreshMenus(!0)},Ee=async(ee,ae,w)=>{var Ne,_e,ve,te,J,se,fe,Fe,dt,k,A,X,oe,I,de,ze,le,K,H,Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge,We,st,Ge,tt,Ae,pt,Je,Le,rt,mt,wt;if(ae==="create"){let He=(w==null?void 0:w.title)+"(1)",ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),yt=(_e=(Ne=ot==null?void 0:ot.data)==null?void 0:Ne.result)==null?void 0:_e[0],je=(ve=yt==null?void 0:yt.value)==null?void 0:ve.pageData;je.compData=(te=je.compData)==null?void 0:te.map(Te=>{var O;return(Te==null?void 0:Te.key)==="menuContents"&&(Te.contents=Ml(Te.contents,(O=w==null?void 0:w.path)==null?void 0:O.split("/"),He)),Te}),await ct.updateInsofDataApi({id:yt==null?void 0:yt.id,value:{pageData:je}});let Ke=(se=(J=w==null?void 0:w.path)==null?void 0:J.split("/"))==null?void 0:se.filter((Te,O)=>{var ye,xe;return O!==((xe=(ye=w==null?void 0:w.path)==null?void 0:ye.split("/"))==null?void 0:xe.length)-1}),Ye=await Me.getItemData((dt=(Fe=(fe=w==null?void 0:w.path)==null?void 0:fe.split("/"))==null?void 0:Fe.filter((Te,O)=>{var ye,xe;return O!==((xe=(ye=w==null?void 0:w.path)==null?void 0:ye.split("/"))==null?void 0:xe.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Ke.push(He),Ke=Ke==null?void 0:Ke.join("/"),(Ye==null?void 0:Ye.length)>0){let Te=Ye==null?void 0:Ye[0],O=(A=(k=Te==null?void 0:Te.compData)==null?void 0:k.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:A.contents;if(((X=O==null?void 0:O[0])==null?void 0:X.directiveLabel)==="#isMain"){let ye=(oe=O==null?void 0:O[0])==null?void 0:oe.prop,xe=(de=(I=Te==null?void 0:Te.compData)==null?void 0:I.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:de.contents,at;xe==null||xe.forEach(et=>{var Et,_t;if(et.length===1)((Et=et==null?void 0:et[0])==null?void 0:Et[ye])===(w==null?void 0:w.title)&&(at=et==null?void 0:et[0],at[ye]=He);else{let ut=(_t=O==null?void 0:O.filter(gt=>gt!=="操作"))==null?void 0:_t.map(gt=>gt==null?void 0:gt.prop),ft=et==null?void 0:et.filter(gt=>!(gt!=null&>.id)),vt=Me.getValueToObjectValue(ft,ut);vt[ye]=He,at=vt}}),await ct.createInsofDataApi({key:{type:"data",pageKey:(K=(le=(ze=w==null?void 0:w.path)==null?void 0:ze.split("/"))==null?void 0:le.filter((et,Et)=>{var _t,ut;return Et!==((ut=(_t=w==null?void 0:w.path)==null?void 0:_t.split("/"))==null?void 0:ut.length)-1}))==null?void 0:K.join("/"),tableId:Te==null?void 0:Te.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(H=p.value)==null?void 0:H.id,createUserLayer:((Y=p.value)==null?void 0:Y.dept)||((we=p.value)==null?void 0:we.部门名称)},value:{tableData:at}})}}await Me.newLoadingConstruct(w==null?void 0:w.path,Ke),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((he=(q=(me=w==null?void 0:w.path)==null?void 0:me.split("/"))==null?void 0:q.filter((Te,O)=>{var ye,xe;return O!==((xe=(ye=w==null?void 0:w.path)==null?void 0:ye.split("/"))==null?void 0:xe.length)-1}))==null?void 0:he.join("/")),s.setActiveTopMenuPath((Ve=(re=w==null?void 0:w.path)==null?void 0:re.split("/"))==null?void 0:Ve[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(ae==="update")_.value=w;else if(ae==="delete"){let He=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:w==null?void 0:w.path}}),ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),yt=(Be=(pe=ot==null?void 0:ot.data)==null?void 0:pe.result)==null?void 0:Be[0],je=($=yt==null?void 0:yt.value)==null?void 0:$.pageData;if(je.compData=(Oe=je.compData)==null?void 0:Oe.map(Te=>{var O;return(Te==null?void 0:Te.key)==="menuContents"&&(Te.contents=Ol(Te.contents,(O=w==null?void 0:w.path)==null?void 0:O.split("/"))),Te}),await ct.updateInsofDataApi({id:yt==null?void 0:yt.id,value:{pageData:je}}),((We=(ge=He==null?void 0:He.data)==null?void 0:ge.result)==null?void 0:We.length)>0){let Te=(Ge=(st=He==null?void 0:He.data)==null?void 0:st.result)==null?void 0:Ge.map(O=>O==null?void 0:O.id);(Te==null?void 0:Te.length)>0&&await ct.batchDeleteInsofDataApi({ids:Te})}let Ke=await Me.getItemData((pt=(Ae=(tt=w==null?void 0:w.path)==null?void 0:tt.split("/"))==null?void 0:Ae.filter((Te,O)=>{var ye,xe;return O!==((xe=(ye=w==null?void 0:w.path)==null?void 0:ye.split("/"))==null?void 0:xe.length)-1}))==null?void 0:pt.join("/"),sessionStorage.getItem("systemKey"),""),Ye=[];(Ke==null?void 0:Ke.length)>0&&(Ke==null||Ke.forEach(Te=>{var ye,xe,at,et,Et,_t,ut,ft,vt,gt,Lt;let O=(et=(at=(xe=(ye=Te==null?void 0:Te.compData)==null?void 0:ye.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:xe.contents)==null?void 0:at[0])==null?void 0:et.prop;((ft=(ut=(_t=(Et=Te==null?void 0:Te.compData)==null?void 0:Et.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:_t.contents)==null?void 0:ut[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((Lt=(gt=(vt=Te==null?void 0:Te.compData)==null?void 0:vt.find(bt=>(bt==null?void 0:bt.key)==="tableContents"))==null?void 0:gt.contents)==null||Lt.forEach(bt=>{var zt,Rt,Kt;(bt==null?void 0:bt.length)>1?(bt==null?void 0:bt[1])===(w==null?void 0:w.title)&&Ye.push((zt=bt==null?void 0:bt[0])==null?void 0:zt.id):((Rt=bt==null?void 0:bt[0])==null?void 0:Rt[O])===(w==null?void 0:w.title)&&Ye.push((Kt=bt==null?void 0:bt[0])==null?void 0:Kt.id)}))})),(Ye==null?void 0:Ye.length)>0&&await ct.batchDeleteInsofDataApi({ids:Ye}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((rt=(Le=(Je=w==null?void 0:w.path)==null?void 0:Je.split("/"))==null?void 0:Le.filter((Te,O)=>{var ye,xe;return O!==((xe=(ye=w==null?void 0:w.path)==null?void 0:ye.split("/"))==null?void 0:xe.length)-1}))==null?void 0:rt.join("/")),s.setActiveTopMenuPath((wt=(mt=w==null?void 0:w.path)==null?void 0:mt.split("/"))==null?void 0:wt[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},Ze=async(ee,ae)=>{var Fe,dt,k,A,X,oe,I,de,ze,le,K,H,Y,we,me,q,he,re,Ve,pe,Be,$,Oe,ge,We,st,Ge,tt,Ae,pt,Je;let w=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ne=(dt=(Fe=w==null?void 0:w.data)==null?void 0:Fe.result)==null?void 0:dt[0],_e=(k=Ne==null?void 0:Ne.value)==null?void 0:k.pageData;_e.compData=(A=_e.compData)==null?void 0:A.map(Le=>{var rt,mt;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=zl(Le.contents,(rt=ae==null?void 0:ae.path)==null?void 0:rt.split("/"),ae==null?void 0:ae.title,(mt=ee==null?void 0:ee.target)==null?void 0:mt.value)),Le}),Ne!=null&&Ne.id&&await ct.updateInsofDataApi({id:Ne==null?void 0:Ne.id,value:{pageData:_e}});let ve=(oe=(X=ae==null?void 0:ae.path)==null?void 0:X.split("/"))==null?void 0:oe.filter((Le,rt)=>{var mt,wt;return rt!==((wt=(mt=ae==null?void 0:ae.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}),te=ve==null?void 0:ve.join("/");ve.push((I=ee==null?void 0:ee.target)==null?void 0:I.value),ve=ve==null?void 0:ve.join("/");let J=await Me.getItemData(te,sessionStorage.getItem("systemKey"),"");if(((H=(K=(le=(ze=(de=J==null?void 0:J[0])==null?void 0:de.compData)==null?void 0:ze.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:le.contents)==null?void 0:K[0])==null?void 0:H.directiveLabel)==="#isMain"){let Le=(he=(q=(me=(we=(Y=J==null?void 0:J[0])==null?void 0:Y.compData)==null?void 0:we.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:me.contents)==null?void 0:q[0])==null?void 0:he.prop,rt=(pe=(Ve=(re=J==null?void 0:J[0])==null?void 0:re.compData)==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:pe.contents,mt=(ge=(Oe=($=(Be=J==null?void 0:J[0])==null?void 0:Be.compData)==null?void 0:$.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:Oe.contents)==null?void 0:ge.map(He=>He==null?void 0:He.prop),wt;if(rt==null||rt.forEach(He=>{var yt;let ot=Me.getValueToObjectValue(He,mt);(ot==null?void 0:ot[Le])===ae.title&&(wt=ot,wt[Le]=(yt=ee==null?void 0:ee.target)==null?void 0:yt.value)}),wt){let He={};for(let yt in wt)yt!=="id"&&(He[yt]=wt==null?void 0:wt[yt]);let ot=[{id:wt==null?void 0:wt.id,value:{tableData:He}}];await ct.batchUpdateInsofDataApi({dataList:ot})}}let se=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ae==null?void 0:ae.path}}),fe=(st=(We=se==null?void 0:se.data)==null?void 0:We.result)==null?void 0:st.map(Le=>({id:Le==null?void 0:Le.id,key:Le==null?void 0:Le.key}));fe=fe==null?void 0:fe.map(Le=>(Le.key.pageKey=ve,Le)),(fe==null?void 0:fe.length)>0&&await ct.batchUpdateInsofDataApi({dataList:fe}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((Ae=(tt=(Ge=ae==null?void 0:ae.path)==null?void 0:Ge.split("/"))==null?void 0:tt.filter((Le,rt)=>{var mt,wt;return rt!==((wt=(mt=ae==null?void 0:ae.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}))==null?void 0:Ae.join("/")),s.setActiveTopMenuPath((Je=(pt=ae==null?void 0:ae.path)==null?void 0:pt.split("/"))==null?void 0:Je[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),_.value=void 0},Z=async(ee,ae)=>{Ie.type=U(ae==null?void 0:ae.operateType),await Ee(ae,Ie.type,ee),P.value=ee,G.value=ae},z=()=>{Ie.show=!1},ue=ee=>ee==null?void 0:ee.filter(ae=>ae.allowInherit),be=()=>{var w,Ne,_e,ve,te;let ee;Ie.type==="create"&&(ee=((w=P.value)==null?void 0:w.path)+"/"+Re.value[(Ne=Re.value)==null?void 0:Ne.prop]),Ie.type==="update"&&(ee=(_e=P.value)==null?void 0:_e.path);const ae={...P.value,config:ue((ve=P.value)==null?void 0:ve.config),children:[],childMenus:[],title:Re.value[(te=Re.value)==null?void 0:te.prop],path:ee};console.log("clickSubmitForm",G.value,P.value,ae),ie(ae),Ie.show=!1},Ce=ee=>{var w,Ne;const ae=(w=ee==null?void 0:ee.contents)==null?void 0:w.find(_e=>_e.key==="formContent");ae&&(Re.value=(Ne=ae==null?void 0:ae.contents)==null?void 0:Ne.reduce((_e,ve)=>(_e[ve.key]=ve.value,_e.prop=ve.key,_e),{}))},Se=e.ref(!1);return{isCollapse:Se,handleMenuCollapse:()=>{Se.value=!Se.value},handleCompChange:Ce,dialogForm:ke,dialogRenderComps:Pe,getComponents:Qe,clickSubmitForm:be,dialogInfo:Ie,beforeDialogDestroy:z,clickMenuIcon:Z,mode:M,renderMenuList:F,clickMenu:g,openMenu:T,closeMenu:v,changeMenuStyle:S,fixElement:_,onBlur:Ze}}}}e.defineComponent(Rl());const Kd=C.useLoginState(),{loginUserInfo:va}=C.storeToRefs(Kd),Zt=C.useModelComp(C.pinia),Wd=e.ref(!1),{itemData:Hd,itemGridData:nn,curStructureCompIds:Ko,isSubmitCurStructure:qd,isRefreshCurStructure:Of,routeToChildPath:Xd,pageMapState:vo,itemExtendData:On}=C.storeToRefs(Zt),Qt=C.useMenuState(C.pinia),{activeTopMenuPath:Yd,activeMenuPath:ea,platform:Mf,activeAsideMenu:zf,buttonTriggerType:Gd,menus:Rf,currentMenuPath:Pf}=C.storeToRefs(Qt),xa=Me.useUnit(C.pinia),{selectTitle:xo,chooseTitle:Wo}=C.storeToRefs(xa),Jd=Me.useOriginalState(C.pinia),{originalPath:Lf}=C.storeToRefs(Jd);e.ref();C.useAuthorityState(C.pinia);const Un=e.ref(!0),gn=e.ref(0),mo=e.ref([]);e.ref(!1);const Zd=()=>{Zt.setItemGridData([]),Zt.setIsEdit("edit"),Zt.setSubmitCurStructure(ea.value!=="/平台管理/菜单管理")},Qd=()=>{Zt.setIsEdit("view"),Zt.setRefreshCurStructure(!0)},ep=async a=>{var c;let r=xo.value,i=r==null?void 0:r.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),l=r==null?void 0:r.filter((s,y)=>y<=i);xa.setSelectTitle(C.cloneDeep(l)),l=(c=l==null?void 0:l.map(s=>s==null?void 0:s.value))==null?void 0:c.join("/"),Qt.setActiveMenuPath(null),Qt.setActiveMenuPath(l)},so=async(a,r,i,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let s,y;r==="create"?(s={dataList:a==null?void 0:a.map(p=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...p,compData:(m=p==null?void 0:p.compData)==null?void 0:m.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},y=ct.batchAddInsofDataApi):r==="update"?(s={dataList:a==null?void 0:a.map(p=>{var m;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(m=p==null?void 0:p.compData)==null?void 0:m.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},y=ct.batchUpdateInsofDataApi):r==="delete"&&(s={ids:a},y=ct.batchDeleteInsofDataApi);const h=await y(s);if(((c=h==null?void 0:h.data)==null?void 0:c.code)===200)return h.data.result;throw ct.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ct.ElMessage.error("保存响应失败")}},Ho=async(a,r,i,l)=>{var c,s,y,h,p,m,D,_,N,j,B;try{const Q=(s=(c=a==null?void 0:a.results)==null?void 0:c.filter(v=>!(v!=null&&v.id)||typeof(v==null?void 0:v.id)=="string"))==null?void 0:s.map(v=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:i},value:{tableData:v}})),M=(h=(y=a==null?void 0:a.results)==null?void 0:y.filter(v=>(v==null?void 0:v.id)&&typeof(v==null?void 0:v.id)=="number"))==null?void 0:h.map(v=>({id:v==null?void 0:v.id,value:{tableData:v}})),L=JSON.parse(C.cloneDeep(JSON.stringify(a))),F=(p=L==null?void 0:L.results)==null?void 0:p.map(v=>v.id);let g;i?g=(_=(D=(m=vo.value)==null?void 0:m[ea.value])==null?void 0:D.filter(v=>{var S,b,ce;return((S=v==null?void 0:v.key)==null?void 0:S.type)===r&&((ce=(b=v==null?void 0:v.key)==null?void 0:b.relatedInfo)==null?void 0:ce.target)===l}))==null?void 0:_.map(v=>v==null?void 0:v.id):g=(B=(j=(N=vo.value)==null?void 0:N[ea.value])==null?void 0:j.filter(v=>{var S;return((S=v==null?void 0:v.key)==null?void 0:S.type)===r}))==null?void 0:B.map(v=>v==null?void 0:v.id);const T=g==null?void 0:g.filter(v=>!(F!=null&&F.includes(v))&&typeof v=="number");(Q==null?void 0:Q.length)>0&&await ct.batchAddInsofDataApi({dataList:Q}),(M==null?void 0:M.length)>0&&await ct.batchUpdateInsofDataApi({dataList:M}),(T==null?void 0:T.length)>0&&await ct.batchDeleteInsofDataApi({ids:T})}catch(Q){throw new Error(Q)}},tp=async a=>{var m,D,_,N,j,B,Q,M,L,F;Qt.setContentLoading(!0);const r=JSON.parse(C.cloneDeep(JSON.stringify(Hd.value)));if(!qd.value)return Qt.setCacheStructures({key:Gd.value,data:r}),ct.ElMessage.success("已暂存");const i=r==null?void 0:r.map(g=>g.id),l=i.filter(g=>{var T;return!((T=Ko.value)!=null&&T.includes(g))}),c=(m=Ko.value)==null?void 0:m.filter(g=>!i.includes(g)),s=[...l,...c].filter(g=>typeof g!==null&&typeof g<"u"),y=r==null?void 0:r.filter(g=>!g.id),h=r==null?void 0:r.filter(g=>g.id);let p=[];if(s&&(s==null?void 0:s.length)>0&&p.push(so(s,"delete",a)),y&&(y==null?void 0:y.length)>0&&p.push(so(y,"create",a)),h&&(h==null?void 0:h.length)>0&&p.push(so(h,"update",a)),nn.value&&((D=nn.value)!=null&&D.isDelete&&((N=(_=nn.value)==null?void 0:_.results)==null?void 0:N.length)>0&&((B=(j=nn.value)==null?void 0:j.results)!=null&&B.every(g=>typeof g=="number"))?await ct.batchDeleteInsofDataApi({ids:(Q=nn.value)==null?void 0:Q.results}):(console.log("itemGridData.value",nn.value),p.push(await Ho(nn.value,"gridLayout")))),On.value)for(const g in On.value)p.push(await Ho((M=On.value)==null?void 0:M[g],"extend",{target:g,compId:(F=(L=On.value)==null?void 0:L[g])==null?void 0:F.compId},g));await Promise.all(p).then(()=>{ct.ElMessage.success("保存成功"),Zt.setRefreshCurStructure(!0)}).catch(g=>{ct.ElMessage.success(g)}),Qt.setContentLoading(!1)},Kn=a=>sn(a),jt=e.ref([]),ap=e.computed(()=>{var a;return(a=jt.value)==null?void 0:a.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),Pl=e.computed(()=>{var a;return(a=jt.value)==null?void 0:a.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),Ll=e.ref(0),$l=e.ref(null),Wn=async(a,r="data",i)=>{var l,c,s,y,h,p,m,D;if((a==null?void 0:a.buttonName)==="新增"){let _=[{tableName:(l=a==null?void 0:a.relatedContents)==null?void 0:l.find(N=>N==null?void 0:N.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Ba.pageBatchAddApi({platId:parseInt((c=va==null?void 0:va.value)==null?void 0:c.plat_id),changeContents:_})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const _=((a==null?void 0:a.ocrRows)||[]).map(j=>{const B={...j};return delete B._isOCRRow,delete B._ocrTableId,B});let N=[{tableName:(s=a==null?void 0:a.relatedContents)==null?void 0:s.find(j=>j==null?void 0:j.includes("content")),tableContents:_}];await Ba.pageBatchAddApi({platId:parseInt((y=va==null?void 0:va.value)==null?void 0:y.plat_id),changeContents:N})}if((a==null?void 0:a.buttonName)==="编辑"){const _=((a==null?void 0:a.fixContent)||[]).map(j=>{const B={...j};return delete B._isOCRRow,delete B._ocrTableId,delete B._isTemp,delete B.tableEditType,delete B.index,B});let N=[{tableName:(h=a==null?void 0:a.relatedContents)==null?void 0:h.find(j=>j==null?void 0:j.includes("content")),tableContents:_}];await Ba.pageBatchUpdateApi({platId:parseInt((p=va==null?void 0:va.value)==null?void 0:p.plat_id),changeContents:N})}if((a==null?void 0:a.buttonName)==="删除"){let _=[{tableName:(m=a==null?void 0:a.relatedContents)==null?void 0:m.find(N=>N==null?void 0:N.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Ba.pageBatchDeleteApi({platId:parseInt((D=va==null?void 0:va.value)==null?void 0:D.plat_id),changeContents:_})}Zt.setRefreshCurStructure(!0)},Hn=async(a,r)=>{},qn=async a=>{jt.value=await Me.getDeepDiffItems(a),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value)};e.ref();const np=e.ref(null),op=()=>{var a,r;console.log("倒计时结束时"),oa.ElMessageBox.alert(`超时未提交,【${(r=(a=ea.value)==null?void 0:a.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),lp=e.computed(()=>{var a,r;return(r=(a=vo.value)==null?void 0:a[ea.value])==null?void 0:r.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Yd.value],()=>{xa.setSelectTitle([]),xa.setChooseTitle([])},{deep:!0});e.watch(()=>[Wo.value],async()=>{var r,i,l;let a=(r=Wo.value)==null?void 0:r.filter(c=>(c==null?void 0:c.condition)==="child"&&(c==null?void 0:c.value)!==""&&(c==null?void 0:c.parentContent)!==ea.value);if((a==null?void 0:a.length)>0){Qt.setContentLoading(!0);let c=ea.value+"/"+((i=a==null?void 0:a[0])==null?void 0:i.value),s=!!((l=a==null?void 0:a[0])!=null&&l.parentContent),y=await mn(c,s,{originPath:ea.value});y=y==null?void 0:y.map(h=>(h.isShow=!0,h)),jt.value=await Me.getDeepDiffItems(y),Qt.setContentLoading(!1)}});e.watch(()=>[ea.value],async a=>{var y,h,p;if(!ea.value)return;Qt.setCurrentMenuPath(ea.value),Zt.setLockingPage(""),jt.value=[];let r=e.getCurrentInstance();(y=r==null?void 0:r.scope)==null||y.stop(),r=null,Un.value=!1,Qt.setContentLoading(!0),Wd.value=!0;let i=a==null?void 0:a[0],l=i,c=(h=xo.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==ea.value&&!(m!=null&&m.relatedContent));(c==null?void 0:c.length)>0&&(i=i+"/"+((p=c==null?void 0:c[0])==null?void 0:p.value));let s=await mn(i,!0,{originPath:l});s=s==null?void 0:s.map(m=>(m.isShow=!0,m)),jt.value=await Me.getDeepDiffItems(s),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value),e.nextTick(()=>{gn.value=gn.value++,Un.value=!0})},{immediate:!0});const rp=async()=>{Qt.setLinkMenuInfo(null),Qt.setActiveMenuPath(Xd.value),jt.value=null,Zt.setRouteToChildPath(""),Qt.setChildMenu("")},ip=a=>new RegExp("button","i").test(a),sp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),jl=a=>{if(sp(a)){const r=a==null?void 0:a.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Qt.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},Ul=async a=>{var h,p,m,D,_,N,j,B;Qt.setCurrentMenuPath(ea.value+"/"+a),Qt.setContentLoading(!0),jt.value=await mn(ea.value+"/"+a,!0,{originPath:ea.value+"/"});let r=await mn(ea.value,!1);jt.value=(h=jt.value)==null?void 0:h.map(Q=>(Q.isShow=!0,Q));let i=(p=r==null?void 0:r.filter(Q=>(Q==null?void 0:Q.comp)==="Table"))==null?void 0:p[0],l=(N=(_=(D=(m=i==null?void 0:i.compData)==null?void 0:m.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:D.contents)==null?void 0:_[0])==null?void 0:N.prop,c=(B=(j=i==null?void 0:i.compData)==null?void 0:j.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:B.contents;c=c==null?void 0:c.map(Q=>({label:Q==null?void 0:Q[l],value:Q==null?void 0:Q[l]}));let s=xo.value,y={value:a,condition:"child",options:c,relatedContent:ea.value,isShow:!0};s.push(y),xa.setSelectTitle(s),xa.setChooseTitle([y]),jt.value=await Me.getDeepDiffItems(jt.value),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value)},cp=a=>{Ll.value=a},fn=e.reactive({index:0,comp:null}),up=e.computed(()=>{var a;return(a=jt.value)==null?void 0:a.map((r,i)=>({id:r.id,name:r.name,status:dp(r,i)}))}),Kl=(a,r)=>{var p,m,D,_,N;const i=r?a:a-2,l=(p=jt.value)==null?void 0:p[i],c=(D=(m=l==null?void 0:l.compData)==null?void 0:m.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:D.contents,s=c==null?void 0:c.findIndex(j=>(j==null?void 0:j.isMainKey)&&(j==null?void 0:j.label)!=="操作"),y=s===-1?0:s,h=(N=(_=l==null?void 0:l.compData)==null?void 0:_.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:N.contents;return{valid:h==null?void 0:h.every(j=>j==null?void 0:j[y+1]),length:(h==null?void 0:h.length)||0}},dp=(a,r)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:s}=Kl(r,!0);fn.index===r?i="process":s===0?i="wait":i=c?"success":"error"}return i},Wl=a=>{var i,l,c,s,y;const r=a+1;if(r>1&&((c=(l=(i=jt.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:h}=Kl(r);h?(fn.index=r,fn.comp=(s=jt.value)==null?void 0:s[a]):ct.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else fn.index=r,fn.comp=(y=jt.value)==null?void 0:y[a]},Hl=e.computed(()=>{var a,r;return(r=(a=Pl.value)==null?void 0:a[0])==null?void 0:r.isStepLayout});e.watch(()=>Hl.value,a=>{a&&Wl(0)},{immediate:!0});const pp={class:"layout"},fp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:r}){const i=r,l=a;e.onMounted(async()=>{});const c=e.computed(()=>C.cloneDeep(l==null?void 0:l.itemData)||[]),s=e.computed(()=>{var D;const m=(D=c==null?void 0:c.value)==null?void 0:D.find(_=>{const{key:N}=_;return N==="baseConfig"});return m==null?void 0:m.contents}),y=e.computed(()=>{var D;const m=(D=c==null?void 0:c.value)==null?void 0:D.find(_=>{const{key:N}=_;return N==="children"});return m==null?void 0:m.contents}),h=e.computed(()=>{let m=C.cloneDeep(y.value)||[];const D=m.length;let _=0;const N=[];if(m=m.map(j=>{const B=j.span;return B?(j.span=Number(B),_=_+j.span):N.push(j),j}),_<24){const j=Math.floor((24-_)/D);N.forEach(B=>{B.span=j})}return m}),p=m=>{i("rowClick",m)};return(m,D)=>{var j;const _=e.resolveComponent("el-col"),N=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",pp,[e.createVNode(N,{style:e.normalizeStyle({height:(j=s.value)==null?void 0:j.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(B,Q)=>(e.openBlock(),e.createBlock(_,{span:B==null?void 0:B.span},{default:e.withCtx(()=>{var M;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)(B.comp)),{key:e.unref(gn),compName:B.name,index:(B==null?void 0:B.id)??Q,height:(M=s.value)==null?void 0:M.height,itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,onChange:e.unref(Wn),onContentChange:e.unref(Hn),onPageChange:e.unref(qn),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),hp=Pt._export_sfc(fp,[["__scopeId","data-v-ab9a36ed"]]),vp={class:"layout-operate"},mp={class:"layout-module"},gp={class:"collapse-title-item"},yp={class:"collapse-title"},bp={class:"icon-content"},kp=["onClick"],xp={class:"comp-child"},wp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r;e.onMounted(()=>{Q()});const c=e.ref({}),s=e.ref({}),y=e.ref([]),h=v=>[{label:"高度",prop:"height",type:"input",value:v==null?void 0:v.height}],p=v=>{s.value=v,l("change",T(),!0)},m=e.ref([]),D=e.ref([]),_=v=>[{label:"占比",prop:"span",type:"input",value:v==null?void 0:v.span}],N=e.computed(()=>{const v=i==null?void 0:i.itemContents;return C.cloneDeep(v)}),j=e.computed(()=>{const v=N==null?void 0:N.value,S=v==null?void 0:v.find(b=>{const{key:ce}=b;return ce==="baseConfig"});return S==null?void 0:S.contents}),B=e.computed(()=>{const v=N==null?void 0:N.value,S=v==null?void 0:v.find(b=>{const{key:ce}=b;return ce==="children"});return S==null?void 0:S.contents}),Q=()=>{var v;c.value=N.value||{},m.value=(B==null?void 0:B.value)||[],y.value=h(),y.value=(v=y.value)==null?void 0:v.map(S=>{var ce;const{prop:b}=S;return S.value=(ce=j.value)==null?void 0:ce[b],S})};e.watch(()=>{var v;return(v=B==null?void 0:B.value)==null?void 0:v.length},()=>{var v;m.value=(B==null?void 0:B.value)||[],D.value=(v=B.value)==null?void 0:v.map(S=>_(S))},{immediate:!0});const M=(v,S)=>{const b=C.cloneDeep(B==null?void 0:B.value);b[S].span=v.span,m.value=b,l("change",T(),!0)},L=v=>sn(v),F=(v,S,b)=>{if(!v)return;const ce=C.cloneDeep(B==null?void 0:B.value);ce[b]&&(ce[b].compData=v,m.value=ce,l("change",T(),!0))},g=v=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let S=C.cloneDeep(B==null?void 0:B.value);S=S==null?void 0:S.filter((b,ce)=>v!==ce),m.value=S,l("change",T(),!0),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(v,S)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",vp,[e.createElementVNode("div",mp,[S[1]||(S[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:y.value,isEnableWrap:!0,onChange:S[0]||(S[0]=ce=>p(ce))},null,8,["rowContents"])])]),e.createVNode(bl.default,{class:"collapse-content",collapseContents:B.value},{title:e.withCtx(({item:ce,index:Ie})=>[e.createElementVNode("div",gp,[e.createElementVNode("div",yp,e.toDisplayString(ce.name),1),e.createElementVNode("div",bp,[e.createElementVNode("div",{onClick:e.withModifiers(Qe=>g(Ie),["stop"]),class:"icon-content"},[e.createVNode(b,{name:"Delete",style:{width:"16px",height:"16px"}})],8,kp)])])]),content:e.withCtx(({item:ce,index:Ie})=>[e.createElementVNode("div",xp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value[Ie],key:Ie,isEnableWrap:!0,onChange:Qe=>M(Qe,Ie)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(ce.comp+"Operate")),{itemContents:ce==null?void 0:ce.compData,originalItemContents:ce.compData,onChange:Qe=>F(Qe,ce,Ie)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Dp=Pt._export_sfc(wp,[["__scopeId","data-v-ba05456e"]]),_p=typeof window<"u";var qo;_p&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(a){return a==null}function ql(){}const Ep=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(Ep)));function Cp(){const a=new Map;return{on(r,i){const l=a.get(r);l!=null&&l.add(i)||a.set(r,new Set([i]))},off(r,i){const l=a.get(r);l&&l.delete(i)},clear(r){const i=a.get(r);i&&i.clear()},clearAll(){a.clear()},emit(r,...i){const l=a.get(r);l&&l.forEach(c=>{c(...i)})}}}function Xo(a,r=16){if(typeof a!="function")return ql;const i=(...s)=>{a(...s)};if(r<=0)return Xl(i);let l=0,c;return function(...s){const y=Date.now(),h=y-l;clearTimeout(c),h>=r?(l=y,i(...s)):c=setTimeout(()=>{l=Date.now(),i(...s)},Math.max(0,r-h))}}function Sp(a,r=100){if(typeof a!="function")return ql;const i=(...c)=>{a(...c)};if(r<=0)return Xl(i);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{i(...c)},r)}}function Xl(a){if(typeof a!="function")return a;let r=!1,i,l;return function(...c){return i=c,r||(r=!0,l=Promise.resolve().then(()=>(r=!1,l=void 0,a(...i)))),l}}const _n=new Set,Yl=new WeakMap;function Tp(){_n.forEach(a=>{a(...Yl.get(a))}),_n.clear()}function ia(a,...r){if(typeof a!="function")return a;Yl.set(a,r),!_n.has(a)&&(_n.add(a),_n.size===1&&Promise.resolve().then(Tp))}const Gl=Symbol("LAYOUT_KEY"),Jl=Symbol("EMITTER_KEY");function Bp(a){let r=0,i;for(let l=0,c=a.length;l<c;l++)i=a[l].y+a[l].h,i>r&&(r=i);return r}function go(a){const r=Array(a.length);for(let i=0,l=a.length;i<l;i++)r[i]=Ip(a[i]);return r}function Ip(a){return{...a}}function Zl(a,r){return!(a===r||a.x+a.w<=r.x||a.x>=r.x+r.w||a.y+a.h<=r.y||a.y>=r.y+r.h)}function pn(a,r,i){const l=er(a),c=tr(a),s=Array(a.length);for(let y=0,h=c.length;y<h;y++){let p=c[y];p.static||(p=Np(l,p,r,i),l.push(p)),s[a.findIndex(m=>m.i===p.i)]=p,p.moved=!1}return s}function Np(a,r,i,l){if(i)for(;r.y>0&&!En(a,r);)r.y--;else if(l){const s=l[r.i].y;for(;r.y>s&&!En(a,r);)r.y--}let c;for(;c=En(a,r);)r.y=c.y+c.h;return r}function Ap(a,r){const i=er(a);for(let l=0,c=a.length;l<c;l++){const s=a[l];if(s.x+s.w>r.cols&&(s.x=r.cols-s.w),s.x<0&&(s.x=0,s.w=r.cols),!s.static)i.push(s);else for(;En(i,s);)s.y++}return a}function Yo(a,r){for(let i=0,l=a.length;i<l;i++)if(a[i].i===r)return a[i]}function En(a,r){for(let i=0,l=a.length;i<l;i++)if(Zl(a[i],r))return a[i]}function Ql(a,r){return a.filter(i=>Zl(i,r))}function er(a){return a.filter(r=>r.static)}function yo(a,r,i,l,c=!1,s=!1){if(r.static)return a;const y=r.x,h=r.y,p=l&&r.y>l;typeof i=="number"&&(r.x=i),typeof l=="number"&&(r.y=l),r.moved=!0;let m=tr(a);p&&(m=m.reverse());const D=Ql(m,r);if(s&&D.length)return r.x=y,r.y=h,r.moved=!1,a;for(let _=0,N=D.length;_<N;_++){const j=D[_];j.moved||r.y>j.y&&r.y-j.y>j.h/4||(j.static?a=Go(a,j,r,c):a=Go(a,r,j,c))}return a}function Go(a,r,i,l){if(l){const c={x:i.x,y:i.y,w:i.w,h:i.h};if(c.y=Math.max(r.y-i.h,0),!En(a,c))return yo(a,i,void 0,c.y,!1)}return yo(a,i,void 0,i.y+1,!1)}function Vp(a,r,i,l){const c="translate3d("+r+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function Op(a,r,i,l){const c="translate3d("+r*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function Mp(a,r,i,l){return{top:a+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function zp(a,r,i,l){return{top:a+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function tr(a){return Array.from(a).sort(function(r,i){return r.y===i.y&&r.x===i.x?0:r.y>i.y||r.y===i.y&&r.x>i.x?1:-1})}function Rp(a,r){r=r||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(r+" must be an array!");for(let c=0,s=a.length;c<s;c++){const y=a[c];for(let h=0;h<i.length;h++)if(typeof y[i[h]]!="number")throw new Error("VueGridLayout: "+r+"["+c+"]."+i[h]+" 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(l.indexOf(y.i)>=0)throw new Error("VueGridLayout: "+r+"["+c+"].i must be unique!");if(l.push(y.i),y.static!==void 0&&typeof y.static!="boolean")throw new Error("VueGridLayout: "+r+"["+c+"].static must be a boolean!")}}function Pp(a,r="vgl"){const i=()=>`${r}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,c)=>`${i()}__${l}--${c}`}}function Jo(a){return Lp(a)}function Lp(a){var r;const i=((r=a.target)==null?void 0:r.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),c=a.clientX+i.scrollLeft-l.left,s=a.clientY+i.scrollTop-l.top;return{x:c,y:s}}function Zo(a,r,i,l){return $p(a)?{deltaX:i-a,deltaY:l-r,lastX:a,lastY:r,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function $p(a){return typeof a=="number"&&!Number.isNaN(a)}function Fp(a,r){const i=nr(a);let l=i[0];for(let c=1,s=i.length;c<s;c++){const y=i[c];r>a[y]&&(l=y)}return l}function ar(a,r){if(!r[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return r[a]}function jp(a,r,i,l,c,s,y){if(r[l])return go(r[l]);let h=a;const p=nr(i),m=p.slice(p.indexOf(l));for(let D=0,_=m.length;D<_;D++){const N=m[D];if(r[N]){h=r[N];break}}return h=go(h||[]),pn(Ap(h,{cols:s}),y)}function nr(a){return Object.keys(a).sort((r,i)=>a[r]-a[i])}let Up="auto";function Kp(){return typeof document<"u"}function Qo(){return Kp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Up}var Dn={exports:{}},Wp=Dn.exports,el;function Hp(){return el||(el=1,function(a,r){(function(i,l){a.exports=l()})(Wp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);t&&(u=u.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,u)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(u){p(n,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(o,u))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function y(n,t){for(var o=0;o<t.length;o++){var u=t[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,Q(u.key),u)}}function h(n,t,o){return t&&y(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function p(n,t,o){return(t=Q(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function m(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&_(n,t)}function D(n){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(n)}function _(n,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},_(n,t)}function N(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function j(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,u=D(n);if(t){var d=D(this).constructor;o=Reflect.construct(u,arguments,d)}else o=u.apply(this,arguments);return function(f,x){if(x&&(typeof x=="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}(this,o)}}function B(){return B=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var u=function(f,x){for(;!Object.prototype.hasOwnProperty.call(f,x)&&(f=D(f))!==null;);return f}(n,t);if(u){var d=Object.getOwnPropertyDescriptor(u,t);return d.get?d.get.call(arguments.length<3?n:o):d.value}},B.apply(this,arguments)}function Q(n){var t=function(o,u){if(typeof o!="object"||o===null)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var f=d.call(o,u);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var M=function(n){return!(!n||!n.Window)&&n instanceof n.Window},L=void 0,F=void 0;function g(n){L=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),F=n}function T(n){return M(n)?n:(n.ownerDocument||n).defaultView||F.window}typeof window<"u"&&window&&g(window);var v=function(n){return!!n&&c(n)==="object"},S=function(n){return typeof n=="function"},b={window:function(n){return n===F||M(n)},docFrag:function(n){return v(n)&&n.nodeType===11},object:v,func:S,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=T(n)||F;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return v(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return v(n)&&n.length!==void 0&&S(n.splice)}};function ce(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Ie(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var u=o.prepared.axis;if(u==="x"||u==="y"){var d=u==="x"?"y":"x";t.page[d]=o.coords.start.page[d],t.client[d]=o.coords.start.client[d],t.delta[d]=0}}}var Qe={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,u=n.defaults;o.prototype.draggable=Qe.draggable,t.map.drag=Qe,t.methodDict.drag="draggable",u.actions.drag=Qe.defaults},listeners:{"interactions:before-action-move":ce,"interactions:action-resume":ce,"interactions:action-move":Ie,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,u=n.buttons,d=o.options.drag;if(d&&d.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(u&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(n){return b.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):b.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:ce,move:Ie,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},ke=Qe,Pe={init:function(n){var t=n;Pe.document=t.document,Pe.DocumentFragment=t.DocumentFragment||Re,Pe.SVGElement=t.SVGElement||Re,Pe.SVGSVGElement=t.SVGSVGElement||Re,Pe.SVGElementInstance=t.SVGElementInstance||Re,Pe.Element=t.Element||Re,Pe.HTMLElement=t.HTMLElement||Pe.Element,Pe.Event=t.Event,Pe.Touch=t.Touch||Re,Pe.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Re(){}var P=Pe,U={init:function(n){var t=P.Element,o=n.navigator||{};U.supportsTouch="ontouchstart"in n||b.func(n.DocumentTouch)&&P.document instanceof n.DocumentTouch,U.supportsPointerEvent=o.pointerEnabled!==!1&&!!P.PointerEvent,U.isIOS=/iP(hone|od|ad)/.test(o.platform),U.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),U.isIe9=/MSIE 9/.test(o.userAgent),U.isOperaMobile=o.appName==="Opera"&&U.supportsTouch&&/Presto/.test(o.userAgent),U.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",U.pEventTypes=U.supportsPointerEvent?P.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,U.wheelEvent=P.document&&"onmousewheel"in P.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},G=U;function ie(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ee(n,t){for(;b.element(n);){if(Z(n,t))return n;n=Ze(n)}return null}function Ze(n){var t=n.parentNode;if(b.docFrag(t)){for(;(t=t.host)&&b.docFrag(t););return t}return t}function Z(n,t){return F!==L&&(t=t.replace(/\/deep\//g," ")),n[G.prefixedMatchesSelector](t)}var z=function(n){return n.parentNode||n.host};function ue(n,t){for(var o,u=[],d=n;(o=z(d))&&d!==t&&o!==d.ownerDocument;)u.unshift(d),d=o;return u}function be(n,t,o){for(;b.element(n);){if(Z(n,t))return!0;if((n=Ze(n))===o)return Z(n,t)}return!1}function Ce(n){return n.correspondingUseElement||n}function Se(n){var t=n instanceof P.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function qe(n){var t,o=Se(n);if(!G.isIOS7&&o){var u={x:(t=(t=T(n))||F).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=u.x,o.right+=u.x,o.top+=u.y,o.bottom+=u.y}return o}function ee(n){for(var t=[];n;)t.push(n),n=Ze(n);return t}function ae(n){return!!b.string(n)&&(P.document.querySelector(n),!0)}function w(n,t){for(var o in t)n[o]=t[o];return n}function Ne(n,t,o){return n==="parent"?Ze(o):n==="self"?t.getRect(o):Ee(o,n)}function _e(n,t,o,u){var d=n;return b.string(d)?d=Ne(d,t,o):b.func(d)&&(d=d.apply(void 0,u)),b.element(d)&&(d=qe(d)),d}function ve(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function te(n){return!n||"x"in n&&"y"in n||((n=w({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function J(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function se(n,t,o){var u=o&&n.options[o];return ve(_e(u&&u.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function fe(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(V){return!0},u=arguments.length>3?arguments[3]:void 0;if(u=u||{},b.string(n)&&n.search(" ")!==-1&&(n=Fe(n)),b.array(n))return n.forEach(function(V){return fe(V,t,o,u)}),u;if(b.object(n)&&(t=n,n=""),b.func(t)&&o(n))u[n]=u[n]||[],u[n].push(t);else if(b.array(t))for(var d=0,f=t;d<f.length;d++){var x=f[d];fe(n,x,o,u)}else if(b.object(t))for(var E in t)fe(Fe(E).map(function(V){return"".concat(n).concat(V)}),t[E],o,u);return u}function Fe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},k=["webkit","moz"];function A(n,t){n.__set||(n.__set={});var o=function(d){if(k.some(function(f){return d.indexOf(f)===0}))return 1;typeof n[d]!="function"&&d!=="__set"&&Object.defineProperty(n,d,{get:function(){return d in n.__set?n.__set[d]:n.__set[d]=t[d]},set:function(f){n.__set[d]=f},configurable:!0})};for(var u in t)o(u);return n}function X(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function oe(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function I(n){return n instanceof P.Event||n instanceof P.Touch}function de(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function ze(n,t){return t=t||{x:0,y:0},G.isOperaMobile&&I(n)?(de("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):de("page",n,t),t}function le(n){return b.number(n.pointerId)?n.pointerId:n.identifier}function K(n,t,o){var u=t.length>1?Y(t):t[0];ze(u,n.page),function(d,f){f=f||{},G.isOperaMobile&&I(d)?de("screen",d,f):de("client",d,f)}(u,n.client),n.timeStamp=o}function H(n){var t=[];return b.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function Y(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var u=n[o];for(var d in t)t[d]+=u[d]}for(var f in t)t[f]/=n.length;return t}function we(n){if(!n.length)return null;var t=H(n),o=Math.min(t[0].pageX,t[1].pageX),u=Math.min(t[0].pageY,t[1].pageY),d=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:u,left:o,top:u,right:d,bottom:f,width:d-o,height:f-u}}function me(n,t){var o=t+"X",u=t+"Y",d=H(n),f=d[0][o]-d[1][o],x=d[0][u]-d[1][u];return dt(f,x)}function q(n,t){var o=t+"X",u=t+"Y",d=H(n),f=d[1][o]-d[0][o],x=d[1][u]-d[0][u];return 180*Math.atan2(x,f)/Math.PI}function he(n){return b.string(n.pointerType)?n.pointerType:b.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof P.Touch?"touch":"mouse"}function re(n){var t=b.func(n.composedPath)?n.composedPath():n.path;return[Ce(t?t[0]:n.target),Ce(n.currentTarget)]}var Ve=function(){function n(t){s(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return h(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Ve.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var pe=function(n,t){for(var o=0;o<t.length;o++){var u=t[o];n.push(u)}return n},Be=function(n){return pe([],n)},$=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Oe=function(n,t){return n[$(n,t)]},ge=function(n){m(o,n);var t=j(o);function o(u,d,f){var x;s(this,o),(x=t.call(this,d._interaction)).dropzone=void 0,x.dragEvent=void 0,x.relatedTarget=void 0,x.draggable=void 0,x.propagationStopped=!1,x.immediatePropagationStopped=!1;var E=f==="dragleave"?u.prev:u.cur,V=E.element,W=E.dropzone;return x.type=f,x.target=V,x.currentTarget=V,x.dropzone=W,x.dragEvent=d,x.relatedTarget=d.target,x.draggable=d.interactable,x.timeStamp=d.timeStamp,x}return h(o,[{key:"reject",value:function(){var u=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=d.activeDrops,x=$(f,function(V){var W=V.dropzone,R=V.element;return W===u.dropzone&&R===u.target});d.activeDrops.splice(x,1);var E=new o(d,this.dragEvent,"dropdeactivate");E.dropzone=this.dropzone,E.target=this.target,this.dropzone.fire(E)}else this.dropzone.fire(new o(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Ve);function We(n,t){for(var o=0,u=n.slice();o<u.length;o++){var d=u[o],f=d.dropzone,x=d.element;t.dropzone=f,t.target=x,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function st(n,t){for(var o=function(f,x){for(var E=[],V=0,W=f.interactables.list;V<W.length;V++){var R=W[V];if(R.options.drop.enabled){var ne=R.options.drop.accept;if(!(b.element(ne)&&ne!==x||b.string(ne)&&!Z(x,ne)||b.func(ne)&&!ne({dropzone:R,draggableElement:x})))for(var De=0,Ue=R.getAllElements();De<Ue.length;De++){var $e=Ue[De];$e!==x&&E.push({dropzone:R,element:$e,rect:R.getRect($e)})}}}return E}(n,t),u=0;u<o.length;u++){var d=o[u];d.rect=d.dropzone.getRect(d.element)}return o}function Ge(n,t,o){for(var u=n.dropState,d=n.interactable,f=n.element,x=[],E=0,V=u.activeDrops;E<V.length;E++){var W=V[E],R=W.dropzone,ne=W.element,De=W.rect,Ue=R.dropCheck(t,o,d,f,ne,De);x.push(Ue?ne:null)}var $e=function(Xe){for(var it,lt,ht,Tt=[],Vt=0;Vt<Xe.length;Vt++){var kt=Xe[Vt],Bt=Xe[it];if(kt&&Vt!==it)if(Bt){var ra=z(kt),Wt=z(Bt);if(ra!==kt.ownerDocument)if(Wt!==kt.ownerDocument)if(ra!==Wt){Tt=Tt.length?Tt:ue(Bt);var da=void 0;if(Bt instanceof P.HTMLElement&&kt instanceof P.SVGElement&&!(kt instanceof P.SVGSVGElement)){if(kt===Wt)continue;da=kt.ownerSVGElement}else da=kt;for(var ga=ue(da,Bt.ownerDocument),Ca=0;ga[Ca]&&ga[Ca]===Tt[Ca];)Ca++;var Vn=[ga[Ca-1],ga[Ca],Tt[Ca]];if(Vn[0])for(var xn=Vn[0].lastChild;xn;){if(xn===Vn[1]){it=Vt,Tt=ga;break}if(xn===Vn[2])break;xn=xn.previousSibling}}else ht=Bt,(parseInt(T(lt=kt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(T(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=Vt);else it=Vt}else it=Vt}return it}(x);return u.activeDrops[$e]||null}function tt(n,t,o){var u=n.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(d.activate=new ge(u,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new ge(u,o,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),u.rejected||(u.cur.element!==u.prev.element&&(u.prev.dropzone&&(d.leave=new ge(u,o,"dragleave"),o.dragLeave=d.leave.target=u.prev.element,o.prevDropzone=d.leave.dropzone=u.prev.dropzone),u.cur.dropzone&&(d.enter=new ge(u,o,"dragenter"),o.dragEnter=u.cur.element,o.dropzone=u.cur.dropzone)),o.type==="dragend"&&u.cur.dropzone&&(d.drop=new ge(u,o,"drop"),o.dropzone=u.cur.dropzone,o.relatedTarget=u.cur.element),o.type==="dragmove"&&u.cur.dropzone&&(d.move=new ge(u,o,"dropmove"),o.dropzone=u.cur.dropzone)),d}function Ae(n,t){var o=n.dropState,u=o.activeDrops,d=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&d.dropzone.fire(t.enter),t.move&&d.dropzone.fire(t.move),t.drop&&d.dropzone.fire(t.drop),t.deactivate&&We(u,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function pt(n,t){var o=n.interaction,u=n.iEvent,d=n.event;if(u.type==="dragmove"||u.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=st(t,o.element));var x=u,E=Ge(o,x,d);f.rejected=f.rejected&&!!E&&E.dropzone===f.cur.dropzone&&E.element===f.cur.element,f.cur.dropzone=E&&E.dropzone,f.cur.element=E&&E.element,f.events=tt(o,0,x)}}var Je={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,u=n.Interactable,d=n.defaults;n.usePlugin(ke),u.prototype.dropzone=function(f){return function(x,E){if(b.object(E)){if(x.options.drop.enabled=E.enabled!==!1,E.listeners){var V=fe(E.listeners),W=Object.keys(V).reduce(function(ne,De){return ne[/^(enter|leave)/.test(De)?"drag".concat(De):/^(activate|deactivate|move)/.test(De)?"drop".concat(De):De]=V[De],ne},{}),R=x.options.drop.listeners;R&&x.off(R),x.on(W),x.options.drop.listeners=W}return b.func(E.ondrop)&&x.on("drop",E.ondrop),b.func(E.ondropactivate)&&x.on("dropactivate",E.ondropactivate),b.func(E.ondropdeactivate)&&x.on("dropdeactivate",E.ondropdeactivate),b.func(E.ondragenter)&&x.on("dragenter",E.ondragenter),b.func(E.ondragleave)&&x.on("dragleave",E.ondragleave),b.func(E.ondropmove)&&x.on("dropmove",E.ondropmove),/^(pointer|center)$/.test(E.overlap)?x.options.drop.overlap=E.overlap:b.number(E.overlap)&&(x.options.drop.overlap=Math.max(Math.min(1,E.overlap),0)),"accept"in E&&(x.options.drop.accept=E.accept),"checker"in E&&(x.options.drop.checker=E.checker),x}return b.bool(E)?(x.options.drop.enabled=E,x):x.options.drop}(this,f)},u.prototype.dropCheck=function(f,x,E,V,W,R){return function(ne,De,Ue,$e,Xe,it,lt){var ht=!1;if(!(lt=lt||ne.getRect(it)))return!!ne.options.drop.checker&&ne.options.drop.checker(De,Ue,ht,ne,it,$e,Xe);var Tt=ne.options.drop.overlap;if(Tt==="pointer"){var Vt=se($e,Xe,"drag"),kt=ze(De);kt.x+=Vt.x,kt.y+=Vt.y;var Bt=kt.x>lt.left&&kt.x<lt.right,ra=kt.y>lt.top&&kt.y<lt.bottom;ht=Bt&&ra}var Wt=$e.getRect(Xe);if(Wt&&Tt==="center"){var da=Wt.left+Wt.width/2,ga=Wt.top+Wt.height/2;ht=da>=lt.left&&da<=lt.right&&ga>=lt.top&&ga<=lt.bottom}return Wt&&b.number(Tt)&&(ht=Math.max(0,Math.min(lt.right,Wt.right)-Math.max(lt.left,Wt.left))*Math.max(0,Math.min(lt.bottom,Wt.bottom)-Math.max(lt.top,Wt.top))/(Wt.width*Wt.height)>=Tt),ne.options.drop.checker&&(ht=ne.options.drop.checker(De,Ue,ht,ne,it,$e,Xe)),ht}(this,f,x,E,V,W,R)},o.dynamicDrop=function(f){return b.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},w(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,d.actions.drop=Je.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,u=(n.event,n.iEvent);if(o.prepared.name==="drag"){var d=o.dropState;d.activeDrops=[],d.events={},d.activeDrops=st(t,o.element),d.events=tt(o,0,u),d.events.activate&&(We(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:u}))}},"interactions:action-move":pt,"interactions:after-action-move":function(n,t){var o=n.interaction,u=n.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ae(o,d.events),t.fire("actions/drop:move",{interaction:o,dragEvent:u}),d.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,u=n.iEvent;pt(n,t),Ae(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:u})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:st,getDrop:Ge,getDropEvents:tt,fireDropEvents:Ae,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Le=Je;function rt(n){var t=n.interaction,o=n.iEvent,u=n.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(W){return W.pointer}),f=u==="start",x=u==="end",E=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],f)o.distance=me(d,E),o.box=we(d),o.scale=1,o.ds=0,o.angle=q(d,E),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(x||t.pointers.length<2){var V=t.prevEvent;o.distance=V.distance,o.box=V.box,o.scale=V.scale,o.ds=0,o.angle=V.angle,o.da=0}else o.distance=me(d,E),o.box=we(d),o.scale=o.distance/t.gesture.startDistance,o.angle=q(d,E),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,b.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var mt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,u=n.defaults;o.prototype.gesturable=function(d){return b.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):b.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},t.map.gesture=mt,t.methodDict.gesture="gesturable",u.actions.gesture=mt.defaults},listeners:{"interactions:action-start":rt,"interactions:action-move":rt,"interactions:action-end":rt,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},wt=mt;function He(n,t,o,u,d,f,x){if(!t)return!1;if(t===!0){var E=b.number(f.width)?f.width:f.right-f.left,V=b.number(f.height)?f.height:f.bottom-f.top;if(x=Math.min(x,Math.abs((n==="left"||n==="right"?E:V)/2)),E<0&&(n==="left"?n="right":n==="right"&&(n="left")),V<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var W=E>=0?f.left:f.right;return o.x<W+x}if(n==="top"){var R=V>=0?f.top:f.bottom;return o.y<R+x}if(n==="right")return o.x>(E>=0?f.right:f.left)-x;if(n==="bottom")return o.y>(V>=0?f.bottom:f.top)-x}return!!b.element(u)&&(b.element(t)?t===u:be(u,t,d))}function ot(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var u=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?u.delta.x=u.delta.y:u.delta.y=u.delta.x,u.axes="xy"):(u.axes=o.resizeAxes,o.resizeAxes==="x"?u.delta.y=0:o.resizeAxes==="y"&&(u.delta.x=0))}}var yt,je,Ke={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,u=n.Interactable,d=n.defaults;Ke.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ke.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,u.prototype.resizable=function(f){return function(x,E,V){return b.object(E)?(x.options.resize.enabled=E.enabled!==!1,x.setPerAction("resize",E),x.setOnEvents("resize",E),b.string(E.axis)&&/^x$|^y$|^xy$/.test(E.axis)?x.options.resize.axis=E.axis:E.axis===null&&(x.options.resize.axis=V.defaults.actions.resize.axis),b.bool(E.preserveAspectRatio)?x.options.resize.preserveAspectRatio=E.preserveAspectRatio:b.bool(E.square)&&(x.options.resize.square=E.square),x):b.bool(E)?(x.options.resize.enabled=E,x):x.options.resize}(this,f,n)},t.map.resize=Ke,t.methodDict.resize="resizable",d.actions.resize=Ke.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,u=t.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=o,f=u.rect;u._rects={start:w({},f),corrected:w({},f),previous:w({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=u.prepared.edges,d.rect=u._rects.corrected,d.deltaRect=u._rects.delta}})(n),ot(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,u=t.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=o,f=u.interactable.options.resize.invert,x=f==="reposition"||f==="negate",E=u.rect,V=u._rects,W=V.start,R=V.corrected,ne=V.delta,De=V.previous;if(w(De,R),x){if(w(R,E),f==="reposition"){if(R.top>R.bottom){var Ue=R.top;R.top=R.bottom,R.bottom=Ue}if(R.left>R.right){var $e=R.left;R.left=R.right,R.right=$e}}}else R.top=Math.min(E.top,W.bottom),R.bottom=Math.max(E.bottom,W.top),R.left=Math.min(E.left,W.right),R.right=Math.max(E.right,W.left);for(var Xe in R.width=R.right-R.left,R.height=R.bottom-R.top,R)ne[Xe]=R[Xe]-De[Xe];d.edges=u.prepared.edges,d.rect=R,d.deltaRect=ne}})(n),ot(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var u=t;u.edges=o.prepared.edges,u.rect=o._rects.corrected,u.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,u=n.element,d=n.rect,f=n.buttons;if(d){var x=w({},t.coords.cur.page),E=o.options.resize;if(E&&E.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&E.mouseButtons)!=0)){if(b.object(E.edges)){var V={left:!1,right:!1,top:!1,bottom:!1};for(var W in V)V[W]=He(W,E.edges[W],x,t._latestPointer.eventTarget,u,d,E.margin||Ke.defaultMargin);V.left=V.left&&!V.right,V.top=V.top&&!V.bottom,(V.left||V.right||V.top||V.bottom)&&(n.action={name:"resize",edges:V})}else{var R=E.axis!=="y"&&x.x>d.right-Ke.defaultMargin,ne=E.axis!=="x"&&x.y>d.bottom-Ke.defaultMargin;(R||ne)&&(n.action={name:"resize",axes:(R?"x":"")+(ne?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,u=n.name,d=Ke.cursors,f=null;if(o)f=d[u+o];else if(t){for(var x="",E=0,V=["top","bottom","left","right"];E<V.length;E++){var W=V[E];t[W]&&(x+=W)}f=d[x]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Ye=Ke,Te={id:"actions",install:function(n){n.usePlugin(wt),n.usePlugin(Ye),n.usePlugin(ke),n.usePlugin(Le)}},O=0,ye={request:function(n){return yt(n)},cancel:function(n){return je(n)},init:function(n){if(yt=n.requestAnimationFrame,je=n.cancelAnimationFrame,!yt)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var u=t[o];yt=n["".concat(u,"RequestAnimationFrame")],je=n["".concat(u,"CancelAnimationFrame")]||n["".concat(u,"CancelRequestAnimationFrame")]}yt=yt&&yt.bind(n),je=je&&je.bind(n),yt||(yt=function(d){var f=Date.now(),x=Math.max(0,16-(f-O)),E=n.setTimeout(function(){d(f+x)},x);return O=f+x,E},je=function(d){return clearTimeout(d)})}},xe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(n){xe.isScrolling=!0,ye.cancel(xe.i),n.autoScroll=xe,xe.interaction=n,xe.prevTime=xe.now(),xe.i=ye.request(xe.scroll)},stop:function(){xe.isScrolling=!1,xe.interaction&&(xe.interaction.autoScroll=null),ye.cancel(xe.i)},scroll:function(){var n=xe.interaction,t=n.interactable,o=n.element,u=n.prepared.name,d=t.options[u].autoScroll,f=at(d.container,t,o),x=xe.now(),E=(x-xe.prevTime)/1e3,V=d.speed*E;if(V>=1){var W={x:xe.x*V,y:xe.y*V};if(W.x||W.y){var R=et(f);b.window(f)?f.scrollBy(W.x,W.y):f&&(f.scrollLeft+=W.x,f.scrollTop+=W.y);var ne=et(f),De={x:ne.x-R.x,y:ne.y-R.y};(De.x||De.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:De,interaction:n,container:f})}xe.prevTime=x}xe.isScrolling&&(ye.cancel(xe.i),xe.i=ye.request(xe.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&xe.check(t.interactable,t.prepared.name))if(t.simulation)xe.x=xe.y=0;else{var u,d,f,x,E=t.interactable,V=t.element,W=t.prepared.name,R=E.options[W].autoScroll,ne=at(R.container,E,V);if(b.window(ne))x=o.clientX<xe.margin,u=o.clientY<xe.margin,d=o.clientX>ne.innerWidth-xe.margin,f=o.clientY>ne.innerHeight-xe.margin;else{var De=Se(ne);x=o.clientX<De.left+xe.margin,u=o.clientY<De.top+xe.margin,d=o.clientX>De.right-xe.margin,f=o.clientY>De.bottom-xe.margin}xe.x=d?1:x?-1:0,xe.y=f?1:u?-1:0,xe.isScrolling||(xe.margin=R.margin,xe.speed=R.speed,xe.start(t))}}};function at(n,t,o){return(b.string(n)?Ne(n,t,o):n)||T(o)}function et(n){return b.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var Et={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=xe,xe.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=xe.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,xe.stop(),xe.interaction&&(xe.interaction=null)},"interactions:stop":xe.stop,"interactions:action-move":function(n){return xe.onInteractionMove(n)}}},_t=Et;function ut(n,t){var o=!1;return function(){return o||(F.console.warn(t),o=!0),n.apply(this,arguments)}}function ft(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function vt(n){return b.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function gt(n){return b.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Lt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,u,d,f){var x=function(E,V,W,R,ne){var De=E.getRect(R),Ue=V.buttons||{0:1,1:4,3:8,4:16}[V.button],$e={action:null,interactable:E,interaction:W,element:R,rect:De,buttons:Ue};return ne.fire("auto-start:check",$e),$e.action}(this,u,d,f,n);return this.options.actionChecker?this.options.actionChecker(o,u,x,this,f,d):x},t.prototype.ignoreFrom=ut(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ut(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=gt,t.prototype.styleCursor=vt}};function bt(n,t,o,u,d){return t.testIgnoreAllow(t.options[n.name],o,u)&&t.options[n.name].enabled&&Ht(t,o,n,d)?n:null}function zt(n,t,o,u,d,f,x){for(var E=0,V=u.length;E<V;E++){var W=u[E],R=d[E],ne=W.getAction(t,o,n,R);if(ne){var De=bt(ne,W,R,f,x);if(De)return{action:De,interactable:W,element:R}}}return{action:null,interactable:null,element:null}}function Rt(n,t,o,u,d){var f=[],x=[],E=u;function V(R){f.push(R),x.push(E)}for(;b.element(E);){f=[],x=[],d.interactables.forEachMatch(E,V);var W=zt(n,t,o,f,x,u,d);if(W.action&&!W.interactable.options[W.action.name].manualStart)return W;E=Ze(E)}return{action:null,interactable:null,element:null}}function Kt(n,t,o){var u=t.action,d=t.interactable,f=t.element;u=u||{name:null},n.interactable=d,n.element=f,ft(n.prepared,u),n.rect=d&&u.name?d.getRect(f):null,Ft(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ht(n,t,o,u){var d=n.options,f=d[o.name].max,x=d[o.name].maxPerElement,E=u.autoStart.maxInteractions,V=0,W=0,R=0;if(!(f&&x&&E))return!1;for(var ne=0,De=u.interactions.list;ne<De.length;ne++){var Ue=De[ne],$e=Ue.prepared.name;if(Ue.interacting()&&(++V>=E||Ue.interactable===n&&((W+=$e===o.name?1:0)>=f||Ue.element===t&&(R++,$e===o.name&&R>=x))))return!1}return E>0}function Jt(n,t){return b.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function ta(n,t,o){var u=o.autoStart.cursorElement;u&&u!==n&&(u.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Ft(n,t){var o=n.interactable,u=n.element,d=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(d.name){var x=o.options[d.name].cursorChecker;f=b.func(x)?x(d,o,u,n._interacting):t.actions.map[d.name].getCursor(d)}ta(n.element,f||"",t)}else t.autoStart.cursorElement&&ta(t.autoStart.cursorElement,"",t)}var Fa={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Lt),o.base.actionChecker=null,o.base.styleCursor=!0,w(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(u){return Jt(u,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Ht,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,u=n.pointer,d=n.event,f=n.eventTarget;o.interacting()||Kt(o,Rt(o,u,d,f,t),t)},"interactions:move":function(n,t){(function(o,u){var d=o.interaction,f=o.pointer,x=o.event,E=o.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Kt(d,Rt(d,f,x,E,u),u)})(n,t),function(o,u){var d=o.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){u.fire("autoStart:before-start",o);var f=d.interactable,x=d.prepared.name;x&&f&&(f.options[x].manualStart||!Ht(f,d.element,d.prepared,u)?d.stop():(d.start(d.prepared,f,d.element),Ft(d,u)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,u=o.interactable;u&&u.options.styleCursor&&ta(o.element,"",t)}},maxInteractions:Jt,withinInteractionLimit:Ht,validateAction:bt},wa=Fa,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,u=n.eventTarget,d=n.dx,f=n.dy;if(o.prepared.name==="drag"){var x=Math.abs(d),E=Math.abs(f),V=o.interactable.options.drag,W=V.startAxis,R=x>E?"x":x<E?"y":"xy";if(o.prepared.axis=V.lockAxis==="start"?R[0]:V.lockAxis,R!=="xy"&&W!=="xy"&&W!==R){o.prepared.name=null;for(var ne=u,De=function($e){if($e!==o.interactable){var Xe=o.interactable.options.drag;if(!Xe.manualStart&&$e.testIgnoreAllow(Xe,ne,u)){var it=$e.getAction(o.downPointer,o.downEvent,o,ne);if(it&&it.name==="drag"&&function(lt,ht){if(!ht)return!1;var Tt=ht.options.drag.startAxis;return lt==="xy"||Tt==="xy"||Tt===lt}(R,$e)&&wa.validateAction(it,$e,ne,u,t))return $e}}};b.element(ne);){var Ue=t.interactables.forEachMatch(ne,De);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=ne;break}ne=Ze(ne)}}}}}};function Da(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(wa),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=Da(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;Da(t)>0&&(t.prepared.name=null)}},getHoldDuration:Da},Ka=Ua,Wa={id:"auto-start",install:function(n){n.usePlugin(wa),n.usePlugin(Ka),n.usePlugin(ja)}},Ha=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):b.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function qa(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Na={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Ha,t.prototype.checkAndPreventDefault=function(o){return function(u,d,f){var x=u.options.preventDefault;if(x!=="never")if(x!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var E=T(f.target).document,V=d.getDocOptions(E);if(!V||!V.events||V.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||b.element(f.target)&&Z(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var u=0,d=n.interactions.list;u<d.length;u++){var f=d[u];if(f.element&&(f.element===o.target||ie(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=qa,n},{})};function ya(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function fa(n){var t={};for(var o in n){var u=n[o];b.plainObject(u)?t[o]=fa(u):b.array(u)?t[o]=Be(u):t[o]=u}return t}var _a=function(){function n(t){s(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(n,[{key:"start",value:function(t,o){var u,d,f=t.phase,x=this.interaction,E=function(W){var R=W.interactable.options[W.prepared.name],ne=R.modifiers;return ne&&ne.length?ne:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(De){var Ue=R[De];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(De){return!!De})}(x);this.prepareStates(E),this.startEdges=w({},x.edges),this.edges=w({},this.startEdges),this.startOffset=(u=x.rect,d=o,u?{left:d.x-u.left,top:d.y-u.top,right:u.right-d.x,bottom:u.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var V=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=ba(),this.startAll(V),this.result=this.setAll(V)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,u=this.states;o<u.length;o++){var d=u[o];d.methods.start&&(t.state=d,d.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,u=t.preEnd,d=t.skipModifiers,f=t.rect,x=t.edges;t.coords=w({},t.pageCoords),t.rect=w({},f),t.edges=w({},x);for(var E=d?this.states.slice(d):this.states,V=ba(t.coords,t.rect),W=0;W<E.length;W++){var R,ne=E[W],De=ne.options,Ue=w({},t.coords),$e=null;(R=ne.methods)!=null&&R.set&&this.shouldDo(De,u,o)&&(t.state=ne,$e=ne.methods.set(t),J(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),V.eventProps.push($e)}w(this.edges,t.edges),V.delta.x=t.coords.x-t.pageCoords.x,V.delta.y=t.coords.y-t.pageCoords.y,V.rectDelta.left=t.rect.left-f.left,V.rectDelta.right=t.rect.right-f.right,V.rectDelta.top=t.rect.top-f.top,V.rectDelta.bottom=t.rect.bottom-f.bottom;var Xe=this.result.coords,it=this.result.rect;if(Xe&&it){var lt=V.rect.left!==it.left||V.rect.right!==it.right||V.rect.top!==it.top||V.rect.bottom!==it.bottom;V.changed=lt||Xe.x!==V.coords.x||Xe.y!==V.coords.y}return V}},{key:"applyToInteraction",value:function(t){var o=this.interaction,u=t.phase,d=o.coords.cur,f=o.coords.start,x=this.result,E=this.startDelta,V=x.delta;u==="start"&&w(this.startDelta,x.delta);for(var W=0,R=[[f,E],[d,V]];W<R.length;W++){var ne=R[W],De=ne[0],Ue=ne[1];De.page.x+=Ue.x,De.page.y+=Ue.y,De.client.x+=Ue.x,De.client.y+=Ue.y}var $e=this.result.rectDelta,Xe=t.rect||o.rect;Xe.left+=$e.left,Xe.right+=$e.right,Xe.top+=$e.top,Xe.bottom+=$e.bottom,Xe.width=Xe.right-Xe.left,Xe.height=Xe.bottom-Xe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,u=t.phase,d=t.preEnd,f=t.skipModifiers,x=this.setAll(this.fillArg({preEnd:d,phase:u,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=x,!x.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var E=o.coords.cur.page,V={x:t.modifiedCoords.x-E.x,y:t.modifiedCoords.y-E.y};x.coords.x+=V.x,x.coords.y+=V.y,x.delta.x+=V.x,x.delta.y+=V.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,u=t.event,d=this.states;if(d&&d.length){for(var f=!1,x=0;x<d.length;x++){var E=d[x];t.state=E;var V=E.options,W=E.methods,R=W.beforeEnd&&W.beforeEnd(t);if(R)return this.endResult=R,!1;f=f||!f&&this.shouldDo(V,!0,t.phase,!0)}f&&o.move({event:u,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var u=w({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(u);for(var d=0,f=this.states;d<f.length;d++){var x=f[d];u.state=x,x.methods.stop&&x.methods.stop(u)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var u=t[o],d=u.options,f=u.methods,x=u.name;this.states.push({options:d,methods:f,index:o,name:x})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,u=o.coords,d=o.rect,f=o.modification;if(f.result){for(var x=f.startDelta,E=f.result,V=E.delta,W=E.rectDelta,R=0,ne=[[u.start,x],[u.cur,V]];R<ne.length;R++){var De=ne[R],Ue=De[0],$e=De[1];Ue.page.x-=$e.x,Ue.page.y-=$e.y,Ue.client.x-=$e.x,Ue.client.y-=$e.y}d.left-=W.left,d.right-=W.right,d.top-=W.top,d.bottom-=W.bottom}}},{key:"shouldDo",value:function(t,o,u,d){return!(!t||t.enabled===!1||d&&!t.endOnly||t.endOnly&&!o||u==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return fa(o)}),this.result=ba(w({},t.result.coords),w({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function ba(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ca(n,t){var o=n.defaults,u={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},d=function(f){var x=f||{};for(var E in x.enabled=x.enabled!==!1,o)E in x||(x[E]=o[E]);var V={options:x,methods:u,name:t,enable:function(){return x.enabled=!0,V},disable:function(){return x.enabled=!1,V}};return V};return t&&typeof t=="string"&&(d._defaults=o,d._methods=u),d}function ma(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,u=o.setAndApply(n);return t.edges=o.edges,u},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,u=o.beforeEnd(n);return t.edges=o.startEdges,u},"interactions:action-start":ma,"interactions:action-move":ma,"interactions:action-end":ma,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},Aa=Xa,Va={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ea=function(n){m(o,n);var t=j(o);function o(u,d,f,x,E,V,W){var R;s(this,o),(R=t.call(this,u)).relatedTarget=null,R.screenX=void 0,R.screenY=void 0,R.button=void 0,R.buttons=void 0,R.ctrlKey=void 0,R.shiftKey=void 0,R.altKey=void 0,R.metaKey=void 0,R.page=void 0,R.client=void 0,R.delta=void 0,R.rect=void 0,R.x0=void 0,R.y0=void 0,R.t0=void 0,R.dt=void 0,R.duration=void 0,R.clientX0=void 0,R.clientY0=void 0,R.velocity=void 0,R.speed=void 0,R.swipe=void 0,R.axes=void 0,R.preEnd=void 0,E=E||u.element;var ne=u.interactable,De=(ne&&ne.options||Va).deltaSource,Ue=se(ne,E,f),$e=x==="start",Xe=x==="end",it=$e?N(R):u.prevEvent,lt=$e?u.coords.start:Xe?{page:it.page,client:it.client,timeStamp:u.coords.cur.timeStamp}:u.coords.cur;return R.page=w({},lt.page),R.client=w({},lt.client),R.rect=w({},u.rect),R.timeStamp=lt.timeStamp,Xe||(R.page.x-=Ue.x,R.page.y-=Ue.y,R.client.x-=Ue.x,R.client.y-=Ue.y),R.ctrlKey=d.ctrlKey,R.altKey=d.altKey,R.shiftKey=d.shiftKey,R.metaKey=d.metaKey,R.button=d.button,R.buttons=d.buttons,R.target=E,R.currentTarget=E,R.preEnd=V,R.type=W||f+(x||""),R.interactable=ne,R.t0=$e?u.pointers[u.pointers.length-1].downTime:it.t0,R.x0=u.coords.start.page.x-Ue.x,R.y0=u.coords.start.page.y-Ue.y,R.clientX0=u.coords.start.client.x-Ue.x,R.clientY0=u.coords.start.client.y-Ue.y,R.delta=$e||Xe?{x:0,y:0}:{x:R[De].x-it[De].x,y:R[De].y-it[De].y},R.dt=u.coords.delta.timeStamp,R.duration=R.timeStamp-R.t0,R.velocity=w({},u.coords.velocity[De]),R.speed=dt(R.velocity.x,R.velocity.y),R.swipe=Xe||x==="inertiastart"?R.getSwipe():null,R}return h(o,[{key:"getSwipe",value:function(){var u=this._interaction;if(u.prevEvent.speed<600||this.timeStamp-u.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(u.prevEvent.velocityY,u.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var f=112.5<=d&&d<247.5,x=202.5<=d&&d<337.5;return{up:x,down:!x&&22.5<=d&&d<157.5,left:f,right:!f&&(292.5<=d||d<67.5),angle:d,speed:u.prevEvent.speed,velocity:{x:u.prevEvent.velocityX,y:u.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Ve);Object.defineProperties(Ea.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var Ya=h(function n(t,o,u,d,f){s(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=u,this.downTime=d,this.downTarget=f}),Ga=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Oa=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ja=0,Za=function(){function n(t){var o=this,u=t.pointerType,d=t.scopeFire;s(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ut(function(R){this.move(R)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ja++,this._scopeFire=d,this.pointerType=u;var f=this;this._proxy={};var x=function(R){Object.defineProperty(o._proxy,R,{get:function(){return f[R]}})};for(var E in Ga)x(E);var V=function(R){Object.defineProperty(o._proxy,R,{value:function(){return f[R].apply(f,arguments)}})};for(var W in Oa)V(W);this._scopeFire("interactions:new",{interaction:this})}return h(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,u){var d=this.updatePointer(t,o,u,!0),f=this.pointers[d];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:u,pointerIndex:d,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,u){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=u,this.rect=o.getRect(u),this.edges=this.prepared.edges?w({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,u){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,u,!1);var d,f,x=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(d=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,f)>this.pointerMoveTolerance);var E,V,W,R=this.getPointerIndex(t),ne={pointer:t,pointerIndex:R,pointerInfo:this.pointers[R],event:o,type:"move",eventTarget:u,dx:d,dy:f,duplicate:x,interaction:this};x||(E=this.coords.velocity,V=this.coords.delta,W=Math.max(V.timeStamp/1e3,.001),E.page.x=V.page.x/W,E.page.y=V.page.y/W,E.client.x=V.client.x/W,E.client.y=V.client.y/W,E.timeStamp=W),this._scopeFire("interactions:move",ne),x||this.simulation||(this.interacting()&&(ne.type=null,this.move(ne)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||oe(this.coords.delta),(t=w({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,u,d){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,u,!1));var x=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(x),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:u,type:x,curEventTarget:d,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=le(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(this.pointers,function(u){return u.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,u,d){var f,x,E,V=le(t),W=this.getPointerIndex(t),R=this.pointers[W];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),R?R.pointer=t:(R=new Ya(V,t,o,null,null),W=this.pointers.length,this.pointers.push(R)),K(this.coords.cur,this.pointers.map(function(ne){return ne.pointer}),this._now()),f=this.coords.delta,x=this.coords.prev,E=this.coords.cur,f.page.x=E.page.x-x.page.x,f.page.y=E.page.y-x.page.y,f.client.x=E.client.x-x.client.x,f.client.y=E.client.y-x.client.y,f.timeStamp=E.timeStamp-x.timeStamp,d&&(this.pointerIsDown=!0,R.downTime=this.coords.cur.timeStamp,R.downTarget=u,A(this.downPointer,t),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,u),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:u,down:d,pointerInfo:R,pointerIndex:W,interaction:this}),W}},{key:"removePointer",value:function(t,o){var u=this.getPointerIndex(t);if(u!==-1){var d=this.pointers[u];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:u,pointerInfo:d,interaction:this}),this.pointers.splice(u,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,u){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=u}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,u,d){return new Ea(this,t,this.prepared.name,o,this.element,u,d)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,u=t.phase,d=t.preEnd,f=t.type,x=this.rect;if(x&&u==="move"&&(J(this.edges,x,this.coords.delta[this.interactable.options.deltaSource]),x.width=x.right-x.left,x.height=x.bottom-x.top),this._scopeFire("interactions:before-action-".concat(u),t)===!1)return!1;var E=t.iEvent=this._createPreparedEvent(o,u,d,f);return this._scopeFire("interactions:action-".concat(u),t),u==="start"&&(this.prevEvent=E),this._fireEvent(E),this._scopeFire("interactions:after-action-".concat(u),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Ma(n){Ct(n.interaction)}function Ct(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return nt(n.coords.cur,t),nt(n.coords.delta,t),J(n.edges,n.rect,t),t.x=0,t.y=0,!0}function aa(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function nt(n,t){var o=n.page,u=n.client,d=t.x,f=t.y;o.x+=d,o.y+=f,u.x+=d,u.y+=f}Oa.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=aa},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(nt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Ma,"interactions:before-action-move":Ma,"interactions:before-action-end":function(n){var t=n.interaction;if(Ct(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},St=qt,Dt=function(){function n(t){s(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return h(n,[{key:"start",value:function(t){var o=this.interaction,u=It(o);if(!u||!u.enabled)return!1;var d=o.coords.velocity.client,f=dt(d.x,d.y),x=this.modification||(this.modification=new _a(o));if(x.copyFrom(o.modification),this.t0=o._now(),this.allowResume=u.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=x.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>u.minSpeed&&f>u.endSpeed)this.startInertia();else{if(x.result=x.setAll(this.modifierArg),!x.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,u=It(this.interaction),d=u.resistance,f=-Math.log(u.endSpeed/this.v0)/d;this.targetOffset={x:(o.x-f)/d,y:(o.y-f)/d},this.te=f,this.lambda_v0=d/this.v0,this.one_ve_v0=1-u.endSpeed/this.v0;var x=this.modification,E=this.modifierArg;E.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},x.result=x.setAll(E),x.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+x.result.delta.x,y:this.targetOffset.y+x.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=ye.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,u,d,f,x,E,V=this,W=this.interaction,R=It(W).resistance,ne=(W._now()-this.t0)/1e3;if(ne<this.te){var De,Ue=1-(Math.exp(-R*ne)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,u=this.targetOffset.x,d=this.targetOffset.y,f=this.modifiedOffset.x,x=this.modifiedOffset.y,De={x:$t(E=Ue,t,u,f),y:$t(E,o,d,x)}):De={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var $e={x:De.x-this.currentOffset.x,y:De.y-this.currentOffset.y};this.currentOffset.x+=$e.x,this.currentOffset.y+=$e.y,W.offsetBy($e),W.move(),this.onNextFrame(function(){return V.inertiaTick()})}else W.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,u=o._now()-this.t0,d=It(o).smoothEndDuration;if(u<d){var f={x:At(u,0,this.targetOffset.x,d),y:At(u,0,this.targetOffset.y,d)},x={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=x.x,this.currentOffset.y+=x.y,o.offsetBy(x),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,u=t.event,d=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,u,d,!0),f._doPhase({interaction:f,event:u,phase:"resume"}),X(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,ye.cancel(this.timeout)}}]),n}();function It(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Mt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(St),n.usePlugin(Aa),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,u=t.inertia;if(u.active)for(var d=o;b.element(d);){if(d===t.element){u.resume(n);break}d=Ze(d)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":ma,"interactions:action-inertiastart":ma,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function $t(n,t,o,u){var d=1-n;return d*d*t+2*d*n*o+n*n*u}function At(n,t,o,u){return-o*(n/=u)*(n-2)+t}var na=Mt;function Yt(n,t){for(var o=0;o<t.length;o++){var u=t[o];if(n.immediatePropagationStopped)break;u(n)}}var za=function(){function n(t){s(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=w({},t||{})}return h(n,[{key:"fire",value:function(t){var o,u=this.global;(o=this.types[t.type])&&Yt(t,o),!t.propagationStopped&&u&&(o=u[t.type])&&Yt(t,o)}},{key:"on",value:function(t,o){var u=fe(t,o);for(t in u)this.types[t]=pe(this.types[t]||[],u[t])}},{key:"off",value:function(t,o){var u=fe(t,o);for(t in u){var d=this.types[t];if(d&&d.length)for(var f=0,x=u[t];f<x.length;f++){var E=x[f],V=d.indexOf(E);V!==-1&&d.splice(V,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Qa=function(){function n(t){s(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,A(this,t)}return h(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Ra(n){return b.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function en(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Tn={id:"events",install:function(n){var t,o=[],u={},d=[],f={add:x,remove:E,addDelegate:function(R,ne,De,Ue,$e){var Xe=Ra($e);if(!u[De]){u[De]=[];for(var it=0;it<d.length;it++){var lt=d[it];x(lt,De,V),x(lt,De,W,!0)}}var ht=u[De],Tt=Oe(ht,function(Vt){return Vt.selector===R&&Vt.context===ne});Tt||(Tt={selector:R,context:ne,listeners:[]},ht.push(Tt)),Tt.listeners.push({func:Ue,options:Xe})},removeDelegate:function(R,ne,De,Ue,$e){var Xe,it=Ra($e),lt=u[De],ht=!1;if(lt)for(Xe=lt.length-1;Xe>=0;Xe--){var Tt=lt[Xe];if(Tt.selector===R&&Tt.context===ne){for(var Vt=Tt.listeners,kt=Vt.length-1;kt>=0;kt--){var Bt=Vt[kt];if(Bt.func===Ue&&en(Bt.options,it)){Vt.splice(kt,1),Vt.length||(lt.splice(Xe,1),E(ne,De,V),E(ne,De,W,!0)),ht=!0;break}}if(ht)break}}},delegateListener:V,delegateUseCapture:W,delegatedEvents:u,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function x(R,ne,De,Ue){if(R.addEventListener){var $e=Ra(Ue),Xe=Oe(o,function(it){return it.eventTarget===R});Xe||(Xe={eventTarget:R,events:{}},o.push(Xe)),Xe.events[ne]||(Xe.events[ne]=[]),Oe(Xe.events[ne],function(it){return it.func===De&&en(it.options,$e)})||(R.addEventListener(ne,De,f.supportsOptions?$e:$e.capture),Xe.events[ne].push({func:De,options:$e}))}}function E(R,ne,De,Ue){if(R.addEventListener&&R.removeEventListener){var $e=$(o,function(ra){return ra.eventTarget===R}),Xe=o[$e];if(Xe&&Xe.events)if(ne!=="all"){var it=!1,lt=Xe.events[ne];if(lt){if(De==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Tt=lt[ht];E(R,ne,Tt.func,Tt.options)}return}for(var Vt=Ra(Ue),kt=0;kt<lt.length;kt++){var Bt=lt[kt];if(Bt.func===De&&en(Bt.options,Vt)){R.removeEventListener(ne,De,f.supportsOptions?Vt:Vt.capture),lt.splice(kt,1),lt.length===0&&(delete Xe.events[ne],it=!0);break}}}it&&!Object.keys(Xe.events).length&&o.splice($e,1)}else for(ne in Xe.events)Xe.events.hasOwnProperty(ne)&&E(R,ne,"all")}}function V(R,ne){for(var De=Ra(ne),Ue=new Qa(R),$e=u[R.type],Xe=re(R)[0],it=Xe;b.element(it);){for(var lt=0;lt<$e.length;lt++){var ht=$e[lt],Tt=ht.selector,Vt=ht.context;if(Z(it,Tt)&&ie(Vt,Xe)&&ie(Vt,it)){var kt=ht.listeners;Ue.currentTarget=it;for(var Bt=0;Bt<kt.length;Bt++){var ra=kt[Bt];en(ra.options,De)&&ra.func(Ue)}}}it=Ze(it)}}function W(R){return V(R,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},cn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=cn.methodOrder;t<o.length;t++){var u=o[t],d=cn[u](n);if(d)return d}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,u=n.eventTarget,d=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,x=d.interactions.list;f<x.length;f++){var E=x[f],V=u;if(E.simulation&&E.simulation.allowResume&&E.pointerType===t)for(;V;){if(V===E.element)return E;V=Ze(V)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,u=n.pointerType,d=n.eventType,f=n.scope;if(u!=="mouse"&&u!=="pen")return null;for(var x=0,E=f.interactions.list;x<E.length;x++){var V=E[x];if(V.pointerType===u){if(V.simulation&&!yn(V,o))continue;if(V.interacting())return V;t||(t=V)}}if(t)return t;for(var W=0,R=f.interactions.list;W<R.length;W++){var ne=R[W];if(!(ne.pointerType!==u||/down/i.test(d)&&ne.simulation))return ne}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,u=n.scope.interactions.list;o<u.length;o++){var d=u[o];if(yn(d,t))return d}return null},idle:function(n){for(var t=n.pointerType,o=0,u=n.scope.interactions.list;o<u.length;o++){var d=u[o];if(d.pointers.length===1){var f=d.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&t===d.pointerType)return d}return null}};function yn(n,t){return n.pointers.some(function(o){return o.id===t})}var un=cn,ha=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function tn(n,t){return function(o){var u=t.interactions.list,d=he(o),f=re(o),x=f[0],E=f[1],V=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var W=0,R=o.changedTouches;W<R.length;W++){var ne=R[W],De={pointer:ne,pointerId:le(ne),pointerType:d,eventType:o.type,eventTarget:x,curEventTarget:E,scope:t},Ue=dn(De);V.push([De.pointer,De.eventTarget,De.curEventTarget,Ue])}}else{var $e=!1;if(!G.supportsPointerEvent&&/mouse/.test(o.type)){for(var Xe=0;Xe<u.length&&!$e;Xe++)$e=u[Xe].pointerType!=="mouse"&&u[Xe].pointerIsDown;$e=$e||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!$e){var it={pointer:o,pointerId:le(o),pointerType:d,eventType:o.type,curEventTarget:E,eventTarget:x,scope:t},lt=dn(it);V.push([it.pointer,it.eventTarget,it.curEventTarget,lt])}}for(var ht=0;ht<V.length;ht++){var Tt=V[ht],Vt=Tt[0],kt=Tt[1],Bt=Tt[2];Tt[3][n](Vt,o,kt,Bt)}}}function dn(n){var t=n.pointerType,o=n.scope,u={interaction:un.search(n),searchDetails:n};return o.fire("interactions:find",u),u.interaction||o.interactions.new({pointerType:t})}function ua(n,t){var o=n.doc,u=n.scope,d=n.options,f=u.interactions.docEvents,x=u.events,E=x[t];for(var V in u.browser.isIOS&&!d.events&&(d.events={passive:!1}),x.delegatedEvents)E(o,V,x.delegateListener),E(o,V,x.delegateUseCapture,!0);for(var W=d&&d.events,R=0;R<f.length;R++){var ne=f[R];E(o,ne.type,ne.listener,W)}}var Bn={id:"core/interactions",install:function(n){for(var t={},o=0;o<ha.length;o++){var u=ha[o];t[u]=tn(u,n)}var d,f=G.pEventTypes;function x(){for(var E=0,V=n.interactions.list;E<V.length;E++){var W=V[E];if(W.pointerIsDown&&W.pointerType==="touch"&&!W._interacting)for(var R=function(){var Ue=De[ne];n.documents.some(function($e){return ie($e.doc,Ue.downTarget)})||W.removePointer(Ue.pointer,Ue.event)},ne=0,De=W.pointers;ne<De.length;ne++)R()}}(d=P.PointerEvent?[{type:f.down,listener:x},{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:x},{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(E){for(var V=0,W=n.interactions.list;V<W.length;V++)W[V].documentBlur(E)}}),n.prevTouchTime=0,n.Interaction=function(E){m(W,E);var V=j(W);function W(){return s(this,W),V.apply(this,arguments)}return h(W,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(R){n.interactions.pointerMoveTolerance=R}},{key:"_now",value:function(){return n.now()}}]),W}(Za),n.interactions={list:[],new:function(E){E.scopeFire=function(W,R){return n.fire(W,R)};var V=new n.Interaction(E);return n.interactions.list.push(V),V},listeners:t,docEvents:d,pointerMoveTolerance:1},n.usePlugin(Na)},listeners:{"scope:add-document":function(n){return ua(n,"add")},"scope:remove-document":function(n){return ua(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,u=t.interactions.list.length-1;u>=0;u--){var d=t.interactions.list[u];d.interactable===o&&(d.stop(),t.fire("interactions:destroy",{interaction:d}),d.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(u,1))}}},onDocSignal:ua,doOnInteractions:tn,methodNames:ha},Pa=Bn,La=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(La||{}),hr=function(){function n(t,o,u,d){s(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||u,this._win=T(ae(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=d,this.set(o)}return h(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return b.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),b.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),b.func(o.onend)&&this.on("".concat(t,"end"),o.onend),b.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,u){var d,f=this,x=(d=this._actions.map[t])==null?void 0:d.filterEventType,E=function(V){return(x==null||x(V))&&ya(V,f._actions)};(b.array(o)||b.object(o))&&this._onOff(La.Off,t,o,void 0,E),(b.array(u)||b.object(u))&&this._onOff(La.On,t,u,void 0,E)}},{key:"setPerAction",value:function(t,o){var u=this._defaults;for(var d in o){var f=d,x=this.options[t],E=o[f];f==="listeners"&&this.updatePerActionListeners(t,x.listeners,E),b.array(E)?x[f]=Be(E):b.plainObject(E)?(x[f]=w(x[f]||{},fa(E)),b.object(u.perAction[f])&&"enabled"in u.perAction[f]&&(x[f].enabled=E.enabled!==!1)):b.bool(E)&&b.object(u.perAction[f])?x[f].enabled=E:x[f]=E}}},{key:"getRect",value:function(t){return t=t||(b.element(this.target)?this.target:null),b.string(this.target)&&(t=t||this._context.querySelector(this.target)),qe(t)}},{key:"rectChecker",value:function(t){var o=this;return b.func(t)?(this.getRect=function(u){var d=w({},t.apply(o,u));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ae(o)||b.object(o)){for(var u in this.options[t]=o,this._actions.map)this.options[u][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return b.string(t)?Array.from(this._context.querySelectorAll(t)):b.func(t)&&t.getAllElements?t.getAllElements():b.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ie(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,u){return!this.testIgnore(t.ignoreFrom,o,u)&&this.testAllow(t.allowFrom,o,u)}},{key:"testAllow",value:function(t,o,u){return!t||!!b.element(u)&&(b.string(t)?be(u,t,o):!!b.element(t)&&ie(t,u))}},{key:"testIgnore",value:function(t,o,u){return!(!t||!b.element(u))&&(b.string(t)?be(u,t,o):!!b.element(t)&&ie(t,u))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,u,d,f){b.object(o)&&!b.array(o)&&(d=u,u=null);var x=fe(o,u,f);for(var E in x){E==="wheel"&&(E=G.wheelEvent);for(var V=0,W=x[E];V<W.length;V++){var R=W[V];ya(E,this._actions)?this.events[t===La.On?"on":"off"](E,R):b.string(this.target)?this._scopeEvents[t===La.On?"addDelegate":"removeDelegate"](this.target,this._context,E,R,d):this._scopeEvents[t===La.On?"add":"remove"](this.target,E,R,d)}}return this}},{key:"on",value:function(t,o,u){return this._onOff(La.On,t,o,u)}},{key:"off",value:function(t,o,u){return this._onOff(La.Off,t,o,u)}},{key:"set",value:function(t){var o=this._defaults;for(var u in b.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var d=u,f=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,w(w({},o.perAction),o.actions[d])),this[f](t[d])}for(var x in t)x!=="getRect"?b.func(this[x])&&this[x](t[x]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(b.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],u=o.length-1;u>=0;u--){var d=o[u],f=d.selector,x=d.context,E=d.listeners;f===this.target&&x===this._context&&o.splice(u,1);for(var V=E.length-1;V>=0;V--)this._scopeEvents.removeDelegate(this.target,this._context,t,E[V][0],E[V][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),vr=function(){function n(t){var o=this;s(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(u){var d=u.interactable,f=d.target,x=b.string(f)?o.selectorMap[f]:f[o.scope.id],E=$(x,function(V){return V===d});x.splice(E,1)}})}return h(n,[{key:"new",value:function(t,o){o=w(o||{},{actions:this.scope.actions});var u=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(u._doc),this.list.push(u),b.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(u)):(u.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(u)),this.scope.fire("interactable:new",{target:t,options:o,interactable:u,win:this.scope._win}),u}},{key:"getExisting",value:function(t,o){var u=o&&o.context||this.scope.document,d=b.string(t),f=d?this.selectorMap[t]:t[this.scope.id];if(f)return Oe(f,function(x){return x._context===u&&(d||x.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var u=0,d=this.list;u<d.length;u++){var f=d[u],x=void 0;if((b.string(f.target)?b.element(t)&&Z(t,f.target):t===f.target)&&f.inContext(t)&&(x=o(f)),x!==void 0)return x}}}]),n}(),mr=function(){function n(){var t=this;s(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=G,this.defaults=fa(Va),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(u){var d=function f(x,E){var V=u.interactables.getExisting(x,E);return V||((V=u.interactables.new(x,E)).events.global=f.globalEvents),V};return d.getPointerAverage=Y,d.getTouchBBox=we,d.getTouchDistance=me,d.getTouchAngle=q,d.getElementRect=qe,d.getElementClientRect=Se,d.matchesSelector=Z,d.closest=Ee,d.globalEvents={},d.version="1.10.27",d.scope=u,d.use=function(f,x){return this.scope.usePlugin(f,x),this},d.isSet=function(f,x){return!!this.scope.interactables.get(f,x&&x.context)},d.on=ut(function(f,x,E){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var V=0,W=f;V<W.length;V++){var R=W[V];this.on(R,x,E)}return this}if(b.object(f)){for(var ne in f)this.on(ne,f[ne],x);return this}return ya(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(x):this.globalEvents[f]=[x]:this.scope.events.add(this.scope.document,f,x,{options:E}),this},"The interact.on() method is being deprecated"),d.off=ut(function(f,x,E){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var V=0,W=f;V<W.length;V++){var R=W[V];this.off(R,x,E)}return this}if(b.object(f)){for(var ne in f)this.off(ne,f[ne],x);return this}var De;return ya(f,this.scope.actions)?f in this.globalEvents&&(De=this.globalEvents[f].indexOf(x))!==-1&&this.globalEvents[f].splice(De,1):this.scope.events.remove(this.scope.document,f,x,E),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return G.supportsTouch},d.supportsPointerEvent=function(){return G.supportsPointerEvent},d.stop=function(){for(var f=0,x=this.scope.interactions.list;f<x.length;f++)x[f].stop();return this},d.pointerMoveTolerance=function(f){return b.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(f,x){this.scope.addDocument(f,x)},d.removeDocument=function(f){this.scope.removeDocument(f)},d}(this),this.InteractEvent=Ea,this.Interactable=void 0,this.interactables=new vr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(u){return t.removeDocument(u.target)};var o=this;this.Interactable=function(u){m(f,u);var d=j(f);function f(){return s(this,f),d.apply(this,arguments)}return h(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(x){return B(D(f.prototype),"set",this).call(this,x),o.fire("interactable:set",{options:x,interactable:this}),this}},{key:"unset",value:function(){B(D(f.prototype),"unset",this).call(this);var x=o.interactables.list.indexOf(this);x<0||(o.interactables.list.splice(x,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(hr)}return h(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var u=0,d=this.listenerMaps;u<d.length;u++){var f=d[u].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,u){return o.isInitialized=!0,b.window(u)&&g(u),P.init(u),G.init(u),ye.init(u),o.window=u,o.document=u.document,o.usePlugin(Pa),o.usePlugin(Tn),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var u=0,d=this.listenerMaps.length,f=t.before.reduce(function(E,V){return E[V]=!0,E[Do(V)]=!0,E},{});u<d;u++){var x=this.listenerMaps[u].id;if(x&&(f[x]||f[Do(x)]))break}this.listenerMaps.splice(u,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var u=T(t);o=o?w({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(u,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:u,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),u=T(t),d=this.documents[o].options;this.events.remove(u,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:u,scope:this,options:d})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Do(n){return n&&n.replace(/\/.*$/,"")}var _o=new mr,la=_o.interactStatic,gr=typeof globalThis<"u"?globalThis:window;_o.init(gr);var yr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(u){var d=u[0],f=u[1];return d in n||f in n}),o=function(u,d){for(var f=n.range,x=n.limits,E=x===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:x,V=n.offset,W=V===void 0?{x:0,y:0}:V,R={range:f,grid:n,x:null,y:null},ne=0;ne<t.length;ne++){var De=t[ne],Ue=De[0],$e=De[1],Xe=Math.round((u-W.x)/n[Ue]),it=Math.round((d-W.y)/n[$e]);R[Ue]=Math.max(E.left,Math.min(E.right,Xe*n[Ue]+W.x)),R[$e]=Math.max(E.top,Math.min(E.bottom,it*n[$e]+W.y))}return R};return o.grid=n,o.coordFields=t,o}}),br={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=w(t.snappers||{},yr),t.createSnapGrid=t.snappers.grid}},kr=br,xr={start:function(n){var t=n.state,o=n.rect,u=n.edges,d=n.pageCoords,f=t.options,x=f.ratio,E=f.enabled,V=t.options,W=V.equalDelta,R=V.modifiers;x==="preserve"&&(x=o.width/o.height),t.startCoords=w({},d),t.startRect=w({},o),t.ratio=x,t.equalDelta=W;var ne=t.linkedEdges={top:u.top||u.left&&!u.bottom,left:u.left||u.top&&!u.right,bottom:u.bottom||u.right&&!u.top,right:u.right||u.bottom&&!u.left};if(t.xIsPrimaryAxis=!(!u.left&&!u.right),t.equalDelta){var De=(ne.left?1:-1)*(ne.top?1:-1);t.edgeSign={x:De,y:De}}else t.edgeSign={x:ne.left?-1:1,y:ne.top?-1:1};if(E!==!1&&w(u,ne),R!=null&&R.length){var Ue=new _a(n.interaction);Ue.copyFrom(n.interaction.modification),Ue.prepareStates(R),t.subModification=Ue,Ue.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,u=n.coords,d=t.linkedEdges,f=w({},u),x=t.equalDelta?wr:Dr;if(w(n.edges,d),x(t,t.xIsPrimaryAxis,u,o),!t.subModification)return null;var E=w({},o);J(d,E,{x:u.x-f.x,y:u.y-f.y});var V=t.subModification.setAll(l(l({},n),{},{rect:E,edges:d,pageCoords:u,prevCoords:u,prevRect:E})),W=V.delta;return V.changed&&(x(t,Math.abs(W.x)>Math.abs(W.y),V.coords,V.rect),w(u,V.coords)),V.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function wr(n,t,o){var u=n.startCoords,d=n.edgeSign;t?o.y=u.y+(o.x-u.x)*d.y:o.x=u.x+(o.y-u.y)*d.x}function Dr(n,t,o,u){var d=n.startRect,f=n.startCoords,x=n.ratio,E=n.edgeSign;if(t){var V=u.width/x;o.y=f.y+(V-d.height)*E.y}else{var W=u.height*x;o.x=f.x+(W-d.width)*E.x}}var _r=ca(xr,"aspectRatio"),Eo=function(){};Eo._defaults={};var In=Eo;function an(n,t,o){return b.func(n)?_e(n,t.interactable,t.element,[o.x,o.y,t]):_e(n,t.interactable,t.element)}var Nn={start:function(n){var t=n.rect,o=n.startOffset,u=n.state,d=n.interaction,f=n.pageCoords,x=u.options,E=x.elementRect,V=w({left:0,top:0,right:0,bottom:0},x.offset||{});if(t&&E){var W=an(x.restriction,d,f);if(W){var R=W.right-W.left-t.width,ne=W.bottom-W.top-t.height;R<0&&(V.left+=R,V.right+=R),ne<0&&(V.top+=ne,V.bottom+=ne)}V.left+=o.left-t.width*E.left,V.top+=o.top-t.height*E.top,V.right+=o.right-t.width*(1-E.right),V.bottom+=o.bottom-t.height*(1-E.bottom)}u.offset=V},set:function(n){var t=n.coords,o=n.interaction,u=n.state,d=u.options,f=u.offset,x=an(d.restriction,o,t);if(x){var E=function(V){return!V||"left"in V&&"top"in V||((V=w({},V)).left=V.x||0,V.top=V.y||0,V.right=V.right||V.left+V.width,V.bottom=V.bottom||V.top+V.height),V}(x);t.x=Math.max(Math.min(E.right-f.right,t.x),E.left+f.left),t.y=Math.max(Math.min(E.bottom-f.bottom,t.y),E.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Er=ca(Nn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(n,t){for(var o=0,u=["top","left","bottom","right"];o<u.length;o++){var d=u[o];d in n||(n[d]=t[d])}return n}var bn={noInner:Co,noOuter:So,start:function(n){var t,o=n.interaction,u=n.startOffset,d=n.state,f=d.options;f&&(t=ve(an(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},d.offset={top:t.y+u.top,left:t.x+u.left,bottom:t.y-u.bottom,right:t.x-u.right}},set:function(n){var t=n.coords,o=n.edges,u=n.interaction,d=n.state,f=d.offset,x=d.options;if(o){var E=w({},t),V=an(x.inner,u,E)||{},W=an(x.outer,u,E)||{};To(V,Co),To(W,So),o.top?t.y=Math.min(Math.max(W.top+f.top,E.y),V.top+f.top):o.bottom&&(t.y=Math.max(Math.min(W.bottom+f.bottom,E.y),V.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(W.left+f.left,E.x),V.left+f.left):o.right&&(t.x=Math.max(Math.min(W.right+f.right,E.x),V.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Cr=ca(bn,"restrictEdges"),Sr=w({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Nn.defaults),Tr=ca({start:Nn.start,set:Nn.set,defaults:Sr},"restrictRect"),Br={width:-1/0,height:-1/0},Ir={width:1/0,height:1/0},Nr=ca({start:function(n){return bn.start(n)},set:function(n){var t=n.interaction,o=n.state,u=n.rect,d=n.edges,f=o.options;if(d){var x=te(an(f.min,t,n.coords))||Br,E=te(an(f.max,t,n.coords))||Ir;o.options={endOnly:f.endOnly,inner:w({},bn.noInner),outer:w({},bn.noOuter)},d.top?(o.options.inner.top=u.bottom-x.height,o.options.outer.top=u.bottom-E.height):d.bottom&&(o.options.inner.bottom=u.top+x.height,o.options.outer.bottom=u.top+E.height),d.left?(o.options.inner.left=u.right-x.width,o.options.outer.left=u.right-E.width):d.right&&(o.options.inner.right=u.left+x.width,o.options.outer.right=u.left+E.width),bn.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Zn={start:function(n){var t,o=n.interaction,u=n.interactable,d=n.element,f=n.rect,x=n.state,E=n.startOffset,V=x.options,W=V.offsetWithOrigin?function(De){var Ue=De.interaction.element,$e=ve(_e(De.state.options.origin,null,null,[Ue])),Xe=$e||se(De.interactable,Ue,De.interaction.prepared.name);return Xe}(n):{x:0,y:0};if(V.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var R=_e(V.offset,u,d,[o]);(t=ve(R)||{x:0,y:0}).x+=W.x,t.y+=W.y}var ne=V.relativePoints;x.offsets=f&&ne&&ne.length?ne.map(function(De,Ue){return{index:Ue,relativePoint:De,x:E.left-f.width*De.x+t.x,y:E.top-f.height*De.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,u=n.state,d=u.options,f=u.offsets,x=se(t.interactable,t.element,t.prepared.name),E=w({},o),V=[];d.offsetWithOrigin||(E.x-=x.x,E.y-=x.y);for(var W=0,R=f;W<R.length;W++)for(var ne=R[W],De=E.x-ne.x,Ue=E.y-ne.y,$e=0,Xe=d.targets.length;$e<Xe;$e++){var it=d.targets[$e],lt=void 0;(lt=b.func(it)?it(De,Ue,t._proxy,ne,$e):it)&&V.push({x:(b.number(lt.x)?lt.x:De)+ne.x,y:(b.number(lt.y)?lt.y:Ue)+ne.y,range:b.number(lt.range)?lt.range:d.range,source:it,index:$e,offset:ne})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<V.length;Tt++){var Vt=V[Tt],kt=Vt.range,Bt=Vt.x-E.x,ra=Vt.y-E.y,Wt=dt(Bt,ra),da=Wt<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&kt!==1/0?Wt/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||Wt<ht.distance:!ht.inRange&&Wt<ht.distance)||(ht.target=Vt,ht.distance=Wt,ht.range=kt,ht.inRange=da,ht.delta.x=Bt,ht.delta.y=ra)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),u.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ar=ca(Zn,"snap"),An={start:function(n){var t=n.state,o=n.edges,u=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:u.offset||"self",origin:{x:0,y:0},range:u.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Zn.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,u=n.coords,d=o.options,f=o.offsets,x={x:u.x-f[0].x,y:u.y-f[0].y};o.options=w({},d),o.options.targets=[];for(var E=0,V=d.targets||[];E<V.length;E++){var W=V[E],R=void 0;if(R=b.func(W)?W(x.x,x.y,t):W){for(var ne=0,De=o.targetFields;ne<De.length;ne++){var Ue=De[ne],$e=Ue[0],Xe=Ue[1];if($e in R||Xe in R){R.x=R[$e],R.y=R[Xe];break}}o.options.targets.push(R)}}var it=Zn.set(n);return o.options=d,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Vr=ca(An,"snapSize"),Qn={aspectRatio:_r,restrictEdges:Cr,restrict:Er,restrictRect:Tr,restrictSize:Nr,snapEdges:ca({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],An.start(n)):null},set:An.set,defaults:w(fa(An.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ar,snapSize:Vr,spring:In,avoid:In,transform:In,rubberband:In},Or={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Aa),n.usePlugin(kr),t.modifiers=Qn,Qn){var u=Qn[o],d=u._defaults,f=u._methods;d._methods=f,n.defaults.perAction[o]=d}}},Mr=Or,Bo=function(n){m(o,n);var t=j(o);function o(u,d,f,x,E,V){var W;if(s(this,o),A(N(W=t.call(this,E)),f),f!==d&&A(N(W),d),W.timeStamp=V,W.originalEvent=f,W.type=u,W.pointerId=le(d),W.pointerType=he(d),W.target=x,W.currentTarget=null,u==="tap"){var R=E.getPointerIndex(d);W.dt=W.timeStamp-E.pointers[R].downTime;var ne=W.timeStamp-E.tapTime;W.double=!!E.prevTap&&E.prevTap.type!=="doubletap"&&E.prevTap.target===W.target&&ne<500}else u==="doubletap"&&(W.dt=d.timeStamp-E.tapTime,W.double=!0);return W}return h(o,[{key:"_subtractOrigin",value:function(u){var d=u.x,f=u.y;return this.pageX-=d,this.pageY-=f,this.clientX-=d,this.clientY-=f,this}},{key:"_addOrigin",value:function(u){var d=u.x,f=u.y;return this.pageX+=d,this.pageY+=f,this.clientX+=d,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Ve),kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=kn,n.defaults.actions.pointerEvents=kn.defaults,w(n.actions.phaselessTypes,kn.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,u=n.pointer,d=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&eo(n),$a({interaction:o,pointer:u,event:d,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,u){for(var d=o.interaction,f=o.pointer,x=o.event,E=o.eventTarget,V=o.pointerIndex,W=d.pointers[V].hold,R=ee(E),ne={interaction:d,pointer:f,event:x,eventTarget:E,type:"hold",targets:[],path:R,node:null},De=0;De<R.length;De++){var Ue=R[De];ne.node=Ue,u.fire("pointerEvents:collect-targets",ne)}if(ne.targets.length){for(var $e=1/0,Xe=0,it=ne.targets;Xe<it.length;Xe++){var lt=it[Xe].eventable.options.holdDuration;lt<$e&&($e=lt)}W.duration=$e,W.timeout=setTimeout(function(){$a({interaction:d,eventTarget:E,pointer:f,event:x,type:"hold"},u)},$e)}})(n,t),$a(n,t)},"interactions:up":function(n,t){eo(n),$a(n,t),function(o,u){var d=o.interaction,f=o.pointer,x=o.event,E=o.eventTarget;d.pointerWasMoved||$a({interaction:d,eventTarget:E,pointer:f,event:x,type:"tap"},u)}(n,t)},"interactions:cancel":function(n,t){eo(n),$a(n,t)}},PointerEvent:Bo,fire:$a,collectEventTargets:Io,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function $a(n,t){var o=n.interaction,u=n.pointer,d=n.event,f=n.eventTarget,x=n.type,E=n.targets,V=E===void 0?Io(n,t):E,W=new Bo(x,u,d,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:W});for(var R={interaction:o,pointer:u,event:d,eventTarget:f,targets:V,type:x,pointerEvent:W},ne=0;ne<V.length;ne++){var De=V[ne];for(var Ue in De.props||{})W[Ue]=De.props[Ue];var $e=se(De.eventable,De.node);if(W._subtractOrigin($e),W.eventable=De.eventable,W.currentTarget=De.node,De.eventable.fire(W),W._addOrigin($e),W.immediatePropagationStopped||W.propagationStopped&&ne+1<V.length&&V[ne+1].node!==W.currentTarget)break}if(t.fire("pointerEvents:fired",R),x==="tap"){var Xe=W.double?$a({interaction:o,pointer:u,event:d,eventTarget:f,type:"doubletap"},t):W;o.prevTap=Xe,o.tapTime=Xe.timeStamp}return W}function Io(n,t){var o=n.interaction,u=n.pointer,d=n.event,f=n.eventTarget,x=n.type,E=o.getPointerIndex(u),V=o.pointers[E];if(x==="tap"&&(o.pointerWasMoved||!V||V.downTarget!==f))return[];for(var W=ee(f),R={interaction:o,pointer:u,event:d,eventTarget:f,type:x,path:W,targets:[],node:null},ne=0;ne<W.length;ne++){var De=W[ne];R.node=De,t.fire("pointerEvents:collect-targets",R)}return x==="hold"&&(R.targets=R.targets.filter(function(Ue){var $e,Xe;return Ue.eventable.options.holdDuration===(($e=o.pointers[E])==null||(Xe=$e.hold)==null?void 0:Xe.duration)})),R.targets}function eo(n){var t=n.interaction,o=n.pointerIndex,u=t.pointers[o].hold;u&&u.timeout&&(clearTimeout(u.timeout),u.timeout=null)}var zr=Object.freeze({__proto__:null,default:kn});function Rr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Pr={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(kn);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Rr,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,u=n.pointerEvent,d=n.eventTarget,f=n.targets;if(u.type==="hold"&&f.length){var x=f[0].eventable.options.holdRepeatInterval;x<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:d,type:"hold",pointer:u,event:u},t)},x))}}})},Lr=Pr,$r={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(u){return w(this.events.options,u),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(u,d){var f=o.call(this,u,d);return f===this&&(this.events.options[u]=d),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,u=n.node,d=n.type,f=n.eventTarget;t.interactables.forEachMatch(u,function(x){var E=x.events,V=E.options;E.types[d]&&E.types[d].length&&x.testIgnoreAllow(V,u,f)&&o.push({node:u,eventable:E,props:{interactable:x}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,u=n.options;w(o.events.options,t.pointerEvents.defaults),w(o.events.options,u.pointerEvents||{})}}},Fr=$r,jr={id:"pointer-events",install:function(n){n.usePlugin(zr),n.usePlugin(Lr),n.usePlugin(Fr)}},Ur=jr,Kr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(u,d,f){for(var x=u.getAllElements(),E=f.window.Promise,V=E?[]:null,W=function(){var ne=x[R],De=u.getRect(ne);if(!De)return 1;var Ue,$e=Oe(f.interactions.list,function(lt){return lt.interacting()&<.interactable===u&<.element===ne&<.prepared.name===d.name});if($e)$e.move(),V&&(Ue=$e._reflowPromise||new E(function(lt){$e._reflowResolve=lt}));else{var Xe=te(De),it=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Xe.x,y:Xe.y},client:{x:Xe.x,y:Xe.y},timeStamp:f.now()});Ue=function(lt,ht,Tt,Vt,kt){var Bt=lt.interactions.new({pointerType:"reflow"}),ra={interaction:Bt,event:kt,pointer:kt,eventTarget:Tt,phase:"reflow"};Bt.interactable=ht,Bt.element=Tt,Bt.prevEvent=kt,Bt.updatePointer(kt,kt,Tt,!0),oe(Bt.coords.delta),ft(Bt.prepared,Vt),Bt._doPhase(ra);var Wt=lt.window,da=Wt.Promise,ga=da?new da(function(Ca){Bt._reflowResolve=Ca}):void 0;return Bt._reflowPromise=ga,Bt.start(Vt,ht,Tt),Bt._interacting?(Bt.move(ra),Bt.end(kt)):(Bt.stop(),Bt._reflowResolve()),Bt.removePointer(kt,kt),ga}(f,u,ne,d,it)}V&&V.push(Ue)},R=0;R<x.length&&!W();R++);return V&&E.all(V).then(function(){return u})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(u,d){u.splice(u.indexOf(d),1)}(t.interactions.list,o))}}},Wr=Kr;if(la.use(Na),la.use(St),la.use(Ur),la.use(na),la.use(Mr),la.use(Wa),la.use(Te),la.use(_t),la.use(Wr),la.default=la,c(a)==="object"&&a)try{a.exports=la}catch{}return la.default=la,la})}(Dn,Dn.exports)),Dn.exports}var qp=Hp();const tl=Me.getDefaultExportFromCjs(qp),Xn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:r,emit:i}){const l=a,c=i,s=e.inject(Gl),y=e.inject(Jl);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=e.shallowRef(null),p=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,D=!1,_=NaN,N=NaN,j=NaN,B=NaN,Q=-1,M=-1,L=-1,F=-1,g=l.x,T=l.y,v=l.w,S=l.h;const b=e.ref(),ce=e.reactive({i:e.toRef(l,"i"),state:p,wrapper:b,calcXY:_e});function Ie(I){fe(I)}function Qe(){Fe()}function ke(I){pa(l.isDraggable)&&(p.draggable=I)}function Pe(I){pa(l.isResizable)&&(p.resizable=I)}function Re(I){pa(l.isBounded)&&(p.bounded=I)}function P(I){p.transformScale=I}function U(I){p.rowHeight=I}function G(I){p.maxRows=I}function ie(){p.rtl=Qo()==="rtl",Fe()}function Ee(I){p.cols=Math.floor(I)}s.increaseItem(ce),e.onBeforeMount(()=>{p.rtl=Qo()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?p.cols=ar(s.lastBreakpoint,s.cols):p.cols=s.colNum,p.rowHeight=s.rowHeight,p.containerWidth=s.width!==null?s.width:100,p.margin=s.margin!==void 0?s.margin.map(Number):[10,10],p.maxRows=s.maxRows,pa(l.isDraggable)?p.draggable=s.isDraggable:p.draggable=l.isDraggable,pa(l.isResizable)?p.resizable=s.isResizable:p.resizable=l.isResizable,pa(l.isBounded)?p.bounded=s.isBounded:p.bounded=l.isBounded,p.transformScale=s.transformScale,p.useCssTransforms=s.useCssTransforms,p.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{g=l.x,T=l.y,S=l.h,v=l.w,ia(qe)}),y.on("updateWidth",Ie),y.on("compact",Qe),y.on("setDraggable",ke),y.on("setResizable",Pe),y.on("setBounded",Re),y.on("setTransformScale",P),y.on("setRowHeight",U),y.on("setMaxRows",G),y.on("directionchange",ie),y.on("setColNum",Ee)}),e.onBeforeUnmount(()=>{y.off("updateWidth",Ie),y.off("compact",Qe),y.off("setDraggable",ke),y.off("setResizable",Pe),y.off("setBounded",Re),y.off("setTransformScale",P),y.off("setRowHeight",U),y.off("setMaxRows",G),y.off("directionchange",ie),y.off("setColNum",Ee),h.value&&(h.value.unset(),h.value=null),s.decreaseItem(ce)}),r({state:p,wrapper:b});const Ze=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Z=e.computed(()=>p.resizable&&!l.static),z=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),ue=e.computed(()=>(p.draggable||p.resizable)&&!l.static),be=Pp("item"),Ce=e.computed(()=>({[be.b()]:!0,[be.bm("resizable")]:Z.value,[be.bm("static")]:l.static,[be.bm("resizing")]:p.isResizing,[be.bm("dragging")]:p.isDragging,[be.bm("transform")]:p.useCssTransforms,[be.bm("rtl")]:z.value,[be.bm("no-touch")]:Ze&&ue.value})),Se=e.computed(()=>[be.be("resizer"),z.value&&be.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,I=>{p.draggable=I}),e.watch(()=>l.static,()=>{ia(A),ia(oe)}),e.watch(()=>p.draggable,()=>{ia(A)}),e.watch(()=>l.isResizable,I=>{p.resizable=I}),e.watch(()=>l.isBounded,I=>{p.bounded=I}),e.watch(()=>p.resizable,()=>{ia(oe)}),e.watch(()=>p.rowHeight,()=>{ia(qe),ia(ee)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{ia(oe),ia(qe),ia(ee)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{ia(oe)}),e.watch(z,()=>{ia(oe),ia(qe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const I=s.margin;!I||I[0]===p.margin[0]&&I[1]===p.margin[1]||(p.margin=I.map(Number),ia(qe),ia(ee))});function qe(){l.x+l.w>p.cols?(g=0,v=l.w>p.cols?p.cols:l.w):(g=l.x,v=l.w);const I=Ne(g,T,v,S);p.isDragging&&(I.top=p.dragging.top,z.value?I.right=p.dragging.left:I.left=p.dragging.left),p.isResizing&&(I.width=p.resizing.width,I.height=p.resizing.height);let de;p.useCssTransforms?z.value?de=Op(I.top,I.right,I.width,I.height):de=Vp(I.top,I.left,I.width,I.height):z.value?de=zp(I.top,I.right,I.width,I.height):de=Mp(I.top,I.left,I.width,I.height),p.style=de}function ee(){const I={};for(const de of["width","height"]){const ze=p.style[de].match(/^(\d+)px$/);if(!ze)return;I[de]=ze[1]}c("container-resized",l.i,l.h,l.w,I.height,I.width)}function ae(I){if(l.static)return;const de=I.type;if(de==="resizestart"&&p.isResizing||de!=="resizestart"&&!p.isResizing)return;const ze=Jo(I);if(pa(ze))return;const{x:le,y:K}=ze,H={width:0,height:0};let Y;switch(de){case"resizestart":{oe(),Q=v,M=S,Y=Ne(g,T,v,S),H.width=Y.width,H.height=Y.height,p.resizing=H,p.isResizing=!0;break}case"resizemove":{!I.edges.right&&!I.edges.left&&(j=le),!I.edges.top&&!I.edges.bottom&&(B=K);const we=Zo(j,B,le,K);z.value?H.width=p.resizing.width-we.deltaX/p.transformScale:H.width=p.resizing.width+we.deltaX/p.transformScale,H.height=p.resizing.height+we.deltaY/p.transformScale,p.resizing=H;break}case"resizeend":{Y=Ne(g,T,v,S),H.width=Y.width,H.height=Y.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}Y=se(H.height,H.width),Y.w<l.minW&&(Y.w=l.minW),Y.w>l.maxW&&(Y.w=l.maxW),Y.h<l.minH&&(Y.h=l.minH),Y.h>l.maxH&&(Y.h=l.maxH),Y.h<1&&(Y.h=1),Y.w<1&&(Y.w=1),j=le,B=K,(v!==Y.w||S!==Y.h)&&c("resize",l.i,Y.h,Y.w,H.height,H.width),I.type==="resizeend"&&(Q!==v||M!==S)&&c("resized",l.i,Y.h,Y.w,H.height,H.width),y.emit("resizeEvent",I.type,l.i,g,T,Y.h,Y.w)}function w(I){if(l.static||p.isResizing)return;const de=I.type;if(de==="dragstart"&&p.isDragging||de!=="dragstart"&&!p.isDragging)return;const ze=Jo(I);if(pa(ze))return;const{x:le,y:K}=ze,H=I.target;if(!H.offsetParent)return;const Y={top:0,left:0};switch(de){case"dragstart":{L=g,F=T;const me=H.offsetParent.getBoundingClientRect(),q=H.getBoundingClientRect(),he=q.left/p.transformScale,re=me.left/p.transformScale,Ve=q.right/p.transformScale,pe=me.right/p.transformScale,Be=q.top/p.transformScale,$=me.top/p.transformScale;z.value?Y.left=(Ve-pe)*-1:Y.left=he-re,Y.top=Be-$,p.dragging=Y,p.isDragging=!0;break}case"dragmove":{const me=Zo(_,N,le,K);if(z.value?Y.left=p.dragging.left-me.deltaX/p.transformScale:Y.left=p.dragging.left+me.deltaX/p.transformScale,Y.top=p.dragging.top+me.deltaY/p.transformScale,p.bounded){const q=H.offsetParent.clientHeight-te(l.h,p.rowHeight,p.margin[1]);Y.top=J(Y.top,0,q);const he=ve(),re=p.containerWidth-te(l.w,he,p.margin[0]);Y.left=J(Y.left,0,re)}p.dragging=Y;break}case"dragend":{const me=H.offsetParent.getBoundingClientRect(),q=H.getBoundingClientRect(),he=q.left/p.transformScale,re=me.left/p.transformScale,Ve=q.right/p.transformScale,pe=me.right/p.transformScale,Be=q.top/p.transformScale,$=me.top/p.transformScale;z.value?Y.left=(Ve-pe)*-1:Y.left=he-re,Y.top=Be-$,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let we;z.value,we=_e(Y.top,Y.left),_=le,N=K,(g!==we.x||T!==we.y)&&c("move",l.i,we.x,we.y),I.type==="dragend"&&(L!==g||F!==T)&&c("moved",l.i,we.x,we.y),y.emit("dragEvent",I.type,l.i,we.x,we.y,S,v)}function Ne(I,de,ze,le){const K=ve();let H;return z.value?H={right:Math.round(K*I+(I+1)*p.margin[0]),top:Math.round(p.rowHeight*de+(de+1)*p.margin[1]),width:ze===1/0?ze:Math.round(K*ze+Math.max(0,ze-1)*p.margin[0]),height:le===1/0?le:Math.round(p.rowHeight*le+Math.max(0,le-1)*p.margin[1])}:H={left:Math.round(K*I+(I+1)*p.margin[0]),top:Math.round(p.rowHeight*de+(de+1)*p.margin[1]),width:ze===1/0?ze:Math.round(K*ze+Math.max(0,ze-1)*p.margin[0]),height:le===1/0?le:Math.round(p.rowHeight*le+Math.max(0,le-1)*p.margin[1])},H}function _e(I,de){const ze=ve();let le=Math.round((de-p.margin[0])/(ze+p.margin[0])),K=Math.round((I-p.margin[1])/(p.rowHeight+p.margin[1]));return le=Math.max(Math.min(le,p.cols-v),0),K=Math.max(Math.min(K,p.maxRows-S),0),{x:le,y:K}}function ve(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function te(I,de,ze){return Number.isFinite(I)?Math.round(de*I+Math.max(0,I-1)*ze):I}function J(I,de,ze){return Math.max(Math.min(I,ze),de)}function se(I,de,ze=!1){const le=ve();let K=Math.round((de+p.margin[0])/(le+p.margin[0])),H=0;return ze?H=Math.ceil((I+p.margin[1])/(p.rowHeight+p.margin[1])):H=Math.round((I+p.margin[1])/(p.rowHeight+p.margin[1])),K=Math.max(Math.min(K,p.cols-g),0),H=Math.max(Math.min(H,p.maxRows-T),0),{w:K,h:H}}function fe(I,de){p.containerWidth=I}function Fe(){qe()}function dt(){!h.value&&b.value&&(h.value=tl(b.value),p.useStyleCursor||h.value.styleCursor(!1))}const k=Xo(w);function A(){if(dt(),!!h.value)if(p.draggable&&!l.static){const I={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};h.value.draggable(I),m||(m=!0,h.value.on("dragstart dragmove dragend",de=>{de.type==="dragmove"?k(de):w(de)}))}else h.value.draggable({enabled:!1})}const X=Xo(ae);function oe(){if(dt(),!!h.value)if(p.resizable&&!l.static){const I=Ne(0,0,l.maxW,l.maxH),de=Ne(0,0,l.minW,l.minH),ze={edges:{left:z.value?`.${Se.value[0]}`:!1,right:z.value?!1:`.${Se.value[0]}`,bottom:`.${Se.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:de.height*p.transformScale,width:de.width*p.transformScale},max:{height:I.height*p.transformScale,width:I.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(ze.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(ze),D||(D=!0,h.value.on("resizestart resizemove resizeend",le=>{le.type==="resizemove"?X(le):ae(le)}))}else h.value.resizable({enabled:!1})}return(I,de)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:b,class:e.normalizeClass(Ce.value),style:e.normalizeStyle(p.style)},[e.renderSlot(I.$slots,"default"),Z.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Se.value)},null,2)):e.createCommentVNode("",!0)],6))}}),rn=typeof window<"u";var al;rn&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nl(a){return a!=null}function ol(){}const Xp=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(Xp)));const Yp=rn&&("ontouchstart"in window||Jp()>0),Gp=Yp?"pointerdown":"click";function Jp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Zp(a,r,i=window.Event){const{type:l,bubbles:c=!1,cancelable:s=!1,...y}=r;if(!nl(l)||l==="")return!1;let h;return nl(i)?h=new i(l,{bubbles:c,cancelable:s}):(h=document.createEvent("HTMLEvents"),h.initEvent(l,c,s)),Object.assign(h,y),a.dispatchEvent(h)}const Qp="clickoutside",ef=new Set;rn&&document.addEventListener(Gp,a=>{const r=a.target,i=a.composedPath&&a.composedPath();ef.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&Zp(l,{type:Qp})})},!0);const tf=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Ln;if(rn){for(const a of tf)if(a[1]in document){Ln=a;break}}e.computed(()=>!1);const af=new Set,nf=new WeakMap;if(rn&&Ln){const a=Ln[2],r=Ln[4];document.addEventListener(r,()=>{if(af.forEach(i=>{i.value=!1}),document[a]){const i=nf.get(document[a]);i&&(i.value=!0)}},!1)}const or=new Map;or.set("x",0);or.set("y",0);var on=[],of=function(){return on.some(function(a){return a.activeTargets.length>0})},lf=function(){return on.some(function(a){return a.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",rf=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:ll}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=ll),window.dispatchEvent(a)},Sn;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sn||(Sn={}));var ln=function(a){return Object.freeze(a)},sf=function(){function a(r,i){this.inlineSize=r,this.blockSize=i,ln(this)}return a}(),lr=function(){function a(r,i,l,c){return this.x=r,this.y=i,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ln(this)}return a.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,c=r.top,s=r.right,y=r.bottom,h=r.left,p=r.width,m=r.height;return{x:i,y:l,top:c,right:s,bottom:y,left:h,width:p,height:m}},a.fromRect=function(r){return new a(r.x,r.y,r.width,r.height)},a}(),wo=function(a){return a instanceof SVGElement&&"getBBox"in a},rr=function(a){if(wo(a)){var r=a.getBBox(),i=r.width,l=r.height;return!i&&!l}var c=a,s=c.offsetWidth,y=c.offsetHeight;return!(s||y||a.getClientRects().length)},rl=function(a){var r;if(a instanceof Element)return!0;var i=(r=a==null?void 0:a.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(i&&a instanceof i.Element)},cf=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},Mn=new WeakMap,il=/auto|scroll/,uf=/^tb|vertical/,df=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),ka=function(a){return parseFloat(a||"0")},vn=function(a,r,i){return a===void 0&&(a=0),r===void 0&&(r=0),i===void 0&&(i=!1),new sf((i?r:a)||0,(i?a:r)||0)},sl=ln({devicePixelContentBoxSize:vn(),borderBoxSize:vn(),contentBoxSize:vn(),contentRect:new lr(0,0,0,0)}),ir=function(a,r){if(r===void 0&&(r=!1),Mn.has(a)&&!r)return Mn.get(a);if(rr(a))return Mn.set(a,sl),sl;var i=getComputedStyle(a),l=wo(a)&&a.ownerSVGElement&&a.getBBox(),c=!df&&i.boxSizing==="border-box",s=uf.test(i.writingMode||""),y=!l&&il.test(i.overflowY||""),h=!l&&il.test(i.overflowX||""),p=l?0:ka(i.paddingTop),m=l?0:ka(i.paddingRight),D=l?0:ka(i.paddingBottom),_=l?0:ka(i.paddingLeft),N=l?0:ka(i.borderTopWidth),j=l?0:ka(i.borderRightWidth),B=l?0:ka(i.borderBottomWidth),Q=l?0:ka(i.borderLeftWidth),M=_+m,L=p+D,F=Q+j,g=N+B,T=h?a.offsetHeight-g-a.clientHeight:0,v=y?a.offsetWidth-F-a.clientWidth:0,S=c?M+F:0,b=c?L+g:0,ce=l?l.width:ka(i.width)-S-v,Ie=l?l.height:ka(i.height)-b-T,Qe=ce+M+v+F,ke=Ie+L+T+g,Pe=ln({devicePixelContentBoxSize:vn(Math.round(ce*devicePixelRatio),Math.round(Ie*devicePixelRatio),s),borderBoxSize:vn(Qe,ke,s),contentBoxSize:vn(ce,Ie,s),contentRect:new lr(_,p,ce,Ie)});return Mn.set(a,Pe),Pe},sr=function(a,r,i){var l=ir(a,i),c=l.borderBoxSize,s=l.contentBoxSize,y=l.devicePixelContentBoxSize;switch(r){case Sn.DEVICE_PIXEL_CONTENT_BOX:return y;case Sn.BORDER_BOX:return c;default:return s}},pf=function(){function a(r){var i=ir(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=ln([i.borderBoxSize]),this.contentBoxSize=ln([i.contentBoxSize]),this.devicePixelContentBoxSize=ln([i.devicePixelContentBoxSize])}return a}(),cr=function(a){if(rr(a))return 1/0;for(var r=0,i=a.parentNode;i;)r+=1,i=i.parentNode;return r},ff=function(){var a=1/0,r=[];on.forEach(function(s){if(s.activeTargets.length!==0){var y=[];s.activeTargets.forEach(function(h){var p=new pf(h.target),m=cr(h.target);y.push(p),h.lastReportedSize=sr(h.target,h.observedBox),m<a&&(a=m)}),r.push(function(){s.callback.call(s.observer,y,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var i=0,l=r;i<l.length;i++){var c=l[i];c()}return a},cl=function(a){on.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(cr(i.target)>a?r.activeTargets.push(i):r.skippedTargets.push(i))})})},hf=function(){var a=0;for(cl(a);of();)a=ff(),cl(a);return lf()&&rf(),a>0},co,ur=[],vf=function(){return ur.splice(0).forEach(function(a){return a()})},mf=function(a){if(!co){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return vf()}).observe(i,l),co=function(){i.textContent="".concat(r?r--:r++)}}ur.push(a),co()},gf=function(a){mf(function(){requestAnimationFrame(a)})},$n=0,yf=function(){return!!$n},bf=250,kf={attributes:!0,characterData:!0,childList:!0,subtree:!0},ul=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},uo=!1,xf=function(){function a(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return a.prototype.run=function(r){var i=this;if(r===void 0&&(r=bf),!uo){uo=!0;var l=dl(r);gf(function(){var c=!1;try{c=hf()}finally{if(uo=!1,r=l-dl(),!yf())return;c?i.run(1e3):r>0?i.run(r):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var r=this,i=function(){return r.observer&&r.observer.observe(document.body,kf)};document.body?i():Cn.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ul.forEach(function(i){return Cn.addEventListener(i,r.listener,!0)}))},a.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),ul.forEach(function(i){return Cn.removeEventListener(i,r.listener,!0)}),this.stopped=!0)},a}(),bo=new xf,pl=function(a){!$n&&a>0&&bo.start(),$n+=a,!$n&&bo.stop()},wf=function(a){return!wo(a)&&!cf(a)&&getComputedStyle(a).display==="inline"},Df=function(){function a(r,i){this.target=r,this.observedBox=i||Sn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var r=sr(this.target,this.observedBox,!0);return wf(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},a}(),_f=function(){function a(r,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=i}return a}(),zn=new WeakMap,fl=function(a,r){for(var i=0;i<a.length;i+=1)if(a[i].target===r)return i;return-1},Rn=function(){function a(){}return a.connect=function(r,i){var l=new _f(r,i);zn.set(r,l)},a.observe=function(r,i,l){var c=zn.get(r),s=c.observationTargets.length===0;fl(c.observationTargets,i)<0&&(s&&on.push(c),c.observationTargets.push(new Df(i,l&&l.box)),pl(1),bo.schedule())},a.unobserve=function(r,i){var l=zn.get(r),c=fl(l.observationTargets,i),s=l.observationTargets.length===1;c>=0&&(s&&on.splice(on.indexOf(l),1),l.observationTargets.splice(c,1),pl(-1))},a.disconnect=function(r){var i=this,l=zn.get(r);l.observationTargets.slice().forEach(function(c){return i.unobserve(r,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Ef=function(){function a(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rn.connect(this,r)}return a.prototype.observe=function(r,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rn.observe(this,r,i)},a.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rn.unobserve(this,r)},a.prototype.disconnect=function(){Rn.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Yn=new WeakMap;function Cf(a){var r;for(let i=0,l=a.length;i<l;++i){const c=a[i],s=Yn.get(c.target);if(typeof s=="function"){const{inlineSize:y,blockSize:h}=((r=c.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:m}=c.target;s(Object.assign(c,{offsetWidth:p,offsetHeight:m,width:y??p,height:h??m}))}}}const dr=new(rn&&window.ResizeObserver||Ef)(Cf);function hl(a,r){Yn.set(a,r),dr.observe(a)}function vl(a){Yn.has(a)&&(dr.unobserve(a),Yn.delete(a))}function Sf(a={}){let r=ol;const i=e.watch(()=>e.unref(a.target),c=>{r(),!(!c||typeof a.onResize!="function")&&(hl(c,a.onResize),r=()=>{vl(c),r=ol})},{immediate:!0}),l=()=>{i(),r()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:hl,unobserveResize:vl,unobserve:l}}const Tf=e.ref(!1);e.computed(()=>Tf.value);const ml="__theme_style__",po="__theme_observer__",gl=e.reactive(new Map),yl=new Map;e.watch(gl,()=>{if(!rn)return;yl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const r=document.createElement("style");let i=`.${po} { width: 1px }`,l=1;for(const[c,[s,y]]of gl.entries())i+=` html.${s} .${po}, .${y} .${po} { width: ${++l}px }`,yl.set(l,c);r.textContent=i,r.id=ml,document.head.appendChild(r)});const pr=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:r,emit:i}){const l=a,c=i,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),y=new Map,h=e.ref(l.layout),p=e.ref(),{observeResize:m,unobserveResize:D}=Sf(),_=Cp();_.on("resizeEvent",N),_.on("dragEvent",j),e.onBeforeMount(()=>{c("layout-before-mount",h.value)}),e.onMounted(()=>{c("layout-mounted",h.value),e.nextTick(()=>{Rp(h.value),s.originalLayout=h.value,e.nextTick(()=>{Ie(),p.value&&m(p.value,Sp(g,16)),pn(h.value,l.verticalCompact),c("layout-updated",h.value),F(),g()})})}),e.onBeforeUnmount(()=>{_.clearAll(),p.value&&D(p.value)});function N(ke,Pe,Re,P,U,G){b(ke,Pe,Re,P,U,G)}function j(ke,Pe,Re,P,U,G){S(ke,Pe,Re,P,U,G)}e.watch(()=>s.width,(ke,Pe)=>{e.nextTick(()=>{_.emit("updateWidth",ke),Pe===-1&&e.nextTick(()=>{c("layout-ready",h.value)}),F()})}),e.watch(()=>[l.layout,l.layout.length],()=>{h.value=l.layout,L()}),e.watch(()=>l.colNum,ke=>{_.emit("setColNum",ke)}),e.watch(()=>l.rowHeight,ke=>{_.emit("setRowHeight",ke)}),e.watch(()=>l.isDraggable,ke=>{_.emit("setDraggable",ke)}),e.watch(()=>l.isResizable,ke=>{_.emit("setResizable",ke)}),e.watch(()=>l.isBounded,ke=>{_.emit("setBounded",ke)}),e.watch(()=>l.transformScale,ke=>{_.emit("setTransformScale",ke)}),e.watch(()=>l.responsive,ke=>{ke||(c("update:layout",s.originalLayout),_.emit("setColNum",l.colNum)),g()}),e.watch(()=>l.maxRows,ke=>{_.emit("setMaxRows",ke)}),e.watch([()=>l.margin,()=>l.margin[1]],F),e.provide(Gl,e.reactive({...e.toRefs(l),...e.toRefs(s),increaseItem:B,decreaseItem:Q})),e.provide(Jl,_),r({state:s,getItem:M,resizeEvent:b,dragEvent:S,layoutUpdate:L});function B(ke){y.set(ke.i,ke)}function Q(ke){y.delete(ke.i)}function M(ke){return y.get(ke)}function L(){if(!pa(h.value)&&!pa(s.originalLayout)){if(h.value.length!==s.originalLayout.length){const ke=Qe(h.value,s.originalLayout);if(ke.length>0)if(h.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(ke);else{const Pe=new Set(ke.map(Re=>Re.i));s.originalLayout=s.originalLayout.filter(Re=>!Pe.has(Re.i))}s.lastLayoutLength=h.value.length,Ie()}pn(h.value,l.verticalCompact),_.emit("updateWidth",s.width),F(),c("layout-updated",h.value)}}function F(){s.mergedStyle={height:T()}}function g(){p.value&&(s.width=p.value.offsetWidth),_.emit("resizeEvent")}function T(){if(!l.autoSize)return;const ke=parseFloat(l.margin[1]);return Bp(h.value)*(l.rowHeight+ke)+ke+"px"}let v;function S(ke,Pe,Re,P,U,G){let ie=Yo(h.value,Pe);pa(ie)&&(ie={h:0,w:0,x:0,y:0,i:""}),ke==="dragstart"&&!l.verticalCompact&&(v=h.value.reduce((Ee,{i:Ze,x:Z,y:z})=>({...Ee,[Ze]:{x:Z,y:z}}),{})),ke==="dragmove"||ke==="dragstart"?(s.placeholder.i=Pe,s.placeholder.x=ie.x,s.placeholder.y=ie.y,s.placeholder.w=G,s.placeholder.h=U,e.nextTick(()=>{s.isDragging=!0}),_.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),h.value=yo(h.value,ie,Re,P,!0,l.preventCollision),l.restoreOnDrag?(ie.static=!0,pn(h.value,l.verticalCompact,v),ie.static=!1):pn(h.value,l.verticalCompact),_.emit("compact"),F(),ke==="dragend"&&(v=void 0,c("layout-updated",h.value))}function b(ke,Pe,Re,P,U,G){let ie=Yo(h.value,Pe);pa(ie)&&(ie={h:0,w:0,x:0,y:0,i:""});let Ee;if(l.preventCollision){const Ze=Ql(h.value,{...ie,w:G,h:U}).filter(Z=>Z.i!==ie.i);if(Ee=Ze.length>0,Ee){let Z=1/0,z=1/0;Ze.forEach(ue=>{ue.x>ie.x&&(Z=Math.min(Z,ue.x)),ue.y>ie.y&&(z=Math.min(z,ue.y))}),Number.isFinite(Z)&&(ie.w=Z-ie.x),Number.isFinite(z)&&(ie.h=z-ie.y)}}Ee||(ie.w=G,ie.h=U),ke==="resizestart"||ke==="resizemove"?(s.placeholder.i=Pe,s.placeholder.x=Re,s.placeholder.y=P,s.placeholder.w=ie.w,s.placeholder.h=ie.h,e.nextTick(()=>{s.isDragging=!0}),_.emit("updateWidth",s.width)):ke&&e.nextTick(()=>{s.isDragging=!1}),l.responsive&&ce(),pn(h.value,l.verticalCompact),_.emit("compact"),F(),ke==="resizeend"&&c("layout-updated",h.value)}function ce(){const ke=Fp(l.breakpoints,s.width);if(ke===s.lastBreakpoint)return;const Pe=ar(ke,l.cols);!pa(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=go(h.value));const Re=jp(s.originalLayout,s.layouts,l.breakpoints,ke,s.lastBreakpoint,Pe,l.verticalCompact);s.layouts[ke]=Re,s.lastBreakpoint!==ke&&c("breakpoint-changed",ke,Re),h.value=Re,c("update:layout",Re),s.lastBreakpoint=ke,_.emit("setColNum",Pe)}function Ie(){s.layouts=Object.assign({},l.responsiveLayouts)}function Qe(ke,Pe){const Re=new Set(Pe.map(ie=>ie.i)),P=new Set(ke.map(ie=>ie.i)),U=ke.filter(ie=>!Re.has(ie.i)),G=Pe.filter(ie=>!P.has(ie.i));return U.concat(G)}return(ke,Pe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[ke.$slots.default?e.renderSlot(ke.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,Re=>(e.openBlock(),e.createBlock(Xn,e.mergeProps({key:Re.i,ref_for:!0},Re),{default:e.withCtx(()=>[e.renderSlot(ke.$slots,"item",{item:Re})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Xn,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const Bf={key:0,class:"item-view-group"},If={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(a,{emit:r}){const i=C.useModelComp(C.pinia),{isEdit:l}=C.storeToRefs(i),c=r,s=a,y=e.computed(()=>s==null?void 0:s.children),h=e.computed(()=>{var N,j,B,Q;return((N=s==null?void 0:s.children)==null?void 0:N.length)>0&&((j=s==null?void 0:s.children)!=null&&j.every(M=>M==null?void 0:M.layout))?(Q=(B=s==null?void 0:s.children)==null?void 0:B[0])==null?void 0:Q.layout:"vertical"}),p=e.computed(()=>{var N,j;return((j=(N=s==null?void 0:s.children)==null?void 0:N[0])==null?void 0:j.isGridLayout)||!1}),m=e.ref((s==null?void 0:s.level)+1),D=N=>{c("rowClick",N)},_=(N,j)=>{c("routeUrl",N,j)};return(N,j)=>p.value?(e.openBlock(),e.createBlock(e.unref(pr),{key:0,layout:y.value,"onUpdate:layout":j[0]||(j[0]=B=>y.value=B),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(B,Q)=>(e.openBlock(),e.createBlock(e.unref(Xn),{key:B.i,x:B.x,y:B.y,"min-h":B.minH,"max-h":B.maxH,"min-w":B.minW,w:B.w,h:B.h,i:B.i},{default:e.withCtx(()=>{var M,L,F,g,T,v,S,b,ce,Ie,Qe,ke,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Q===((M=s==null?void 0:s.children)==null?void 0:M.length)-1?"0px":"24px"})},[((F=(L=B==null?void 0:B.component)==null?void 0:L.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&((g=B==null?void 0:B.component)!=null&&g.name)?(e.openBlock(),e.createElementBlock("div",Bf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(m.value.toString())-1)*12+"px",fontWeight:600-(m.value-1)*100>=400?600-(m.value-1)*100:400,fontSize:17-m.value>=14?17-m.value+"px":"14px"})},e.toDisplayString((T=B==null?void 0:B.component)==null?void 0:T.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)((v=B==null?void 0:B.component)==null?void 0:v.comp)),{pageLayout:h.value,config:{showIndex:(S=e.unref(jt)[Q])==null?void 0:S.showIndex,allowMove:(b=e.unref(jt)[Q])==null?void 0:b.allowMove,viewport:(ce=e.unref(jt)[Q])==null?void 0:ce.viewport},related:B==null?void 0:B.relatedTables,compName:B==null?void 0:B.component.name,compNames:e.unref(Fl),itemData:(Ie=B==null?void 0:B.component)==null?void 0:Ie.compData,childItemData:(Qe=B==null?void 0:B.component)==null?void 0:Qe.itemChildData,key:e.unref(gn),cacheNewData:e.unref($l),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Q,onContentChange:e.unref(Hn),onPageChange:e.unref(qn),parentTableId:(ke=B==null?void 0:B.component)==null?void 0:ke.tableId,allMapContents:e.unref(mo),children:(Pe=B==null?void 0:B.component)==null?void 0:Pe.children,level:m.value,onRowClick:D,onRouteUrl:_,onClickTrigger:e.unref(jl),onClickMainKey:e.unref(Ul)},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s==null?void 0:s.children,(B,Q)=>{var M,L;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(B==null?void 0:B.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(Q)===((M=s==null?void 0:s.children)==null?void 0:M.length)-1?"0px":"24px"})},[((L=B==null?void 0:B.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&B.name?(e.openBlock(),e.createElementBlock("div",If,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(m.value.toString())>1?"12px":"0px",fontWeight:600-(m.value-1)*100>=400?600-(m.value-1)*100:400,fontSize:17-m.value>=14?17-m.value+"px":"14px"})},e.toDisplayString(B.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)(B.comp)),{compName:B.name,itemData:B==null?void 0:B.compData,related:B==null?void 0:B.relatedTables,childItemData:B==null?void 0:B.itemChildData,key:e.unref(gn),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Q,onContentChange:e.unref(Hn),onPageChange:e.unref(qn),parentTableId:B==null?void 0:B.tableId,allMapContents:e.unref(mo),children:B==null?void 0:B.children,level:m.value,onRowClick:D,onRouteUrl:_},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Af=Pt._export_sfc(Nf,[["__scopeId","data-v-a00427c1"]]),fr=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),Vf={TABLE:oa.ssTable,FORM:Ro,STATICFORM:wl,TABLEOPERATE:Ts,TABLESTYLE:Ks,TABLEEXTEND:Hs,TABLEINTERACTION:Ys,FORMOPERATE:Po,FOLD:Ec,CALCULATOR:Nc,METHODBUTTON:Oc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Ro,STEP:Hc,STEPOPERATE:mc,TIMELINE:Zc,TIMELINEOPERATE:wc,FORMTOPOPERATE:Po,SIGNATUREOPERATE:Uc,AVATARUPLOADOPERATE:Rc,TABS:tu,TABSOPERATE:$u,CHART:ed,CHARTOPERATE:dd,LAYOUT:hp,LAYOUTOPERATE:Dp,PARENTITEM:Af};function sn(a){return Vf[a==null?void 0:a.toUpperCase()]||null}exports.De=pr;exports._sfc_main=Vl;exports.activeStepInfo=fn;exports.affixItems=ap;exports.allMapContents=mo;exports.analyzeForm=bd;exports.analyzeQuoteForm=yd;exports.analyzeSplitToContent=Ut;exports.analyzeTable=xd;exports.analyzerStringToArray=pd;exports.cacheNewData=$l;exports.clickMainKey=Ul;exports.clickSavePage=tp;exports.clickStep=Wl;exports.clickTrigger=jl;exports.compId=gn;exports.compNames=Fl;exports.compShow=Un;exports.existLayouts=lp;exports.generateLayouts=$s;exports.getComponent=sn;exports.getComponents=Kn;exports.getSliceContLength=cp;exports.gridRowHeight=Ms;exports.isStepLayout=Hl;exports.onBack=Qd;exports.onChange=Wn;exports.onClick=ep;exports.onContentChange=Hn;exports.onExtendTaskEnd=op;exports.onPageBack=rp;exports.onPageChange=qn;exports.onSelectFixContent=Zd;exports.renderShowItems=Pl;exports.same=fd;exports.setComponent=Rl;exports.showItems=jt;exports.sliceTableLength=Ll;exports.slotContent=fr;exports.ssMenu=jn;exports.st=Xn;exports.stepItems=up;exports.toolBar=np;exports.verifyButton=ip;
|