ss-component-new 1.3.414 → 1.3.415
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/{array-D_lEz3-j.js → array-C6OdbPQ9.js} +2 -2
- package/dist/{array-DYLqRd7l.cjs → array-DmjXKlpK.cjs} +1 -1
- package/dist/{index-Casuz8Vp.cjs → index--TgqYrZc.cjs} +3 -3
- package/dist/{index-DY3aYQHA.cjs → index-8Urth4VT.cjs} +1 -1
- package/dist/{index-Bl5a8pH8.js → index-B-EizQFy.js} +2167 -2134
- package/dist/{index-CKzWVkpj.js → index-B3Z2HbJW.js} +1 -1
- package/dist/{index-CjV1C8sT.cjs → index-B4nzrEgl.cjs} +1 -1
- package/dist/{index-DYiY7D0W.js → index-B4ouy3El.js} +1 -1
- package/dist/{index-w1oBL1gJ.js → index-BKf-rOwE.js} +1 -1
- package/dist/{index-CK0l2Ml-.cjs → index-BVigGIkW.cjs} +2 -2
- package/dist/{index-CJJevI6C.cjs → index-BgDoXxnN.cjs} +1 -1
- package/dist/{index-CrRj6hNn.cjs → index-C7FJ3zvS.cjs} +1 -1
- package/dist/{index-Ba53ogKK.js → index-CEeOqd9g.js} +2 -2
- package/dist/{index-BCWRYy0b.js → index-CHaXvVsZ.js} +2 -2
- package/dist/{index-5BOhtSaG.js → index-CMIG3zru.js} +8 -8
- package/dist/{index-Da2Xb1RX.js → index-CPekdGe9.js} +2 -2
- package/dist/{index-DCwXwslK.js → index-CPl5clIF.js} +1067 -1035
- package/dist/{index-C1Iza7fB.cjs → index-CbbBN6_1.cjs} +1 -1
- package/dist/{index-CUJJfquN.cjs → index-CqcZ6Hbg.cjs} +1 -1
- package/dist/{index-CiuREeu1.cjs → index-DAX8T606.cjs} +1 -1
- package/dist/{index-C_rr5XQg.cjs → index-DIzwWIe-.cjs} +1 -1
- package/dist/{index-53_vfbFK.js → index-DK1-jWC0.js} +1 -1
- package/dist/{index-Cw9DvwCF.js → index-DnKH7LRu.js} +3 -3
- package/dist/{index-Dpy7DX_X.cjs → index-FLJJKkyQ.cjs} +1 -1
- package/dist/{index-DovRe4j5.cjs → index-I-s-QfVJ.cjs} +12 -12
- package/dist/{index-Do3cYG8p.js → index-aYsID9DE.js} +1 -1
- package/dist/{main-Dw6fy-Wz.cjs → main-BK6LUeIR.cjs} +1 -1
- package/dist/{main-BGVtFZVe.js → main-DLWQY8bl.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-DBd1dst8.js → threeModel-BeCt3JW8.js} +1 -1
- package/dist/{threeModel-C81BUDEj.cjs → threeModel-D_5szEHS.cjs} +1 -1
- package/dist/{threeSceneView-DecwgIvE.js → threeSceneView-Cy7aJHos.js} +3 -3
- package/dist/{threeSceneView-BmCIbgFw.cjs → threeSceneView-DqWt8Soc.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bl5oULDr.js → threeSceneViewForCPMPIP-BFnW_k3q.js} +1 -1
- package/dist/{threeSceneViewForCPMPIP-BZzyqlh4.cjs → threeSceneViewForCPMPIP-Cp4DP9Kz.cjs} +1 -1
- package/dist/{threeViewerHost-B_NFg86U.js → threeViewerHost-BOBeI0tj.js} +1 -1
- package/dist/{threeViewerHost-M-zpRrsk.cjs → threeViewerHost-D64feDPk.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Mu=Object.defineProperty;var Iu=(a,l,n)=>l in a?Mu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var tn=(a,l,n)=>Iu(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),qa=require("./request-Dl8yi2iS.cjs"),A=require("./index-Pve69buQ.cjs"),sl=require("./index-DovRe4j5.cjs"),oe=require("./index-BszVYrt4.cjs"),Zl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Al=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CkTzrR_j.cjs"),Br=require("./index-BOkUwKV5.cjs"),Bo=require("./threeViewerHost-M-zpRrsk.cjs"),Rr=require("./index-DmwxzDGW.cjs"),os=require("./index-Dpy7DX_X.cjs"),Qs=require("./index-DBxrIHI8.cjs");;/* empty css */const No=require("./isString-CGrvcmBw.cjs"),ts=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),ec=require("./index-BVaHwt5f.cjs"),Ou=require("./index-BwJLSnJn.cjs"),$n=require("./MTLLoader-VuBhYPg2.cjs"),Lu=require("./URDFLoader-9WBWnVjI.cjs");var Ru="[object Boolean]";function ac(a){return a===!0||a===!1||qa.isObjectLike(a)&&qa.baseGetTag(a)==Ru}function $u(a){return a===void 0}const Vu=a=>a.match(/\((.*)\)/)[1],Pu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,n=e.ref(null),r=e.ref(!1),o=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>o.value,()=>{e.nextTick(()=>{var s,h;(h=(s=n.value)==null?void 0:s.updatePopper)==null||h.call(s)})},{deep:!0,immediate:!0}),(s,h)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":h[0]||(h[0]=d=>r.value=d),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:o})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Fu=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var d,m,b,u,C,M;const r=l.value??"";let o=(d=l==null?void 0:l.columnContent)==null?void 0:d.filter;if(o=(m=oe.analyzeSplitToContent(o,","))==null?void 0:m.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k)),o=o==null?void 0:o.find(k=>(k==null?void 0:k[0])==="("),(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=o==null?void 0:o.split("||"),!o)return{backgroundColor:void 0,color:void 0};let s=(u=(b=l==null?void 0:l.columnContent)==null?void 0:b.options)==null?void 0:u.findIndex(k=>(k==null?void 0:k.value)===r);s=o==null?void 0:o[s],s=oe.analyzeSplitToContent(s,","),s=s==null?void 0:s.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k));let h=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextBackRGBA"));h?h=oe.rgbaToColor((C=h==null?void 0:h.split("="))==null?void 0:C[1]):h=void 0;let c=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextRGBA"));return c?c=oe.rgbaToColor((M=c==null?void 0:c.split("="))==null?void 0:M[1]):c=void 0,{backgroundColor:h,color:c}});return(r,o)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),ju=Zl._export_sfc(Fu,[["__scopeId","data-v-3290070b"]]);function Hu(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const o=a.getContext("2d");if(!o)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:h=2,fillOpacity:c=.2}=r,d=a.getBoundingClientRect(),m=l.getBoundingClientRect(),b=l.naturalWidth,u=l.naturalHeight,C=m.width/b,M=m.height/u,k=Math.min(C,M),W=b*k,I=u*k,j=(d.width-W)/2,L=(d.height-I)/2,E=n.map(([w,g])=>{const S=j+w*W,$=L+g*I;return{x:S,y:$}});o.clearRect(0,0,a.width,a.height),o.beginPath(),o.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)o.lineTo(E[w].x,E[w].y);o.closePath();const x=s.replace(/[\d.]+\)$/,`${c})`);o.fillStyle=x,o.fill(),o.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),o.lineWidth=h,o.stroke()}function Si(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ss(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const Uu={key:0,class:"ocr-img-preview-root"},qu={class:"ocr-img-preview-window"},Wu={key:0,class:"img-preview-body"},Ku={class:"img-preview-header"},Gu={class:"img-header-left"},Yu={class:"img-name"},Ju={key:0,class:"img-header-right"},Xu={class:"img-index"},Zu={key:0,class:"img-thumb-list"},Qu=["onClick"],ed={key:1,class:"thumb-placeholder"},ad={class:"thumb-name"},ld={class:"img-preview-container"},rd={key:0,class:"img-placeholder"},nd={key:2,class:"img-placeholder"},id={key:0},od={key:1},td={key:1,class:"img-placeholder"},sd=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const n=a,r=l,o=e.computed({get:()=>n.visible,set:N=>r("update:visible",N)});let s=!1,h="",c=0,d=0,m=0,b=0,u=0,C=0,M=null;const k=N=>{var U,Ce;const te=(Ce=(U=N==null?void 0:N.target)==null?void 0:U.closest)==null?void 0:Ce.call(U,".ocr-img-preview-window");return te||document.querySelector(".ocr-img-preview-window")},W=N=>{if(!N||N==="none")return{tx:0,ty:0};let te=N.match(/matrix\(([^)]+)\)/);if(te){const U=te[1].split(",").map(Ce=>Number(Ce.trim()));return{tx:(U==null?void 0:U[4])||0,ty:(U==null?void 0:U[5])||0}}if(te=N.match(/matrix3d\(([^)]+)\)/),te){const U=te[1].split(",").map(Ce=>Number(Ce.trim()));return{tx:(U==null?void 0:U[12])||0,ty:(U==null?void 0:U[13])||0}}return te=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),te?{tx:Number(te[1])||0,ty:Number(te[2])||0}:{tx:0,ty:0}},I=(N,te,U)=>{N.style.transform=`translate(${te}px, ${U}px)`},j=N=>{const te=k(N);if(!te)return;s=!0,M=te,h="move",c=N.clientX,d=N.clientY;const U=window.getComputedStyle(te),{tx:Ce,ty:Me}=W(U.transform);u=Ce,C=Me,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},L=(N,te)=>{const U=k(N);if(!U)return;s=!0,M=U,h=te,c=N.clientX,d=N.clientY;const Ce=U.getBoundingClientRect();m=Ce.width,b=Ce.height;const Me=window.getComputedStyle(U),{tx:Pe,ty:ra}=W(Me.transform);u=Pe,C=ra,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},E=N=>{if(!s||!M)return;const te=N.clientX-c,U=N.clientY-d,Ce=360,Me=420;let Pe=m,ra=b,Ta=u,ee=C;if(h==="move"){Ta=u+te,ee=C+U,I(M,Ta,ee);return}if(h.includes("right")&&(Pe=Math.max(Ce,m+te)),h.includes("bottom")&&(ra=Math.max(Me,b+U)),h.includes("left")){const pa=m-te;pa<Ce?(Pe=Ce,Ta=u+(m-Ce)):(Pe=pa,Ta=u+te)}if(h.includes("top")){const pa=b-U;pa<Me?(ra=Me,ee=C+(b-Me)):(ra=pa,ee=C+U)}M.style.width=`${Pe}px`,M.style.height=`${ra}px`,I(M,Ta,ee)},x=()=>{s=!1,h="",M=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)},w=e.ref([]),g=e.ref(!1);e.watch(()=>n.images,async N=>{if(!Array.isArray(N)||N.length===0){w.value=[];return}g.value=!0;const te=[];for(const U of N)if(U.url&&!U.url.startsWith("blob:")&&!U.url.startsWith("http"))try{const Ce=await Al.downloadFile(U.url),Me=URL.createObjectURL(Ce);te.push({...U,blobUrl:Me})}catch(Ce){console.error(`Failed to load image for preview: ${U.url}`,Ce),te.push({...U,blobUrl:""})}else te.push({...U,blobUrl:U.url});w.value=te,g.value=!1},{deep:!0,immediate:!0});const S=e.ref(0),$=e.ref(null),V=e.ref(null),ae=e.computed(()=>w.value[S.value]||null),Z=()=>{if(!w.value.length){S.value=0;return}if(n.defaultImageName){const N=w.value.findIndex(te=>(te==null?void 0:te.name)===n.defaultImageName);S.value=N>=0?N:0}else S.value=0},me=N=>{if(!w.value.length)return;const te=Math.max(0,Math.min(N,w.value.length-1));S.value=te},Ae=()=>me(S.value-1),F=()=>me(S.value+1),ne=N=>{if(!N)return;const te=w.value.findIndex(U=>(U==null?void 0:U.name)===N);te>=0&&(S.value=te)},J=()=>{if(!V.value)return;const N=V.value.parentElement;if(!N)return;const te=N.getBoundingClientRect();V.value.width=te.width,V.value.height=te.height},ce=()=>{var Ce,Me;if(!V.value||!$.value||!n.focusedFieldName){V.value&&Si(V.value);return}const N=(Ce=$.value.$el)==null?void 0:Ce.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{ce()})};return}const te=((Me=ae.value)==null?void 0:Me.name)||"",U=ss(n.fieldMeta,n.focusedFieldName);if(!U){Si(V.value);return}if(U.imageName!==te){Si(V.value);return}J(),Hu(V.value,N,U.bboxNorm)},Te=()=>{e.nextTick(()=>{J(),ce()})};e.watch(()=>n.focusedFieldName,()=>{if(!o.value)return;const N=ss(n.fieldMeta,n.focusedFieldName);N!=null&&N.imageName&&ne(N.imageName),e.nextTick(()=>{ce()})}),e.watch(()=>{var N;return(N=ae.value)==null?void 0:N.name},()=>{o.value&&e.nextTick(()=>{V.value&&Si(V.value),ce()})}),e.watch(()=>n.visible,N=>{N?(Z(),e.nextTick(()=>{J(),ce()})):V.value&&Si(V.value)}),e.watch(()=>n.defaultImageName,()=>{o.value&&Z()});let $e=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&($e=new ResizeObserver(()=>{J(),e.nextTick(()=>{ce()})}),(N=V.value)!=null&&N.parentElement&&$e.observe(V.value.parentElement))}),e.onUnmounted(()=>{$e&&($e.disconnect(),$e=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)});const fe=()=>{V.value&&Si(V.value),r("update:visible",!1),r("close")};return(N,te)=>{var ra,Ta;const U=e.resolveComponent("el-button"),Ce=e.resolveComponent("el-image"),Me=e.resolveComponent("Loading"),Pe=e.resolveComponent("el-icon");return o.value?(e.openBlock(),e.createElementBlock("div",Uu,[te[12]||(te[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",qu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(j,["stop"])},[te[8]||(te[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:fe},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:te[0]||(te[0]=e.withModifiers(ee=>L(ee,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:te[1]||(te[1]=e.withModifiers(ee=>L(ee,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:te[2]||(te[2]=e.withModifiers(ee=>L(ee,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:te[3]||(te[3]=e.withModifiers(ee=>L(ee,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:te[4]||(te[4]=e.withModifiers(ee=>L(ee,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:te[5]||(te[5]=e.withModifiers(ee=>L(ee,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:te[6]||(te[6]=e.withModifiers(ee=>L(ee,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:te[7]||(te[7]=e.withModifiers(ee=>L(ee,"bottom-right"),["stop"]))},null,32),ae.value?(e.openBlock(),e.createElementBlock("div",Wu,[e.createElementVNode("div",Ku,[e.createElementVNode("div",Gu,[e.createElementVNode("span",Yu,e.toDisplayString(ae.value.name?ae.value.name+(ae.value.url&&ae.value.url.lastIndexOf(".")!==-1?ae.value.url.substring(ae.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ju,[e.createVNode(U,{size:"small",disabled:S.value===0,onClick:Ae},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Xu,e.toDisplayString(S.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(U,{size:"small",disabled:S.value===w.value.length-1,onClick:F},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Zu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ee,pa)=>(e.openBlock(),e.createElementBlock("div",{key:(ee.name||"")+"-"+pa,class:e.normalizeClass(["img-thumb-item",{active:pa===S.value}]),onClick:ue=>me(pa)},[ee!=null&&ee.blobUrl?(e.openBlock(),e.createBlock(Ce,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",ed,"加载失败")),e.createElementVNode("div",ad,e.toDisplayString(ee.name||"-"),1)],10,Qu))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ld,[g.value?(e.openBlock(),e.createElementBlock("div",rd,[e.createVNode(Pe,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),te[11]||(te[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(ra=ae.value)!=null&&ra.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(Ce,{ref_key:"imageRef",ref:$,src:ae.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[ae.value.blobUrl],onLoad:Te},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:V,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",nd,[(Ta=ae.value)!=null&&Ta.url?(e.openBlock(),e.createElementBlock("span",id,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",od,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",td,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),cd=Zl._export_sfc(sd,[["__scopeId","data-v-48a4ecb1"]]),ud={class:"cert-preview-body"},dd={key:0,class:"pdf-preview-container"},pd={class:"thumbs"},fd=["onClick"],hd={class:"thumb-img"},vd=["src"],md={key:1,class:"thumb-loading"},yd={class:"thumb-title"},gd={class:"viewer"},bd={key:0,class:"viewer-img-wrap"},kd=["src"],xd={key:1,class:"viewer-loading"},wd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(""),s=e.ref(""),h=e.computed(()=>(n.versions||[]).find(k=>String(k.versionId)===String(o.value))),c=e.ref({}),d=e.ref(""),m=e.ref("证书附件.pdf"),b=()=>{try{Object.values(c.value||{}).forEach(k=>{k&&URL.revokeObjectURL(k)}),d.value&&URL.revokeObjectURL(d.value)}catch{}c.value={},d.value=""},u=async k=>{if(!k||k.fileType==="pdf")return;const W=Array.isArray(k.images)?k.images:[];for(const I of W){const j=I==null?void 0:I.url;if(!(!j||c.value[j]))try{const L=await A.platformDownloadFile({url:j}),E=URL.createObjectURL(L.data);c.value={...c.value,[j]:E}}catch{}}},C=async k=>{var I;if(!k||k.fileType!=="pdf"){d.value="";return}const W=k.sourceUrl||"";if(!W){d.value="";return}if(d.value){try{URL.revokeObjectURL(d.value)}catch{}d.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:W,versionId:k==null?void 0:k.versionId,certNo:k==null?void 0:k.certNo});const j=await A.platformDownloadFile({url:W});console.log("[CertificatePreview] PDF响应:",{url:W,status:j==null?void 0:j.status,size:(I=j==null?void 0:j.data)==null?void 0:I.size});const L=URL.createObjectURL(j.data);d.value=L;const E=k.certNo?String(k.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(j){console.error("[CertificatePreview] PDF加载失败:",{url:W,error:j}),d.value=""}};e.watch(()=>n.visible,async k=>{var I;if(!k){b();return}const W=(I=n.versions)==null?void 0:I[0];o.value=(W==null?void 0:W.versionId)||"",await u(W),await C(W)},{immediate:!0}),e.watch(()=>o.value,async()=>{var W,I;const k=h.value;if(!k){s.value="",d.value="";return}if(k.fileType==="pdf"){s.value="",await C(k);return}d.value="",s.value=((I=(W=k.images)==null?void 0:W[0])==null?void 0:I.url)||"",await u(k)},{immediate:!0});const M=()=>{r("update:visible",!1),b()};return e.onBeforeUnmount(()=>{b()}),(k,W)=>{const I=e.resolveComponent("el-empty"),j=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,{"model-value":k.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:M},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:M},{default:e.withCtx(()=>W[1]||(W[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[k.versions&&k.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:o.value,"onUpdate:modelValue":W[0]||(W[0]=w=>o.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.versions,w=>(e.openBlock(),e.createBlock(j,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",ud,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",dd,[d.value?(e.openBlock(),e.createBlock(sl.SsFilePreview,{key:1,fileName:m.value,blobUrl:d.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(I,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",pd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],g=>(e.openBlock(),e.createElementBlock("div",{key:g.url,class:e.normalizeClass(["thumb",{active:g.url===s.value}]),onClick:S=>s.value=g.url},[e.createElementVNode("div",hd,[c.value[g.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[g.url]},null,8,vd)):(e.openBlock(),e.createElementBlock("div",md,"加载中"))]),e.createElementVNode("div",yd,e.toDisplayString(g.name),1)],10,fd))),128))]),e.createElementVNode("div",gd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[s.value]?(e.openBlock(),e.createElementBlock("div",bd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[s.value]},null,8,kd)])):(e.openBlock(),e.createElementBlock("div",xd,"加载中"))],64)):(e.openBlock(),e.createBlock(I,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),_d=Zl._export_sfc(wd,[["__scopeId","data-v-220703c0"]]),Sd={class:"ocr-candidate-wrap"},Ed={class:"ocr-candidate-left"},Cd={key:1},Dd={key:0},Td={key:1},Bd={key:2},Nd={key:3},Ad={key:0,class:"ocr-candidate-right"},zd={class:"ocr-candidate-actions"},Md={key:1},Id={class:"dialog-footer"},Od={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const n=(S=[])=>{const $=[],V=ae=>{(ae||[]).forEach(Z=>{if(!Z)return;const me=Z.children||Z.childrens||Z.columns;Array.isArray(me)&&me.length>0?V(me):$.push(Z)})};return V(S),$},r=a,o=l,s=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowAdd)!==!1}),h=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowReplace)!==!1}),c=S=>{if(!S)return[];if(Array.isArray(S))return S;if(typeof S=="string")try{const $=JSON.parse(S);return Array.isArray($)?$:[]}catch{return[]}return[]},d=S=>{o("preview-file",S)},m=e.ref([]),b=e.ref(0),u=e.ref("");e.watch(()=>r.candidates,S=>{var $,V;m.value=(S||[]).map(ae=>({...ae,...(ae==null?void 0:ae.ocrRow)||{},selectedTargetId:(ae==null?void 0:ae.selectedTargetId)||"",__decision:ae==null?void 0:ae.__decision})),b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,S=>{var $,V;S&&(b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||"")});const C=e.computed(()=>{var $;const S=Number(b.value||0);return(($=m.value||[])==null?void 0:$[S])||null}),M=e.computed(()=>(n(r.columns||[])||[]).filter(V=>V&&V.prop).filter(V=>V.type!=="operate"&&V.label!=="操作"&&V.prop!=="operate")),k=e.computed(()=>M.value.filter(S=>S.label!=="证书附件"&&S.prop!=="证书附件")),W=S=>{if(!S)return;const $=(m.value||[]).findIndex(V=>(V==null?void 0:V.idx)===(S==null?void 0:S.idx));$>-1&&(b.value=$,u.value=(S==null?void 0:S.selectedTargetId)||"")},I=S=>{if(!S){u.value="";return}u.value=String((S==null?void 0:S.id)??"")},j=(S,$="")=>{const V=Number(b.value||0),ae=m.value||[],Z=ae[V];Z&&(Z.__decision=S,Z.selectedTargetId=$,u.value=$,m.value=[...ae])},L=()=>j("skip",""),E=()=>j("add",""),x=()=>{if(!u.value){qa.ElMessage.warning("请先选择要替换的目标记录");return}j("replace",u.value)},w=()=>{o("update:visible",!1)},g=()=>{const S=m.value||[];if(S.find(V=>(V==null?void 0:V.__decision)==="replace"&&!(V!=null&&V.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}o("submit",S),o("update:visible",!1)};return(S,$)=>{const V=e.resolveComponent("el-table-column"),ae=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-table"),me=e.resolveComponent("el-button"),Ae=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var F,ne;return[e.createElementVNode("div",Sd,[e.createElementVNode("div",Ed,[$[0]||($[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Z,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:W},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:ce})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ce==null?void 0:ce[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Te=>d({row:ce,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Cd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ce==null?void 0:ce[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(V,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:J})=>[e.createTextVNode(e.toDisplayString(((J==null?void 0:J.candidates)||[]).length),1)]),_:1}),e.createVNode(V,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:J})=>[(J==null?void 0:J.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Dd,"替换")):(J==null?void 0:J.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Td,"新增")):(J==null?void 0:J.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Bd,"跳过")):(e.openBlock(),e.createElementBlock("span",Nd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Ad,[$[4]||($[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",zd,[e.createVNode(me,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(me,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>$[2]||($[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:x,disabled:!h.value||!u.value},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((F=C.value)==null?void 0:F.candidates)||[]).length===0?(e.openBlock(),e.createBlock(Ae,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Z,{data:((ne=C.value)==null?void 0:ne.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:I,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:ce})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ce==null?void 0:ce[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Te=>d({row:ce,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Md,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ce==null?void 0:ce[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Id,[e.createVNode(me,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>$[5]||($[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:g},{default:e.withCtx(()=>$[6]||($[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Ld=Zl._export_sfc(Od,[["__scopeId","data-v-89e0489c"]]),Rd={class:"ocr-preview-content"},$d={class:"ocr-preview-tip"},Vd={class:"ocr-preview-table"},Pd={style:{display:"flex","align-items":"center",gap:"8px"}},Fd={class:"dialog-footer"},jd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref([]),h=e.ref([]);e.watch(()=>n.visible,M=>{M&&(o.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),h.value=[...n.ocrSelectedFields])});const c=(M,k)=>{const W=[...h.value];if(k)W.includes(M)||W.push(M);else{const I=W.indexOf(M);I>-1&&W.splice(I,1)}h.value=W,r("update:ocrSelectedFields",W)},d=(M,k,W)=>{r("fieldChange",{rowIndex:M,prop:k,value:W})},m=()=>{r("update:ocrPreviewData",o.value),r("confirm",o.value),r("update:visible",!1)},b=()=>{r("update:visible",!1)},u=M=>typeof M!="number"?"-":`${(M*100).toFixed(1)}%`,C=M=>typeof M!="number"?"#606266":M>=.9?"#67c23a":M>=.7?"#e6a23c":"#f56c6c";return(M,k)=>{const W=e.resolveComponent("el-alert"),I=e.resolveComponent("el-table-column"),j=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),x=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:b,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Rd,[e.createElementVNode("div",$d,[e.createVNode(W,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Vd,[e.createVNode(E,{data:o.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(I,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",Pd,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:0,"model-value":h.value.includes(w.prop),onChange:g=>c(w.prop,g),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:g,$index:S})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(g[w.prop]),fontWeight:500})},e.toDisplayString(u(g[w.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:g[w.prop],"onUpdate:modelValue":$=>g[w.prop]=$,size:"small",placeholder:"请输入"+w.label,onChange:$=>d(S,w.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fd,[e.createVNode(x,{onClick:b,id:"themeBorderButton"},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(x,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Hd=Zl._export_sfc(jd,[["__scopeId","data-v-df66eb1f"]]),ci=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=oe.analyzeSplitToContent(l,","))==null?void 0:r.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),yn(o)));return n=n==null?void 0:n.join(","),n};function lc(a){return qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function Ud(a){return qa.axios.get(a,{responseType:"blob"})}let Gl="$R",qd="http://222.92.178.198:55002/AIRobot",ft=["Form","BarChart","FormText","FormBlock"];const rc=a=>{var n,r;let l=(r=oe.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=oe.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(ft!=null&&ft.some(o=>l==null?void 0:l.includes(o)))},Wd=async(a,l,n,r)=>{var s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa;let o=a;if(rc(o==null?void 0:o[0])){let ue=Qd(o),ua=(s=ue==null?void 0:ue.filter)==null?void 0:s.join(","),Se=[];(h=ue==null?void 0:ue.hideContents)==null||h.forEach(Ge=>{if(Ge){const da=Ge;da&&Se.push(`(HideGroup=Yes, prop=${da})`)}});let se=(c=ue==null?void 0:ue.formContents)==null?void 0:c.filter(Ge=>{var da;return(da=Ge==null?void 0:Ge.filters)==null?void 0:da.includes("@ShowHide=Hide")});(se==null?void 0:se.length)>0&&(se==null||se.forEach(Ge=>{if(Ge){const da=Ge==null?void 0:Ge.prop;da&&Se.push(`(Hide=Yes, prop=${da})`)}}));let Be=(r==null?void 0:r.menuFilter)??[];return Array.isArray(Be)||(Be=Be?[Be]:[]),Be=[...Be,...Se],{key:"Form",name:ue==null?void 0:ue.groupName,value:ue==null?void 0:ue.formContents,contents:Array.isArray((d=ue==null?void 0:ue.contents)==null?void 0:d[0])&&((b=(m=ue==null?void 0:ue.contents)==null?void 0:m[0])!=null&&b.every(Ge=>Array.isArray(Ge)))?[(C=(u=ue==null?void 0:ue.contents)==null?void 0:u[0])==null?void 0:C[n]]:[ue==null?void 0:ue.contents],filter:"("+ua+")",menuFilter:Be,groupFilter:ue==null?void 0:ue.groupFilters}}else if(((M=o==null?void 0:o[0])==null?void 0:M[0])!=="&"){let ue=oc(o,r),ua="";(k=ue==null?void 0:ue.tableFilter)!=null&&k.includes(Gl)?ue.tableFilter=(W=ue==null?void 0:ue.tableFilter)==null?void 0:W.replace(Gl,""):ua=(L=(j=(I=ue==null?void 0:ue.tableFilter)==null?void 0:I.replace("(",Gl))==null?void 0:j.split(Gl))==null?void 0:L[0];let Se=[];ue!=null&&ue.tableFilter&&((E=oe.analyzeSplitToContent(ue==null?void 0:ue.tableFilter,","))==null||E.forEach(Be=>{Be!=null&&Be.includes("@ShowHide=Hide")&&Se.push("HideGroup=Yes")}));let se=(r==null?void 0:r.menuFilter)??[];return Array.isArray(se)||(se=se?[se]:[]),se=[...se,...Se],{key:"Table",name:ue==null?void 0:ue.groupName,tableColumns:ue==null?void 0:ue.tableColumns,assistColumn:ue==null?void 0:ue.columns,tableContents:l===1?ue==null?void 0:ue.tableContents:(w=(x=ue==null?void 0:ue.tableContents)==null?void 0:x[n])!=null&&w.every(Be=>Array.isArray(Be))?(g=ue==null?void 0:ue.tableContents)==null?void 0:g[n]:[(S=ue==null?void 0:ue.tableContents)==null?void 0:S[n]],filter:ue==null?void 0:ue.tableFilter,menuFilter:se,quotePage:ua!==""?((ae=(V=($=ua==null?void 0:ua.replace("*",Gl))==null?void 0:$.split(Gl))==null?void 0:V[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:ua!==""?((ce=(J=(ne=(F=(Ae=(me=(Z=ua==null?void 0:ua.replace("*",Gl))==null?void 0:Z.split(Gl))==null?void 0:me[1])==null?void 0:Ae.replace("{",Gl))==null?void 0:F.split(Gl))==null?void 0:ne[0])==null?void 0:J.split(":"))==null?void 0:ce.filter(Be=>Be!==""))??[]:[],relatedQuotes:ue==null?void 0:ue.relatedQuotes,fatherSyncContents:ue==null?void 0:ue.fatherSyncContents,sonSyncContents:ue==null?void 0:ue.sonSyncContents}}else{let ue=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ua=o==null?void 0:o[0];ua=ua==null?void 0:ua.slice(1,ua==null?void 0:ua.length),ua=oe.analyzeSplitToContent(ua,":"),ua=ua==null?void 0:ua[(ua==null?void 0:ua.length)-1];let Se=[];Se.push("1");let se=ua==null?void 0:ua.replace("(",Gl);se=(Te=se==null?void 0:se.split(Gl))==null?void 0:Te[0],Se.push(se);let Be=ua==null?void 0:ua.replace("(",Gl);if(Be=($e=Be==null?void 0:Be.split(Gl))==null?void 0:$e[1],Be=(N=(fe=Be==null?void 0:Be.replace(")",Gl))==null?void 0:fe.split(Gl))==null?void 0:N[0],(U=(te=Be==null?void 0:Be.replace(",",Gl))==null?void 0:te.split(Gl))==null||U.forEach(Ge=>{Se.push(Ge)}),Se.push(""),Se.push(""),(Ce=Se==null?void 0:Se[2])!=null&&Ce.includes(".xlsx")||(Me=Se==null?void 0:Se[2])!=null&&Me.includes(".xls"))try{let Ge=qd+"/"+(Se==null?void 0:Se[2]),da=await Ud(Ge),Ja=`生成js函数名称为${Se==null?void 0:Se[1]}的函数,规则为:`+(Se==null?void 0:Se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((da==null?void 0:da.status)===200){let R=da==null?void 0:da.data;const H=new FormData;H.append("file",R,Se==null?void 0:Se[2]),H.append("query",Ja);let X=await lc(H);X=(Ta=(ra=(Pe=X==null?void 0:X.data)==null?void 0:Pe.data)==null?void 0:ra.response)==null?void 0:Ta.replace("generateResult",Se==null?void 0:Se[1]),Se[Se.length-2]=X,Se[Se.length-1]=[{name:(pa=(ee=Se==null?void 0:Se[2])==null?void 0:ee.split("."))==null?void 0:pa[0],url:Ge}]}}catch{}return Se=[Se],{key:"Method",name:[],tableContents:Se,tableColumns:ue}}},Kd=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se;let n=(o=(r=oe.analyzeSplitToContent(a,"="))==null?void 0:r.filter(se=>se!=="="))==null?void 0:o.map(se=>((se==null?void 0:se[(se==null?void 0:se.length)-1])==="="&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),se));if(rc(n==null?void 0:n[1])){let se=Zd(n),Be=(c=(h=(s=se==null?void 0:se.filter)==null?void 0:s.replace("@",Gl))==null?void 0:h.split(Gl))==null?void 0:c[0],Ge=(b=(m=(d=se==null?void 0:se.filter)==null?void 0:d.replace("(",Gl))==null?void 0:m.split(Gl))==null?void 0:b[1],da=(M=(C=(u=se==null?void 0:se.filter)==null?void 0:u.replace("(",Gl))==null?void 0:C.split(Gl))==null?void 0:M[0];da="@"+((k=da==null?void 0:da.split("@"))==null?void 0:k[1]),Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1),Ge=(I=(W=oe.analyzeSplitToContent(Ge,","))==null?void 0:W.map(R=>(R=da+R,R)))==null?void 0:I.join("");let Ja=Be+"("+Ge+")";return{key:"Form",name:se==null?void 0:se.group,filter:Ja,formPage:((E=(L=(j=Be==null?void 0:Be.replace("*",Gl))==null?void 0:j.split(Gl))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((ae=(V=($=(S=(g=(w=(x=Be==null?void 0:Be.replace("*",Gl))==null?void 0:x.split(Gl))==null?void 0:w[1])==null?void 0:g.replace("{",Gl))==null?void 0:S.split(Gl))==null?void 0:$[0])==null?void 0:V.split(":"))==null?void 0:ae.filter(R=>R!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let se=oc(n,l,n==null?void 0:n[1]),Be="";(Z=se==null?void 0:se.tableFilter)!=null&&Z.includes(Gl)?se.tableFilter=(me=se==null?void 0:se.tableFilter)==null?void 0:me.replace(Gl,""):Be=(ne=(F=(Ae=se==null?void 0:se.tableFilter)==null?void 0:Ae.replace("(",Gl))==null?void 0:F.split(Gl))==null?void 0:ne[0];let Ge=(Te=(ce=(J=se==null?void 0:se.tableFilter)==null?void 0:J.replace("(",Gl))==null?void 0:ce.split(Gl))==null?void 0:Te[0];Ge=[{menus:(fe=($e=Ge==null?void 0:Ge.split("*"))==null?void 0:$e[0])==null?void 0:fe.replaceAll(":","/"),groups:((te=(N=Ge==null?void 0:Ge.split("*"))==null?void 0:N[1])==null?void 0:te.split(":"))??[]}];let da=(Me=(Ce=(U=se==null?void 0:se.tableFilter)==null?void 0:U.replace("(",Gl))==null?void 0:Ce.split(Gl))==null?void 0:Me[1];(da==null?void 0:da[(da==null?void 0:da.length)-1])===")"&&(da=da==null?void 0:da.slice(0,(da==null?void 0:da.length)-1));let Ja=[];se!=null&&se.tableFilter&&((Pe=oe.analyzeSplitToContent(se==null?void 0:se.tableFilter,","))==null||Pe.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ja.push("HideGroup=Yes")}));let R=(l==null?void 0:l.menuFilter)??[];return Array.isArray(R)||(R=R?[R]:[]),R=[...R,...Ja],{key:"Table",name:se==null?void 0:se.groupName,filter:se==null?void 0:se.tableFilter,tableColumns:se==null?void 0:se.tableColumns,quotePage:Be!==""?((ee=(Ta=(ra=Be==null?void 0:Be.replace("*",Gl))==null?void 0:ra.split(Gl))==null?void 0:Ta[0])==null?void 0:ee.replaceAll(":","/"))??"":void 0,quoteGroup:Be!==""?((Se=(ua=(ue=(pa=Be==null?void 0:Be.replace("*",Gl))==null?void 0:pa.split(Gl))==null?void 0:ue[1])==null?void 0:ua.split(":"))==null?void 0:Se.filter(H=>H!==""))??[]:[],menuFilter:R,relatedQuotes:Ge,fatherSyncContents:(se==null?void 0:se.fatherSyncContents)??[],sonSyncContents:(se==null?void 0:se.sonSyncContents)??[]}}},Gd=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(o,s)=>{let h=[];o=o==null?void 0:o.map(async c=>{var d,m;if(h.push(c),((d=oe.analyzeSplitToContent(a,"="))==null?void 0:d.length)<=2){if(((m=oe.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const b=await Wd(oe.analyzeSplitToContent(a,"="),r,s,c);h.push(b)}}else h.push(Kd(a,c))}),await Promise.all(o),n.push(h)}),await Promise.all(l),n};let qi="/",Yd="$",_n="$R";const nc=a=>{var n,r,o;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((h,c)=>c!==0);s=s==null?void 0:s.join(""),s=oe.analyzerSplitToWord(s,")"),(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.join(""):s=(n=s==null?void 0:s.filter((h,c)=>c!==(s==null?void 0:s.length)-1))==null?void 0:n.join(""):s=s==null?void 0:s[0],l="("+s,((o=a==null?void 0:a[0])==null?void 0:o[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ic=(a,l=[])=>{let n=(a==null?void 0:a.map(s=>{var h,c;return(c=s==null?void 0:s.key)==null?void 0:c.slice(1,(h=s==null?void 0:s.key)==null?void 0:h.length)}))??[],r=[];n==null||n.forEach(s=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Yd)){let Ae="",F=!0,ne=oe.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(Ae="("+((h=oe.analyzerSplitToWord(ne==null?void 0:ne[1],")"))==null?void 0:h[0]),((d=ne==null?void 0:ne[0])==null?void 0:d[((c=ne==null?void 0:ne[0])==null?void 0:c.length)-2])==="@"&&(Ae="@"+Ae));let J=s;J=J==null?void 0:J.replace(Ae,""),Ae=yn(Ae),Ae=(m=oe.analyzeSplitToContent(Ae,","))==null?void 0:m.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)),Ae!=null&&Ae.includes("@ShowHide=Hide")&&(F=!1);let ce=(b=J==null?void 0:J.replace("$",_n))==null?void 0:b.split(_n),Te=ce==null?void 0:ce[1],$e=ce==null?void 0:ce[0];$e!=null&&$e.includes("[")&&($e=(C=(u=$e==null?void 0:$e.replace("[",_n))==null?void 0:u.split(_n))==null?void 0:C[0],Te=Te+":["+((W=(k=(M=ce==null?void 0:ce[0])==null?void 0:M.replace("[",_n))==null?void 0:k.split(_n))==null?void 0:W[1])),$e=(j=(I=$e==null?void 0:$e.replaceAll(":","/"))==null?void 0:I.replaceAll("{",""))==null?void 0:j.replaceAll("}",""),($e==null?void 0:$e[($e==null?void 0:$e.length)-1])!=="/"&&($e=$e+"/"),Te=((L=$e==null?void 0:$e.split("/"))==null?void 0:L[0])+":"+Te;let N="";if(!(Te!=null&&Te.includes("[")))N=Te==null?void 0:Te.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:Ae,fatherPath:$e});else{let te=(x=(E=Te==null?void 0:Te.replace("[",_n))==null?void 0:E.split(_n))==null?void 0:x[1];te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1),te=(w=oe.analyzeSplitToContent(te,","))==null?void 0:w.map(U=>((U==null?void 0:U[(U==null?void 0:U.length)-1])===","&&(U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1)),U)),te==null||te.forEach(U=>{var Ce,Me;N=((Me=(Ce=Te==null?void 0:Te.replace("[",_n))==null?void 0:Ce.split(_n))==null?void 0:Me[0])+U,N=N==null?void 0:N.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:Ae,fatherPath:$e})})}}else{let Ae="",F=!0,ne=oe.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(Ae=(g=nc(ne))==null?void 0:g.filter);let J=s;if(J=J==null?void 0:J.replace(Ae,""),(Ae==null?void 0:Ae[0])==="("){Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1);let Te=[];(S=oe.analyzeSplitToContent(Ae,","))==null||S.forEach($e=>{($e==null?void 0:$e[($e==null?void 0:$e.length)-1])===","&&($e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])==="("&&($e=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),Te.push(yn($e))}),Ae=Te==null?void 0:Te.join(",")}else Ae=yn(Ae);Ae=($=oe.analyzeSplitToContent(Ae,","))==null?void 0:$.map(Te=>((Te==null?void 0:Te[(Te==null?void 0:Te.length)-1])===","&&(Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1)),Te)),Ae!=null&&Ae.includes("@ShowHide=Hide")&&(F=!1),(J==null?void 0:J[(J==null?void 0:J.length)-1])==="}"&&(J=J+":"),J=(V=J==null?void 0:J.replaceAll("{",""))==null?void 0:V.replaceAll("}","");let ce="";if(J!=null&&J.includes("[")){let Te=(ae=J==null?void 0:J.replace("[",_n))==null?void 0:ae.split(_n),$e=Te==null?void 0:Te[1];$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),(me=(Z=oe.analyzeSplitToContent($e,","))==null?void 0:Z.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe)))==null||me.forEach(fe=>{ce=(Te==null?void 0:Te[0])+fe,ce=ce==null?void 0:ce.replaceAll(":","/"),r==null||r.push({path:ce,isShow:F,filter:Ae})})}else ce=J==null?void 0:J.replaceAll(":","/"),r==null||r.push({path:ce,isShow:F,filter:Ae})}});let o=A.cloneDeep(r);return(l==null?void 0:l.length)>0&&(o=l),o=o==null?void 0:o.filter(s=>{var h,c,d,m;return!(s!=null&&s.fatherPath)&&((c=(h=s==null?void 0:s.path)==null?void 0:h.split(qi))==null?void 0:c.length)>1&&((m=(d=s==null?void 0:s.path)==null?void 0:d.split(qi))==null?void 0:m[1])===""}),o=o==null?void 0:o.map(s=>{var h;return s.path=(h=s.path)==null?void 0:h.replace(qi,""),s.path}),(o==null?void 0:o.length)>0&&(r=r==null?void 0:r.map(s=>{var c,d,m,b,u,C,M;let h=o==null?void 0:o.find(k=>{var W;return(W=s==null?void 0:s.path)==null?void 0:W.includes(k)});return!(s!=null&&s.fatherPath)&&h&&!((c=s==null?void 0:s.path)!=null&&c.includes(qi))&&!(o!=null&&o.find(k=>(s==null?void 0:s.path)===k))&&(s.path=h+qi+((M=(m=(d=s==null?void 0:s.path)==null?void 0:d.split(h))==null?void 0:m[1])==null?void 0:M.slice(1,(C=(u=(b=s==null?void 0:s.path)==null?void 0:b.split(h))==null?void 0:u[1])==null?void 0:C.length))),s})),r},Jd=(a,l)=>ic([{key:a}],l),Xd=async(a,l)=>{const n=[],r=Jd(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(s=>{n.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await Gd(a==null?void 0:a.value,n)};let ml="$R",Ki="[Any]";const Zd=a=>{var h,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let o=a==null?void 0:a[1],s;return o!=null&&o.includes("{")?s=(c=(h=o==null?void 0:o.replaceAll("{",""))==null?void 0:h.replaceAll("}",""))==null?void 0:c.replaceAll(Ki,""):s=o==null?void 0:o.replaceAll(Ki,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Qd=a=>{var C,M,k,W,I,j;let l=[],n=[],r=[],o=[],s=[],h=[],c="",d=a==null?void 0:a[0];(d==null?void 0:d[0])==="*"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length));let m=oe.analyzeSplitToContent(d,":");(C=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||C.forEach(L=>{var x,w,g;(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));let E=oe.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(x=nc(E))==null?void 0:x.filter;let S=L==null?void 0:L.replace(c,"");if(r.push(S),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let $=[];(w=oe.analyzeSplitToContent(c,","))==null||w.forEach(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==null?void 0:V[0])==="("&&(V=V==null?void 0:V.slice(1,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])!=="@"&&(V="@"+V),$.push(yn(V))}),c=$==null?void 0:$.join(",")}else c=yn(c);c=(g=oe.analyzeSplitToContent(c,","))==null?void 0:g.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$)),c!=null&&c.includes("@ShowHide=Hide")&&h.push(S),o=[...o,...c]}else r.push(E==null?void 0:E[0])});let b=(M=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:M[0],u=(k=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:k[0];return l=Ni(u??""),l!=null&&l.every(L=>Array.isArray(L))&&(l=[l]),(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)),s=(W=oe.analyzeSplitToContent(b,"@"))==null?void 0:W[1],s="@"+s,b=b==null?void 0:b.replace(s,""),s=yn(s),s=(I=oe.analyzeSplitToContent(s,","))==null?void 0:I.map(L=>((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)),(b==null?void 0:b[0])==="{"&&(b=b==null?void 0:b.slice(1,(b==null?void 0:b.length)-1)),b=(j=oe.analyzeSplitToContent(b,","))==null?void 0:j.map(L=>((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)),b==null||b.forEach((L,E)=>{var ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha;let x=[],w=[],g=[],S="",$="",V=!1,ae,Z=[],me=[],Ae=[],F="Input",ne=[],J=[];if(L!=null&&L.includes("==")){ae=(ce=L==null?void 0:L.split("=="))==null?void 0:ce[0];let Ca=(Te=L==null?void 0:L.split("=="))==null?void 0:Te[1],Ne="";(($e=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:$e.length)>1&&((fe=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:fe[0])!=="$"?(Ne=(N=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:N[0],Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)):((te=oe.analyzeSplitToContent(Ca,"}"))==null?void 0:te.length)>1&&(Ne=(U=oe.analyzeSplitToContent(Ca,"}"))==null?void 0:U[1]);let ye=Ca==null?void 0:Ca.replace(Ne,"");if((Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),(Ce=oe.analyzeSplitToContent(Ne,","))==null||Ce.forEach(Y=>{var pe;(Y==null?void 0:Y[0])!=="@"&&(Y="@"+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));let xe=yn(Y);(pe=oe.analyzeSplitToContent(xe,","))==null||pe.forEach(qe=>{(qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===","&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),x.push(qe)})}),(ye==null?void 0:ye[0])==="$"&&(ye=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length)),ye!=null&&ye.includes("&")){let Y=ye;if((ye==null?void 0:ye[0])==="("){let pe=(Me=oe.analyzeSplitToContent(ye,"&"))==null?void 0:Me.map(qe=>((qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])==="&"&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),qe));Y=pe==null?void 0:pe[1],pe=pe==null?void 0:pe[0],(pe==null?void 0:pe[0])!=="@"&&(pe="@"+pe),S=yn(pe)}(Y==null?void 0:Y[0])==="&"&&(Y=Y==null?void 0:Y.slice(1,Y==null?void 0:Y.length)),$=(ra=(Pe=Y==null?void 0:Y.replace("(",ml))==null?void 0:Pe.split(ml))==null?void 0:ra[0],g=(ee=(Ta=Y==null?void 0:Y.replace("(",ml))==null?void 0:Ta.split(ml))==null?void 0:ee[1],g=[g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)],F="Input"}else{let Y=(pa=ye==null?void 0:ye.replace("*",ml))==null?void 0:pa.split(ml);Z=(ue=Y==null?void 0:Y[0])==null?void 0:ue.split(":"),me=(Se=(ua=oe.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:ua.filter((xe,pe)=>{var qe,sa;return pe!==((sa=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:sa.length)-1}))==null?void 0:Se.map(xe=>((xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe)),Ae=(Be=(se=oe.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:se.filter((xe,pe)=>{var qe,sa;return pe===((sa=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:sa.length)-1}))==null?void 0:Be[0],Ae=(da=(Ge=Ae==null?void 0:Ae.replaceAll("{",""))==null?void 0:Ge.replaceAll("}",""))==null?void 0:da.split(":"),F="Select"}}else if(((Ja=oe.analyzeSplitToContent(L,"="))==null?void 0:Ja.length)>1)if(F="Select",ae=(H=(R=L==null?void 0:L.replace("=",ml))==null?void 0:R.split(ml))==null?void 0:H[0],!(L!=null&&L.includes("If")))ne=(he=(X=L==null?void 0:L.replace("=",ml))==null?void 0:X.split(ml))==null?void 0:he[1],ne=ne==null?void 0:ne.split("||");else{let Ca=(ma=(de=L==null?void 0:L.replace("=",ml))==null?void 0:de.split(ml))==null?void 0:ma[1];J=(oa=oe.analyzeSplitToContent(Ca,")"))==null?void 0:oa.filter(Ne=>!(Ne!=null&&Ne.includes("If"))),J=J==null?void 0:J.map(Ne=>((Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),Ne=Ne==null?void 0:Ne.split("||"),Ne)),w=(Ve=oe.analyzeSplitToContent(Ca,")"))==null?void 0:Ve.filter(Ne=>Ne==null?void 0:Ne.includes("If")),w=w==null?void 0:w.map(Ne=>((Ne==null?void 0:Ne[0])==="|"&&(Ne=Ne==null?void 0:Ne.slice(2,Ne==null?void 0:Ne.length)),(Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),(Ne==null?void 0:Ne[0])!=="@"&&(Ne="@"+Ne),Ne))}else if(((_a=oe.analyzeSplitToContent(L,"@"))==null?void 0:_a.length)>1){ae=(ze=oe.analyzeSplitToContent(L,"@"))==null?void 0:ze[0],(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])==="@"&&(ae=ae==null?void 0:ae.slice(0,(ae==null?void 0:ae.length)-1));let Ca="@"+((ya=oe.analyzeSplitToContent(L,"@"))==null?void 0:ya[1]);Ca=yn(Ca),x=(La=oe.analyzeSplitToContent(Ca,","))==null?void 0:La.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===","&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ne)),x!=null&&x.find(Ne=>Ne==null?void 0:Ne.includes("@Type"))&&(F=(ha=(za=x==null?void 0:x.find(Ne=>Ne==null?void 0:Ne.includes("@Type")))==null?void 0:za.split("="))==null?void 0:ha[1])}else ae=L;x!=null&&x.includes("@ShowHide=Hide")&&(V=!0),n.push({prop:ae,label:ae,value:"",menuPath:Z,groups:me,columns:Ae,type:F,options:ne,allContents:J,filters:x,width:b==null?void 0:b.length,isFormColHidden:V,filterContents:w,functionName:$,functionRelatedWords:g,calculatorFilter:S})}),{groupName:r,groupFilters:o,formContents:n,contents:l,filter:s,hideContents:h}},Ni=a=>{var r,o;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=oe.analyzeSplitToContent(n,","))==null||r.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)),l.push(s??"")});else{let s=[];(o=oe.analyzeSplitToContent(n,","))==null||o.forEach(h=>{(h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),s.push(Ni(h))}),l=s}return l},bt=(a,l)=>{var j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va;let n,r=[],o=[],s=[],h=[],c=[],d=[],m=[],b="Input",u,C="",M="",k="",W=[],I="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],u=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],b="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(x=(E=a==null?void 0:a.replace("=",ml))==null?void 0:E.split(ml))==null?void 0:x[1])!=null&&w.includes("If")))if(n=oe.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(S=(g=n==null?void 0:n.replace("=",ml))==null?void 0:g.split(ml))==null?void 0:S[0],n!=null&&n.includes("&")&&(n=(V=($=n==null?void 0:n.replace("&",ml))==null?void 0:$.split(ml))==null?void 0:V[0]),u=n,((ae=oe.analyzeSplitToContent(a,"@"))==null?void 0:ae.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ue=(Z=oe.analyzeSplitToContent(a,"@"))==null?void 0:Z[1];if((Ue==null?void 0:Ue[0])!=="@"&&(Ue="@"+Ue),Ue=yn(Ue),M=Ue,M!=null&&M.includes("@Type")){let Ie=oe.analyzeSplitToContent(M,",");Ie=Ie==null?void 0:Ie.map(aa=>((aa==null?void 0:aa[(aa==null?void 0:aa.length)-1])===","&&(aa=aa==null?void 0:aa.slice(0,(aa==null?void 0:aa.length)-1)),aa)),Ie=(me=Ie==null?void 0:Ie.filter(aa=>aa==null?void 0:aa.includes("@Type")))==null?void 0:me[0],b=(Ae=Ie==null?void 0:Ie.split("="))==null?void 0:Ae[1]}else b="Input"}}else if(a!=null&&a.includes("||")){let Ue=[];r=(J=(ne=(F=oe.analyzeSplitToContent(a,"="))==null?void 0:F[1])==null?void 0:ne.split("||"))==null?void 0:J.map(aa=>{var We,tl,Cl,El;let ke=aa;if(ke!=null&&ke.includes("@")){let Vl="@"+((tl=(We=ke==null?void 0:ke.replace("@",ml))==null?void 0:We.split(ml))==null?void 0:tl[1]);ke=(El=(Cl=ke==null?void 0:ke.replace("@",ml))==null?void 0:Cl.split(ml))==null?void 0:El[0],Vl=ci(Vl),Ue.push(Vl)}return{label:ke==null?void 0:ke.replaceAll("'",""),value:ke==null?void 0:ke.replaceAll("'","")}}),(Ue==null?void 0:Ue.length)>0&&(M="("+(Ue==null?void 0:Ue.join("||"))+")");let Ie=(ce=oe.analyzeSplitToContent(a,"="))==null?void 0:ce[0];if(Ie!=null&&Ie.includes("@")){(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])==="="&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1));let aa=(Te=oe.analyzeSplitToContent(Ie,"@"))==null?void 0:Te[1];aa="@"+aa,aa=ci(aa),M=M===""?aa:aa+","+M}}else b="Input",C=(N=(fe=($e=a==null?void 0:a.replace("=",ml))==null?void 0:$e.split(ml))==null?void 0:fe[1])==null?void 0:N.replaceAll("'","");else if((U=(te=oe.analyzeSplitToContent(a,"="))==null?void 0:te[1])!=null&&U.includes("||")){let Ue=(Ce=oe.analyzeSplitToContent(a,"="))==null?void 0:Ce[0];if((Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])==="="&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1)),Ue!=null&&Ue.includes("@")){let We=(Me=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:Me[1];We="@"+We,M=ci(We),n=(ee=(Pe=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:Pe[0])==null?void 0:ee.slice(0,((Ta=(ra=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:ra[0])==null?void 0:Ta.length)-1),u=(Se=(pa=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:pa[0])==null?void 0:Se.slice(0,((ua=(ue=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:ue[0])==null?void 0:ua.length)-1)}else n=Ue,u=Ue;let Ie=(se=oe.analyzeSplitToContent(a,"="))==null?void 0:se[1];Ie=oe.analyzeSplitToContent(Ie,")");let aa=Ie==null?void 0:Ie.filter(We=>!(We!=null&&We.includes("If")));aa==null||aa.forEach(We=>{(We==null?void 0:We[0])==="("&&(We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1)),o==null||o.push(We==null?void 0:We.split("||"))});let ke=Ie==null?void 0:Ie.filter(We=>We==null?void 0:We.includes("If"));ke=ke==null?void 0:ke.map(We=>((We==null?void 0:We[0])==="|"&&(We==null?void 0:We[1])==="|"&&(We=We==null?void 0:We.slice(2,We==null?void 0:We.length)),(We==null?void 0:We[0])==="("&&(We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1)),(We==null?void 0:We[0])!=="@"&&(We="@"+We),We)),s=ke}else{let Ue=a==null?void 0:a.split("=="),Ie=(Be=Ue==null?void 0:Ue.filter(aa=>(aa==null?void 0:aa.includes("$"))&&(aa==null?void 0:aa[0])!=="{"))==null?void 0:Be[0];if(Ie&&!(Ie!=null&&Ie.includes("&"))){let aa=(da=oe.analyzeSplitToContent(Ie,")"))==null?void 0:da[((Ge=oe.analyzeSplitToContent(Ie,")"))==null?void 0:Ge.length)-1],ke=(Ja=aa==null?void 0:aa.replace("*",ml))==null?void 0:Ja.split(ml),We=(ke==null?void 0:ke[0])===""?l==null?void 0:l.value:ke==null?void 0:ke[0];(We==null?void 0:We[0])==="("&&(We=(R=oe.analyzeSplitToContent(We,")"))==null?void 0:R[1]),We=(X=(H=We==null?void 0:We.replaceAll("{",""))==null?void 0:H.replaceAll("}",""))==null?void 0:X.replaceAll(Ki,""),(We==null?void 0:We[0])==="$"&&(We=(he=We==null?void 0:We.slice(1,We==null?void 0:We.length))==null?void 0:he.replaceAll(":","/")),h=We==null?void 0:We.split("/");let tl=(ma=(de=ke==null?void 0:ke[1])==null?void 0:de.replace("{",ml))==null?void 0:ma.split(ml),Cl=tl==null?void 0:tl[0];(Cl==null?void 0:Cl[(Cl==null?void 0:Cl.length)-1])===":"&&(Cl=Cl==null?void 0:Cl.slice(0,(Cl==null?void 0:Cl.length)-1)),c=Cl==null?void 0:Cl.split(":"),d=(ze=(_a=(Ve=(oa=tl==null?void 0:tl[1])==null?void 0:oa.replace("}",ml))==null?void 0:Ve.split(ml))==null?void 0:_a[0])==null?void 0:ze.split(":");let El="";((ya=oe.analyzeSplitToContent(Ie,")"))==null?void 0:ya.length)>1&&(El=(La=oe.analyzeSplitToContent(Ie,")"))==null?void 0:La[0]),El&&El!==""&&((El==null?void 0:El[0])!=="@"&&(El="@"+El),M=ci(El))}if(Ue!=null&&Ue.some(aa=>aa==null?void 0:aa.includes("&"))){let aa=(za=Ue==null?void 0:Ue.filter(tl=>tl==null?void 0:tl.includes("&")))==null?void 0:za[0];aa=(ha=oe.analyzeSplitToContent(aa,"&"))==null?void 0:ha.map(tl=>((tl==null?void 0:tl[(tl==null?void 0:tl.length)-1])==="&"&&(tl=tl==null?void 0:tl.slice(0,(tl==null?void 0:tl.length)-1)),tl)),k=(ye=(Ne=(Ca=aa==null?void 0:aa[1])==null?void 0:Ca.replace("(",ml))==null?void 0:Ne.split(ml))==null?void 0:ye[0];let ke=(Y=oe.analyzeSplitToContent(aa==null?void 0:aa[1],")"))==null?void 0:Y[0];ke=(pe=(xe=ke==null?void 0:ke.replace("(",ml))==null?void 0:xe.split(ml))==null?void 0:pe[1],ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1),(ke==null?void 0:ke[0])==="{"&&(ke=ke==null?void 0:ke.slice(1,ke==null?void 0:ke.length)),(ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])==="}"&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),W=ke==null?void 0:ke.split(",");let We=aa==null?void 0:aa[0];We&&We!==""&&((We==null?void 0:We[0])!=="@"&&(We="@"+We),I=ci(We))}else if(!Ie&&((qe=Ue==null?void 0:Ue.filter(aa=>(aa==null?void 0:aa[0])==="{"))==null?void 0:qe.length)>0){let aa=Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1];aa=aa==null?void 0:aa.slice(1,(aa==null?void 0:aa.length)-1),aa=oe.analyzeSplitToContent(aa,","),aa=aa==null?void 0:aa.map(ke=>((ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])===","&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),ke)),aa=aa==null?void 0:aa.map(ke=>{var We,tl,Cl,El;if(ke=ke==null?void 0:ke.replaceAll("$",""),ke!=null&&ke.includes("{")){let Vl="";ke=ke==null?void 0:ke.replaceAll("{","");let _l=ke==null?void 0:ke.split("}");Vl=((tl=(We=_l==null?void 0:_l[0])==null?void 0:We.split(":"))==null?void 0:tl[0])+":"+(_l==null?void 0:_l[1]),ke=Vl,ke=ke+":"}if(ke!=null&&ke.includes(Ki)){let Vl="",_l=ke==null?void 0:ke.split(Ki);Vl=((El=(Cl=_l==null?void 0:_l[0])==null?void 0:Cl.split(":"))==null?void 0:El[0])+":"+(_l==null?void 0:_l[1]),ke=Vl,ke=ke+":"}return ke=ke==null?void 0:ke.replaceAll(":","/"),ke}),m=aa}else!((sa=Ue==null?void 0:Ue[1])!=null&&sa.includes("$"))&&(($a=Ue==null?void 0:Ue[1])==null?void 0:$a[0])!=="("&&d.push(Ue==null?void 0:Ue[1])}else n=(Ma=a==null?void 0:a.split("&"))==null?void 0:Ma[0],u=(Va=a==null?void 0:a.split("&"))==null?void 0:Va[0];return(r==null?void 0:r.length)===0&&(o==null?void 0:o.length)===0&&(h==null?void 0:h.length)===0&&b==="Select"&&(b="Input"),{label:n,prop:u,options:r,allContents:o,filterContents:s,menus:h,groups:c,words:d,align:"center",formType:b,filter:M,functionName:k,functionRelatedWords:W,calculatorFilter:I,relatedPages:m,value:C}},Ao=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((h=(s=(o=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",ml))==null?void 0:o.split(ml))==null?void 0:s[0])!=null&&h.includes(","))){let ce=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Te=(c=ce==null?void 0:ce.replace(":",ml))==null?void 0:c.split(ml);if(((d=oe.analyzeSplitToContent(Te==null?void 0:Te[1],"="))==null?void 0:d.length)===1){let $e=Te==null?void 0:Te[0],fe=[];(u=oe.analyzeSplitToContent((b=Te==null?void 0:Te[1])==null?void 0:b.slice(1,((m=Te==null?void 0:Te[1])==null?void 0:m.length)-1),","))==null||u.forEach(N=>{var te,U;((te=oe.analyzeSplitToContent(N,"="))==null?void 0:te.length)>1?((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),fe=[...fe,...Ao(N,l)]):((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),fe.push((U=Ao(N,l))==null?void 0:U[0]))}),n==null||n.push({label:$e,prop:$e,children:fe,align:"center"})}else{let $e=[];if(((C=oe.analyzeSplitToContent(ce,"="))==null?void 0:C.length)>=2){let N=(M=oe.analyzeSplitToContent(ce,"="))==null?void 0:M[1],te=(k=oe.analyzeSplitToContent(N,"/"))==null?void 0:k.map(U=>((U==null?void 0:U[(U==null?void 0:U.length)-1])==="/"&&(U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1)),U));$e=te==null?void 0:te.map(U=>(U=Ni(U),U))}let fe=(x=(E=(L=(j=(I=(W=ce==null?void 0:ce.replace("{",ml))==null?void 0:W.split(ml))==null?void 0:I[1])==null?void 0:j.replace("}",ml))==null?void 0:L.split(ml))==null?void 0:E[0])==null?void 0:x.split(",");fe==null||fe.forEach((N,te)=>{($e==null?void 0:$e.length)>0&&te===0?n==null||n.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:$e==null?void 0:$e.map(U=>{let Ce={};return fe==null||fe.forEach((Me,Pe)=>{Ce[Me]=U==null?void 0:U[Pe]}),Ce}),options:$e==null?void 0:$e.map(U=>({label:U==null?void 0:U[0],value:U==null?void 0:U[0]})),mainKey:!0}):n==null||n.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=oe.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((S=(g=oe.analyzeSplitToContent(a,"="))==null?void 0:g[1])==null?void 0:S[0])==="["){let ce=[];if((($=oe.analyzeSplitToContent(a,"="))==null?void 0:$.length)>=2){let $e=(V=oe.analyzeSplitToContent(a,"="))==null?void 0:V[1],fe=(Z=(ae=oe.analyzeSplitToContent($e,"|"))==null?void 0:ae.filter(N=>N!=="|"))==null?void 0:Z.map(N=>((N==null?void 0:N[(N==null?void 0:N.length)-1])==="|"&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),N));ce=fe==null?void 0:fe.map(N=>(N=Ni(N),N))}let Te=(Ae=(me=a==null?void 0:a.replace("}",ml))==null?void 0:me.split(ml))==null?void 0:Ae[0];Te=(F=Te==null?void 0:Te.slice(1,Te==null?void 0:Te.length))==null?void 0:F.split(","),Te==null||Te.forEach(($e,fe)=>{(ce==null?void 0:ce.length)>0&&fe===0?n==null||n.push({label:$e,prop:$e,align:"center",formType:"Select",relatedContents:ce==null?void 0:ce.map(N=>{let te={};return Te==null||Te.forEach((U,Ce)=>{te[U]=N==null?void 0:N[Ce]}),te}),options:ce==null?void 0:ce.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):n==null||n.push({label:$e,prop:$e,align:"center"})})}else(ne=oe.analyzeSplitToContent(a,","))==null||ne.forEach(ce=>{var Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if((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)),(ce==null?void 0:ce[0])==="{"){let pe=oe.analyzeSplitToContent(ce,"="),qe=pe==null?void 0:pe[(pe==null?void 0:pe.length)-1],sa=[],$a=[],Ma=[],Va="",Ue="",Ie=[],aa=[],ke=(Te=qe==null?void 0:qe.replace("*",ml))==null?void 0:Te.split(ml),We=(ke==null?void 0:ke[0])===""?l==null?void 0:l.value:ke==null?void 0:ke[0];We=oe.analyzeSplitToContent(We,")");let tl="";if((We==null?void 0:We.length)>1&&(($e=We==null?void 0:We[0])==null?void 0:$e[0])!=="&"&&(tl=We==null?void 0:We[0],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ue=tl??""),We=(fe=We==null?void 0:We.filter(Qe=>(Qe==null?void 0:Qe[0])==="$"))==null?void 0:fe[0],((N=oe.analyzeSplitToContent(We,"}"))==null?void 0:N.length)>1&&((U=(te=oe.analyzeSplitToContent(We,"}"))==null?void 0:te[1])==null?void 0:U[0])==="("&&(tl=(Ce=oe.analyzeSplitToContent(We,"}"))==null?void 0:Ce[1],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ue!==""&&(Ue=Ue+","),Ue=Ue+tl),(Me=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1))!=null&&Me.includes("$")||(We=(Pe=oe.analyzeSplitToContent(We,"}"))==null?void 0:Pe[0]),(We==null?void 0:We[0])==="$"&&(We=(ra=We==null?void 0:We.replace("{",""))==null?void 0:ra.replace("}",":"),We=(Ta=We==null?void 0:We.slice(1,We==null?void 0:We.length))==null?void 0:Ta.replaceAll(":","/")),We!=null&&We.includes("$")){let Qe=(ee=We==null?void 0:We.split("$"))==null?void 0:ee[0];Qe=(pa=Qe==null?void 0:Qe.split("/"))==null?void 0:pa[0],We=Qe+"/"+((ue=We==null?void 0:We.split("$"))==null?void 0:ue[1])+"/"}sa=(We==null?void 0:We.split("/"))??[];let Cl=(Se=(ua=ke==null?void 0:ke[1])==null?void 0:ua.replace("{",ml))==null?void 0:Se.split(ml);if((Ge=(Be=(se=ke==null?void 0:ke[1])==null?void 0:se.split("(@"))==null?void 0:Be[0])!=null&&Ge.includes("&&")||(R=(Ja=(da=ke==null?void 0:ke[1])==null?void 0:da.split("@"))==null?void 0:Ja[0])!=null&&R.includes("&&")){let Qe=(H=ke==null?void 0:ke[1])!=null&&H.includes("(@")?(de=(he=(X=ke==null?void 0:ke[1])==null?void 0:X.split("(@"))==null?void 0:he[0])==null?void 0:de.split("&&"):(Ve=(oa=(ma=ke==null?void 0:ke[1])==null?void 0:ma.split("@"))==null?void 0:oa[0])==null?void 0:Ve.split("&&");Ie=Qe==null?void 0:Qe.map(ba=>{var ll,Ia;return(ba==null?void 0:ba[0])==="*"&&(ba=ba==null?void 0:ba.slice(1,ba==null?void 0:ba.length)),ba=(Ia=(ll=ba==null?void 0:ba.replace("{",ml))==null?void 0:ll.split(ml))==null?void 0:Ia[0],(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])===":"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1)),ba=ba==null?void 0:ba.split(":"),ba});let Xa=[];Qe==null||Qe.forEach((ba,ll)=>{var Ia,il;(ba==null?void 0:ba[0])==="*"&&(ba=ba==null?void 0:ba.slice(1,ba==null?void 0:ba.length)),ba=(il=(Ia=ba==null?void 0:ba.replace("{",ml))==null?void 0:Ia.split(ml))==null?void 0:il[1],(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])==="}"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1)),ba=ba==null?void 0:ba.split(","),Xa.push(ll===0?(ba==null?void 0:ba.length)-1:ba==null?void 0:ba.length),aa=[...aa,...ba]}),Xa=(_a=oe.prefixSum(Xa))==null?void 0:_a.map(ba=>ba==null?void 0:ba.total),Ie=Ie==null?void 0:Ie.map((ba,ll)=>({number:Xa==null?void 0:Xa[ll],contents:ba}))}let El=Cl==null?void 0:Cl[0];(El==null?void 0:El[(El==null?void 0:El.length)-1])===":"&&(El=El==null?void 0:El.slice(0,(El==null?void 0:El.length)-1)),$a=(El==null?void 0:El.split(":"))??[],Ma=((za=(La=(ya=(ze=Cl==null?void 0:Cl[1])==null?void 0:ze.replace("}",ml))==null?void 0:ya.split(ml))==null?void 0:La[0])==null?void 0:za.split(","))??[];let Vl=(Ca=pe==null?void 0:pe[0])==null?void 0:Ca.slice(1,((ha=pe==null?void 0:pe[0])==null?void 0:ha.length)-2);Ue&&Ue!==""&&(Va=ci(Ue));let _l=(Ne=oe.analyzeSplitToContent(Va,","))==null?void 0:Ne.map(Qe=>((Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])===","&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1)),Qe)),jl=[];_l!=null&&_l.find(Qe=>Qe==null?void 0:Qe.includes("@MainParam"))&&(_l=_l==null?void 0:_l.find(Qe=>Qe==null?void 0:Qe.includes("@MainParam")),_l=(Y=(ye=_l==null?void 0:_l.replace("=",ml))==null?void 0:ye.split(ml))==null?void 0:Y[1],_l=_l==null?void 0:_l.slice(1,(_l==null?void 0:_l.length)-1),jl=oe.analyzeSplitToContent(_l,",")),(xe=Vl==null?void 0:Vl.split(","))==null||xe.forEach((Qe,Xa)=>{var ba,ll,Ia,il,rl;((ba=oe.analyzeSplitToContent(Qe,"@"))==null?void 0:ba.length)>1&&(Qe=(ll=oe.analyzeSplitToContent(Qe,"@"))==null?void 0:ll[0],(Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])==="@"&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1))),n.push({label:Qe,prop:Qe,align:"center",menus:sa,groups:(Ie==null?void 0:Ie.length)===0?$a:(Ia=Ie==null?void 0:Ie.find(_e=>(_e==null?void 0:_e.number)>=Xa))==null?void 0:Ia.contents,words:(aa==null?void 0:aa.length)===0?(il=Ma==null?void 0:Ma[Xa])==null?void 0:il.split(":"):(rl=aa==null?void 0:aa[Xa])==null?void 0:rl.split(":"),formType:(sa==null?void 0:sa.length)>0?"Select":"Input",mainKey:!!(Xa===0||jl!=null&&jl.find(_e=>_e===Qe)),filter:Va,isMainPath:(Ie==null?void 0:Ie.findIndex(_e=>(_e==null?void 0:_e.number)>=Xa))===0})})}else n.push({label:ce,prop:ce,align:"center"})});else{let ce=(J=oe.analyzeSplitToContent(a,","))==null?void 0:J.map(Te=>((Te==null?void 0:Te[(Te==null?void 0:Te.length)-1])===","&&(Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1)),Te));ce==null||ce.forEach(Te=>{n.push(bt(Te,l))})}return n},ep=(a,l)=>{var h,c,d,m,b;let n=a;if(!a)return;let r="";((h=oe.analyzeSplitToContent(a,"}"))==null?void 0:h.length)>1&&(n=(c=oe.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(d=oe.analyzeSplitToContent(a,"}"))==null?void 0:d[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let o=[],s=[];return o.push({label:"排序",prop:"sort"}),o.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=oe.analyzeSplitToContent(n,","))==null||m.forEach(u=>{var C;(u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),(u==null?void 0:u[0])==="{"?(C=Ao(u,l))==null||C.forEach(M=>{o.push(M)}):o.push(bt(u,l))}),o!=null&&o.some(u=>{var C;return(C=u==null?void 0:u.prop)==null?void 0:C.includes("@")})&&(o=o==null?void 0:o.filter(u=>{var C;return!((C=u==null?void 0:u.prop)!=null&&C.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(b=oe.analyzeSplitToContent(r,","))==null||b.forEach(u=>{var C;(u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),(u==null?void 0:u[0])==="{"?(C=Ao(u,l))==null||C.forEach(M=>{s.push(M)}):s.push(bt(u,l))})),{columns:o,secondColumns:s}},yn=a=>{var l,n,r,o,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let h=(n=(l=a==null?void 0:a.replace("(",ml))==null?void 0:l.split(ml))==null?void 0:n[1],c=(o=(r=a==null?void 0:a.replace("(",ml))==null?void 0:r.split(ml))==null?void 0:o[0];return h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h=(s=oe.analyzeSplitToContent(h,","))==null?void 0:s.map(d=>((d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1)),c+d)),h=h==null?void 0:h.join(","),a!=null&&a.includes("@Quote")&&(h!=null&&h.includes("@QuoteType")||(h=h===""?h+"@QuoteType=Manual":h+",@QuoteType=Manual"),h!=null&&h.includes("@QuoteSonSync")||(h=h===""?h+"@QuoteSonSync=No":h+",@QuoteSonSync=No"),h!=null&&h.includes("@QuoteFatherSync")||(h=h===""?h+"@QuoteFatherSync=Yes":h+",@QuoteFatherSync=Yes")),h}},cs=a=>{let l=a==null?void 0:a.map(n=>{var r,o;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+ml+((o=n==null?void 0:n.groups)==null?void 0:o.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,o;return{menus:(r=n==null?void 0:n.split(ml))==null?void 0:r[0],groups:((o=n==null?void 0:n.split(ml))==null?void 0:o[1])??[]}}),l},us=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=oe.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),(r==null?void 0:r[1])==="("&&(r=yn(r)),r)),l==null?void 0:l.join(",")},oc=(a,l,n="")=>{var L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne;let r=[],o=[],s=[],h="",c="",d="",m=[],b=[],u=[],C="";if(((L=a==null?void 0:a[0])==null?void 0:L[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((g=a==null?void 0:a[0])==null?void 0:g[0])!=="$"&&(h=(S=oe.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:S[0],(h==null?void 0:h[0])!=="@"&&(h="@"+h),h=ci(h),d=($=oe.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:$[1],(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=d==null?void 0:d.replaceAll(":","/"));let k=oe.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(V=k==null?void 0:k.filter(ye=>(ye==null?void 0:ye[0])!=="{"&&(ye==null?void 0:ye[0])!=="["))==null?void 0:V.join(""),c=(ae=a==null?void 0:a[0])==null?void 0:ae.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),C=(Z=k==null?void 0:k.filter(ye=>(ye==null?void 0:ye[0])!=="["))==null?void 0:Z.join(""),C=(me=a==null?void 0:a[0])==null?void 0:me.replace(C,""),c=c==null?void 0:c.replace(C,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((Ae=oe.analyzeSplitToContent(c,"@"))==null?void 0:Ae.length)>1&&(h=(F=oe.analyzeSplitToContent(c,"@"))==null?void 0:F[1],(h==null?void 0:h[(h==null?void 0:h.length)-1])===":"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h="@"+h,h=yn(h),c=(ne=oe.analyzeSplitToContent(c,"@"))==null?void 0:ne[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((J=oe.analyzeSplitToContent(r,"@"))==null?void 0:J.length)>1){h!==""&&(h=h+",");let ye=(ce=oe.analyzeSplitToContent(r,"@"))==null?void 0:ce[1];ye="@"+ye,ye=yn(ye),h=h+ye,r=(Te=oe.analyzeSplitToContent(r,"@"))==null?void 0:Te[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(c==null?void 0:c[(c==null?void 0:c.length)-1])===":"&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),n!==""){let ye=($e=oe.analyzeSplitToContent(n,")"))==null?void 0:$e[0],Y=(fe=oe.analyzeSplitToContent(n,"@"))==null?void 0:fe[1];d=(te=(N=oe.analyzeSplitToContent(n,"@"))==null?void 0:N[0])==null?void 0:te.replace(ye,""),(d==null?void 0:d[(d==null?void 0:d.length)-1])==="@"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),ye=us(ye),Y=us(Y);let xe=ye??"";if(xe!==""&&(xe=xe+","),xe=xe+Y,(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===","&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe!==""&&h!==""&&(h=h+","),h=h+xe,(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=(U=oe.analyzeSplitToContent(d,":"))==null?void 0:U.filter((pe,qe)=>{var sa;return!((pe==null?void 0:pe[0])==="{"&&qe===((sa=oe.analyzeSplitToContent(d,":"))==null?void 0:sa.length)-1)}),d=d==null?void 0:d.join(""),(d==null?void 0:d[(d==null?void 0:d.length)-1])===":"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),h!=null&&h.includes("@Sync")||(h=h===""?h+"@Sync=(Yes,Yes)":h+",@Sync=(Yes,Yes)"),d!=null&&d.includes("$")){let pe=(Me=(Ce=d==null?void 0:d.replace("*",ml))==null?void 0:Ce.split(ml))==null?void 0:Me[1],qe=(ra=(Pe=d==null?void 0:d.replace("*",ml))==null?void 0:Pe.split(ml))==null?void 0:ra[0];qe=qe==null?void 0:qe.split("$"),qe=((ee=(Ta=qe==null?void 0:qe[0])==null?void 0:Ta.split(":"))==null?void 0:ee[0])+":"+(qe==null?void 0:qe[1])+":",d=qe+"*"+pe}else d=(pa=d==null?void 0:d.replaceAll("{",""))==null?void 0:pa.replaceAll("}","")}h!==""&&h&&(h="("+h+")"),h=d+h,((ue=oe.analyzeSplitToContent(c,"}"))==null?void 0:ue.length)>1&&(c=(ua=oe.analyzeSplitToContent(c,"}"))==null?void 0:ua.filter(ye=>(ye==null?void 0:ye[0])!=="@"),c=c==null?void 0:c.join(""));let W=ep(c,l);s=c===""?[]:(W==null?void 0:W.columns)??[],u=oe.getColumnChild(s);let I=oe.getColumnChild(s);s!=null&&s.some(ye=>{var Y;return Array.isArray(ye==null?void 0:ye.children)&&((Y=ye==null?void 0:ye.children)==null?void 0:Y.length)>0})&&(s=[s]),o=C?Ni(C):[],!(o!=null&&o.every(ye=>Array.isArray(ye)))&&(o==null?void 0:o.length)>0&&(o=[o]),(o==null?void 0:o.length)>0&&(Array.isArray(o==null?void 0:o[0])&&((Se=o==null?void 0:o[0])!=null&&Se.every(ye=>Array.isArray(ye)))?o=o==null?void 0:o.map((ye,Y)=>(ye=ye.map((xe,pe)=>(xe.unshift("{}"),xe.unshift((pe+1).toString()),xe)),ye)):o=o==null?void 0:o.map((ye,Y)=>(ye.unshift("{}"),ye.unshift((Y+1).toString()),ye))),W!=null&&W.secondColumns&&((se=W==null?void 0:W.secondColumns)==null?void 0:se.length)>0&&((o==null?void 0:o.length)>0?o=o==null?void 0:o.map((ye,Y)=>{var xe,pe;return Array.isArray(ye==null?void 0:ye[0])?ye=ye==null?void 0:ye.map((qe,sa)=>{var $a,Ma;return qe.unshift((Ma=($a=W==null?void 0:W.secondColumns)==null?void 0:$a[sa])==null?void 0:Ma.prop),qe}):ye.unshift((pe=(xe=W==null?void 0:W.secondColumns)==null?void 0:xe[Y])==null?void 0:pe.prop),ye}):o=(Be=W==null?void 0:W.secondColumns)==null?void 0:Be.map((ye,Y)=>(ye=[ye==null?void 0:ye.label],ye.push(Y),ye)),s.unshift({label:"",prop:"disabled",sortable:!1})),u=u==null?void 0:u.map(ye=>{var Y,xe;return{menus:ye==null?void 0:ye.menus,content:((Y=ye==null?void 0:ye.menus)==null?void 0:Y.join("/"))+ml+((xe=ye==null?void 0:ye.groups)==null?void 0:xe.join("/"))}});let j=[];if(((da=(Ge=h==null?void 0:h.replace("(",ml))==null?void 0:Ge.split(ml))==null?void 0:da[0])!==""&&(j=(R=(Ja=h==null?void 0:h.replace("(",ml))==null?void 0:Ja.split(ml))==null?void 0:R[0],j=[j],j=j==null?void 0:j.map(ye=>{var xe,pe,qe;let Y=ye==null?void 0:ye.split("*");return{menus:(xe=Y==null?void 0:Y[0])==null?void 0:xe.split(":"),content:((pe=Y==null?void 0:Y[0])==null?void 0:pe.replaceAll(":","/"))+ml+((qe=Y==null?void 0:Y[1])==null?void 0:qe.replaceAll(":","/"))}}),u=[...u,...j]),u=u==null?void 0:u.filter(ye=>{var Y;return(ye==null?void 0:ye.menus)&&((Y=ye==null?void 0:ye.menus)==null?void 0:Y.length)>0}),u=u==null?void 0:u.map(ye=>ye==null?void 0:ye.content),u=[...new Set(u)],u=u==null?void 0:u.map(ye=>{var Y,xe;return{menus:(Y=ye==null?void 0:ye.split(ml))==null?void 0:Y[0],groups:((xe=ye==null?void 0:ye.split(ml))==null?void 0:xe[1])??[]}}),m=I==null?void 0:I.filter(ye=>{var Y;return(ye==null?void 0:ye.filter)&&((Y=ye==null?void 0:ye.filter)==null?void 0:Y.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(ye=>{var Y,xe,pe,qe;return(qe=(pe=(xe=(Y=oe.analyzeSplitToContent(ye==null?void 0:ye.filter,","))==null?void 0:Y.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:pe[0])==null?void 0:qe.includes("Yes")}),m=cs(m)),b=I==null?void 0:I.filter(ye=>{var Y;return(ye==null?void 0:ye.filter)&&((Y=ye==null?void 0:ye.filter)==null?void 0:Y.includes("@Sync"))}),(b==null?void 0:b.length)>0&&(b=b==null?void 0:b.filter(ye=>{var Y,xe,pe,qe;return(qe=(pe=(xe=(Y=oe.analyzeSplitToContent(ye==null?void 0:ye.filter,","))==null?void 0:Y.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:pe[1])==null?void 0:qe.includes("Yes")}),b=cs(b)),h!==""&&(h!=null&&h.includes("@Sync"))&&(h==null?void 0:h[0])!=="("){let ye=(H=h==null?void 0:h.replace("(",ml))==null?void 0:H.split(ml),Y=ye==null?void 0:ye[1];if(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1),Y=oe.analyzeSplitToContent(Y,","),(de=(he=(X=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:X.split(","))==null?void 0:he[0])!=null&&de.includes("Yes")){let xe=ye==null?void 0:ye[0];xe=[{menus:(oa=(ma=xe==null?void 0:xe.split("*"))==null?void 0:ma[0])==null?void 0:oa.replaceAll(":","/"),groups:((_a=(Ve=xe==null?void 0:xe.split("*"))==null?void 0:Ve[1])==null?void 0:_a.split(":"))??[]}],m=[...m,...xe]}if((La=(ya=(ze=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:ya[1])!=null&&La.includes("Yes")){let xe=ye==null?void 0:ye[0];xe=[{menus:(ha=(za=xe==null?void 0:xe.split("*"))==null?void 0:za[0])==null?void 0:ha.replaceAll(":","/"),groups:((Ne=(Ca=xe==null?void 0:xe.split("*"))==null?void 0:Ca[1])==null?void 0:Ne.split(":"))??[]}],b=[...b,...xe]}}return{groupName:r,tableColumns:s,tableFilter:h,tableContents:o,columns:(W==null?void 0:W.secondColumns)??[],relatedQuotes:u,fatherSyncContents:m,sonSyncContents:b}},tc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var o,s,h,c;if(Array.isArray(n))n=n==null?void 0:n.map(d=>{var m,b,u,C;return d!=null&&d.isMainPath||(((m=d==null?void 0:d.children)==null?void 0:m.length)>0?d.children=tc(d.children,l):((b=d==null?void 0:d.menus)==null?void 0:b.length)>0&&!((u=n==null?void 0:n[0])!=null&&u.isMainPath)&&(d.menus=(C=d.menus)==null?void 0:C.map((M,k)=>{var W,I;return((W=d.menus)==null?void 0:W.length)-1===k&&M===""&&(l==null?void 0:l.parentContent)+"/"!==((I=d.menus)==null?void 0:I.join("/"))&&(M=l==null?void 0:l.value),d}),d.bindMenus=d.menus)),d});else{if(r===0&&((o=n.menus)==null?void 0:o.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((s=n.menus)==null?void 0:s.length)>0&&!((h=a==null?void 0:a[0])!=null&&h.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((d,m)=>{var b,u;return((b=n.menus)==null?void 0:b.length)-1===m&&d===""&&(l==null?void 0:l.parentContent)+"/"!==((u=n.menus)==null?void 0:u.join("/"))&&(d=l==null?void 0:l.value),d}),n.bindMenus=n.menus)}return n}),a),ap=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=tc(n.contents,l)),n)),a),kt=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=kt(r,l),r)):n=n==null?void 0:n.map(r=>{var o,s;return r!=null&&r.children&&((o=r==null?void 0:r.children)==null?void 0:o.length)>0?r.children=kt(r==null?void 0:r.children,l):r!=null&&r.words&&((s=r==null?void 0:r.words)==null?void 0:s.length)>0&&(l!=null&&l.find(h=>{var c,d,m,b;return((b=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:b[((m=(d=r==null?void 0:r.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])===h}))&&(r.mainKey=!0),r}),n};let _r="$R";const lp=A.useUnit(A.pinia),{selectTitle:dn}=A.storeToRefs(lp),rp=A.useMenuState(A.pinia),{localFiles:np}=A.storeToRefs(rp),Sn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainParam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixColumn",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1},{key:"@BackGround",value:"onBackGround",order:1}];var si=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(si||{});const ip=a=>{var l,n,r,o,s;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let h=a==null?void 0:a.contents,c=a==null?void 0:a.filter;(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(l=oe.analyzeSplitToContent(c,","))==null?void 0:l.map(m=>((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)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=oe.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((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)),m));let d=(s=(o=(r=np.value)==null?void 0:r.filter(m=>{var b;return(m==null?void 0:m.path)===((b=a==null?void 0:a.groupName)==null?void 0:b[0])}))==null?void 0:o[0])==null?void 0:s.children;return d=(d==null?void 0:d.filter(m=>c==null?void 0:c.find(b=>b===(m==null?void 0:m.name))))??[],h.push({key:"backGround",contents:d}),h}return a==null?void 0:a.contents},op=a=>{const l=cc(a==null?void 0:a.filter);return l?uc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},tp=a=>{const l=cc(a==null?void 0:a.filter);return l?uc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},sp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},cp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},up=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var o;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(o=r.contents)==null?void 0:o.slice(0,parseInt(a==null?void 0:a.filter))),r})},dp=async a=>{var l,n,r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(J=>((J==null?void 0:J.key)==="tableContents"&&(J.contents=oe.shuffle(J.contents)),J));if((a==null?void 0:a.filter)==="Auto"){let ne=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:r.contents;Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),ne=oe.getColumnChild(ne);let J=ne==null?void 0:ne.filter(Ce=>(Ce==null?void 0:Ce.filter)&&(Ce==null?void 0:Ce.filter)!==""),ce=new Map,Te=[];J==null||J.forEach(Ce=>{var Me,Pe;ce.get((Me=Ce==null?void 0:Ce.menus)==null?void 0:Me.join("/"))||(ce.set((Pe=Ce==null?void 0:Ce.menus)==null?void 0:Pe.join("/"),Ce),Te.push(Ce))});let $e=(s=(o=dn==null?void 0:dn.value)==null?void 0:o.find(Ce=>(Ce==null?void 0:Ce.condition)==="child"))==null?void 0:s.value,fe=Te==null?void 0:Te.map(Ce=>{var Me,Pe,ra;return Ce=(Me=Ce==null?void 0:Ce.menus)==null?void 0:Me.join("/"),(Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])==="/"&&((ra=(Pe=dn==null?void 0:dn.value)==null?void 0:Pe.find(Ta=>(Ta==null?void 0:Ta.condition)==="child"))==null?void 0:ra.parentContent)+"/"!==Ce?Ce=Ce+$e:(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)),Ce}),N=Te==null?void 0:Te.map(Ce=>Ce==null?void 0:Ce.groups),te=fe==null?void 0:fe.map(async Ce=>{let Me=await en(Ce,!1);return{path:Ce,contents:Me}});te=await Promise.all(te);let U=te==null?void 0:te.map((Ce,Me)=>{var ra,Ta,ee,pa,ue,ua,Se;let Pe=(ra=Ce==null?void 0:Ce.contents)==null?void 0:ra.filter(se=>{var Be,Ge;return(se==null?void 0:se.name)===((Ge=N==null?void 0:N[Me])==null?void 0:Ge[((Be=N==null?void 0:N[Me])==null?void 0:Be.length)-1])});return Pe=(pa=(ee=(Ta=Pe==null?void 0:Pe[0])==null?void 0:Ta.compData)==null?void 0:ee.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:pa.contents,(Ce==null?void 0:Ce.path)===((ua=(ue=dn==null?void 0:dn.value)==null?void 0:ue.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:ua.parentContent)&&(Pe=((Se=Pe==null?void 0:Pe.map(se=>{for(let Be in se)if(se[Be]===$e)return se}))==null?void 0:Se.filter(se=>se))??[]),Pe??[]});if(U=U==null?void 0:U.map(Ce=>(Ce=Ce==null?void 0:Ce.map(Me=>{var ra;let Pe={};for(let Ta in Me)if(J!=null&&J.find(ee=>{var pa,ue;return((ue=(pa=ee==null?void 0:ee.words)==null?void 0:pa[0])==null?void 0:ue.replaceAll("'",""))===Ta})){let ee=(ra=J==null?void 0:J.find(pa=>{var ue,ua;return((ua=(ue=pa==null?void 0:pa.words)==null?void 0:ue[0])==null?void 0:ua.replaceAll("'",""))===Ta}))==null?void 0:ra.prop;Pe[ee]=Me==null?void 0:Me[Ta]}return Pe}),Ce)),U=oe.cartesianProduct(U),Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),(U==null?void 0:U.length)>0&&((u=(c=(h=J==null?void 0:J[0])==null?void 0:h.menus)==null?void 0:c.join("/"))==null?void 0:u[((b=(m=(d=J==null?void 0:J[0])==null?void 0:d.menus)==null?void 0:m.join("/"))==null?void 0:b.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Me=>{var Pe;return(Me==null?void 0:Me.key)==="tableContents"&&(U==null?void 0:U.length)>0&&(Me.contents=((Pe=Me.contents)==null?void 0:Pe.length)>0?Me.contents:U),Me})}if((a==null?void 0:a.filter)==="Manual"){let ne=[],J=[],ce=(k=(M=a==null?void 0:a.contents)==null?void 0:M.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:k.contents;(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===")"?ce=(I=(W=ce==null?void 0:ce.replace("(",_r))==null?void 0:W.split(_r))==null?void 0:I[0]:ce="",ce!==""&&(ne=((L=(j=ce==null?void 0:ce.split("*"))==null?void 0:j[0])==null?void 0:L.split(":"))??[],J=((S=(g=(w=(x=(E=ce==null?void 0:ce.split("*"))==null?void 0:E[1])==null?void 0:x.replace("{",_r))==null?void 0:w.split(_r))==null?void 0:g[0])==null?void 0:S.split(":"))??[]);let Te=(V=($=a==null?void 0:a.contents)==null?void 0:$.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:V.contents;Te=(Z=(ae=Te==null?void 0:Te.replace("(",_r))==null?void 0:ae.split(_r))==null?void 0:Z[1],Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1);let $e=(me=a==null?void 0:a.contents)==null?void 0:me.map(N=>{var te,U,Ce,Me,Pe,ra,Ta,ee,pa;return(N==null?void 0:N.key)==="header"&&((te=N==null?void 0:N.contents)!=null&&te.every(ue=>(ue==null?void 0:ue.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((U=N==null?void 0:N.contents)==null?void 0:U[0])?N.contents=(Ce=N==null?void 0:N.contents)==null?void 0:Ce.map((ue,ua)=>{var Se,se,Be;return ue!=null&&ue.isMainPath||(ua===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((se=ue.words)==null?void 0:se.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Te,(!(ue!=null&&ue.menus)||((Be=ue==null?void 0:ue.menus)==null?void 0:Be.length)===0)&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}):Array.isArray((Me=N==null?void 0:N.contents)==null?void 0:Me[0])&&((Ta=(ra=(Pe=N==null?void 0:N.contents)==null?void 0:Pe[0])==null?void 0:ra.filter(()=>(ne==null?void 0:ne.length)>0))==null?void 0:Ta.length)>0&&(N.contents[0]=(pa=(ee=N==null?void 0:N.contents)==null?void 0:ee[0])==null?void 0:pa.map((ue,ua)=>{var Se,se,Be;return ue!=null&&ue.isMainPath||(ua===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((se=ue.words)==null?void 0:se.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Te,(!(ue!=null&&ue.menus)||Array.isArray(ue==null?void 0:ue.menus)&&((Be=ue==null?void 0:ue.menus)==null?void 0:Be.length)===0)&&(ne==null?void 0:ne.length)>0&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}))),N}),fe=(Ae=$e==null?void 0:$e.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:Ae.contents;if(Array.isArray(fe==null?void 0:fe[0])&&(fe=fe==null?void 0:fe[0]),fe=oe.getColumnChild(fe),fe!=null&&fe.some(N=>{var te,U;return((U=N==null?void 0:N.menus)==null?void 0:U[((te=N==null?void 0:N.menus)==null?void 0:te.length)-1])===""})){let N=(F=dn==null?void 0:dn.value)==null?void 0:F.find(te=>(te==null?void 0:te.condition)==="child");$e=ap($e,N)}return $e}if((a==null?void 0:a.filter)==="Chart"){let ne=a==null?void 0:a.contents;return ne.push({key:"newType",contents:"Chart"}),ne}return a==null?void 0:a.contents},pp=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}if((a==null?void 0:a.filter)==="Bar"||(a==null?void 0:a.filter)==="Pie"||(a==null?void 0:a.filter)==="Line"||(a==null?void 0:a.filter)==="Histogram"||(a==null?void 0:a.filter)==="Scatter"){let l=a==null?void 0:a.contents;return l.push({key:"ChartType",contents:{type:a==null?void 0:a.filter,title:""}}),l}return a==null?void 0:a.contents},fp=a=>{var r,o,s,h,c,d,m,b,u,C,M,k;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((o=(r=l==null?void 0:l.replace(":",_r))==null?void 0:r.split(_r))==null?void 0:o[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(c=(h=l==null?void 0:l.split("="))==null?void 0:h[1])!=null&&c.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let W=(d=l==null?void 0:l.split("="))==null?void 0:d[0],I=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(b=I==null?void 0:I.slice(1,I==null?void 0:I.length))!=null&&b.includes("$")&&(I=(M=(C=(u=dn==null?void 0:dn.value)==null?void 0:u.filter(j=>(j==null?void 0:j.condition)==="child"))==null?void 0:C[0])==null?void 0:M.value),l=W+"="+I}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=oe.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let W=[];return n==null||n.forEach(j=>{let L={};for(let E in j){let x=E;x!=null&&x.includes("[")||(L[x]=j[E])}W.push(L)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(j=>{var E,x,w;let L=(x=(E=a==null?void 0:a.contents)==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:x.contents;if(L=(w=oe.getEqualChild(L))==null?void 0:w.filter(g=>(g==null?void 0:g.label)!=="操作"),(j==null?void 0:j.key)==="tableContents"){let S=oe.tableToForm(j==null?void 0:j.contents,L);W==null||W.forEach($=>{var V,ae;for(let Z in $)!((V=S==null?void 0:S[0])!=null&&V.find(me=>{var Ae;return(me==null?void 0:me.key)===Z||((Ae=me==null?void 0:me.key)==null?void 0:Ae.includes(Z))}))&&!(S!=null&&S.find(me=>{var Ae;return(me==null?void 0:me.key)===Z||((Ae=me==null?void 0:me.key)==null?void 0:Ae.includes(Z))}))||(((ae=$[Z])==null?void 0:ae[0])!=="!"?S=S==null?void 0:S.filter(me=>{var Ae,F;return((Ae=me==null?void 0:me.find(ne=>{var J;return(ne==null?void 0:ne.key)===Z||((J=ne==null?void 0:ne.key)==null?void 0:J.includes(Z))}))==null?void 0:Ae.value)===$[Z]||Array.isArray($==null?void 0:$[Z])&&((F=$==null?void 0:$[Z])==null?void 0:F.find(ne=>{var J;return((J=me==null?void 0:me.find(ce=>{var Te;return(ce==null?void 0:ce.key)===Z||((Te=ce==null?void 0:ce.key)==null?void 0:Te.includes(Z))}))==null?void 0:J.value)===ne}))}):S=S==null?void 0:S.filter(me=>{var Ae;return((Ae=me==null?void 0:me.find(F=>{var ne;return(F==null?void 0:F.key)===Z||((ne=F==null?void 0:F.key)==null?void 0:ne.includes(Z))}))==null?void 0:Ae.value)!==$[Z]}))}),(S==null?void 0:S.length)===0?j.contents=[]:j.contents=S==null?void 0:S.map($=>{let V={};return $==null||$.forEach(ae=>{V[ae==null?void 0:ae.key]=ae==null?void 0:ae.value}),V})}return j})}return a==null?void 0:a.contents},hp=a=>a==null?void 0:a.contents,vp=a=>a==null?void 0:a.contents,mp=a=>{var l,n,r,o;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(o=a==null?void 0:a.contents)==null?void 0:o.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=kt(c.contents,s)),c))}return a==null?void 0:a.contents},yp=a=>{var n,r,o,s,h;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",_r))==null?void 0:n.split(_r))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(o=oe.analyzeSplitToContent(c,","))==null?void 0:o.map(u=>((u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),u));let d=c==null?void 0:c[0];(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1));let m=(c==null?void 0:c[1])??"Up",b=(s=a==null?void 0:a.contents)==null?void 0:s.map(u=>{var C,M;if(m==="Up"){if((u==null?void 0:u.key)==="extraButton"){let k=(C=d==null?void 0:d.split(","))==null?void 0:C.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}}else if(m==="Line"&&(u==null?void 0:u.key)==="rowButton"){let k=(M=d==null?void 0:d.split(","))==null?void 0:M.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}return u});if(m==="Bottom"||m==="Down"){let u=(h=d==null?void 0:d.split(","))==null?void 0:h.map(C=>({label:C,prop:C}));b.push({key:"bottomButton",contents:u})}return b}return a==null?void 0:a.contents},gp=a=>a==null?void 0:a.contents,bp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.key)==="rowButton"&&(o.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(h=>({label:h,prop:h}))),o}):a==null?void 0:a.contents},kp=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,o=(n=l==null?void 0:l.split(","))==null?void 0:n.map(s=>({label:s,prop:s}));return r.push({key:"bottomButton",contents:o}),r}return a==null?void 0:a.contents},xp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(o=>(o.isNoClick=!0,o))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},wp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s;return(o==null?void 0:o.key)==="formContent"&&(o.contents=(s=o.contents)==null?void 0:s.map(h=>(h.width=n,h))),o})}return a==null?void 0:a.contents},_p=a=>{var l,n,r,o;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(c=>{var d;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(d=c.contents)==null?void 0:d.map(m=>(m.width=s,m))),c})}if(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let s=Ni(a==null?void 0:a.filter),h=Array.isArray(s)?s.map(d=>parseInt(d)).filter(d=>!!d&&!Number.isNaN(d)):[];return h.length?(o=a==null?void 0:a.contents)==null?void 0:o.map(d=>{if((d==null?void 0:d.key)==="formContent"){const m=d.contents??[];d.contents=m.map((b,u)=>{const C=u+1;let M=0,k=0;for(let I=0;I<h.length;I++){if(k+=h[I],C<=k){M=I;break}I===h.length-1&&(M=h.length-1)}const W=h[M]||h[h.length-1]||1;return b.width=W,b})}return d}):a==null?void 0:a.contents}return a==null?void 0:a.contents},Sp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s,h,c;return(o==null?void 0:o.key)==="header"&&(Array.isArray((s=o==null?void 0:o.contents)==null?void 0:s[0])?o.contents[0]=(c=o.contents[0])==null?void 0:c.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d)):o.contents=(h=o.contents)==null?void 0:h.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d))),o})}return a==null?void 0:a.contents},Ep=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const r=s=>(n!=null&&n.find(h=>h===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(h=>r(h))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var h,c,d;return(s==null?void 0:s.key)==="header"&&(Array.isArray((h=s==null?void 0:s.contents)==null?void 0:h[0])?s.contents[0]=(d=s.contents[0])==null?void 0:d.map(m=>r(m)):s.contents=(c=s.contents)==null?void 0:c.map(m=>r(m))),s})}return a==null?void 0:a.contents},Cp=async a=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;const l=A.useUnit(A.pinia),{chooseTitle:n}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let x=await en(((o=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:o.parentContent)??((h=(s=n==null?void 0:n.value)==null?void 0:s[0])==null?void 0:h.relatedContent),!1),w=(d=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:d.value;(b=(m=x==null?void 0:x[0])==null?void 0:m.compData)!=null&&b.find(V=>(V==null?void 0:V.key)==="header")?x=(u=x==null?void 0:x[0])==null?void 0:u.compData:x=(M=(C=x==null?void 0:x.filter(V=>{var ae;return(ae=V==null?void 0:V.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="header")}))==null?void 0:C[0])==null?void 0:M.compData;let g=(k=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:k.contents;Array.isArray(g==null?void 0:g[0])&&(g=g==null?void 0:g[0]),g=((W=g==null?void 0:g.find(V=>V==null?void 0:V.isMainKey))==null?void 0:W.prop)??((I=g==null?void 0:g[0])==null?void 0:I.prop);let S=(L=(j=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:L.find(V=>(V==null?void 0:V[g])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(V=>{var ae;return(V==null?void 0:V.key)==="formContent"&&(V.contents=(ae=V.contents)==null?void 0:ae.map(Z=>(Z.value=S==null?void 0:S[Z==null?void 0:Z.prop],Z))),V})}return a==null?void 0:a.contents},Dp=a=>{var l,n,r,o,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let h=a==null?void 0:a.filter;if(h!=null&&h.includes("*")&&(h="({"+((r=(n=h==null?void 0:h.replace("{",_r))==null?void 0:n.split(_r))==null?void 0:r[1])),h=(o=h==null?void 0:h.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(h==null?void 0:h[0])!=="("&&(h="("+h+")"),h.slice(1,(h==null?void 0:h.length)-1)==="undefined")return a==null?void 0:a.contents;let c=oe.calculatorAndToOr(h),d=c==null?void 0:c[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,b=[];for(let u in d)(d==null?void 0:d[u])===(m==null?void 0:m[u])?b.push(!0):b.push(!1);return b!=null&&b.every(u=>u===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Tp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Bp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Np=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Ap=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,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=(l=oe.analyzeSplitToContent(r,","))==null?void 0:l.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o)),n.push({key:"stepName",contents:r}),n}return a==null?void 0:a.contents},zp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},sc={onNumSlice:up,onRandomContents:dp,onConditionContents:fp,onFatherPaceContents:hp,onPaceContents:vp,onMainTagContents:mp,onButtonContents:yp,onPamButtonContents:gp,onRowButtonContents:bp,onRelated:Cp,onRowNum:_p,onFixRow:Sp,onReqItem:Ep,onBottomButtonContents:kp,onConditionContent:Dp,onTabs:Tp,onSinChoice:Bp,onTextSize:sp,onTextRGBA:cp,onPosition:op,onSize:tp,onShowType:Np,onStepName:Ap,onStep:zp,onInterfaceTypeContents:pp,onBackGround:ip,onMaxColumn:wp,onEditRead:xp},Mp=async(a,l,n="")=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r="";if(((h=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:h.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.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=(m=(d=r==null?void 0:r.replace("(",_r))==null?void 0:d.split(_r))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=oe.analyzeSplitToContent(r,","))==null?void 0:b.map(L=>((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&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=a;for(let L in o){let E,x="";E=(M=(C=(u=o==null?void 0:o[L])==null?void 0:u.replace("=",_r))==null?void 0:C.split(_r))==null?void 0:M[0],x=(I=(W=(k=o==null?void 0:o[L])==null?void 0:k.replace("=",_r))==null?void 0:W.split(_r))==null?void 0:I[1];let w=(j=Sn==null?void 0:Sn.find(g=>(g==null?void 0:g.key)===E))==null?void 0:j.value;if(w){const g=sc[w];s=await g({contents:s,filter:x,extra:l,groupName:n})}}return s},Po=async(a,l,n="")=>{var c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae;let r="";if(((c=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(d=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:d.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)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(b=(m=r==null?void 0:r.replace("(",_r))==null?void 0:m.split(_r))==null?void 0:b[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(u=oe.analyzeSplitToContent(r,","))==null?void 0:u.map(Z=>((Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])===","&&(Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1)),Z!=null&&Z.includes("(")||(Z=Z==null?void 0:Z.replaceAll(":","=")),Z)),s=a,h=new Map;o==null||o.forEach(Z=>{var Ae,F,ne;let me=(Ae=Z==null?void 0:Z.split("="))==null?void 0:Ae[0];if(me==="@MainParam"&&h.get(me)){let J=h.get(me);J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1);let ce=(ne=(F=Z==null?void 0:Z.replace("{",_r))==null?void 0:F.split(_r))==null?void 0:ne[1];ce=J+","+ce,h.set(me,ce)}else me==="@Button"&&h.get(me)?h.set(Z,Z):h.set(me,Z)}),o=Array.from(h.values()),o=o==null?void 0:o.sort((Z,me)=>{var Ae,F;return((Ae=Sn==null?void 0:Sn.find(ne=>me==null?void 0:me.includes(ne==null?void 0:ne.key)))==null?void 0:Ae.order)-((F=Sn==null?void 0:Sn.find(ne=>Z==null?void 0:Z.includes(ne==null?void 0:ne.key)))==null?void 0:F.order)});for(let Z in o){let me,Ae="";(C=o==null?void 0:o[Z])!=null&&C.includes("(")&&((M=o==null?void 0:o[Z])!=null&&M.includes("@If"))?(me=(I=(W=(k=o==null?void 0:o[Z])==null?void 0:k.replace("(",_r))==null?void 0:W.split(_r))==null?void 0:I[0],Ae="("+((E=(L=(j=o==null?void 0:o[Z])==null?void 0:j.replace("(",_r))==null?void 0:L.split(_r))==null?void 0:E[1])):(me=(g=(w=(x=o==null?void 0:o[Z])==null?void 0:x.replace("=",_r))==null?void 0:w.split(_r))==null?void 0:g[0],Ae=(V=($=(S=o==null?void 0:o[Z])==null?void 0:S.replace("=",_r))==null?void 0:$.split(_r))==null?void 0:V[1]);let F=(ae=Sn==null?void 0:Sn.find(ne=>(ne==null?void 0:ne.key)===me))==null?void 0:ae.value;if(F){const ne=sc[F];s=await ne({contents:s,filter:Ae,extra:l,groupName:n})}}return s},cc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},uc=(a,l)=>{var W,I,j,L,E;const n=Array.isArray(a)?a:[],r=n.find(x=>(x==null?void 0:x.key)==="formContent"),o=Array.isArray(r==null?void 0:r.contents)?r.contents:[],s=((W=n.find(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"))==null?void 0:W.contents)??{},h=(o==null?void 0:o[0])??{};let c=((I=l==null?void 0:l.position)==null?void 0:I[0])??(s==null?void 0:s._positionStartRow)??(h==null?void 0:h._positionStartRow),d=((j=l==null?void 0:l.position)==null?void 0:j[1])??(s==null?void 0:s._positionRowSpan)??(h==null?void 0:h._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!d||Number.isNaN(d)||d<1)&&(d=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(s==null?void 0:s._sizeStart)??(h==null?void 0:h._sizeStart),b=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(h==null?void 0:h._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(b===void 0||Number.isNaN(b))&&(b=1),m=Math.max(0,Math.min(1,m)),b=Math.max(0,Math.min(1,b)),b<=m&&(m=0,b=1);const u=b-m,C=Math.max(1,Math.round(1/u));let M=n.map(x=>{if((x==null?void 0:x.key)!=="formContent")return x;const w=Array.isArray(x==null?void 0:x.contents)?x.contents:[];return{...x,contents:w.map(g=>({...g,width:C,_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b}))}});const k={_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b};return M.some(x=>(x==null?void 0:x.key)==="_gridLayoutMeta")?M=M.map(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"?{...x,contents:k}:x):M.push({key:"_gridLayoutMeta",contents:k}),M};let yo="$R";const Ip=A.useUnit(A.pinia),{selectTitle:Op}=A.storeToRefs(Ip);let Lp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Rp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],$p=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Vp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ds=async(a,l,n=!0)=>{let r=[],o=a==null?void 0:a.map(async s=>{var u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl;let h=(k=(M=(C=(u=s==null?void 0:s.contents)==null?void 0:u.find(_e=>{var Oa;return(Oa=_e==null?void 0:_e.key)==null?void 0:Oa.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:k.类型,c=Object.values(s==null?void 0:s.name);c=c==null?void 0:c.reverse();let d=(W=s==null?void 0:s.contents)==null?void 0:W.map(_e=>_e==null?void 0:_e.key),m={comp:h,isShow:s==null?void 0:s.is_show,name:c==null?void 0:c[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:d,menuFilter:(I=s==null?void 0:s.filter)==null?void 0:I.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(j=s==null?void 0:s.filter)==null?void 0:j.fatherSyncs,relatedQuotes:(L=s==null?void 0:s.filter)==null?void 0:L.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(x=A.cloneDeep(c))==null?void 0:x.reverse()};for(let _e in c)parseInt(_e)>=1&&(m[`name${parseInt(_e)-1}`]=c[_e]);let b=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(g=s==null?void 0:s.filter)==null?void 0:g.menuFilter:[];if(((S=b==null?void 0:b.filter(_e=>_e==null?void 0:_e.includes("@If")))==null?void 0:S.length)>0){let _e=b==null?void 0:b.filter(Ze=>Ze==null?void 0:Ze.includes("@If"));_e=_e==null?void 0:_e[0],_e=(V=($=_e==null?void 0:_e.replace("(",yo))==null?void 0:$.split(yo))==null?void 0:V[1],_e=_e==null?void 0:_e.slice(0,(_e==null?void 0:_e.length)-1),_e!=null&&_e.includes("*")&&(_e=(Z=(ae=_e==null?void 0:_e.replace("{",yo))==null?void 0:ae.split(yo))==null?void 0:Z[1],_e=_e==null?void 0:_e.replace("}","")),_e=oe.calculatorAndToOr(_e);let Oa=(l==null?void 0:l.originPath)??"";(Oa==null?void 0:Oa[(Oa==null?void 0:Oa.length)-1])==="/"&&(Oa=Oa==null?void 0:Oa.slice(0,(Oa==null?void 0:Oa.length)-1));let Je=await en(Oa,!1),ie=(me=Je==null?void 0:Je.filter(Ze=>(Ze==null?void 0:Ze.comp)==="Table"))==null?void 0:me[0];ie=(F=(Ae=ie==null?void 0:ie.compData)==null?void 0:Ae.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:F.contents;let Xe=(J=(ne=Op.value)==null?void 0:ne.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:J.value;ie=(ce=ie==null?void 0:ie.map(Ze=>{for(let wa in Ze)if((Ze==null?void 0:Ze[wa])===Xe)return Ze}))==null?void 0:ce.filter(Ze=>Ze),ie=ie==null?void 0:ie[0],_e=_e==null?void 0:_e[0];let Aa=[];for(let Ze in _e){let wa="";qa.isObject(ie)&&(wa=($e=(Te=Object.keys(ie))==null?void 0:Te.filter(Fa=>Fa==null?void 0:Fa.includes("."+Ze)))==null?void 0:$e[0]),wa!==""&&(ie!=null&&ie[wa])&&(_e==null?void 0:_e[Ze])===(ie==null?void 0:ie[wa])||ie!=null&&ie[Ze]&&(_e==null?void 0:_e[Ze])===(ie==null?void 0:ie[Ze])?Aa.push(!0):Aa.push(!1)}if(Aa!=null&&Aa.some(Ze=>Ze===!1)&&((N=l==null?void 0:l.originPath)==null?void 0:N[((fe=l==null?void 0:l.originPath)==null?void 0:fe.length)-1])!=="/")return}if(h==="Table"||h==="Method"){!n&&((te=m==null?void 0:m.fatherSyncContents)==null?void 0:te.length)>0;let _e=((U=s==null?void 0:s.contents)==null?void 0:U.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("content")}))||[],Oa=[];m.comp="Table",_e.value=(Ce=_e==null?void 0:_e.value)==null?void 0:Ce.sort((He,va)=>parseInt(He==null?void 0:He.id)-parseInt(va==null?void 0:va.id)),_e.value=(Me=_e==null?void 0:_e.value)==null?void 0:Me.map(He=>{let va={};for(let ca in He)JSON.stringify(He==null?void 0:He[ca])==="{}"?va[ca]="":va[ca]=He==null?void 0:He[ca];return va}),Oa.push({key:"tableContents",contents:_e==null?void 0:_e.value});let Je=(pa=(ee=(Ta=(ra=(Pe=s==null?void 0:s.contents)==null?void 0:Pe.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("struct")}))==null?void 0:ra.value)==null?void 0:Ta[0])==null?void 0:ee.结构)==null?void 0:pa.contents;Array.isArray(Je==null?void 0:Je[0])?Je[0]=(ue=Je==null?void 0:Je[0])==null?void 0:ue.filter(He=>(He==null?void 0:He.prop)!=="sort"&&(He==null?void 0:He.prop)!=="relatedId"):Je=Je==null?void 0:Je.filter(He=>(He==null?void 0:He.prop)!=="sort"&&(He==null?void 0:He.prop)!=="relatedId"),Oa.push({key:"header",contents:Je}),Oa.push({key:"filter",contents:(Ge=(Be=(se=(Se=(ua=s==null?void 0:s.contents)==null?void 0:ua.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("struct")}))==null?void 0:Se.value)==null?void 0:se[0])==null?void 0:Be.引用)==null?void 0:Ge.contents});let ie=Lp,Xe=A.cloneDeep(Rp);h==="Method"&&Xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Je==null?void 0:Je[0])&&((da=Je==null?void 0:Je[0])==null?void 0:da.prop)==="disabled"&&(ie=$p,Xe=Vp);const Aa=["推力","真空","压力","温度","流量"],Ze=m.name;Ze&&Aa.includes(Ze)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let wa=[];if(!Array.isArray(Je==null?void 0:Je[0])&&(Je!=null&&Je.some(He=>{var va;return(He==null?void 0:He.calculatorFilter)&&((va=He==null?void 0:He.calculatorFilter)==null?void 0:va.includes("Manual"))}))){let He=(Ja=Je==null?void 0:Je.map(va=>va==null?void 0:va.calculatorFilter))==null?void 0:Ja.filter(va=>va&&(va==null?void 0:va.includes("Manual")));He==null||He.forEach(va=>{var cl;let ca=oe.analyzeSplitToContent(va,",");if(ca=ca==null?void 0:ca.map(Le=>((Le==null?void 0:Le[(Le==null?void 0:Le.length)-1])===","&&(Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1)),Le)),ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=ca==null?void 0:ca.find(ja=>ja==null?void 0:ja.includes("@FunctionButton"));Le=(cl=Le==null?void 0:Le.split("="))==null?void 0:cl[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],wa.push(Le)}}),wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(va=>({label:va,prop:va,type:"methodButton"}))}else if(Array.isArray(Je==null?void 0:Je[0])&&((R=oe.getColumnChild(Je==null?void 0:Je[0]))!=null&&R.some(He=>{var va;return(He==null?void 0:He.calculatorFilter)&&((va=He==null?void 0:He.calculatorFilter)==null?void 0:va.includes("Manual"))}))){let He=(X=(H=oe.getColumnChild(Je==null?void 0:Je[0]))==null?void 0:H.map(va=>va==null?void 0:va.calculatorFilter))==null?void 0:X.filter(va=>va&&(va==null?void 0:va.includes("Manual")));He==null||He.forEach(va=>{var cl;let ca=oe.analyzeSplitToContent(va,",");if(ca=ca==null?void 0:ca.map(Le=>((Le==null?void 0:Le[(Le==null?void 0:Le.length)-1])===","&&(Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1)),Le)),ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=ca==null?void 0:ca.find(ja=>ja==null?void 0:ja.includes("@FunctionButton"));Le=(cl=Le==null?void 0:Le.split("="))==null?void 0:cl[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],wa.push(Le)}}),wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(va=>({label:va,prop:va,type:"methodButton"}))}if(Oa.push({key:"extraButton",contents:ie}),Oa.push({key:"rowButton",contents:[...Xe,...wa]}),m.compData=await Po(Oa,l,m==null?void 0:m.nameContents),(he=m.compData)!=null&&he.find(He=>(He==null?void 0:He.key)==="tab")&&(m.tab=(ma=(de=m.compData)==null?void 0:de.find(He=>(He==null?void 0:He.key)==="tab"))==null?void 0:ma.contents),(oa=m.compData)!=null&&oa.find(He=>(He==null?void 0:He.key)==="step")&&(m.step=(_a=(Ve=m.compData)==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="step"))==null?void 0:_a.contents),(ze=m.compData)!=null&&ze.find(He=>(He==null?void 0:He.key)==="choice")&&(m.choice=(La=(ya=m.compData)==null?void 0:ya.find(He=>(He==null?void 0:He.key)==="choice"))==null?void 0:La.contents),(za=m.compData)!=null&&za.find(He=>(He==null?void 0:He.key)==="newType")){let He=(Ca=(ha=m.compData)==null?void 0:ha.find(va=>(va==null?void 0:va.key)==="newType"))==null?void 0:Ca.contents;m.comp=He,m.compData=(Ne=m.compData)==null?void 0:Ne.filter(va=>(va==null?void 0:va.key)!=="newType")}let Fa="",Za=(ye=m==null?void 0:m.compData)==null?void 0:ye.filter(He=>(He==null?void 0:He.key)==="fixType");(Za==null?void 0:Za.length)>0&&n&&(Fa=(Y=Za==null?void 0:Za[0])==null?void 0:Y.contents,m.comp=Fa)}else if(h==="Form"){let _e=[],Oa=(qe=(pe=(xe=s==null?void 0:s.contents)==null?void 0:xe.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("content")}))==null?void 0:pe.value)==null?void 0:qe[0],Je=[],ie=Array.isArray((sa=s==null?void 0:s.filter)==null?void 0:sa.menuFilter)?($a=s==null?void 0:s.filter)==null?void 0:$a.menuFilter:[];ie==null||ie.forEach(Ze=>{if(Ze!=null&&Ze.includes("@Param(Hide=Yes, prop=")||Ze!=null&&Ze.includes("(Hide=Yes, prop=")){const wa=Ze==null?void 0:Ze.match(/prop=([^,)]+)/);wa!=null&&wa[1]&&Je.push(wa==null?void 0:wa[1])}});let Xe=(aa=(Ie=(Ue=(Va=(Ma=s==null?void 0:s.contents)==null?void 0:Ma.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("struct")}))==null?void 0:Va.value)==null?void 0:Ue[0])==null?void 0:Ie.结构)==null?void 0:aa.contents,Aa=(ke=Xe==null?void 0:Xe.map(Ze=>(Ze.value=Oa==null?void 0:Oa[Ze==null?void 0:Ze.prop],Ze)))==null?void 0:ke.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId");Aa=Aa==null?void 0:Aa.map(Ze=>(Je!=null&&Je.includes(Ze==null?void 0:Ze.prop)&&(Ze.isHideInForm=!0),Ze)),_e.push({key:"filter",contents:(Vl=(El=(Cl=(tl=(We=s==null?void 0:s.contents)==null?void 0:We.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("struct")}))==null?void 0:tl.value)==null?void 0:Cl[0])==null?void 0:El.引用)==null?void 0:Vl.contents}),_e.push({key:"formContent",contents:Aa}),_e.push({key:"paramHideProps",contents:Je}),m.compData=await Mp(_e,l,m==null?void 0:m.nameContents),(_l=m.compData)!=null&&_l.find(Ze=>(Ze==null?void 0:Ze.key)==="tab")&&(m.tab=(Qe=(jl=m.compData)==null?void 0:jl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab"))==null?void 0:Qe.contents),(Xa=m.compData)!=null&&Xa.find(Ze=>(Ze==null?void 0:Ze.key)==="step")&&(m.step=(ll=(ba=m.compData)==null?void 0:ba.find(Ze=>(Ze==null?void 0:Ze.key)==="step"))==null?void 0:ll.contents),(Ia=m.compData)!=null&&Ia.find(Ze=>(Ze==null?void 0:Ze.key)==="choice")&&(m.choice=(rl=(il=m.compData)==null?void 0:il.find(Ze=>(Ze==null?void 0:Ze.key)==="choice"))==null?void 0:rl.contents)}return m});return r=await Promise.all(o),r},Pp=A.useLoginState(A.pinia),{loginUserInfo:Ei}=A.storeToRefs(Pp),Fp=async(a,l="Manual",n=[])=>{var h;let r=a;r=r==null?void 0:r.filter(c=>c==null?void 0:c.functionName);let o=(h=r==null?void 0:r.filter(c=>{var d;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((d=c==null?void 0:c.calculatorFilter)==null?void 0:d.includes(l))||l!=="Manual")}))==null?void 0:h.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),s=r==null?void 0:r.map(async c=>{let d=o==null?void 0:o.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await dc(c,d,r,l,r,n),c});return s=await Promise.all(s),s},xt=async(a,l,n="Manual",r=[])=>{var d;let o=a,s;Array.isArray(l==null?void 0:l[0])?s=oe.getColumnChild(l==null?void 0:l[0]):s=l;let h=(d=s==null?void 0:s.filter(m=>{var b;return(m==null?void 0:m.calculatorFilter)&&((b=m==null?void 0:m.calculatorFilter)==null?void 0:b.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:d.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),c=o==null?void 0:o.map(async m=>(m=await dc(m,h,s,n,o,r),m));return c=await Promise.all(c),c},jp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(h=>{var c;if(l!=null&&l[h]){let d=l==null?void 0:l[h];s=s?d?Al.isEqual(d.toString(),s.toString()):void 0:d}else{let d=(c=o==null?void 0:o.find(b=>(b==null?void 0:b.label)===h))==null?void 0:c.prop,m=(l==null?void 0:l[d])??0;s=s?m?Al.isEqual(m.toString(),s.toString()):void 0:m}}),l[r]=s===void 0?void 0:s?1:0,l},Dr=a=>{const[l,n,r]=A.cloneDeep(a).split(":").map(Number);let o=+a;return!a||!(a!=null&&a.includes(":"))?o:(l??0)*3600+(n??0)*60+(r??0)},Kn=a=>{const l=s=>s.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),o=a%60;return`${l(n)}:${l(r)}:${parseInt(l(o))}`},Hp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W,I,j;if(l!=null&&l[d]){if(s==="Row")if(!((b=((m=l==null?void 0:l[d])==null?void 0:m.toString())??"")!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let L=+(l==null?void 0:l[d]);c=c+L}else c=Dr(c.toString())+Dr((C=l==null?void 0:l[d])==null?void 0:C.toString()),c=Kn(c)}else if(s==="Row"){let L=(M=o==null?void 0:o.find(E=>(E==null?void 0:E.label)===d))==null?void 0:M.prop;if(!((W=Number.isNaN(l==null?void 0:l[L])?"":(k=l==null?void 0:l[L])==null?void 0:k.toString())!=null&&W.includes(":"))&&!((I=c==null?void 0:c.toString())!=null&&I.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=Dr(c==null?void 0:c.toString())+Dr((j=(l==null?void 0:l[L])??0)==null?void 0:j.toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u+C},0)}return l[r]=c,l},Up=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c-I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())-Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c-j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())-Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u-C},0)}return l[r]=c,l},qp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c*I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())*Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!(l!=null&&l[I]))c=void 0;else if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c*j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())*Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u*C},0)}return l[r]=c,l},Wp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c/I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())/Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c/j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())/Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u/C},0)}return l[r]=c.toFixed(2),l},Kp=async a=>{var s,h,c,d,m,b,u,C,M,k,W;let l=(s=a==null?void 0:a.valueString)==null?void 0:s[0],n=(h=a==null?void 0:a.contents)==null?void 0:h.calculatorFilter,r=0,o=a==null?void 0:a.contents;if(l!=null&&l.includes("$")&&!(l!=null&&l.includes("{"))){(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let I=(d=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:d.replaceAll(":","/"),j=await en(I,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(j=(b=j==null?void 0:j.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:b[0],n!==""){let E=j.compData;E=E==null?void 0:E.filter(x=>(x==null?void 0:x.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Po(E,{}),r=(C=(u=E==null?void 0:E.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:C.length}else r=(W=(k=(M=j==null?void 0:j.compData)==null?void 0:M.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:W.length}return o.value=r,o},go={Sum:Hp,Substract:Up,Multiple:qp,Divide:Wp,Compare:jp,VecDimCount:Kp},dc=async(a,l,n,r="Auto",o,s=[])=>{var b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F;let h=a,c=[],d=await A.getPageDataApi({platId:parseInt((b=Ei==null?void 0:Ei.value)==null?void 0:b.plat_id),pageName:"menu"});d=(M=(C=(u=d==null?void 0:d.data)==null?void 0:u.result)==null?void 0:C.filter(ne=>(ne==null?void 0:ne.property_name)===""))==null?void 0:M[0];let m=[];if(d!=null&&d.object_name){d=d==null?void 0:d.object_name;let ne=await A.getPageDataApi({platId:parseInt((k=Ei==null?void 0:Ei.value)==null?void 0:k.plat_id),pageName:d});ne=(E=(L=(j=(I=(W=ne==null?void 0:ne.data)==null?void 0:W.result)==null?void 0:I[0])==null?void 0:j.contents)==null?void 0:L.find(J=>{var ce;return(ce=J==null?void 0:J.key)==null?void 0:ce.includes("content")}))==null?void 0:E.value,c=(x=ne==null?void 0:ne.map(J=>({functionName:J==null?void 0:J.函数名称,functionContent:J==null?void 0:J.输出值})))==null?void 0:x.filter(J=>(J==null?void 0:J.functionContent)!==""),c==null||c.forEach(J=>{m.push(J.functionName),go[J.functionName]=new Function("return "+J.functionContent)()})}if((l==null?void 0:l.length)===0)return h;for(let ne in l){let J=(w=l==null?void 0:l[ne])==null?void 0:w.functionName;const ce=go==null?void 0:go[J];let Te=(g=l==null?void 0:l[ne])==null?void 0:g.methods;if(Te=oe.analyzeSplitToContent(Te,","),(S=Te==null?void 0:Te.find($e=>$e==null?void 0:$e.includes("@FunctionType")))!=null&&S.includes(r)||r==="Auto"||(Te==null?void 0:Te.length)===0){let $e=((ae=(V=($=Te==null?void 0:Te.find(fe=>fe==null?void 0:fe.includes("@FunctionExtent")))==null?void 0:$.replace(":","="))==null?void 0:V.split("="))==null?void 0:ae[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(fe=>fe===J)){let fe="";try{let te=(Z=l==null?void 0:l[ne])==null?void 0:Z.functionRelatedWords,U=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Me=>{var Pe;return Me==null?void 0:Me[(Pe=l==null?void 0:l[ne])==null?void 0:Pe.prop]}):["0"];U=U==null?void 0:U.map(Me=>Me==null?void 0:Me.slice((Me==null?void 0:Me.length)-5,Me==null?void 0:Me.length)),U=U==null?void 0:U.map(Me=>oe.isNumber(parseInt(Me))&&parseInt(Me)?parseInt(Me):0);let Ce=Math.max(...U);te=te==null?void 0:te.map(Me=>{if(Me!=null&&Me.includes("'"))return Me==null?void 0:Me.replaceAll("'","");if(Me!=null&&Me.includes("@"))return Ce+1;{let Pe=Object.keys(h);return Me=(h==null?void 0:h[Me])??(h==null?void 0:h[Pe==null?void 0:Pe.find(ra=>ra==null?void 0:ra.includes("."+Me))]),Me}}),fe=ce(...te)}catch(te){qa.ElMessage.warning("关联数据出现错误,"+te.message)}let N=(me=l==null?void 0:l[ne])==null?void 0:me.prop;h[N]=fe}else h=await ce({contents:h,valueString:(Ae=l==null?void 0:l[ne])==null?void 0:Ae.functionRelatedWords,prop:(F=l==null?void 0:l[ne])==null?void 0:F.prop,headers:n,typeString:$e,allContents:o})}}return h},Gp=A.useLoginState(A.pinia),{loginUserInfo:pn}=A.storeToRefs(Gp),Yp=A.useMenuState(A.pinia),{activeMenuPath:ps,currentMenuPath:bo}=A.storeToRefs(Yp),pc=A.useUnit(A.pinia);let fs="$R";const{selectTitle:Ti}=A.storeToRefs(pc),fc=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L;let n=ps.value,r="",o=((h=Ti==null?void 0:Ti.value)==null?void 0:h.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(d=a==null?void 0:a[0])==null?void 0:d.father_name);let s=[];if(r!==""){let E=r;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let x=await en(E,!1);x=(m=x==null?void 0:x[0])==null?void 0:m.compData;let w=(b=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:b.contents;w=((u=w==null?void 0:w.find(S=>S==null?void 0:S.isMainKey))==null?void 0:u.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let g=(k=(M=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:k.map(S=>({label:S==null?void 0:S[w],value:S==null?void 0:S[w]}));s=(W=r==null?void 0:r.split("/"))==null?void 0:W.map(S=>(S===""?o?(o.isShow=!0,S=o):S={value:S,condition:"child",options:g,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:S={condition:"parent",value:S.trim(),isShow:!0},S))}if(n!==""){let E=(I=n==null?void 0:n.split("/"))==null?void 0:I.map(x=>(x={condition:"normal",value:x.trim(),isShow:!0},x));((j=E==null?void 0:E[0])==null?void 0:j.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((x,w)=>w!==0)),s=[...s??[],...E??[]]}r===""&&o&&((o==null?void 0:o.parentContent)!==ps.value&&(o.isShow=!1),(o==null?void 0:o.value)!==""&&s.push(o)),pc.setSelectTitle(s)},Jp=async a=>{var s,h,c,d,m,b,u,C,M;let l=await A.getPageDataApi({platId:parseInt((s=pn==null?void 0:pn.value)==null?void 0:s.plat_id),pageName:"menu"}),n=(h=l==null?void 0:l.data)==null?void 0:h.result,r=(b=(m=(d=(c=a==null?void 0:a.filter(k=>(k==null?void 0:k.comp)==="Table"))==null?void 0:c[0])==null?void 0:d.compData)==null?void 0:m.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:b.contents;r=(M=(C=(u=r==null?void 0:r.replace("(",fs))==null?void 0:u.split(fs))==null?void 0:C[0])==null?void 0:M.replaceAll(":","/");let o=n==null?void 0:n.filter(k=>{var W;return(k==null?void 0:k.object_name)===bo.value+"/"||((W=bo.value)==null?void 0:W.includes(r))&&r+"/"===(k==null?void 0:k.object_name)||r===(k==null?void 0:k.object_name)});return(o==null?void 0:o.length)>0&&(a=a==null?void 0:a.map(k=>{var W;return(k==null?void 0:k.comp)==="Table"&&(k.compData=(W=k==null?void 0:k.compData)==null?void 0:W.map(I=>{var j,L,E;return(I==null?void 0:I.key)==="header"&&(Array.isArray((j=I.contents)==null?void 0:j[0])?I.contents[0]=(E=I.contents[0])==null?void 0:E.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,((g=bo.value)!=null&&g.includes(r)||r)&&(x.fatherPath=r)),x}):I.contents=(L=I.contents)==null?void 0:L.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,((g=bo.value)!=null&&g.includes(r)||r)&&(x.fatherPath=r)),x})),I})),k})),a},en=async(a,l,n={})=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r=await A.getPageDataApi({platId:parseInt((h=pn==null?void 0:pn.value)==null?void 0:h.plat_id),pageName:a}),o=(c=r==null?void 0:r.data)==null?void 0:c.result;if((o==null?void 0:o.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await A.getPageDataApi({platId:parseInt((d=pn==null?void 0:pn.value)==null?void 0:d.plat_id),pageName:n==null?void 0:n.originPath});if(((b=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:b.length)>0){let E=await ds((u=L==null?void 0:L.data)==null?void 0:u.result,n,!1);E=E==null?void 0:E.map(async g=>{var V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja;let S=[],$=(V=Object.keys(g))==null?void 0:V.filter(R=>(R==null?void 0:R.includes("name"))&&R!=="nameContents");for(let R in g)$!=null&&$.find(H=>H===R)&&S.push(g==null?void 0:g[R]);if(S=S.reverse(),(g==null?void 0:g.comp)==="Table"){let R=(me=(Z=(ae=g==null?void 0:g.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:Z.contents)==null?void 0:me.map(X=>{let he={};for(let de in X)de!=="id"&&de!=="create_time"&&de!=="update_time"&&de!=="sort"&&de!=="create_user_id"&&de!=="update_user_id"&&de!=="department_id"&&de!=="relatedId"&&(he[de]=X==null?void 0:X[de]);return X=Object.values(he),X}),H=(F=(Ae=g==null?void 0:g.compData)==null?void 0:Ae.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:F.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ne=H[0])!=null&&ne.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H[0]=(J=H[0])==null?void 0:J.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H=H==null?void 0:H.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(X=>{var he;return(X==null?void 0:X.calculatorFilter)&&((he=X==null?void 0:X.calculatorFilter)==null?void 0:he.includes("Auto"))})&&(R=await xt(R,H,"Auto"),R=R==null?void 0:R.map(X=>Object.values(X))),g!=null&&g.fatherSyncContents){Array.isArray((ce=g==null?void 0:g.fatherSyncContents)==null?void 0:ce[0])&&(g.fatherSyncContents=(Te=g==null?void 0:g.fatherSyncContents)==null?void 0:Te[0]);let X=($e=Ti.value)==null?void 0:$e.find(he=>(he==null?void 0:he.condition)==="child");g.fatherSyncContents=(fe=g==null?void 0:g.fatherSyncContents)==null?void 0:fe.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}if(g!=null&&g.sonSyncContents){Array.isArray((N=g==null?void 0:g.sonSyncContents)==null?void 0:N[0])&&(g.sonSyncContents=(te=g==null?void 0:g.sonSyncContents)==null?void 0:te[0]);let X=(U=Ti.value)==null?void 0:U.find(he=>(he==null?void 0:he.condition)==="child");g.sonSyncContents=(Ce=g==null?void 0:g.sonSyncContents)==null?void 0:Ce.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}if(g!=null&&g.relatedQuotes){Array.isArray((Me=g==null?void 0:g.relatedQuotes)==null?void 0:Me[0])&&(g.relatedQuotes=(Pe=g==null?void 0:g.relatedQuotes)==null?void 0:Pe[0]);let X=(ra=Ti.value)==null?void 0:ra.find(he=>(he==null?void 0:he.condition)==="child");g.relatedQuotes=(Ta=g==null?void 0:g.relatedQuotes)==null?void 0:Ta.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}g={filter:(pa=(ee=g==null?void 0:g.compData)==null?void 0:ee.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:pa.contents,key:g==null?void 0:g.comp,name:S,tableColumns:H,tableContents:R,menuFilter:g==null?void 0:g.menuFilter,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}else{let R=(Se=(ua=(ue=g==null?void 0:g.compData)==null?void 0:ue.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ua.contents)==null?void 0:Se.map(X=>(X==null?void 0:X.value)??"");R=[R];let H=(Ge=(Be=(se=g==null?void 0:g.compData)==null?void 0:se.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:Ge.map(X=>(X.value="",X));g={contents:R,filter:(Ja=(da=g==null?void 0:g.compData)==null?void 0:da.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Ja.contents,key:g==null?void 0:g.comp,name:S,value:H,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}return g.isShow=!1,g}),E=await Promise.all(E);let x=[{key:"menuPath",contents:[{path:a,fatherPath:(k=(M=(C=L==null?void 0:L.data)==null?void 0:C.result)==null?void 0:M[0])==null?void 0:k.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((W=pn==null?void 0:pn.value)==null?void 0:W.plat_id),changeData:x});let w=await A.getPageDataApi({platId:parseInt((I=pn==null?void 0:pn.value)==null?void 0:I.plat_id),pageName:a});o=(j=w==null?void 0:w.data)==null?void 0:j.result}}l&&await fc(o,!!(n!=null&&n.originPath));let s=await ds(o,n);return l&&(s=await Jp(s)),s==null?void 0:s.filter(L=>L)},hs=async a=>{var r,o,s,h,c,d,m,b,u,C,M;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(o=a.value)==null?void 0:o.split(" "))==null?void 0:s[0]));let n=await en(l,!1);if(n=(h=n==null?void 0:n.filter(k=>{var W,I;return(k==null?void 0:k.name)===((I=a==null?void 0:a.groups)==null?void 0:I[((W=a==null?void 0:a.groups)==null?void 0:W.length)-1])}))==null?void 0:h[0],(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="tableContents"))!=null&&d.contents){n=(b=(m=n==null?void 0:n.compData)==null?void 0:m.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:b.contents;let k=((u=a==null?void 0:a.words)==null?void 0:u[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(W=>{var I,j,L,E;return(W==null?void 0:W[a!=null&&a.endChildMenu?k:(I=a==null?void 0:a.words)==null?void 0:I[0]])===(a!=null&&a.relatedWords&&((j=a==null?void 0:a.relatedWords)==null?void 0:j.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let k=(M=(C=n==null?void 0:n.compData)==null?void 0:C.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:M.contents,W={};return k==null||k.forEach(I=>{W[I.prop]=I.value}),W}},Xp={key:0,class:"extra-button-content"},Zp={class:"table-operator-wrap"},Qp={key:0,class:"extra-button-filter"},ef={key:1,class:"extra-header"},af=["onClick"],lf={class:"table-op-text"},rf={class:"table-op-text"},nf={class:"drop-menu",style:{width:"120px"}},of=["onClick"],tf={key:0},sf={key:1},cf=["onClick"],uf={class:"table-op-text"},df={key:1,class:"extra-button-content tabs-button-wrapper"},pf={class:"table-operator-wrap"},ff={class:"extra-button-filter"},hf={key:0,class:"extra-header"},vf={class:"table-op-action"},mf={class:"table-op-text"},yf={class:"drop-menu",style:{width:"120px"}},gf={key:0},bf={key:1},kf=["onClick"],xf={class:"table-op-text"},wf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,o=()=>{const $=(r==null?void 0:r.menuFilter)||[];return Array.isArray($)&&($==null?void 0:$.some(V=>{const ae=typeof V=="string"?V:JSON.stringify(V);return ae==null?void 0:ae.includes("HideGroup=Yes")}))},s=e.ref(""),h=e.ref(!1),c=e.ref(!1),d=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),b=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function u($,V){return $.map(ae=>{const Z={...ae};return V.forEach(me=>{delete Z[me]}),Z})}function C($){if(!$||$.t!=="n")return($==null?void 0:$.v)??"";const V=$.v;if($.z){const ae=String($.z).toLowerCase(),Z=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const F of Z)if(ae.includes(F))return M(V);const me=/[ymdhms]/.test(ae),Ae=/^[0#\.\,\s]+$/.test(ae.replace(/[\\\/\-:]/g,""));if(me&&!Ae)return M(V)}if(V>=1&&V<=73050){if(V<5e3)return V;if(V>=5e3&&V<4e4){const ae=Math.floor((V-25569)/365.25)+1970;return ae>=1970&&ae<=2e3&&$.z&&/[ymd]/.test(String($.z).toLowerCase())?M(V):V}if(V>=4e4)return M(V)}return V}function M($){if(typeof $!="number")return $;try{const V=new Date(($-25569)*86400*1e3);if(isNaN(V.getTime()))return $;const ae=V.getFullYear(),Z=String(V.getMonth()+1).padStart(2,"0"),me=String(V.getDate()).padStart(2,"0");return`${ae}-${Z}-${me}`}catch{return $}}const k=$=>{const V=$.raw;if(!V)return;const ae=new FileReader;ae.onload=Z=>{try{const me=new Uint8Array(Z.target.result),Ae=oe.readSync(me,{type:"array"}),F=Ae.SheetNames[0],ne=Ae.Sheets[F],ce=oe.utils.decode_range(ne["!ref"]).e.c+1,Te=new Array(ce).fill(""),$e=[];for(const Ce in ne){if(Ce[0]==="!")continue;const{r:Me,c:Pe}=oe.utils.decode_cell(Ce),ra=ne[Ce];let Ta=C(ra);if((Ta==null||Ta==="")&&(Ta=""),Me===0)Te[Pe]=Ta;else{if(!$e[Me-1]){$e[Me-1]={};for(let ee=0;ee<ce;ee++)$e[Me-1][`col_${ee}`]=""}$e[Me-1][`col_${Pe}`]=Ta}}for(let Ce=0;Ce<ce;Ce++)Te[Ce]===void 0&&(Te[Ce]="");const fe=[];for(let Ce=0;Ce<Te.length;Ce++)(!Te[Ce]||Te[Ce].toString().trim()==="")&&fe.push(Ce);let N,te;(fe==null?void 0:fe.length)>0?(qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=Te.filter((Ce,Me)=>!fe.includes(Me)),te=u($e,fe==null?void 0:fe.map(Ce=>`col_${Ce}`))):(N=Te,te=$e);const U=$e==null?void 0:$e[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",N,te)}catch(me){throw qa.ElMessage.error(me.message),new Error(me.message)}},ae.readAsArrayBuffer(V)},W=$=>{var ae;const V=(ae=d.value)==null?void 0:ae.reduce((Z,me,Ae)=>(Ae===0?Z[me.label]=$:Z[me.label]=me==null?void 0:me.value,Z),{});n("filter",V,$,!0)},I=($,V={})=>{n("buttonClick",$,"",V)},j=$=>{var V,ae;d.value=(ae=(V=oe.getColumnChild(A.cloneDeep($)))==null?void 0:V.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:ae.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.prop)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2,prop:(Z==null?void 0:Z.prop)??""}))},L=e.ref(!1),E=$=>{var V;if(($==null?void 0:$.buttonName)==="确认"&&(n("filter",$==null?void 0:$.content),L.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ae=A.cloneDeep($==null?void 0:$.content);for(const Z in ae)ae[Z]="";d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""})),n("filter",ae),L.value=!1}h.value=!1},x=()=>{h.value=!h.value,c.value=!0},w=()=>{var V,ae;d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""}));const $=(ae=d.value)==null?void 0:ae.reduce((Z,me)=>(Z[me.label]=me.value,Z),{});n("filter",$)},g=e.ref(null);let S;return S=$=>{var me;if(!h.value)return;const V=(me=g==null?void 0:g.value)==null?void 0:me.$el,ae=V==null?void 0:V.contains($.target);let Z=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Ae=>{Ae.contains($.target)&&(Z=!0)}),!ae&&!Z&&(h.value=!1)},e.onMounted(()=>{document.addEventListener("click",S),j(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",S)}),e.watch(()=>r.columns,()=>{j(r.columns)},{deep:!0,immediate:!0}),($,V)=>{var ne,J,ce,Te,$e,fe,N,te;const ae=e.resolveComponent("el-icon"),Z=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-input"),Ae=e.resolveComponent("el-upload"),F=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Xp,[o()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Zp,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(Pu,{trigger:"contextmenu",ref_key:"popOverRef",ref:g,title:"",width:800,placement:"bottom-start",isVisible:h.value,"onUpdate:isVisible":V[4]||(V[4]=U=>h.value=U)},{reference:e.withCtx(()=>{var U,Ce,Me,Pe;return[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":V[0]||(V[0]=ra=>s.value=ra),style:{"min-width":"80px"},placeholder:L.value?(Me=(Ce=(U=a.filterValues)==null?void 0:U.filter(ra=>ra))==null?void 0:Ce.slice(0,3))==null?void 0:Me.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:W,disabled:((Pe=d.value)==null?void 0:Pe.length)===0},{suffix:e.withCtx(()=>{var ra,Ta;return[!s.value&&((Ta=(ra=a.filterValues)==null?void 0:ra.filter(ee=>ee))!=null&&Ta.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-content-value",onKeydown:V[1]||(V[1]=e.withModifiers(()=>{},["stop"])),onKeyup:V[2]||(V[2]=e.withModifiers(()=>{},["stop"])),onKeypress:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((ne=a.buttons)==null?void 0:ne.length)>0?(e.openBlock(),e.createElementBlock("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=a.buttons)==null?void 0:J.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,Ce)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ce},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Ae,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:ra=>I(U==null?void 0:U.label)},[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",lf,e.toDisplayString(U==null?void 0:U.label),1)],10,af)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(sl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",rf,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Pe=>{var ra,Ta;return e.openBlock(),e.createElementBlock("div",{key:Pe==null?void 0:Pe.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ee=>!a.lockingPage&&I(Pe==null?void 0:Pe.label)},[e.createTextVNode(e.toDisplayString(Pe==null?void 0:Pe.label),1),(ra=Pe==null?void 0:Pe.label)!=null&&ra.includes("选中")?(e.openBlock(),e.createElementBlock("span",tf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=Pe==null?void 0:Pe.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",sf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,of)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Pe=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:((Me=b==null?void 0:b.find(Pe=>(Pe==null?void 0:Pe.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",uf,e.toDisplayString(U==null?void 0:U.label),1)],10,cf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",df,[e.createElementVNode("div",pf,[e.createElementVNode("div",ff,[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":V[5]||(V[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:L.value?($e=(Te=(ce=a.filterValues)==null?void 0:ce.filter(U=>U))==null?void 0:Te.slice(0,3))==null?void 0:$e.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:W,disabled:((fe=d.value)==null?void 0:fe.length)===0},{suffix:e.withCtx(()=>{var U,Ce;return[!s.value&&((Ce=(U=a.filterValues)==null?void 0:U.filter(Me=>Me))!=null&&Ce.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((N=a.buttons)==null?void 0:N.length)>0?(e.openBlock(),e.createElementBlock("div",hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=a.buttons)==null?void 0:te.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,Ce)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ce},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Ae,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",vf,[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",mf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(sl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(F,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Pe;return[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",yf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Pe=>(e.openBlock(),e.createBlock(F,{key:Pe==null?void 0:Pe.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ra=>I(Pe==null?void 0:Pe.label)},{default:e.withCtx(()=>{var ra,Ta;return[e.createTextVNode(e.toDisplayString(Pe==null?void 0:Pe.label),1),(ra=Pe==null?void 0:Pe.label)!=null&&ra.includes("选中")?(e.openBlock(),e.createElementBlock("span",gf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=Pe==null?void 0:Pe.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",bf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Pe=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:(Me=b==null?void 0:b.find(Pe=>(Pe==null?void 0:Pe.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon},null,8,["name"]),e.createElementVNode("span",xf,e.toDisplayString(U==null?void 0:U.label),1)],10,kf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},_f=Zl._export_sfc(wf,[["__scopeId","data-v-44a17652"]]),Sf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=e.resolveComponent("el-table-column"),o=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(o,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var h;return e.openBlock(),e.createBlock(r,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((h=s==null?void 0:s.label)==null?void 0:h.length)*2||4)*27)},{default:e.withCtx(c=>[e.renderSlot(l.$slots,"content",{row:c.row,column:c.column,$index:c.$index,scope:c}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(d,m)=>(e.openBlock(),e.createBlock(sl._sfc_main$2,{key:m,column:d,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(b,u)=>({name:u,fn:e.withCtx(({row:C,slotData:M,item:k,column:W})=>[e.renderSlot(l.$slots,u,e.mergeProps({ref_for:!0},M??C,{item:k??d,slotData:M??C,row:C,column:W,columnProp:d}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Ef extends Al.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,o){const s=this,h=new Al.FileLoader(s.manager);h.setPath(s.path),h.setResponseType("arraybuffer"),h.setRequestHeader(s.requestHeader),h.setWithCredentials(s.withCredentials),h.load(l,function(c){try{n(s.parse(c))}catch(d){o?o(d):console.error(d),s.manager.itemError(l)}},r,o)}_getDataView(l,n,r,o){switch(r){case"F":return o===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return o===1?l.getInt8(n):o===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return o===1?l.getUint8(n):o===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(M,k){const W=M.length,I=new Uint8Array(k);let j=0,L=0,E,x,w;do if(E=M[j++],E<32){if(E++,L+E>k)throw new Error("Output buffer is not large enough");if(j+E>W)throw new Error("Invalid compressed data");do I[L++]=M[j++];while(--E)}else{if(x=E>>5,w=L-((E&31)<<8)-1,j>=W)throw new Error("Invalid compressed data");if(x===7&&(x+=M[j++],j>=W))throw new Error("Invalid compressed data");if(w-=M[j++],L+x+2>k)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=L)throw new Error("Invalid compressed data");do I[L++]=I[w++];while(--x+2)}while(j<W);return I}function r(M){const k={},W=new Uint8Array(M);let I="",j="",L=0,E=!1;const x=W.length;for(;L<x&&E===!1;){const $=String.fromCharCode(W[L++]);$===`
|
|
1
|
+
"use strict";var Mu=Object.defineProperty;var Iu=(a,l,n)=>l in a?Mu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var tn=(a,l,n)=>Iu(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),qa=require("./request-Dl8yi2iS.cjs"),A=require("./index-Pve69buQ.cjs"),sl=require("./index-I-s-QfVJ.cjs"),oe=require("./index-BszVYrt4.cjs"),Zl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Al=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CkTzrR_j.cjs"),Br=require("./index-BOkUwKV5.cjs"),Bo=require("./threeViewerHost-D64feDPk.cjs"),Rr=require("./index-DmwxzDGW.cjs"),os=require("./index-FLJJKkyQ.cjs"),Qs=require("./index-DBxrIHI8.cjs");;/* empty css */const No=require("./isString-CGrvcmBw.cjs"),ts=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),ec=require("./index-BVaHwt5f.cjs"),Ou=require("./index-BwJLSnJn.cjs"),$n=require("./MTLLoader-VuBhYPg2.cjs"),Lu=require("./URDFLoader-9WBWnVjI.cjs");var Ru="[object Boolean]";function ac(a){return a===!0||a===!1||qa.isObjectLike(a)&&qa.baseGetTag(a)==Ru}function $u(a){return a===void 0}const Vu=a=>a.match(/\((.*)\)/)[1],Pu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,n=e.ref(null),r=e.ref(!1),o=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>o.value,()=>{e.nextTick(()=>{var s,h;(h=(s=n.value)==null?void 0:s.updatePopper)==null||h.call(s)})},{deep:!0,immediate:!0}),(s,h)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":h[0]||(h[0]=d=>r.value=d),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:o})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Fu=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var d,m,b,u,C,M;const r=l.value??"";let o=(d=l==null?void 0:l.columnContent)==null?void 0:d.filter;if(o=(m=oe.analyzeSplitToContent(o,","))==null?void 0:m.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k)),o=o==null?void 0:o.find(k=>(k==null?void 0:k[0])==="("),(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=o==null?void 0:o.split("||"),!o)return{backgroundColor:void 0,color:void 0};let s=(u=(b=l==null?void 0:l.columnContent)==null?void 0:b.options)==null?void 0:u.findIndex(k=>(k==null?void 0:k.value)===r);s=o==null?void 0:o[s],s=oe.analyzeSplitToContent(s,","),s=s==null?void 0:s.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k));let h=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextBackRGBA"));h?h=oe.rgbaToColor((C=h==null?void 0:h.split("="))==null?void 0:C[1]):h=void 0;let c=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextRGBA"));return c?c=oe.rgbaToColor((M=c==null?void 0:c.split("="))==null?void 0:M[1]):c=void 0,{backgroundColor:h,color:c}});return(r,o)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),ju=Zl._export_sfc(Fu,[["__scopeId","data-v-3290070b"]]);function Hu(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const o=a.getContext("2d");if(!o)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:h=2,fillOpacity:c=.2}=r,d=a.getBoundingClientRect(),m=l.getBoundingClientRect(),b=l.naturalWidth,u=l.naturalHeight,C=m.width/b,M=m.height/u,k=Math.min(C,M),W=b*k,I=u*k,j=(d.width-W)/2,L=(d.height-I)/2,E=n.map(([w,g])=>{const S=j+w*W,$=L+g*I;return{x:S,y:$}});o.clearRect(0,0,a.width,a.height),o.beginPath(),o.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)o.lineTo(E[w].x,E[w].y);o.closePath();const x=s.replace(/[\d.]+\)$/,`${c})`);o.fillStyle=x,o.fill(),o.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),o.lineWidth=h,o.stroke()}function Si(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ss(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const Uu={key:0,class:"ocr-img-preview-root"},qu={class:"ocr-img-preview-window"},Wu={key:0,class:"img-preview-body"},Ku={class:"img-preview-header"},Gu={class:"img-header-left"},Yu={class:"img-name"},Ju={key:0,class:"img-header-right"},Xu={class:"img-index"},Zu={key:0,class:"img-thumb-list"},Qu=["onClick"],ed={key:1,class:"thumb-placeholder"},ad={class:"thumb-name"},ld={class:"img-preview-container"},rd={key:0,class:"img-placeholder"},nd={key:2,class:"img-placeholder"},id={key:0},od={key:1},td={key:1,class:"img-placeholder"},sd=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const n=a,r=l,o=e.computed({get:()=>n.visible,set:N=>r("update:visible",N)});let s=!1,h="",c=0,d=0,m=0,b=0,u=0,C=0,M=null;const k=N=>{var U,Ce;const te=(Ce=(U=N==null?void 0:N.target)==null?void 0:U.closest)==null?void 0:Ce.call(U,".ocr-img-preview-window");return te||document.querySelector(".ocr-img-preview-window")},W=N=>{if(!N||N==="none")return{tx:0,ty:0};let te=N.match(/matrix\(([^)]+)\)/);if(te){const U=te[1].split(",").map(Ce=>Number(Ce.trim()));return{tx:(U==null?void 0:U[4])||0,ty:(U==null?void 0:U[5])||0}}if(te=N.match(/matrix3d\(([^)]+)\)/),te){const U=te[1].split(",").map(Ce=>Number(Ce.trim()));return{tx:(U==null?void 0:U[12])||0,ty:(U==null?void 0:U[13])||0}}return te=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),te?{tx:Number(te[1])||0,ty:Number(te[2])||0}:{tx:0,ty:0}},I=(N,te,U)=>{N.style.transform=`translate(${te}px, ${U}px)`},j=N=>{const te=k(N);if(!te)return;s=!0,M=te,h="move",c=N.clientX,d=N.clientY;const U=window.getComputedStyle(te),{tx:Ce,ty:Me}=W(U.transform);u=Ce,C=Me,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},L=(N,te)=>{const U=k(N);if(!U)return;s=!0,M=U,h=te,c=N.clientX,d=N.clientY;const Ce=U.getBoundingClientRect();m=Ce.width,b=Ce.height;const Me=window.getComputedStyle(U),{tx:Pe,ty:ra}=W(Me.transform);u=Pe,C=ra,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},E=N=>{if(!s||!M)return;const te=N.clientX-c,U=N.clientY-d,Ce=360,Me=420;let Pe=m,ra=b,Ta=u,ee=C;if(h==="move"){Ta=u+te,ee=C+U,I(M,Ta,ee);return}if(h.includes("right")&&(Pe=Math.max(Ce,m+te)),h.includes("bottom")&&(ra=Math.max(Me,b+U)),h.includes("left")){const pa=m-te;pa<Ce?(Pe=Ce,Ta=u+(m-Ce)):(Pe=pa,Ta=u+te)}if(h.includes("top")){const pa=b-U;pa<Me?(ra=Me,ee=C+(b-Me)):(ra=pa,ee=C+U)}M.style.width=`${Pe}px`,M.style.height=`${ra}px`,I(M,Ta,ee)},x=()=>{s=!1,h="",M=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)},w=e.ref([]),g=e.ref(!1);e.watch(()=>n.images,async N=>{if(!Array.isArray(N)||N.length===0){w.value=[];return}g.value=!0;const te=[];for(const U of N)if(U.url&&!U.url.startsWith("blob:")&&!U.url.startsWith("http"))try{const Ce=await Al.downloadFile(U.url),Me=URL.createObjectURL(Ce);te.push({...U,blobUrl:Me})}catch(Ce){console.error(`Failed to load image for preview: ${U.url}`,Ce),te.push({...U,blobUrl:""})}else te.push({...U,blobUrl:U.url});w.value=te,g.value=!1},{deep:!0,immediate:!0});const S=e.ref(0),$=e.ref(null),V=e.ref(null),ae=e.computed(()=>w.value[S.value]||null),Z=()=>{if(!w.value.length){S.value=0;return}if(n.defaultImageName){const N=w.value.findIndex(te=>(te==null?void 0:te.name)===n.defaultImageName);S.value=N>=0?N:0}else S.value=0},me=N=>{if(!w.value.length)return;const te=Math.max(0,Math.min(N,w.value.length-1));S.value=te},Ae=()=>me(S.value-1),F=()=>me(S.value+1),ne=N=>{if(!N)return;const te=w.value.findIndex(U=>(U==null?void 0:U.name)===N);te>=0&&(S.value=te)},J=()=>{if(!V.value)return;const N=V.value.parentElement;if(!N)return;const te=N.getBoundingClientRect();V.value.width=te.width,V.value.height=te.height},ce=()=>{var Ce,Me;if(!V.value||!$.value||!n.focusedFieldName){V.value&&Si(V.value);return}const N=(Ce=$.value.$el)==null?void 0:Ce.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{ce()})};return}const te=((Me=ae.value)==null?void 0:Me.name)||"",U=ss(n.fieldMeta,n.focusedFieldName);if(!U){Si(V.value);return}if(U.imageName!==te){Si(V.value);return}J(),Hu(V.value,N,U.bboxNorm)},Te=()=>{e.nextTick(()=>{J(),ce()})};e.watch(()=>n.focusedFieldName,()=>{if(!o.value)return;const N=ss(n.fieldMeta,n.focusedFieldName);N!=null&&N.imageName&&ne(N.imageName),e.nextTick(()=>{ce()})}),e.watch(()=>{var N;return(N=ae.value)==null?void 0:N.name},()=>{o.value&&e.nextTick(()=>{V.value&&Si(V.value),ce()})}),e.watch(()=>n.visible,N=>{N?(Z(),e.nextTick(()=>{J(),ce()})):V.value&&Si(V.value)}),e.watch(()=>n.defaultImageName,()=>{o.value&&Z()});let $e=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&($e=new ResizeObserver(()=>{J(),e.nextTick(()=>{ce()})}),(N=V.value)!=null&&N.parentElement&&$e.observe(V.value.parentElement))}),e.onUnmounted(()=>{$e&&($e.disconnect(),$e=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)});const fe=()=>{V.value&&Si(V.value),r("update:visible",!1),r("close")};return(N,te)=>{var ra,Ta;const U=e.resolveComponent("el-button"),Ce=e.resolveComponent("el-image"),Me=e.resolveComponent("Loading"),Pe=e.resolveComponent("el-icon");return o.value?(e.openBlock(),e.createElementBlock("div",Uu,[te[12]||(te[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",qu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(j,["stop"])},[te[8]||(te[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:fe},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:te[0]||(te[0]=e.withModifiers(ee=>L(ee,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:te[1]||(te[1]=e.withModifiers(ee=>L(ee,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:te[2]||(te[2]=e.withModifiers(ee=>L(ee,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:te[3]||(te[3]=e.withModifiers(ee=>L(ee,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:te[4]||(te[4]=e.withModifiers(ee=>L(ee,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:te[5]||(te[5]=e.withModifiers(ee=>L(ee,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:te[6]||(te[6]=e.withModifiers(ee=>L(ee,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:te[7]||(te[7]=e.withModifiers(ee=>L(ee,"bottom-right"),["stop"]))},null,32),ae.value?(e.openBlock(),e.createElementBlock("div",Wu,[e.createElementVNode("div",Ku,[e.createElementVNode("div",Gu,[e.createElementVNode("span",Yu,e.toDisplayString(ae.value.name?ae.value.name+(ae.value.url&&ae.value.url.lastIndexOf(".")!==-1?ae.value.url.substring(ae.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ju,[e.createVNode(U,{size:"small",disabled:S.value===0,onClick:Ae},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Xu,e.toDisplayString(S.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(U,{size:"small",disabled:S.value===w.value.length-1,onClick:F},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Zu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ee,pa)=>(e.openBlock(),e.createElementBlock("div",{key:(ee.name||"")+"-"+pa,class:e.normalizeClass(["img-thumb-item",{active:pa===S.value}]),onClick:ue=>me(pa)},[ee!=null&&ee.blobUrl?(e.openBlock(),e.createBlock(Ce,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",ed,"加载失败")),e.createElementVNode("div",ad,e.toDisplayString(ee.name||"-"),1)],10,Qu))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ld,[g.value?(e.openBlock(),e.createElementBlock("div",rd,[e.createVNode(Pe,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),te[11]||(te[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(ra=ae.value)!=null&&ra.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(Ce,{ref_key:"imageRef",ref:$,src:ae.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[ae.value.blobUrl],onLoad:Te},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:V,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",nd,[(Ta=ae.value)!=null&&Ta.url?(e.openBlock(),e.createElementBlock("span",id,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",od,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",td,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),cd=Zl._export_sfc(sd,[["__scopeId","data-v-48a4ecb1"]]),ud={class:"cert-preview-body"},dd={key:0,class:"pdf-preview-container"},pd={class:"thumbs"},fd=["onClick"],hd={class:"thumb-img"},vd=["src"],md={key:1,class:"thumb-loading"},yd={class:"thumb-title"},gd={class:"viewer"},bd={key:0,class:"viewer-img-wrap"},kd=["src"],xd={key:1,class:"viewer-loading"},wd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(""),s=e.ref(""),h=e.computed(()=>(n.versions||[]).find(k=>String(k.versionId)===String(o.value))),c=e.ref({}),d=e.ref(""),m=e.ref("证书附件.pdf"),b=()=>{try{Object.values(c.value||{}).forEach(k=>{k&&URL.revokeObjectURL(k)}),d.value&&URL.revokeObjectURL(d.value)}catch{}c.value={},d.value=""},u=async k=>{if(!k||k.fileType==="pdf")return;const W=Array.isArray(k.images)?k.images:[];for(const I of W){const j=I==null?void 0:I.url;if(!(!j||c.value[j]))try{const L=await A.platformDownloadFile({url:j}),E=URL.createObjectURL(L.data);c.value={...c.value,[j]:E}}catch{}}},C=async k=>{var I;if(!k||k.fileType!=="pdf"){d.value="";return}const W=k.sourceUrl||"";if(!W){d.value="";return}if(d.value){try{URL.revokeObjectURL(d.value)}catch{}d.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:W,versionId:k==null?void 0:k.versionId,certNo:k==null?void 0:k.certNo});const j=await A.platformDownloadFile({url:W});console.log("[CertificatePreview] PDF响应:",{url:W,status:j==null?void 0:j.status,size:(I=j==null?void 0:j.data)==null?void 0:I.size});const L=URL.createObjectURL(j.data);d.value=L;const E=k.certNo?String(k.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(j){console.error("[CertificatePreview] PDF加载失败:",{url:W,error:j}),d.value=""}};e.watch(()=>n.visible,async k=>{var I;if(!k){b();return}const W=(I=n.versions)==null?void 0:I[0];o.value=(W==null?void 0:W.versionId)||"",await u(W),await C(W)},{immediate:!0}),e.watch(()=>o.value,async()=>{var W,I;const k=h.value;if(!k){s.value="",d.value="";return}if(k.fileType==="pdf"){s.value="",await C(k);return}d.value="",s.value=((I=(W=k.images)==null?void 0:W[0])==null?void 0:I.url)||"",await u(k)},{immediate:!0});const M=()=>{r("update:visible",!1),b()};return e.onBeforeUnmount(()=>{b()}),(k,W)=>{const I=e.resolveComponent("el-empty"),j=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,{"model-value":k.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:M},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:M},{default:e.withCtx(()=>W[1]||(W[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[k.versions&&k.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:o.value,"onUpdate:modelValue":W[0]||(W[0]=w=>o.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.versions,w=>(e.openBlock(),e.createBlock(j,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",ud,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",dd,[d.value?(e.openBlock(),e.createBlock(sl.SsFilePreview,{key:1,fileName:m.value,blobUrl:d.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(I,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",pd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],g=>(e.openBlock(),e.createElementBlock("div",{key:g.url,class:e.normalizeClass(["thumb",{active:g.url===s.value}]),onClick:S=>s.value=g.url},[e.createElementVNode("div",hd,[c.value[g.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[g.url]},null,8,vd)):(e.openBlock(),e.createElementBlock("div",md,"加载中"))]),e.createElementVNode("div",yd,e.toDisplayString(g.name),1)],10,fd))),128))]),e.createElementVNode("div",gd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[s.value]?(e.openBlock(),e.createElementBlock("div",bd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[s.value]},null,8,kd)])):(e.openBlock(),e.createElementBlock("div",xd,"加载中"))],64)):(e.openBlock(),e.createBlock(I,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),_d=Zl._export_sfc(wd,[["__scopeId","data-v-220703c0"]]),Sd={class:"ocr-candidate-wrap"},Ed={class:"ocr-candidate-left"},Cd={key:1},Dd={key:0},Td={key:1},Bd={key:2},Nd={key:3},Ad={key:0,class:"ocr-candidate-right"},zd={class:"ocr-candidate-actions"},Md={key:1},Id={class:"dialog-footer"},Od={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const n=(S=[])=>{const $=[],V=ae=>{(ae||[]).forEach(Z=>{if(!Z)return;const me=Z.children||Z.childrens||Z.columns;Array.isArray(me)&&me.length>0?V(me):$.push(Z)})};return V(S),$},r=a,o=l,s=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowAdd)!==!1}),h=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowReplace)!==!1}),c=S=>{if(!S)return[];if(Array.isArray(S))return S;if(typeof S=="string")try{const $=JSON.parse(S);return Array.isArray($)?$:[]}catch{return[]}return[]},d=S=>{o("preview-file",S)},m=e.ref([]),b=e.ref(0),u=e.ref("");e.watch(()=>r.candidates,S=>{var $,V;m.value=(S||[]).map(ae=>({...ae,...(ae==null?void 0:ae.ocrRow)||{},selectedTargetId:(ae==null?void 0:ae.selectedTargetId)||"",__decision:ae==null?void 0:ae.__decision})),b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,S=>{var $,V;S&&(b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||"")});const C=e.computed(()=>{var $;const S=Number(b.value||0);return(($=m.value||[])==null?void 0:$[S])||null}),M=e.computed(()=>(n(r.columns||[])||[]).filter(V=>V&&V.prop).filter(V=>V.type!=="operate"&&V.label!=="操作"&&V.prop!=="operate")),k=e.computed(()=>M.value.filter(S=>S.label!=="证书附件"&&S.prop!=="证书附件")),W=S=>{if(!S)return;const $=(m.value||[]).findIndex(V=>(V==null?void 0:V.idx)===(S==null?void 0:S.idx));$>-1&&(b.value=$,u.value=(S==null?void 0:S.selectedTargetId)||"")},I=S=>{if(!S){u.value="";return}u.value=String((S==null?void 0:S.id)??"")},j=(S,$="")=>{const V=Number(b.value||0),ae=m.value||[],Z=ae[V];Z&&(Z.__decision=S,Z.selectedTargetId=$,u.value=$,m.value=[...ae])},L=()=>j("skip",""),E=()=>j("add",""),x=()=>{if(!u.value){qa.ElMessage.warning("请先选择要替换的目标记录");return}j("replace",u.value)},w=()=>{o("update:visible",!1)},g=()=>{const S=m.value||[];if(S.find(V=>(V==null?void 0:V.__decision)==="replace"&&!(V!=null&&V.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}o("submit",S),o("update:visible",!1)};return(S,$)=>{const V=e.resolveComponent("el-table-column"),ae=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-table"),me=e.resolveComponent("el-button"),Ae=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var F,ne;return[e.createElementVNode("div",Sd,[e.createElementVNode("div",Ed,[$[0]||($[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Z,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:W},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:ce})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ce==null?void 0:ce[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Te=>d({row:ce,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Cd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ce==null?void 0:ce[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(V,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:J})=>[e.createTextVNode(e.toDisplayString(((J==null?void 0:J.candidates)||[]).length),1)]),_:1}),e.createVNode(V,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:J})=>[(J==null?void 0:J.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Dd,"替换")):(J==null?void 0:J.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Td,"新增")):(J==null?void 0:J.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Bd,"跳过")):(e.openBlock(),e.createElementBlock("span",Nd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Ad,[$[4]||($[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",zd,[e.createVNode(me,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(me,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>$[2]||($[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:x,disabled:!h.value||!u.value},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((F=C.value)==null?void 0:F.candidates)||[]).length===0?(e.openBlock(),e.createBlock(Ae,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Z,{data:((ne=C.value)==null?void 0:ne.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:I,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:ce})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ce==null?void 0:ce[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Te=>d({row:ce,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Md,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ce==null?void 0:ce[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Id,[e.createVNode(me,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>$[5]||($[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:g},{default:e.withCtx(()=>$[6]||($[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Ld=Zl._export_sfc(Od,[["__scopeId","data-v-89e0489c"]]),Rd={class:"ocr-preview-content"},$d={class:"ocr-preview-tip"},Vd={class:"ocr-preview-table"},Pd={style:{display:"flex","align-items":"center",gap:"8px"}},Fd={class:"dialog-footer"},jd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref([]),h=e.ref([]);e.watch(()=>n.visible,M=>{M&&(o.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),h.value=[...n.ocrSelectedFields])});const c=(M,k)=>{const W=[...h.value];if(k)W.includes(M)||W.push(M);else{const I=W.indexOf(M);I>-1&&W.splice(I,1)}h.value=W,r("update:ocrSelectedFields",W)},d=(M,k,W)=>{r("fieldChange",{rowIndex:M,prop:k,value:W})},m=()=>{r("update:ocrPreviewData",o.value),r("confirm",o.value),r("update:visible",!1)},b=()=>{r("update:visible",!1)},u=M=>typeof M!="number"?"-":`${(M*100).toFixed(1)}%`,C=M=>typeof M!="number"?"#606266":M>=.9?"#67c23a":M>=.7?"#e6a23c":"#f56c6c";return(M,k)=>{const W=e.resolveComponent("el-alert"),I=e.resolveComponent("el-table-column"),j=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),x=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:b,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Rd,[e.createElementVNode("div",$d,[e.createVNode(W,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Vd,[e.createVNode(E,{data:o.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(I,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",Pd,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:0,"model-value":h.value.includes(w.prop),onChange:g=>c(w.prop,g),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:g,$index:S})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(g[w.prop]),fontWeight:500})},e.toDisplayString(u(g[w.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:g[w.prop],"onUpdate:modelValue":$=>g[w.prop]=$,size:"small",placeholder:"请输入"+w.label,onChange:$=>d(S,w.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fd,[e.createVNode(x,{onClick:b,id:"themeBorderButton"},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(x,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Hd=Zl._export_sfc(jd,[["__scopeId","data-v-df66eb1f"]]),ci=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=oe.analyzeSplitToContent(l,","))==null?void 0:r.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),yn(o)));return n=n==null?void 0:n.join(","),n};function lc(a){return qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function Ud(a){return qa.axios.get(a,{responseType:"blob"})}let Gl="$R",qd="http://222.92.178.198:55002/AIRobot",ft=["Form","BarChart","FormText","FormBlock"];const rc=a=>{var n,r;let l=(r=oe.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=oe.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(ft!=null&&ft.some(o=>l==null?void 0:l.includes(o)))},Wd=async(a,l,n,r)=>{var s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa;let o=a;if(rc(o==null?void 0:o[0])){let ue=Qd(o),ua=(s=ue==null?void 0:ue.filter)==null?void 0:s.join(","),Se=[];(h=ue==null?void 0:ue.hideContents)==null||h.forEach(Ge=>{if(Ge){const da=Ge;da&&Se.push(`(HideGroup=Yes, prop=${da})`)}});let se=(c=ue==null?void 0:ue.formContents)==null?void 0:c.filter(Ge=>{var da;return(da=Ge==null?void 0:Ge.filters)==null?void 0:da.includes("@ShowHide=Hide")});(se==null?void 0:se.length)>0&&(se==null||se.forEach(Ge=>{if(Ge){const da=Ge==null?void 0:Ge.prop;da&&Se.push(`(Hide=Yes, prop=${da})`)}}));let Be=(r==null?void 0:r.menuFilter)??[];return Array.isArray(Be)||(Be=Be?[Be]:[]),Be=[...Be,...Se],{key:"Form",name:ue==null?void 0:ue.groupName,value:ue==null?void 0:ue.formContents,contents:Array.isArray((d=ue==null?void 0:ue.contents)==null?void 0:d[0])&&((b=(m=ue==null?void 0:ue.contents)==null?void 0:m[0])!=null&&b.every(Ge=>Array.isArray(Ge)))?[(C=(u=ue==null?void 0:ue.contents)==null?void 0:u[0])==null?void 0:C[n]]:[ue==null?void 0:ue.contents],filter:"("+ua+")",menuFilter:Be,groupFilter:ue==null?void 0:ue.groupFilters}}else if(((M=o==null?void 0:o[0])==null?void 0:M[0])!=="&"){let ue=oc(o,r),ua="";(k=ue==null?void 0:ue.tableFilter)!=null&&k.includes(Gl)?ue.tableFilter=(W=ue==null?void 0:ue.tableFilter)==null?void 0:W.replace(Gl,""):ua=(L=(j=(I=ue==null?void 0:ue.tableFilter)==null?void 0:I.replace("(",Gl))==null?void 0:j.split(Gl))==null?void 0:L[0];let Se=[];ue!=null&&ue.tableFilter&&((E=oe.analyzeSplitToContent(ue==null?void 0:ue.tableFilter,","))==null||E.forEach(Be=>{Be!=null&&Be.includes("@ShowHide=Hide")&&Se.push("HideGroup=Yes")}));let se=(r==null?void 0:r.menuFilter)??[];return Array.isArray(se)||(se=se?[se]:[]),se=[...se,...Se],{key:"Table",name:ue==null?void 0:ue.groupName,tableColumns:ue==null?void 0:ue.tableColumns,assistColumn:ue==null?void 0:ue.columns,tableContents:l===1?ue==null?void 0:ue.tableContents:(w=(x=ue==null?void 0:ue.tableContents)==null?void 0:x[n])!=null&&w.every(Be=>Array.isArray(Be))?(g=ue==null?void 0:ue.tableContents)==null?void 0:g[n]:[(S=ue==null?void 0:ue.tableContents)==null?void 0:S[n]],filter:ue==null?void 0:ue.tableFilter,menuFilter:se,quotePage:ua!==""?((ae=(V=($=ua==null?void 0:ua.replace("*",Gl))==null?void 0:$.split(Gl))==null?void 0:V[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:ua!==""?((ce=(J=(ne=(F=(Ae=(me=(Z=ua==null?void 0:ua.replace("*",Gl))==null?void 0:Z.split(Gl))==null?void 0:me[1])==null?void 0:Ae.replace("{",Gl))==null?void 0:F.split(Gl))==null?void 0:ne[0])==null?void 0:J.split(":"))==null?void 0:ce.filter(Be=>Be!==""))??[]:[],relatedQuotes:ue==null?void 0:ue.relatedQuotes,fatherSyncContents:ue==null?void 0:ue.fatherSyncContents,sonSyncContents:ue==null?void 0:ue.sonSyncContents}}else{let ue=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ua=o==null?void 0:o[0];ua=ua==null?void 0:ua.slice(1,ua==null?void 0:ua.length),ua=oe.analyzeSplitToContent(ua,":"),ua=ua==null?void 0:ua[(ua==null?void 0:ua.length)-1];let Se=[];Se.push("1");let se=ua==null?void 0:ua.replace("(",Gl);se=(Te=se==null?void 0:se.split(Gl))==null?void 0:Te[0],Se.push(se);let Be=ua==null?void 0:ua.replace("(",Gl);if(Be=($e=Be==null?void 0:Be.split(Gl))==null?void 0:$e[1],Be=(N=(fe=Be==null?void 0:Be.replace(")",Gl))==null?void 0:fe.split(Gl))==null?void 0:N[0],(U=(te=Be==null?void 0:Be.replace(",",Gl))==null?void 0:te.split(Gl))==null||U.forEach(Ge=>{Se.push(Ge)}),Se.push(""),Se.push(""),(Ce=Se==null?void 0:Se[2])!=null&&Ce.includes(".xlsx")||(Me=Se==null?void 0:Se[2])!=null&&Me.includes(".xls"))try{let Ge=qd+"/"+(Se==null?void 0:Se[2]),da=await Ud(Ge),Ja=`生成js函数名称为${Se==null?void 0:Se[1]}的函数,规则为:`+(Se==null?void 0:Se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((da==null?void 0:da.status)===200){let R=da==null?void 0:da.data;const H=new FormData;H.append("file",R,Se==null?void 0:Se[2]),H.append("query",Ja);let X=await lc(H);X=(Ta=(ra=(Pe=X==null?void 0:X.data)==null?void 0:Pe.data)==null?void 0:ra.response)==null?void 0:Ta.replace("generateResult",Se==null?void 0:Se[1]),Se[Se.length-2]=X,Se[Se.length-1]=[{name:(pa=(ee=Se==null?void 0:Se[2])==null?void 0:ee.split("."))==null?void 0:pa[0],url:Ge}]}}catch{}return Se=[Se],{key:"Method",name:[],tableContents:Se,tableColumns:ue}}},Kd=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se;let n=(o=(r=oe.analyzeSplitToContent(a,"="))==null?void 0:r.filter(se=>se!=="="))==null?void 0:o.map(se=>((se==null?void 0:se[(se==null?void 0:se.length)-1])==="="&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),se));if(rc(n==null?void 0:n[1])){let se=Zd(n),Be=(c=(h=(s=se==null?void 0:se.filter)==null?void 0:s.replace("@",Gl))==null?void 0:h.split(Gl))==null?void 0:c[0],Ge=(b=(m=(d=se==null?void 0:se.filter)==null?void 0:d.replace("(",Gl))==null?void 0:m.split(Gl))==null?void 0:b[1],da=(M=(C=(u=se==null?void 0:se.filter)==null?void 0:u.replace("(",Gl))==null?void 0:C.split(Gl))==null?void 0:M[0];da="@"+((k=da==null?void 0:da.split("@"))==null?void 0:k[1]),Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1),Ge=(I=(W=oe.analyzeSplitToContent(Ge,","))==null?void 0:W.map(R=>(R=da+R,R)))==null?void 0:I.join("");let Ja=Be+"("+Ge+")";return{key:"Form",name:se==null?void 0:se.group,filter:Ja,formPage:((E=(L=(j=Be==null?void 0:Be.replace("*",Gl))==null?void 0:j.split(Gl))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((ae=(V=($=(S=(g=(w=(x=Be==null?void 0:Be.replace("*",Gl))==null?void 0:x.split(Gl))==null?void 0:w[1])==null?void 0:g.replace("{",Gl))==null?void 0:S.split(Gl))==null?void 0:$[0])==null?void 0:V.split(":"))==null?void 0:ae.filter(R=>R!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let se=oc(n,l,n==null?void 0:n[1]),Be="";(Z=se==null?void 0:se.tableFilter)!=null&&Z.includes(Gl)?se.tableFilter=(me=se==null?void 0:se.tableFilter)==null?void 0:me.replace(Gl,""):Be=(ne=(F=(Ae=se==null?void 0:se.tableFilter)==null?void 0:Ae.replace("(",Gl))==null?void 0:F.split(Gl))==null?void 0:ne[0];let Ge=(Te=(ce=(J=se==null?void 0:se.tableFilter)==null?void 0:J.replace("(",Gl))==null?void 0:ce.split(Gl))==null?void 0:Te[0];Ge=[{menus:(fe=($e=Ge==null?void 0:Ge.split("*"))==null?void 0:$e[0])==null?void 0:fe.replaceAll(":","/"),groups:((te=(N=Ge==null?void 0:Ge.split("*"))==null?void 0:N[1])==null?void 0:te.split(":"))??[]}];let da=(Me=(Ce=(U=se==null?void 0:se.tableFilter)==null?void 0:U.replace("(",Gl))==null?void 0:Ce.split(Gl))==null?void 0:Me[1];(da==null?void 0:da[(da==null?void 0:da.length)-1])===")"&&(da=da==null?void 0:da.slice(0,(da==null?void 0:da.length)-1));let Ja=[];se!=null&&se.tableFilter&&((Pe=oe.analyzeSplitToContent(se==null?void 0:se.tableFilter,","))==null||Pe.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ja.push("HideGroup=Yes")}));let R=(l==null?void 0:l.menuFilter)??[];return Array.isArray(R)||(R=R?[R]:[]),R=[...R,...Ja],{key:"Table",name:se==null?void 0:se.groupName,filter:se==null?void 0:se.tableFilter,tableColumns:se==null?void 0:se.tableColumns,quotePage:Be!==""?((ee=(Ta=(ra=Be==null?void 0:Be.replace("*",Gl))==null?void 0:ra.split(Gl))==null?void 0:Ta[0])==null?void 0:ee.replaceAll(":","/"))??"":void 0,quoteGroup:Be!==""?((Se=(ua=(ue=(pa=Be==null?void 0:Be.replace("*",Gl))==null?void 0:pa.split(Gl))==null?void 0:ue[1])==null?void 0:ua.split(":"))==null?void 0:Se.filter(H=>H!==""))??[]:[],menuFilter:R,relatedQuotes:Ge,fatherSyncContents:(se==null?void 0:se.fatherSyncContents)??[],sonSyncContents:(se==null?void 0:se.sonSyncContents)??[]}}},Gd=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(o,s)=>{let h=[];o=o==null?void 0:o.map(async c=>{var d,m;if(h.push(c),((d=oe.analyzeSplitToContent(a,"="))==null?void 0:d.length)<=2){if(((m=oe.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const b=await Wd(oe.analyzeSplitToContent(a,"="),r,s,c);h.push(b)}}else h.push(Kd(a,c))}),await Promise.all(o),n.push(h)}),await Promise.all(l),n};let qi="/",Yd="$",_n="$R";const nc=a=>{var n,r,o;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((h,c)=>c!==0);s=s==null?void 0:s.join(""),s=oe.analyzerSplitToWord(s,")"),(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.join(""):s=(n=s==null?void 0:s.filter((h,c)=>c!==(s==null?void 0:s.length)-1))==null?void 0:n.join(""):s=s==null?void 0:s[0],l="("+s,((o=a==null?void 0:a[0])==null?void 0:o[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ic=(a,l=[])=>{let n=(a==null?void 0:a.map(s=>{var h,c;return(c=s==null?void 0:s.key)==null?void 0:c.slice(1,(h=s==null?void 0:s.key)==null?void 0:h.length)}))??[],r=[];n==null||n.forEach(s=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Yd)){let Ae="",F=!0,ne=oe.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(Ae="("+((h=oe.analyzerSplitToWord(ne==null?void 0:ne[1],")"))==null?void 0:h[0]),((d=ne==null?void 0:ne[0])==null?void 0:d[((c=ne==null?void 0:ne[0])==null?void 0:c.length)-2])==="@"&&(Ae="@"+Ae));let J=s;J=J==null?void 0:J.replace(Ae,""),Ae=yn(Ae),Ae=(m=oe.analyzeSplitToContent(Ae,","))==null?void 0:m.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)),Ae!=null&&Ae.includes("@ShowHide=Hide")&&(F=!1);let ce=(b=J==null?void 0:J.replace("$",_n))==null?void 0:b.split(_n),Te=ce==null?void 0:ce[1],$e=ce==null?void 0:ce[0];$e!=null&&$e.includes("[")&&($e=(C=(u=$e==null?void 0:$e.replace("[",_n))==null?void 0:u.split(_n))==null?void 0:C[0],Te=Te+":["+((W=(k=(M=ce==null?void 0:ce[0])==null?void 0:M.replace("[",_n))==null?void 0:k.split(_n))==null?void 0:W[1])),$e=(j=(I=$e==null?void 0:$e.replaceAll(":","/"))==null?void 0:I.replaceAll("{",""))==null?void 0:j.replaceAll("}",""),($e==null?void 0:$e[($e==null?void 0:$e.length)-1])!=="/"&&($e=$e+"/"),Te=((L=$e==null?void 0:$e.split("/"))==null?void 0:L[0])+":"+Te;let N="";if(!(Te!=null&&Te.includes("[")))N=Te==null?void 0:Te.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:Ae,fatherPath:$e});else{let te=(x=(E=Te==null?void 0:Te.replace("[",_n))==null?void 0:E.split(_n))==null?void 0:x[1];te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1),te=(w=oe.analyzeSplitToContent(te,","))==null?void 0:w.map(U=>((U==null?void 0:U[(U==null?void 0:U.length)-1])===","&&(U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1)),U)),te==null||te.forEach(U=>{var Ce,Me;N=((Me=(Ce=Te==null?void 0:Te.replace("[",_n))==null?void 0:Ce.split(_n))==null?void 0:Me[0])+U,N=N==null?void 0:N.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:Ae,fatherPath:$e})})}}else{let Ae="",F=!0,ne=oe.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(Ae=(g=nc(ne))==null?void 0:g.filter);let J=s;if(J=J==null?void 0:J.replace(Ae,""),(Ae==null?void 0:Ae[0])==="("){Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1);let Te=[];(S=oe.analyzeSplitToContent(Ae,","))==null||S.forEach($e=>{($e==null?void 0:$e[($e==null?void 0:$e.length)-1])===","&&($e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])==="("&&($e=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),Te.push(yn($e))}),Ae=Te==null?void 0:Te.join(",")}else Ae=yn(Ae);Ae=($=oe.analyzeSplitToContent(Ae,","))==null?void 0:$.map(Te=>((Te==null?void 0:Te[(Te==null?void 0:Te.length)-1])===","&&(Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1)),Te)),Ae!=null&&Ae.includes("@ShowHide=Hide")&&(F=!1),(J==null?void 0:J[(J==null?void 0:J.length)-1])==="}"&&(J=J+":"),J=(V=J==null?void 0:J.replaceAll("{",""))==null?void 0:V.replaceAll("}","");let ce="";if(J!=null&&J.includes("[")){let Te=(ae=J==null?void 0:J.replace("[",_n))==null?void 0:ae.split(_n),$e=Te==null?void 0:Te[1];$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),(me=(Z=oe.analyzeSplitToContent($e,","))==null?void 0:Z.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe)))==null||me.forEach(fe=>{ce=(Te==null?void 0:Te[0])+fe,ce=ce==null?void 0:ce.replaceAll(":","/"),r==null||r.push({path:ce,isShow:F,filter:Ae})})}else ce=J==null?void 0:J.replaceAll(":","/"),r==null||r.push({path:ce,isShow:F,filter:Ae})}});let o=A.cloneDeep(r);return(l==null?void 0:l.length)>0&&(o=l),o=o==null?void 0:o.filter(s=>{var h,c,d,m;return!(s!=null&&s.fatherPath)&&((c=(h=s==null?void 0:s.path)==null?void 0:h.split(qi))==null?void 0:c.length)>1&&((m=(d=s==null?void 0:s.path)==null?void 0:d.split(qi))==null?void 0:m[1])===""}),o=o==null?void 0:o.map(s=>{var h;return s.path=(h=s.path)==null?void 0:h.replace(qi,""),s.path}),(o==null?void 0:o.length)>0&&(r=r==null?void 0:r.map(s=>{var c,d,m,b,u,C,M;let h=o==null?void 0:o.find(k=>{var W;return(W=s==null?void 0:s.path)==null?void 0:W.includes(k)});return!(s!=null&&s.fatherPath)&&h&&!((c=s==null?void 0:s.path)!=null&&c.includes(qi))&&!(o!=null&&o.find(k=>(s==null?void 0:s.path)===k))&&(s.path=h+qi+((M=(m=(d=s==null?void 0:s.path)==null?void 0:d.split(h))==null?void 0:m[1])==null?void 0:M.slice(1,(C=(u=(b=s==null?void 0:s.path)==null?void 0:b.split(h))==null?void 0:u[1])==null?void 0:C.length))),s})),r},Jd=(a,l)=>ic([{key:a}],l),Xd=async(a,l)=>{const n=[],r=Jd(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(s=>{n.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await Gd(a==null?void 0:a.value,n)};let ml="$R",Ki="[Any]";const Zd=a=>{var h,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let o=a==null?void 0:a[1],s;return o!=null&&o.includes("{")?s=(c=(h=o==null?void 0:o.replaceAll("{",""))==null?void 0:h.replaceAll("}",""))==null?void 0:c.replaceAll(Ki,""):s=o==null?void 0:o.replaceAll(Ki,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Qd=a=>{var C,M,k,W,I,j;let l=[],n=[],r=[],o=[],s=[],h=[],c="",d=a==null?void 0:a[0];(d==null?void 0:d[0])==="*"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length));let m=oe.analyzeSplitToContent(d,":");(C=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||C.forEach(L=>{var x,w,g;(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));let E=oe.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(x=nc(E))==null?void 0:x.filter;let S=L==null?void 0:L.replace(c,"");if(r.push(S),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let $=[];(w=oe.analyzeSplitToContent(c,","))==null||w.forEach(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==null?void 0:V[0])==="("&&(V=V==null?void 0:V.slice(1,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])!=="@"&&(V="@"+V),$.push(yn(V))}),c=$==null?void 0:$.join(",")}else c=yn(c);c=(g=oe.analyzeSplitToContent(c,","))==null?void 0:g.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$)),c!=null&&c.includes("@ShowHide=Hide")&&h.push(S),o=[...o,...c]}else r.push(E==null?void 0:E[0])});let b=(M=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:M[0],u=(k=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:k[0];return l=Ni(u??""),l!=null&&l.every(L=>Array.isArray(L))&&(l=[l]),(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)),s=(W=oe.analyzeSplitToContent(b,"@"))==null?void 0:W[1],s="@"+s,b=b==null?void 0:b.replace(s,""),s=yn(s),s=(I=oe.analyzeSplitToContent(s,","))==null?void 0:I.map(L=>((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)),(b==null?void 0:b[0])==="{"&&(b=b==null?void 0:b.slice(1,(b==null?void 0:b.length)-1)),b=(j=oe.analyzeSplitToContent(b,","))==null?void 0:j.map(L=>((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)),b==null||b.forEach((L,E)=>{var ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha;let x=[],w=[],g=[],S="",$="",V=!1,ae,Z=[],me=[],Ae=[],F="Input",ne=[],J=[];if(L!=null&&L.includes("==")){ae=(ce=L==null?void 0:L.split("=="))==null?void 0:ce[0];let Ca=(Te=L==null?void 0:L.split("=="))==null?void 0:Te[1],Ne="";(($e=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:$e.length)>1&&((fe=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:fe[0])!=="$"?(Ne=(N=oe.analyzeSplitToContent(Ca,"$"))==null?void 0:N[0],Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)):((te=oe.analyzeSplitToContent(Ca,"}"))==null?void 0:te.length)>1&&(Ne=(U=oe.analyzeSplitToContent(Ca,"}"))==null?void 0:U[1]);let ye=Ca==null?void 0:Ca.replace(Ne,"");if((Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),(Ce=oe.analyzeSplitToContent(Ne,","))==null||Ce.forEach(Y=>{var pe;(Y==null?void 0:Y[0])!=="@"&&(Y="@"+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));let xe=yn(Y);(pe=oe.analyzeSplitToContent(xe,","))==null||pe.forEach(qe=>{(qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===","&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),x.push(qe)})}),(ye==null?void 0:ye[0])==="$"&&(ye=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length)),ye!=null&&ye.includes("&")){let Y=ye;if((ye==null?void 0:ye[0])==="("){let pe=(Me=oe.analyzeSplitToContent(ye,"&"))==null?void 0:Me.map(qe=>((qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])==="&"&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),qe));Y=pe==null?void 0:pe[1],pe=pe==null?void 0:pe[0],(pe==null?void 0:pe[0])!=="@"&&(pe="@"+pe),S=yn(pe)}(Y==null?void 0:Y[0])==="&"&&(Y=Y==null?void 0:Y.slice(1,Y==null?void 0:Y.length)),$=(ra=(Pe=Y==null?void 0:Y.replace("(",ml))==null?void 0:Pe.split(ml))==null?void 0:ra[0],g=(ee=(Ta=Y==null?void 0:Y.replace("(",ml))==null?void 0:Ta.split(ml))==null?void 0:ee[1],g=[g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)],F="Input"}else{let Y=(pa=ye==null?void 0:ye.replace("*",ml))==null?void 0:pa.split(ml);Z=(ue=Y==null?void 0:Y[0])==null?void 0:ue.split(":"),me=(Se=(ua=oe.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:ua.filter((xe,pe)=>{var qe,sa;return pe!==((sa=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:sa.length)-1}))==null?void 0:Se.map(xe=>((xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe)),Ae=(Be=(se=oe.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:se.filter((xe,pe)=>{var qe,sa;return pe===((sa=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:sa.length)-1}))==null?void 0:Be[0],Ae=(da=(Ge=Ae==null?void 0:Ae.replaceAll("{",""))==null?void 0:Ge.replaceAll("}",""))==null?void 0:da.split(":"),F="Select"}}else if(((Ja=oe.analyzeSplitToContent(L,"="))==null?void 0:Ja.length)>1)if(F="Select",ae=(H=(R=L==null?void 0:L.replace("=",ml))==null?void 0:R.split(ml))==null?void 0:H[0],!(L!=null&&L.includes("If")))ne=(he=(X=L==null?void 0:L.replace("=",ml))==null?void 0:X.split(ml))==null?void 0:he[1],ne=ne==null?void 0:ne.split("||");else{let Ca=(ma=(de=L==null?void 0:L.replace("=",ml))==null?void 0:de.split(ml))==null?void 0:ma[1];J=(oa=oe.analyzeSplitToContent(Ca,")"))==null?void 0:oa.filter(Ne=>!(Ne!=null&&Ne.includes("If"))),J=J==null?void 0:J.map(Ne=>((Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),Ne=Ne==null?void 0:Ne.split("||"),Ne)),w=(Ve=oe.analyzeSplitToContent(Ca,")"))==null?void 0:Ve.filter(Ne=>Ne==null?void 0:Ne.includes("If")),w=w==null?void 0:w.map(Ne=>((Ne==null?void 0:Ne[0])==="|"&&(Ne=Ne==null?void 0:Ne.slice(2,Ne==null?void 0:Ne.length)),(Ne==null?void 0:Ne[0])==="("&&(Ne=Ne==null?void 0:Ne.slice(1,(Ne==null?void 0:Ne.length)-1)),(Ne==null?void 0:Ne[0])!=="@"&&(Ne="@"+Ne),Ne))}else if(((_a=oe.analyzeSplitToContent(L,"@"))==null?void 0:_a.length)>1){ae=(ze=oe.analyzeSplitToContent(L,"@"))==null?void 0:ze[0],(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])==="@"&&(ae=ae==null?void 0:ae.slice(0,(ae==null?void 0:ae.length)-1));let Ca="@"+((ya=oe.analyzeSplitToContent(L,"@"))==null?void 0:ya[1]);Ca=yn(Ca),x=(La=oe.analyzeSplitToContent(Ca,","))==null?void 0:La.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===","&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ne)),x!=null&&x.find(Ne=>Ne==null?void 0:Ne.includes("@Type"))&&(F=(ha=(za=x==null?void 0:x.find(Ne=>Ne==null?void 0:Ne.includes("@Type")))==null?void 0:za.split("="))==null?void 0:ha[1])}else ae=L;x!=null&&x.includes("@ShowHide=Hide")&&(V=!0),n.push({prop:ae,label:ae,value:"",menuPath:Z,groups:me,columns:Ae,type:F,options:ne,allContents:J,filters:x,width:b==null?void 0:b.length,isFormColHidden:V,filterContents:w,functionName:$,functionRelatedWords:g,calculatorFilter:S})}),{groupName:r,groupFilters:o,formContents:n,contents:l,filter:s,hideContents:h}},Ni=a=>{var r,o;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=oe.analyzeSplitToContent(n,","))==null||r.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)),l.push(s??"")});else{let s=[];(o=oe.analyzeSplitToContent(n,","))==null||o.forEach(h=>{(h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),s.push(Ni(h))}),l=s}return l},bt=(a,l)=>{var j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va;let n,r=[],o=[],s=[],h=[],c=[],d=[],m=[],b="Input",u,C="",M="",k="",W=[],I="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],u=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],b="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(x=(E=a==null?void 0:a.replace("=",ml))==null?void 0:E.split(ml))==null?void 0:x[1])!=null&&w.includes("If")))if(n=oe.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(S=(g=n==null?void 0:n.replace("=",ml))==null?void 0:g.split(ml))==null?void 0:S[0],n!=null&&n.includes("&")&&(n=(V=($=n==null?void 0:n.replace("&",ml))==null?void 0:$.split(ml))==null?void 0:V[0]),u=n,((ae=oe.analyzeSplitToContent(a,"@"))==null?void 0:ae.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ue=(Z=oe.analyzeSplitToContent(a,"@"))==null?void 0:Z[1];if((Ue==null?void 0:Ue[0])!=="@"&&(Ue="@"+Ue),Ue=yn(Ue),M=Ue,M!=null&&M.includes("@Type")){let Ie=oe.analyzeSplitToContent(M,",");Ie=Ie==null?void 0:Ie.map(aa=>((aa==null?void 0:aa[(aa==null?void 0:aa.length)-1])===","&&(aa=aa==null?void 0:aa.slice(0,(aa==null?void 0:aa.length)-1)),aa)),Ie=(me=Ie==null?void 0:Ie.filter(aa=>aa==null?void 0:aa.includes("@Type")))==null?void 0:me[0],b=(Ae=Ie==null?void 0:Ie.split("="))==null?void 0:Ae[1]}else b="Input"}}else if(a!=null&&a.includes("||")){let Ue=[];r=(J=(ne=(F=oe.analyzeSplitToContent(a,"="))==null?void 0:F[1])==null?void 0:ne.split("||"))==null?void 0:J.map(aa=>{var We,tl,Cl,El;let ke=aa;if(ke!=null&&ke.includes("@")){let Vl="@"+((tl=(We=ke==null?void 0:ke.replace("@",ml))==null?void 0:We.split(ml))==null?void 0:tl[1]);ke=(El=(Cl=ke==null?void 0:ke.replace("@",ml))==null?void 0:Cl.split(ml))==null?void 0:El[0],Vl=ci(Vl),Ue.push(Vl)}return{label:ke==null?void 0:ke.replaceAll("'",""),value:ke==null?void 0:ke.replaceAll("'","")}}),(Ue==null?void 0:Ue.length)>0&&(M="("+(Ue==null?void 0:Ue.join("||"))+")");let Ie=(ce=oe.analyzeSplitToContent(a,"="))==null?void 0:ce[0];if(Ie!=null&&Ie.includes("@")){(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])==="="&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1));let aa=(Te=oe.analyzeSplitToContent(Ie,"@"))==null?void 0:Te[1];aa="@"+aa,aa=ci(aa),M=M===""?aa:aa+","+M}}else b="Input",C=(N=(fe=($e=a==null?void 0:a.replace("=",ml))==null?void 0:$e.split(ml))==null?void 0:fe[1])==null?void 0:N.replaceAll("'","");else if((U=(te=oe.analyzeSplitToContent(a,"="))==null?void 0:te[1])!=null&&U.includes("||")){let Ue=(Ce=oe.analyzeSplitToContent(a,"="))==null?void 0:Ce[0];if((Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])==="="&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1)),Ue!=null&&Ue.includes("@")){let We=(Me=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:Me[1];We="@"+We,M=ci(We),n=(ee=(Pe=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:Pe[0])==null?void 0:ee.slice(0,((Ta=(ra=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:ra[0])==null?void 0:Ta.length)-1),u=(Se=(pa=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:pa[0])==null?void 0:Se.slice(0,((ua=(ue=oe.analyzeSplitToContent(Ue,"@"))==null?void 0:ue[0])==null?void 0:ua.length)-1)}else n=Ue,u=Ue;let Ie=(se=oe.analyzeSplitToContent(a,"="))==null?void 0:se[1];Ie=oe.analyzeSplitToContent(Ie,")");let aa=Ie==null?void 0:Ie.filter(We=>!(We!=null&&We.includes("If")));aa==null||aa.forEach(We=>{(We==null?void 0:We[0])==="("&&(We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1)),o==null||o.push(We==null?void 0:We.split("||"))});let ke=Ie==null?void 0:Ie.filter(We=>We==null?void 0:We.includes("If"));ke=ke==null?void 0:ke.map(We=>((We==null?void 0:We[0])==="|"&&(We==null?void 0:We[1])==="|"&&(We=We==null?void 0:We.slice(2,We==null?void 0:We.length)),(We==null?void 0:We[0])==="("&&(We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1)),(We==null?void 0:We[0])!=="@"&&(We="@"+We),We)),s=ke}else{let Ue=a==null?void 0:a.split("=="),Ie=(Be=Ue==null?void 0:Ue.filter(aa=>(aa==null?void 0:aa.includes("$"))&&(aa==null?void 0:aa[0])!=="{"))==null?void 0:Be[0];if(Ie&&!(Ie!=null&&Ie.includes("&"))){let aa=(da=oe.analyzeSplitToContent(Ie,")"))==null?void 0:da[((Ge=oe.analyzeSplitToContent(Ie,")"))==null?void 0:Ge.length)-1],ke=(Ja=aa==null?void 0:aa.replace("*",ml))==null?void 0:Ja.split(ml),We=(ke==null?void 0:ke[0])===""?l==null?void 0:l.value:ke==null?void 0:ke[0];(We==null?void 0:We[0])==="("&&(We=(R=oe.analyzeSplitToContent(We,")"))==null?void 0:R[1]),We=(X=(H=We==null?void 0:We.replaceAll("{",""))==null?void 0:H.replaceAll("}",""))==null?void 0:X.replaceAll(Ki,""),(We==null?void 0:We[0])==="$"&&(We=(he=We==null?void 0:We.slice(1,We==null?void 0:We.length))==null?void 0:he.replaceAll(":","/")),h=We==null?void 0:We.split("/");let tl=(ma=(de=ke==null?void 0:ke[1])==null?void 0:de.replace("{",ml))==null?void 0:ma.split(ml),Cl=tl==null?void 0:tl[0];(Cl==null?void 0:Cl[(Cl==null?void 0:Cl.length)-1])===":"&&(Cl=Cl==null?void 0:Cl.slice(0,(Cl==null?void 0:Cl.length)-1)),c=Cl==null?void 0:Cl.split(":"),d=(ze=(_a=(Ve=(oa=tl==null?void 0:tl[1])==null?void 0:oa.replace("}",ml))==null?void 0:Ve.split(ml))==null?void 0:_a[0])==null?void 0:ze.split(":");let El="";((ya=oe.analyzeSplitToContent(Ie,")"))==null?void 0:ya.length)>1&&(El=(La=oe.analyzeSplitToContent(Ie,")"))==null?void 0:La[0]),El&&El!==""&&((El==null?void 0:El[0])!=="@"&&(El="@"+El),M=ci(El))}if(Ue!=null&&Ue.some(aa=>aa==null?void 0:aa.includes("&"))){let aa=(za=Ue==null?void 0:Ue.filter(tl=>tl==null?void 0:tl.includes("&")))==null?void 0:za[0];aa=(ha=oe.analyzeSplitToContent(aa,"&"))==null?void 0:ha.map(tl=>((tl==null?void 0:tl[(tl==null?void 0:tl.length)-1])==="&"&&(tl=tl==null?void 0:tl.slice(0,(tl==null?void 0:tl.length)-1)),tl)),k=(ye=(Ne=(Ca=aa==null?void 0:aa[1])==null?void 0:Ca.replace("(",ml))==null?void 0:Ne.split(ml))==null?void 0:ye[0];let ke=(Y=oe.analyzeSplitToContent(aa==null?void 0:aa[1],")"))==null?void 0:Y[0];ke=(pe=(xe=ke==null?void 0:ke.replace("(",ml))==null?void 0:xe.split(ml))==null?void 0:pe[1],ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1),(ke==null?void 0:ke[0])==="{"&&(ke=ke==null?void 0:ke.slice(1,ke==null?void 0:ke.length)),(ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])==="}"&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),W=ke==null?void 0:ke.split(",");let We=aa==null?void 0:aa[0];We&&We!==""&&((We==null?void 0:We[0])!=="@"&&(We="@"+We),I=ci(We))}else if(!Ie&&((qe=Ue==null?void 0:Ue.filter(aa=>(aa==null?void 0:aa[0])==="{"))==null?void 0:qe.length)>0){let aa=Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1];aa=aa==null?void 0:aa.slice(1,(aa==null?void 0:aa.length)-1),aa=oe.analyzeSplitToContent(aa,","),aa=aa==null?void 0:aa.map(ke=>((ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])===","&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),ke)),aa=aa==null?void 0:aa.map(ke=>{var We,tl,Cl,El;if(ke=ke==null?void 0:ke.replaceAll("$",""),ke!=null&&ke.includes("{")){let Vl="";ke=ke==null?void 0:ke.replaceAll("{","");let _l=ke==null?void 0:ke.split("}");Vl=((tl=(We=_l==null?void 0:_l[0])==null?void 0:We.split(":"))==null?void 0:tl[0])+":"+(_l==null?void 0:_l[1]),ke=Vl,ke=ke+":"}if(ke!=null&&ke.includes(Ki)){let Vl="",_l=ke==null?void 0:ke.split(Ki);Vl=((El=(Cl=_l==null?void 0:_l[0])==null?void 0:Cl.split(":"))==null?void 0:El[0])+":"+(_l==null?void 0:_l[1]),ke=Vl,ke=ke+":"}return ke=ke==null?void 0:ke.replaceAll(":","/"),ke}),m=aa}else!((sa=Ue==null?void 0:Ue[1])!=null&&sa.includes("$"))&&(($a=Ue==null?void 0:Ue[1])==null?void 0:$a[0])!=="("&&d.push(Ue==null?void 0:Ue[1])}else n=(Ma=a==null?void 0:a.split("&"))==null?void 0:Ma[0],u=(Va=a==null?void 0:a.split("&"))==null?void 0:Va[0];return(r==null?void 0:r.length)===0&&(o==null?void 0:o.length)===0&&(h==null?void 0:h.length)===0&&b==="Select"&&(b="Input"),{label:n,prop:u,options:r,allContents:o,filterContents:s,menus:h,groups:c,words:d,align:"center",formType:b,filter:M,functionName:k,functionRelatedWords:W,calculatorFilter:I,relatedPages:m,value:C}},Ao=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((h=(s=(o=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",ml))==null?void 0:o.split(ml))==null?void 0:s[0])!=null&&h.includes(","))){let ce=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Te=(c=ce==null?void 0:ce.replace(":",ml))==null?void 0:c.split(ml);if(((d=oe.analyzeSplitToContent(Te==null?void 0:Te[1],"="))==null?void 0:d.length)===1){let $e=Te==null?void 0:Te[0],fe=[];(u=oe.analyzeSplitToContent((b=Te==null?void 0:Te[1])==null?void 0:b.slice(1,((m=Te==null?void 0:Te[1])==null?void 0:m.length)-1),","))==null||u.forEach(N=>{var te,U;((te=oe.analyzeSplitToContent(N,"="))==null?void 0:te.length)>1?((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),fe=[...fe,...Ao(N,l)]):((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),fe.push((U=Ao(N,l))==null?void 0:U[0]))}),n==null||n.push({label:$e,prop:$e,children:fe,align:"center"})}else{let $e=[];if(((C=oe.analyzeSplitToContent(ce,"="))==null?void 0:C.length)>=2){let N=(M=oe.analyzeSplitToContent(ce,"="))==null?void 0:M[1],te=(k=oe.analyzeSplitToContent(N,"/"))==null?void 0:k.map(U=>((U==null?void 0:U[(U==null?void 0:U.length)-1])==="/"&&(U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1)),U));$e=te==null?void 0:te.map(U=>(U=Ni(U),U))}let fe=(x=(E=(L=(j=(I=(W=ce==null?void 0:ce.replace("{",ml))==null?void 0:W.split(ml))==null?void 0:I[1])==null?void 0:j.replace("}",ml))==null?void 0:L.split(ml))==null?void 0:E[0])==null?void 0:x.split(",");fe==null||fe.forEach((N,te)=>{($e==null?void 0:$e.length)>0&&te===0?n==null||n.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:$e==null?void 0:$e.map(U=>{let Ce={};return fe==null||fe.forEach((Me,Pe)=>{Ce[Me]=U==null?void 0:U[Pe]}),Ce}),options:$e==null?void 0:$e.map(U=>({label:U==null?void 0:U[0],value:U==null?void 0:U[0]})),mainKey:!0}):n==null||n.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=oe.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((S=(g=oe.analyzeSplitToContent(a,"="))==null?void 0:g[1])==null?void 0:S[0])==="["){let ce=[];if((($=oe.analyzeSplitToContent(a,"="))==null?void 0:$.length)>=2){let $e=(V=oe.analyzeSplitToContent(a,"="))==null?void 0:V[1],fe=(Z=(ae=oe.analyzeSplitToContent($e,"|"))==null?void 0:ae.filter(N=>N!=="|"))==null?void 0:Z.map(N=>((N==null?void 0:N[(N==null?void 0:N.length)-1])==="|"&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),N));ce=fe==null?void 0:fe.map(N=>(N=Ni(N),N))}let Te=(Ae=(me=a==null?void 0:a.replace("}",ml))==null?void 0:me.split(ml))==null?void 0:Ae[0];Te=(F=Te==null?void 0:Te.slice(1,Te==null?void 0:Te.length))==null?void 0:F.split(","),Te==null||Te.forEach(($e,fe)=>{(ce==null?void 0:ce.length)>0&&fe===0?n==null||n.push({label:$e,prop:$e,align:"center",formType:"Select",relatedContents:ce==null?void 0:ce.map(N=>{let te={};return Te==null||Te.forEach((U,Ce)=>{te[U]=N==null?void 0:N[Ce]}),te}),options:ce==null?void 0:ce.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):n==null||n.push({label:$e,prop:$e,align:"center"})})}else(ne=oe.analyzeSplitToContent(a,","))==null||ne.forEach(ce=>{var Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if((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)),(ce==null?void 0:ce[0])==="{"){let pe=oe.analyzeSplitToContent(ce,"="),qe=pe==null?void 0:pe[(pe==null?void 0:pe.length)-1],sa=[],$a=[],Ma=[],Va="",Ue="",Ie=[],aa=[],ke=(Te=qe==null?void 0:qe.replace("*",ml))==null?void 0:Te.split(ml),We=(ke==null?void 0:ke[0])===""?l==null?void 0:l.value:ke==null?void 0:ke[0];We=oe.analyzeSplitToContent(We,")");let tl="";if((We==null?void 0:We.length)>1&&(($e=We==null?void 0:We[0])==null?void 0:$e[0])!=="&"&&(tl=We==null?void 0:We[0],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ue=tl??""),We=(fe=We==null?void 0:We.filter(Qe=>(Qe==null?void 0:Qe[0])==="$"))==null?void 0:fe[0],((N=oe.analyzeSplitToContent(We,"}"))==null?void 0:N.length)>1&&((U=(te=oe.analyzeSplitToContent(We,"}"))==null?void 0:te[1])==null?void 0:U[0])==="("&&(tl=(Ce=oe.analyzeSplitToContent(We,"}"))==null?void 0:Ce[1],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ue!==""&&(Ue=Ue+","),Ue=Ue+tl),(Me=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1))!=null&&Me.includes("$")||(We=(Pe=oe.analyzeSplitToContent(We,"}"))==null?void 0:Pe[0]),(We==null?void 0:We[0])==="$"&&(We=(ra=We==null?void 0:We.replace("{",""))==null?void 0:ra.replace("}",":"),We=(Ta=We==null?void 0:We.slice(1,We==null?void 0:We.length))==null?void 0:Ta.replaceAll(":","/")),We!=null&&We.includes("$")){let Qe=(ee=We==null?void 0:We.split("$"))==null?void 0:ee[0];Qe=(pa=Qe==null?void 0:Qe.split("/"))==null?void 0:pa[0],We=Qe+"/"+((ue=We==null?void 0:We.split("$"))==null?void 0:ue[1])+"/"}sa=(We==null?void 0:We.split("/"))??[];let Cl=(Se=(ua=ke==null?void 0:ke[1])==null?void 0:ua.replace("{",ml))==null?void 0:Se.split(ml);if((Ge=(Be=(se=ke==null?void 0:ke[1])==null?void 0:se.split("(@"))==null?void 0:Be[0])!=null&&Ge.includes("&&")||(R=(Ja=(da=ke==null?void 0:ke[1])==null?void 0:da.split("@"))==null?void 0:Ja[0])!=null&&R.includes("&&")){let Qe=(H=ke==null?void 0:ke[1])!=null&&H.includes("(@")?(de=(he=(X=ke==null?void 0:ke[1])==null?void 0:X.split("(@"))==null?void 0:he[0])==null?void 0:de.split("&&"):(Ve=(oa=(ma=ke==null?void 0:ke[1])==null?void 0:ma.split("@"))==null?void 0:oa[0])==null?void 0:Ve.split("&&");Ie=Qe==null?void 0:Qe.map(ba=>{var ll,Ia;return(ba==null?void 0:ba[0])==="*"&&(ba=ba==null?void 0:ba.slice(1,ba==null?void 0:ba.length)),ba=(Ia=(ll=ba==null?void 0:ba.replace("{",ml))==null?void 0:ll.split(ml))==null?void 0:Ia[0],(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])===":"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1)),ba=ba==null?void 0:ba.split(":"),ba});let Xa=[];Qe==null||Qe.forEach((ba,ll)=>{var Ia,il;(ba==null?void 0:ba[0])==="*"&&(ba=ba==null?void 0:ba.slice(1,ba==null?void 0:ba.length)),ba=(il=(Ia=ba==null?void 0:ba.replace("{",ml))==null?void 0:Ia.split(ml))==null?void 0:il[1],(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])==="}"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1)),ba=ba==null?void 0:ba.split(","),Xa.push(ll===0?(ba==null?void 0:ba.length)-1:ba==null?void 0:ba.length),aa=[...aa,...ba]}),Xa=(_a=oe.prefixSum(Xa))==null?void 0:_a.map(ba=>ba==null?void 0:ba.total),Ie=Ie==null?void 0:Ie.map((ba,ll)=>({number:Xa==null?void 0:Xa[ll],contents:ba}))}let El=Cl==null?void 0:Cl[0];(El==null?void 0:El[(El==null?void 0:El.length)-1])===":"&&(El=El==null?void 0:El.slice(0,(El==null?void 0:El.length)-1)),$a=(El==null?void 0:El.split(":"))??[],Ma=((za=(La=(ya=(ze=Cl==null?void 0:Cl[1])==null?void 0:ze.replace("}",ml))==null?void 0:ya.split(ml))==null?void 0:La[0])==null?void 0:za.split(","))??[];let Vl=(Ca=pe==null?void 0:pe[0])==null?void 0:Ca.slice(1,((ha=pe==null?void 0:pe[0])==null?void 0:ha.length)-2);Ue&&Ue!==""&&(Va=ci(Ue));let _l=(Ne=oe.analyzeSplitToContent(Va,","))==null?void 0:Ne.map(Qe=>((Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])===","&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1)),Qe)),jl=[];_l!=null&&_l.find(Qe=>Qe==null?void 0:Qe.includes("@MainParam"))&&(_l=_l==null?void 0:_l.find(Qe=>Qe==null?void 0:Qe.includes("@MainParam")),_l=(Y=(ye=_l==null?void 0:_l.replace("=",ml))==null?void 0:ye.split(ml))==null?void 0:Y[1],_l=_l==null?void 0:_l.slice(1,(_l==null?void 0:_l.length)-1),jl=oe.analyzeSplitToContent(_l,",")),(xe=Vl==null?void 0:Vl.split(","))==null||xe.forEach((Qe,Xa)=>{var ba,ll,Ia,il,rl;((ba=oe.analyzeSplitToContent(Qe,"@"))==null?void 0:ba.length)>1&&(Qe=(ll=oe.analyzeSplitToContent(Qe,"@"))==null?void 0:ll[0],(Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])==="@"&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1))),n.push({label:Qe,prop:Qe,align:"center",menus:sa,groups:(Ie==null?void 0:Ie.length)===0?$a:(Ia=Ie==null?void 0:Ie.find(_e=>(_e==null?void 0:_e.number)>=Xa))==null?void 0:Ia.contents,words:(aa==null?void 0:aa.length)===0?(il=Ma==null?void 0:Ma[Xa])==null?void 0:il.split(":"):(rl=aa==null?void 0:aa[Xa])==null?void 0:rl.split(":"),formType:(sa==null?void 0:sa.length)>0?"Select":"Input",mainKey:!!(Xa===0||jl!=null&&jl.find(_e=>_e===Qe)),filter:Va,isMainPath:(Ie==null?void 0:Ie.findIndex(_e=>(_e==null?void 0:_e.number)>=Xa))===0})})}else n.push({label:ce,prop:ce,align:"center"})});else{let ce=(J=oe.analyzeSplitToContent(a,","))==null?void 0:J.map(Te=>((Te==null?void 0:Te[(Te==null?void 0:Te.length)-1])===","&&(Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1)),Te));ce==null||ce.forEach(Te=>{n.push(bt(Te,l))})}return n},ep=(a,l)=>{var h,c,d,m,b;let n=a;if(!a)return;let r="";((h=oe.analyzeSplitToContent(a,"}"))==null?void 0:h.length)>1&&(n=(c=oe.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(d=oe.analyzeSplitToContent(a,"}"))==null?void 0:d[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let o=[],s=[];return o.push({label:"排序",prop:"sort"}),o.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=oe.analyzeSplitToContent(n,","))==null||m.forEach(u=>{var C;(u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),(u==null?void 0:u[0])==="{"?(C=Ao(u,l))==null||C.forEach(M=>{o.push(M)}):o.push(bt(u,l))}),o!=null&&o.some(u=>{var C;return(C=u==null?void 0:u.prop)==null?void 0:C.includes("@")})&&(o=o==null?void 0:o.filter(u=>{var C;return!((C=u==null?void 0:u.prop)!=null&&C.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(b=oe.analyzeSplitToContent(r,","))==null||b.forEach(u=>{var C;(u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),(u==null?void 0:u[0])==="{"?(C=Ao(u,l))==null||C.forEach(M=>{s.push(M)}):s.push(bt(u,l))})),{columns:o,secondColumns:s}},yn=a=>{var l,n,r,o,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let h=(n=(l=a==null?void 0:a.replace("(",ml))==null?void 0:l.split(ml))==null?void 0:n[1],c=(o=(r=a==null?void 0:a.replace("(",ml))==null?void 0:r.split(ml))==null?void 0:o[0];return h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h=(s=oe.analyzeSplitToContent(h,","))==null?void 0:s.map(d=>((d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1)),c+d)),h=h==null?void 0:h.join(","),a!=null&&a.includes("@Quote")&&(h!=null&&h.includes("@QuoteType")||(h=h===""?h+"@QuoteType=Manual":h+",@QuoteType=Manual"),h!=null&&h.includes("@QuoteSonSync")||(h=h===""?h+"@QuoteSonSync=No":h+",@QuoteSonSync=No"),h!=null&&h.includes("@QuoteFatherSync")||(h=h===""?h+"@QuoteFatherSync=Yes":h+",@QuoteFatherSync=Yes")),h}},cs=a=>{let l=a==null?void 0:a.map(n=>{var r,o;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+ml+((o=n==null?void 0:n.groups)==null?void 0:o.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,o;return{menus:(r=n==null?void 0:n.split(ml))==null?void 0:r[0],groups:((o=n==null?void 0:n.split(ml))==null?void 0:o[1])??[]}}),l},us=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=oe.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),(r==null?void 0:r[1])==="("&&(r=yn(r)),r)),l==null?void 0:l.join(",")},oc=(a,l,n="")=>{var L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne;let r=[],o=[],s=[],h="",c="",d="",m=[],b=[],u=[],C="";if(((L=a==null?void 0:a[0])==null?void 0:L[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((g=a==null?void 0:a[0])==null?void 0:g[0])!=="$"&&(h=(S=oe.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:S[0],(h==null?void 0:h[0])!=="@"&&(h="@"+h),h=ci(h),d=($=oe.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:$[1],(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=d==null?void 0:d.replaceAll(":","/"));let k=oe.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(V=k==null?void 0:k.filter(ye=>(ye==null?void 0:ye[0])!=="{"&&(ye==null?void 0:ye[0])!=="["))==null?void 0:V.join(""),c=(ae=a==null?void 0:a[0])==null?void 0:ae.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),C=(Z=k==null?void 0:k.filter(ye=>(ye==null?void 0:ye[0])!=="["))==null?void 0:Z.join(""),C=(me=a==null?void 0:a[0])==null?void 0:me.replace(C,""),c=c==null?void 0:c.replace(C,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((Ae=oe.analyzeSplitToContent(c,"@"))==null?void 0:Ae.length)>1&&(h=(F=oe.analyzeSplitToContent(c,"@"))==null?void 0:F[1],(h==null?void 0:h[(h==null?void 0:h.length)-1])===":"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h="@"+h,h=yn(h),c=(ne=oe.analyzeSplitToContent(c,"@"))==null?void 0:ne[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((J=oe.analyzeSplitToContent(r,"@"))==null?void 0:J.length)>1){h!==""&&(h=h+",");let ye=(ce=oe.analyzeSplitToContent(r,"@"))==null?void 0:ce[1];ye="@"+ye,ye=yn(ye),h=h+ye,r=(Te=oe.analyzeSplitToContent(r,"@"))==null?void 0:Te[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(c==null?void 0:c[(c==null?void 0:c.length)-1])===":"&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),n!==""){let ye=($e=oe.analyzeSplitToContent(n,")"))==null?void 0:$e[0],Y=(fe=oe.analyzeSplitToContent(n,"@"))==null?void 0:fe[1];d=(te=(N=oe.analyzeSplitToContent(n,"@"))==null?void 0:N[0])==null?void 0:te.replace(ye,""),(d==null?void 0:d[(d==null?void 0:d.length)-1])==="@"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),ye=us(ye),Y=us(Y);let xe=ye??"";if(xe!==""&&(xe=xe+","),xe=xe+Y,(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===","&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe!==""&&h!==""&&(h=h+","),h=h+xe,(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=(U=oe.analyzeSplitToContent(d,":"))==null?void 0:U.filter((pe,qe)=>{var sa;return!((pe==null?void 0:pe[0])==="{"&&qe===((sa=oe.analyzeSplitToContent(d,":"))==null?void 0:sa.length)-1)}),d=d==null?void 0:d.join(""),(d==null?void 0:d[(d==null?void 0:d.length)-1])===":"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),h!=null&&h.includes("@Sync")||(h=h===""?h+"@Sync=(Yes,Yes)":h+",@Sync=(Yes,Yes)"),d!=null&&d.includes("$")){let pe=(Me=(Ce=d==null?void 0:d.replace("*",ml))==null?void 0:Ce.split(ml))==null?void 0:Me[1],qe=(ra=(Pe=d==null?void 0:d.replace("*",ml))==null?void 0:Pe.split(ml))==null?void 0:ra[0];qe=qe==null?void 0:qe.split("$"),qe=((ee=(Ta=qe==null?void 0:qe[0])==null?void 0:Ta.split(":"))==null?void 0:ee[0])+":"+(qe==null?void 0:qe[1])+":",d=qe+"*"+pe}else d=(pa=d==null?void 0:d.replaceAll("{",""))==null?void 0:pa.replaceAll("}","")}h!==""&&h&&(h="("+h+")"),h=d+h,((ue=oe.analyzeSplitToContent(c,"}"))==null?void 0:ue.length)>1&&(c=(ua=oe.analyzeSplitToContent(c,"}"))==null?void 0:ua.filter(ye=>(ye==null?void 0:ye[0])!=="@"),c=c==null?void 0:c.join(""));let W=ep(c,l);s=c===""?[]:(W==null?void 0:W.columns)??[],u=oe.getColumnChild(s);let I=oe.getColumnChild(s);s!=null&&s.some(ye=>{var Y;return Array.isArray(ye==null?void 0:ye.children)&&((Y=ye==null?void 0:ye.children)==null?void 0:Y.length)>0})&&(s=[s]),o=C?Ni(C):[],!(o!=null&&o.every(ye=>Array.isArray(ye)))&&(o==null?void 0:o.length)>0&&(o=[o]),(o==null?void 0:o.length)>0&&(Array.isArray(o==null?void 0:o[0])&&((Se=o==null?void 0:o[0])!=null&&Se.every(ye=>Array.isArray(ye)))?o=o==null?void 0:o.map((ye,Y)=>(ye=ye.map((xe,pe)=>(xe.unshift("{}"),xe.unshift((pe+1).toString()),xe)),ye)):o=o==null?void 0:o.map((ye,Y)=>(ye.unshift("{}"),ye.unshift((Y+1).toString()),ye))),W!=null&&W.secondColumns&&((se=W==null?void 0:W.secondColumns)==null?void 0:se.length)>0&&((o==null?void 0:o.length)>0?o=o==null?void 0:o.map((ye,Y)=>{var xe,pe;return Array.isArray(ye==null?void 0:ye[0])?ye=ye==null?void 0:ye.map((qe,sa)=>{var $a,Ma;return qe.unshift((Ma=($a=W==null?void 0:W.secondColumns)==null?void 0:$a[sa])==null?void 0:Ma.prop),qe}):ye.unshift((pe=(xe=W==null?void 0:W.secondColumns)==null?void 0:xe[Y])==null?void 0:pe.prop),ye}):o=(Be=W==null?void 0:W.secondColumns)==null?void 0:Be.map((ye,Y)=>(ye=[ye==null?void 0:ye.label],ye.push(Y),ye)),s.unshift({label:"",prop:"disabled",sortable:!1})),u=u==null?void 0:u.map(ye=>{var Y,xe;return{menus:ye==null?void 0:ye.menus,content:((Y=ye==null?void 0:ye.menus)==null?void 0:Y.join("/"))+ml+((xe=ye==null?void 0:ye.groups)==null?void 0:xe.join("/"))}});let j=[];if(((da=(Ge=h==null?void 0:h.replace("(",ml))==null?void 0:Ge.split(ml))==null?void 0:da[0])!==""&&(j=(R=(Ja=h==null?void 0:h.replace("(",ml))==null?void 0:Ja.split(ml))==null?void 0:R[0],j=[j],j=j==null?void 0:j.map(ye=>{var xe,pe,qe;let Y=ye==null?void 0:ye.split("*");return{menus:(xe=Y==null?void 0:Y[0])==null?void 0:xe.split(":"),content:((pe=Y==null?void 0:Y[0])==null?void 0:pe.replaceAll(":","/"))+ml+((qe=Y==null?void 0:Y[1])==null?void 0:qe.replaceAll(":","/"))}}),u=[...u,...j]),u=u==null?void 0:u.filter(ye=>{var Y;return(ye==null?void 0:ye.menus)&&((Y=ye==null?void 0:ye.menus)==null?void 0:Y.length)>0}),u=u==null?void 0:u.map(ye=>ye==null?void 0:ye.content),u=[...new Set(u)],u=u==null?void 0:u.map(ye=>{var Y,xe;return{menus:(Y=ye==null?void 0:ye.split(ml))==null?void 0:Y[0],groups:((xe=ye==null?void 0:ye.split(ml))==null?void 0:xe[1])??[]}}),m=I==null?void 0:I.filter(ye=>{var Y;return(ye==null?void 0:ye.filter)&&((Y=ye==null?void 0:ye.filter)==null?void 0:Y.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(ye=>{var Y,xe,pe,qe;return(qe=(pe=(xe=(Y=oe.analyzeSplitToContent(ye==null?void 0:ye.filter,","))==null?void 0:Y.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:pe[0])==null?void 0:qe.includes("Yes")}),m=cs(m)),b=I==null?void 0:I.filter(ye=>{var Y;return(ye==null?void 0:ye.filter)&&((Y=ye==null?void 0:ye.filter)==null?void 0:Y.includes("@Sync"))}),(b==null?void 0:b.length)>0&&(b=b==null?void 0:b.filter(ye=>{var Y,xe,pe,qe;return(qe=(pe=(xe=(Y=oe.analyzeSplitToContent(ye==null?void 0:ye.filter,","))==null?void 0:Y.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:pe[1])==null?void 0:qe.includes("Yes")}),b=cs(b)),h!==""&&(h!=null&&h.includes("@Sync"))&&(h==null?void 0:h[0])!=="("){let ye=(H=h==null?void 0:h.replace("(",ml))==null?void 0:H.split(ml),Y=ye==null?void 0:ye[1];if(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1),Y=oe.analyzeSplitToContent(Y,","),(de=(he=(X=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:X.split(","))==null?void 0:he[0])!=null&&de.includes("Yes")){let xe=ye==null?void 0:ye[0];xe=[{menus:(oa=(ma=xe==null?void 0:xe.split("*"))==null?void 0:ma[0])==null?void 0:oa.replaceAll(":","/"),groups:((_a=(Ve=xe==null?void 0:xe.split("*"))==null?void 0:Ve[1])==null?void 0:_a.split(":"))??[]}],m=[...m,...xe]}if((La=(ya=(ze=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:ya[1])!=null&&La.includes("Yes")){let xe=ye==null?void 0:ye[0];xe=[{menus:(ha=(za=xe==null?void 0:xe.split("*"))==null?void 0:za[0])==null?void 0:ha.replaceAll(":","/"),groups:((Ne=(Ca=xe==null?void 0:xe.split("*"))==null?void 0:Ca[1])==null?void 0:Ne.split(":"))??[]}],b=[...b,...xe]}}return{groupName:r,tableColumns:s,tableFilter:h,tableContents:o,columns:(W==null?void 0:W.secondColumns)??[],relatedQuotes:u,fatherSyncContents:m,sonSyncContents:b}},tc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var o,s,h,c;if(Array.isArray(n))n=n==null?void 0:n.map(d=>{var m,b,u,C;return d!=null&&d.isMainPath||(((m=d==null?void 0:d.children)==null?void 0:m.length)>0?d.children=tc(d.children,l):((b=d==null?void 0:d.menus)==null?void 0:b.length)>0&&!((u=n==null?void 0:n[0])!=null&&u.isMainPath)&&(d.menus=(C=d.menus)==null?void 0:C.map((M,k)=>{var W,I;return((W=d.menus)==null?void 0:W.length)-1===k&&M===""&&(l==null?void 0:l.parentContent)+"/"!==((I=d.menus)==null?void 0:I.join("/"))&&(M=l==null?void 0:l.value),d}),d.bindMenus=d.menus)),d});else{if(r===0&&((o=n.menus)==null?void 0:o.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((s=n.menus)==null?void 0:s.length)>0&&!((h=a==null?void 0:a[0])!=null&&h.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((d,m)=>{var b,u;return((b=n.menus)==null?void 0:b.length)-1===m&&d===""&&(l==null?void 0:l.parentContent)+"/"!==((u=n.menus)==null?void 0:u.join("/"))&&(d=l==null?void 0:l.value),d}),n.bindMenus=n.menus)}return n}),a),ap=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=tc(n.contents,l)),n)),a),kt=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=kt(r,l),r)):n=n==null?void 0:n.map(r=>{var o,s;return r!=null&&r.children&&((o=r==null?void 0:r.children)==null?void 0:o.length)>0?r.children=kt(r==null?void 0:r.children,l):r!=null&&r.words&&((s=r==null?void 0:r.words)==null?void 0:s.length)>0&&(l!=null&&l.find(h=>{var c,d,m,b;return((b=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:b[((m=(d=r==null?void 0:r.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])===h}))&&(r.mainKey=!0),r}),n};let _r="$R";const lp=A.useUnit(A.pinia),{selectTitle:dn}=A.storeToRefs(lp),rp=A.useMenuState(A.pinia),{localFiles:np}=A.storeToRefs(rp),Sn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainParam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixColumn",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1},{key:"@BackGround",value:"onBackGround",order:1}];var si=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(si||{});const ip=a=>{var l,n,r,o,s;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let h=a==null?void 0:a.contents,c=a==null?void 0:a.filter;(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(l=oe.analyzeSplitToContent(c,","))==null?void 0:l.map(m=>((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)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=oe.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((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)),m));let d=(s=(o=(r=np.value)==null?void 0:r.filter(m=>{var b;return(m==null?void 0:m.path)===((b=a==null?void 0:a.groupName)==null?void 0:b[0])}))==null?void 0:o[0])==null?void 0:s.children;return d=(d==null?void 0:d.filter(m=>c==null?void 0:c.find(b=>b===(m==null?void 0:m.name))))??[],(c==null?void 0:c.length)>0&&(d==null?void 0:d.length)===0&&(c==null||c.forEach(m=>{d.push({url:"file:///"+(m==null?void 0:m.replaceAll("\\","/"))})})),h.push({key:"backGround",contents:d}),h}return a==null?void 0:a.contents},op=a=>{const l=cc(a==null?void 0:a.filter);return l?uc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},tp=a=>{const l=cc(a==null?void 0:a.filter);return l?uc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},sp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},cp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},up=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var o;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(o=r.contents)==null?void 0:o.slice(0,parseInt(a==null?void 0:a.filter))),r})},dp=async a=>{var l,n,r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(J=>((J==null?void 0:J.key)==="tableContents"&&(J.contents=oe.shuffle(J.contents)),J));if((a==null?void 0:a.filter)==="Auto"){let ne=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:r.contents;Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),ne=oe.getColumnChild(ne);let J=ne==null?void 0:ne.filter(Ce=>(Ce==null?void 0:Ce.filter)&&(Ce==null?void 0:Ce.filter)!==""),ce=new Map,Te=[];J==null||J.forEach(Ce=>{var Me,Pe;ce.get((Me=Ce==null?void 0:Ce.menus)==null?void 0:Me.join("/"))||(ce.set((Pe=Ce==null?void 0:Ce.menus)==null?void 0:Pe.join("/"),Ce),Te.push(Ce))});let $e=(s=(o=dn==null?void 0:dn.value)==null?void 0:o.find(Ce=>(Ce==null?void 0:Ce.condition)==="child"))==null?void 0:s.value,fe=Te==null?void 0:Te.map(Ce=>{var Me,Pe,ra;return Ce=(Me=Ce==null?void 0:Ce.menus)==null?void 0:Me.join("/"),(Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])==="/"&&((ra=(Pe=dn==null?void 0:dn.value)==null?void 0:Pe.find(Ta=>(Ta==null?void 0:Ta.condition)==="child"))==null?void 0:ra.parentContent)+"/"!==Ce?Ce=Ce+$e:(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)),Ce}),N=Te==null?void 0:Te.map(Ce=>Ce==null?void 0:Ce.groups),te=fe==null?void 0:fe.map(async Ce=>{let Me=await en(Ce,!1);return{path:Ce,contents:Me}});te=await Promise.all(te);let U=te==null?void 0:te.map((Ce,Me)=>{var ra,Ta,ee,pa,ue,ua,Se;let Pe=(ra=Ce==null?void 0:Ce.contents)==null?void 0:ra.filter(se=>{var Be,Ge;return(se==null?void 0:se.name)===((Ge=N==null?void 0:N[Me])==null?void 0:Ge[((Be=N==null?void 0:N[Me])==null?void 0:Be.length)-1])});return Pe=(pa=(ee=(Ta=Pe==null?void 0:Pe[0])==null?void 0:Ta.compData)==null?void 0:ee.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:pa.contents,(Ce==null?void 0:Ce.path)===((ua=(ue=dn==null?void 0:dn.value)==null?void 0:ue.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:ua.parentContent)&&(Pe=((Se=Pe==null?void 0:Pe.map(se=>{for(let Be in se)if(se[Be]===$e)return se}))==null?void 0:Se.filter(se=>se))??[]),Pe??[]});if(U=U==null?void 0:U.map(Ce=>(Ce=Ce==null?void 0:Ce.map(Me=>{var ra;let Pe={};for(let Ta in Me)if(J!=null&&J.find(ee=>{var pa,ue;return((ue=(pa=ee==null?void 0:ee.words)==null?void 0:pa[0])==null?void 0:ue.replaceAll("'",""))===Ta})){let ee=(ra=J==null?void 0:J.find(pa=>{var ue,ua;return((ua=(ue=pa==null?void 0:pa.words)==null?void 0:ue[0])==null?void 0:ua.replaceAll("'",""))===Ta}))==null?void 0:ra.prop;Pe[ee]=Me==null?void 0:Me[Ta]}return Pe}),Ce)),U=oe.cartesianProduct(U),Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),(U==null?void 0:U.length)>0&&((u=(c=(h=J==null?void 0:J[0])==null?void 0:h.menus)==null?void 0:c.join("/"))==null?void 0:u[((b=(m=(d=J==null?void 0:J[0])==null?void 0:d.menus)==null?void 0:m.join("/"))==null?void 0:b.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Me=>{var Pe;return(Me==null?void 0:Me.key)==="tableContents"&&(U==null?void 0:U.length)>0&&(Me.contents=((Pe=Me.contents)==null?void 0:Pe.length)>0?Me.contents:U),Me})}if((a==null?void 0:a.filter)==="Manual"){let ne=[],J=[],ce=(k=(M=a==null?void 0:a.contents)==null?void 0:M.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:k.contents;(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===")"?ce=(I=(W=ce==null?void 0:ce.replace("(",_r))==null?void 0:W.split(_r))==null?void 0:I[0]:ce="",ce!==""&&(ne=((L=(j=ce==null?void 0:ce.split("*"))==null?void 0:j[0])==null?void 0:L.split(":"))??[],J=((S=(g=(w=(x=(E=ce==null?void 0:ce.split("*"))==null?void 0:E[1])==null?void 0:x.replace("{",_r))==null?void 0:w.split(_r))==null?void 0:g[0])==null?void 0:S.split(":"))??[]);let Te=(V=($=a==null?void 0:a.contents)==null?void 0:$.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:V.contents;Te=(Z=(ae=Te==null?void 0:Te.replace("(",_r))==null?void 0:ae.split(_r))==null?void 0:Z[1],Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1);let $e=(me=a==null?void 0:a.contents)==null?void 0:me.map(N=>{var te,U,Ce,Me,Pe,ra,Ta,ee,pa;return(N==null?void 0:N.key)==="header"&&((te=N==null?void 0:N.contents)!=null&&te.every(ue=>(ue==null?void 0:ue.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((U=N==null?void 0:N.contents)==null?void 0:U[0])?N.contents=(Ce=N==null?void 0:N.contents)==null?void 0:Ce.map((ue,ua)=>{var Se,se,Be;return ue!=null&&ue.isMainPath||(ua===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((se=ue.words)==null?void 0:se.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Te,(!(ue!=null&&ue.menus)||((Be=ue==null?void 0:ue.menus)==null?void 0:Be.length)===0)&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}):Array.isArray((Me=N==null?void 0:N.contents)==null?void 0:Me[0])&&((Ta=(ra=(Pe=N==null?void 0:N.contents)==null?void 0:Pe[0])==null?void 0:ra.filter(()=>(ne==null?void 0:ne.length)>0))==null?void 0:Ta.length)>0&&(N.contents[0]=(pa=(ee=N==null?void 0:N.contents)==null?void 0:ee[0])==null?void 0:pa.map((ue,ua)=>{var Se,se,Be;return ue!=null&&ue.isMainPath||(ua===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((se=ue.words)==null?void 0:se.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Te,(!(ue!=null&&ue.menus)||Array.isArray(ue==null?void 0:ue.menus)&&((Be=ue==null?void 0:ue.menus)==null?void 0:Be.length)===0)&&(ne==null?void 0:ne.length)>0&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}))),N}),fe=(Ae=$e==null?void 0:$e.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:Ae.contents;if(Array.isArray(fe==null?void 0:fe[0])&&(fe=fe==null?void 0:fe[0]),fe=oe.getColumnChild(fe),fe!=null&&fe.some(N=>{var te,U;return((U=N==null?void 0:N.menus)==null?void 0:U[((te=N==null?void 0:N.menus)==null?void 0:te.length)-1])===""})){let N=(F=dn==null?void 0:dn.value)==null?void 0:F.find(te=>(te==null?void 0:te.condition)==="child");$e=ap($e,N)}return $e}if((a==null?void 0:a.filter)==="Chart"){let ne=a==null?void 0:a.contents;return ne.push({key:"newType",contents:"Chart"}),ne}if((a==null?void 0:a.filter)==="Carousel"){let ne=a==null?void 0:a.contents;return ne.push({key:"newType",contents:"Carousel"}),ne}return a==null?void 0:a.contents},pp=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}if((a==null?void 0:a.filter)==="Bar"||(a==null?void 0:a.filter)==="Pie"||(a==null?void 0:a.filter)==="Line"||(a==null?void 0:a.filter)==="Histogram"||(a==null?void 0:a.filter)==="Scatter"){let l=a==null?void 0:a.contents;return l.push({key:"ChartType",contents:{type:a==null?void 0:a.filter,title:""}}),l}return a==null?void 0:a.contents},fp=a=>{var r,o,s,h,c,d,m,b,u,C,M,k;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((o=(r=l==null?void 0:l.replace(":",_r))==null?void 0:r.split(_r))==null?void 0:o[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(c=(h=l==null?void 0:l.split("="))==null?void 0:h[1])!=null&&c.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let W=(d=l==null?void 0:l.split("="))==null?void 0:d[0],I=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(b=I==null?void 0:I.slice(1,I==null?void 0:I.length))!=null&&b.includes("$")&&(I=(M=(C=(u=dn==null?void 0:dn.value)==null?void 0:u.filter(j=>(j==null?void 0:j.condition)==="child"))==null?void 0:C[0])==null?void 0:M.value),l=W+"="+I}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=oe.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let W=[];return n==null||n.forEach(j=>{let L={};for(let E in j){let x=E;x!=null&&x.includes("[")||(L[x]=j[E])}W.push(L)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(j=>{var E,x,w;let L=(x=(E=a==null?void 0:a.contents)==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:x.contents;if(L=(w=oe.getEqualChild(L))==null?void 0:w.filter(g=>(g==null?void 0:g.label)!=="操作"),(j==null?void 0:j.key)==="tableContents"){let S=oe.tableToForm(j==null?void 0:j.contents,L);W==null||W.forEach($=>{var V,ae;for(let Z in $)!((V=S==null?void 0:S[0])!=null&&V.find(me=>{var Ae;return(me==null?void 0:me.key)===Z||((Ae=me==null?void 0:me.key)==null?void 0:Ae.includes(Z))}))&&!(S!=null&&S.find(me=>{var Ae;return(me==null?void 0:me.key)===Z||((Ae=me==null?void 0:me.key)==null?void 0:Ae.includes(Z))}))||(((ae=$[Z])==null?void 0:ae[0])!=="!"?S=S==null?void 0:S.filter(me=>{var Ae,F;return((Ae=me==null?void 0:me.find(ne=>{var J;return(ne==null?void 0:ne.key)===Z||((J=ne==null?void 0:ne.key)==null?void 0:J.includes(Z))}))==null?void 0:Ae.value)===$[Z]||Array.isArray($==null?void 0:$[Z])&&((F=$==null?void 0:$[Z])==null?void 0:F.find(ne=>{var J;return((J=me==null?void 0:me.find(ce=>{var Te;return(ce==null?void 0:ce.key)===Z||((Te=ce==null?void 0:ce.key)==null?void 0:Te.includes(Z))}))==null?void 0:J.value)===ne}))}):S=S==null?void 0:S.filter(me=>{var Ae;return((Ae=me==null?void 0:me.find(F=>{var ne;return(F==null?void 0:F.key)===Z||((ne=F==null?void 0:F.key)==null?void 0:ne.includes(Z))}))==null?void 0:Ae.value)!==$[Z]}))}),(S==null?void 0:S.length)===0?j.contents=[]:j.contents=S==null?void 0:S.map($=>{let V={};return $==null||$.forEach(ae=>{V[ae==null?void 0:ae.key]=ae==null?void 0:ae.value}),V})}return j})}return a==null?void 0:a.contents},hp=a=>a==null?void 0:a.contents,vp=a=>a==null?void 0:a.contents,mp=a=>{var l,n,r,o;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(o=a==null?void 0:a.contents)==null?void 0:o.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=kt(c.contents,s)),c))}return a==null?void 0:a.contents},yp=a=>{var n,r,o,s,h;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",_r))==null?void 0:n.split(_r))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(o=oe.analyzeSplitToContent(c,","))==null?void 0:o.map(u=>((u==null?void 0:u[(u==null?void 0:u.length)-1])===","&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),u));let d=c==null?void 0:c[0];(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1));let m=(c==null?void 0:c[1])??"Up",b=(s=a==null?void 0:a.contents)==null?void 0:s.map(u=>{var C,M;if(m==="Up"){if((u==null?void 0:u.key)==="extraButton"){let k=(C=d==null?void 0:d.split(","))==null?void 0:C.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}}else if(m==="Line"&&(u==null?void 0:u.key)==="rowButton"){let k=(M=d==null?void 0:d.split(","))==null?void 0:M.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}return u});if(m==="Bottom"||m==="Down"){let u=(h=d==null?void 0:d.split(","))==null?void 0:h.map(C=>({label:C,prop:C}));b.push({key:"bottomButton",contents:u})}return b}return a==null?void 0:a.contents},gp=a=>a==null?void 0:a.contents,bp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.key)==="rowButton"&&(o.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(h=>({label:h,prop:h}))),o}):a==null?void 0:a.contents},kp=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,o=(n=l==null?void 0:l.split(","))==null?void 0:n.map(s=>({label:s,prop:s}));return r.push({key:"bottomButton",contents:o}),r}return a==null?void 0:a.contents},xp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(o=>(o.isNoClick=!0,o))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},wp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s;return(o==null?void 0:o.key)==="formContent"&&(o.contents=(s=o.contents)==null?void 0:s.map(h=>(h.width=n,h))),o})}return a==null?void 0:a.contents},_p=a=>{var l,n,r,o;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(c=>{var d;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(d=c.contents)==null?void 0:d.map(m=>(m.width=s,m))),c})}if(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let s=Ni(a==null?void 0:a.filter),h=Array.isArray(s)?s.map(d=>parseInt(d)).filter(d=>!!d&&!Number.isNaN(d)):[];return h.length?(o=a==null?void 0:a.contents)==null?void 0:o.map(d=>{if((d==null?void 0:d.key)==="formContent"){const m=d.contents??[];d.contents=m.map((b,u)=>{const C=u+1;let M=0,k=0;for(let I=0;I<h.length;I++){if(k+=h[I],C<=k){M=I;break}I===h.length-1&&(M=h.length-1)}const W=h[M]||h[h.length-1]||1;return b.width=W,b})}return d}):a==null?void 0:a.contents}return a==null?void 0:a.contents},Sp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s,h,c;return(o==null?void 0:o.key)==="header"&&(Array.isArray((s=o==null?void 0:o.contents)==null?void 0:s[0])?o.contents[0]=(c=o.contents[0])==null?void 0:c.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d)):o.contents=(h=o.contents)==null?void 0:h.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d))),o})}return a==null?void 0:a.contents},Ep=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const r=s=>(n!=null&&n.find(h=>h===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(h=>r(h))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var h,c,d;return(s==null?void 0:s.key)==="header"&&(Array.isArray((h=s==null?void 0:s.contents)==null?void 0:h[0])?s.contents[0]=(d=s.contents[0])==null?void 0:d.map(m=>r(m)):s.contents=(c=s.contents)==null?void 0:c.map(m=>r(m))),s})}return a==null?void 0:a.contents},Cp=async a=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;const l=A.useUnit(A.pinia),{chooseTitle:n}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let x=await en(((o=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:o.parentContent)??((h=(s=n==null?void 0:n.value)==null?void 0:s[0])==null?void 0:h.relatedContent),!1),w=(d=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:d.value;(b=(m=x==null?void 0:x[0])==null?void 0:m.compData)!=null&&b.find(V=>(V==null?void 0:V.key)==="header")?x=(u=x==null?void 0:x[0])==null?void 0:u.compData:x=(M=(C=x==null?void 0:x.filter(V=>{var ae;return(ae=V==null?void 0:V.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="header")}))==null?void 0:C[0])==null?void 0:M.compData;let g=(k=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:k.contents;Array.isArray(g==null?void 0:g[0])&&(g=g==null?void 0:g[0]),g=((W=g==null?void 0:g.find(V=>V==null?void 0:V.isMainKey))==null?void 0:W.prop)??((I=g==null?void 0:g[0])==null?void 0:I.prop);let S=(L=(j=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:L.find(V=>(V==null?void 0:V[g])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(V=>{var ae;return(V==null?void 0:V.key)==="formContent"&&(V.contents=(ae=V.contents)==null?void 0:ae.map(Z=>(Z.value=S==null?void 0:S[Z==null?void 0:Z.prop],Z))),V})}return a==null?void 0:a.contents},Dp=a=>{var l,n,r,o,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let h=a==null?void 0:a.filter;if(h!=null&&h.includes("*")&&(h="({"+((r=(n=h==null?void 0:h.replace("{",_r))==null?void 0:n.split(_r))==null?void 0:r[1])),h=(o=h==null?void 0:h.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(h==null?void 0:h[0])!=="("&&(h="("+h+")"),h.slice(1,(h==null?void 0:h.length)-1)==="undefined")return a==null?void 0:a.contents;let c=oe.calculatorAndToOr(h),d=c==null?void 0:c[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,b=[];for(let u in d)(d==null?void 0:d[u])===(m==null?void 0:m[u])?b.push(!0):b.push(!1);return b!=null&&b.every(u=>u===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Tp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Bp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Np=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Ap=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,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=(l=oe.analyzeSplitToContent(r,","))==null?void 0:l.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o)),n.push({key:"stepName",contents:r}),n}return a==null?void 0:a.contents},zp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},sc={onNumSlice:up,onRandomContents:dp,onConditionContents:fp,onFatherPaceContents:hp,onPaceContents:vp,onMainTagContents:mp,onButtonContents:yp,onPamButtonContents:gp,onRowButtonContents:bp,onRelated:Cp,onRowNum:_p,onFixRow:Sp,onReqItem:Ep,onBottomButtonContents:kp,onConditionContent:Dp,onTabs:Tp,onSinChoice:Bp,onTextSize:sp,onTextRGBA:cp,onPosition:op,onSize:tp,onShowType:Np,onStepName:Ap,onStep:zp,onInterfaceTypeContents:pp,onBackGround:ip,onMaxColumn:wp,onEditRead:xp},Mp=async(a,l,n="")=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r="";if(((h=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:h.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.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=(m=(d=r==null?void 0:r.replace("(",_r))==null?void 0:d.split(_r))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=oe.analyzeSplitToContent(r,","))==null?void 0:b.map(L=>((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&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=a;for(let L in o){let E,x="";E=(M=(C=(u=o==null?void 0:o[L])==null?void 0:u.replace("=",_r))==null?void 0:C.split(_r))==null?void 0:M[0],x=(I=(W=(k=o==null?void 0:o[L])==null?void 0:k.replace("=",_r))==null?void 0:W.split(_r))==null?void 0:I[1];let w=(j=Sn==null?void 0:Sn.find(g=>(g==null?void 0:g.key)===E))==null?void 0:j.value;if(w){const g=sc[w];s=await g({contents:s,filter:x,extra:l,groupName:n})}}return s},Po=async(a,l,n="")=>{var c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae;let r="";if(((c=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(d=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:d.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)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(b=(m=r==null?void 0:r.replace("(",_r))==null?void 0:m.split(_r))==null?void 0:b[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(u=oe.analyzeSplitToContent(r,","))==null?void 0:u.map(Z=>((Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])===","&&(Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1)),Z!=null&&Z.includes("(")||(Z=Z==null?void 0:Z.replaceAll(":","=")),Z)),s=a,h=new Map;o==null||o.forEach(Z=>{var Ae,F,ne;let me=(Ae=Z==null?void 0:Z.split("="))==null?void 0:Ae[0];if(me==="@MainParam"&&h.get(me)){let J=h.get(me);J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1);let ce=(ne=(F=Z==null?void 0:Z.replace("{",_r))==null?void 0:F.split(_r))==null?void 0:ne[1];ce=J+","+ce,h.set(me,ce)}else me==="@Button"&&h.get(me)?h.set(Z,Z):h.set(me,Z)}),o=Array.from(h.values()),o=o==null?void 0:o.sort((Z,me)=>{var Ae,F;return((Ae=Sn==null?void 0:Sn.find(ne=>me==null?void 0:me.includes(ne==null?void 0:ne.key)))==null?void 0:Ae.order)-((F=Sn==null?void 0:Sn.find(ne=>Z==null?void 0:Z.includes(ne==null?void 0:ne.key)))==null?void 0:F.order)});for(let Z in o){let me,Ae="";(C=o==null?void 0:o[Z])!=null&&C.includes("(")&&((M=o==null?void 0:o[Z])!=null&&M.includes("@If"))?(me=(I=(W=(k=o==null?void 0:o[Z])==null?void 0:k.replace("(",_r))==null?void 0:W.split(_r))==null?void 0:I[0],Ae="("+((E=(L=(j=o==null?void 0:o[Z])==null?void 0:j.replace("(",_r))==null?void 0:L.split(_r))==null?void 0:E[1])):(me=(g=(w=(x=o==null?void 0:o[Z])==null?void 0:x.replace("=",_r))==null?void 0:w.split(_r))==null?void 0:g[0],Ae=(V=($=(S=o==null?void 0:o[Z])==null?void 0:S.replace("=",_r))==null?void 0:$.split(_r))==null?void 0:V[1]);let F=(ae=Sn==null?void 0:Sn.find(ne=>(ne==null?void 0:ne.key)===me))==null?void 0:ae.value;if(F){const ne=sc[F];s=await ne({contents:s,filter:Ae,extra:l,groupName:n})}}return s},cc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},uc=(a,l)=>{var W,I,j,L,E;const n=Array.isArray(a)?a:[],r=n.find(x=>(x==null?void 0:x.key)==="formContent"),o=Array.isArray(r==null?void 0:r.contents)?r.contents:[],s=((W=n.find(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"))==null?void 0:W.contents)??{},h=(o==null?void 0:o[0])??{};let c=((I=l==null?void 0:l.position)==null?void 0:I[0])??(s==null?void 0:s._positionStartRow)??(h==null?void 0:h._positionStartRow),d=((j=l==null?void 0:l.position)==null?void 0:j[1])??(s==null?void 0:s._positionRowSpan)??(h==null?void 0:h._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!d||Number.isNaN(d)||d<1)&&(d=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(s==null?void 0:s._sizeStart)??(h==null?void 0:h._sizeStart),b=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(h==null?void 0:h._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(b===void 0||Number.isNaN(b))&&(b=1),m=Math.max(0,Math.min(1,m)),b=Math.max(0,Math.min(1,b)),b<=m&&(m=0,b=1);const u=b-m,C=Math.max(1,Math.round(1/u));let M=n.map(x=>{if((x==null?void 0:x.key)!=="formContent")return x;const w=Array.isArray(x==null?void 0:x.contents)?x.contents:[];return{...x,contents:w.map(g=>({...g,width:C,_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b}))}});const k={_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b};return M.some(x=>(x==null?void 0:x.key)==="_gridLayoutMeta")?M=M.map(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"?{...x,contents:k}:x):M.push({key:"_gridLayoutMeta",contents:k}),M};let yo="$R";const Ip=A.useUnit(A.pinia),{selectTitle:Op}=A.storeToRefs(Ip);let Lp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Rp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],$p=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Vp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ds=async(a,l,n=!0)=>{let r=[],o=a==null?void 0:a.map(async s=>{var u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl;let h=(k=(M=(C=(u=s==null?void 0:s.contents)==null?void 0:u.find(_e=>{var Oa;return(Oa=_e==null?void 0:_e.key)==null?void 0:Oa.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:k.类型,c=Object.values(s==null?void 0:s.name);c=c==null?void 0:c.reverse();let d=(W=s==null?void 0:s.contents)==null?void 0:W.map(_e=>_e==null?void 0:_e.key),m={comp:h,isShow:s==null?void 0:s.is_show,name:c==null?void 0:c[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:d,menuFilter:(I=s==null?void 0:s.filter)==null?void 0:I.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(j=s==null?void 0:s.filter)==null?void 0:j.fatherSyncs,relatedQuotes:(L=s==null?void 0:s.filter)==null?void 0:L.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(x=A.cloneDeep(c))==null?void 0:x.reverse()};for(let _e in c)parseInt(_e)>=1&&(m[`name${parseInt(_e)-1}`]=c[_e]);let b=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(g=s==null?void 0:s.filter)==null?void 0:g.menuFilter:[];if(((S=b==null?void 0:b.filter(_e=>_e==null?void 0:_e.includes("@If")))==null?void 0:S.length)>0){let _e=b==null?void 0:b.filter(Ze=>Ze==null?void 0:Ze.includes("@If"));_e=_e==null?void 0:_e[0],_e=(V=($=_e==null?void 0:_e.replace("(",yo))==null?void 0:$.split(yo))==null?void 0:V[1],_e=_e==null?void 0:_e.slice(0,(_e==null?void 0:_e.length)-1),_e!=null&&_e.includes("*")&&(_e=(Z=(ae=_e==null?void 0:_e.replace("{",yo))==null?void 0:ae.split(yo))==null?void 0:Z[1],_e=_e==null?void 0:_e.replace("}","")),_e=oe.calculatorAndToOr(_e);let Oa=(l==null?void 0:l.originPath)??"";(Oa==null?void 0:Oa[(Oa==null?void 0:Oa.length)-1])==="/"&&(Oa=Oa==null?void 0:Oa.slice(0,(Oa==null?void 0:Oa.length)-1));let Je=await en(Oa,!1),ie=(me=Je==null?void 0:Je.filter(Ze=>(Ze==null?void 0:Ze.comp)==="Table"))==null?void 0:me[0];ie=(F=(Ae=ie==null?void 0:ie.compData)==null?void 0:Ae.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:F.contents;let Xe=(J=(ne=Op.value)==null?void 0:ne.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:J.value;ie=(ce=ie==null?void 0:ie.map(Ze=>{for(let wa in Ze)if((Ze==null?void 0:Ze[wa])===Xe)return Ze}))==null?void 0:ce.filter(Ze=>Ze),ie=ie==null?void 0:ie[0],_e=_e==null?void 0:_e[0];let Aa=[];for(let Ze in _e){let wa="";qa.isObject(ie)&&(wa=($e=(Te=Object.keys(ie))==null?void 0:Te.filter(Fa=>Fa==null?void 0:Fa.includes("."+Ze)))==null?void 0:$e[0]),wa!==""&&(ie!=null&&ie[wa])&&(_e==null?void 0:_e[Ze])===(ie==null?void 0:ie[wa])||ie!=null&&ie[Ze]&&(_e==null?void 0:_e[Ze])===(ie==null?void 0:ie[Ze])?Aa.push(!0):Aa.push(!1)}if(Aa!=null&&Aa.some(Ze=>Ze===!1)&&((N=l==null?void 0:l.originPath)==null?void 0:N[((fe=l==null?void 0:l.originPath)==null?void 0:fe.length)-1])!=="/")return}if(h==="Table"||h==="Method"){!n&&((te=m==null?void 0:m.fatherSyncContents)==null?void 0:te.length)>0;let _e=((U=s==null?void 0:s.contents)==null?void 0:U.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("content")}))||[],Oa=[];m.comp="Table",_e.value=(Ce=_e==null?void 0:_e.value)==null?void 0:Ce.sort((He,va)=>parseInt(He==null?void 0:He.id)-parseInt(va==null?void 0:va.id)),_e.value=(Me=_e==null?void 0:_e.value)==null?void 0:Me.map(He=>{let va={};for(let ca in He)JSON.stringify(He==null?void 0:He[ca])==="{}"?va[ca]="":va[ca]=He==null?void 0:He[ca];return va}),Oa.push({key:"tableContents",contents:_e==null?void 0:_e.value});let Je=(pa=(ee=(Ta=(ra=(Pe=s==null?void 0:s.contents)==null?void 0:Pe.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("struct")}))==null?void 0:ra.value)==null?void 0:Ta[0])==null?void 0:ee.结构)==null?void 0:pa.contents;Array.isArray(Je==null?void 0:Je[0])?Je[0]=(ue=Je==null?void 0:Je[0])==null?void 0:ue.filter(He=>(He==null?void 0:He.prop)!=="sort"&&(He==null?void 0:He.prop)!=="relatedId"):Je=Je==null?void 0:Je.filter(He=>(He==null?void 0:He.prop)!=="sort"&&(He==null?void 0:He.prop)!=="relatedId"),Oa.push({key:"header",contents:Je}),Oa.push({key:"filter",contents:(Ge=(Be=(se=(Se=(ua=s==null?void 0:s.contents)==null?void 0:ua.find(He=>{var va;return(va=He==null?void 0:He.key)==null?void 0:va.includes("struct")}))==null?void 0:Se.value)==null?void 0:se[0])==null?void 0:Be.引用)==null?void 0:Ge.contents});let ie=Lp,Xe=A.cloneDeep(Rp);h==="Method"&&Xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Je==null?void 0:Je[0])&&((da=Je==null?void 0:Je[0])==null?void 0:da.prop)==="disabled"&&(ie=$p,Xe=Vp);const Aa=["推力","真空","压力","温度","流量"],Ze=m.name;Ze&&Aa.includes(Ze)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let wa=[];if(!Array.isArray(Je==null?void 0:Je[0])&&(Je!=null&&Je.some(He=>{var va;return(He==null?void 0:He.calculatorFilter)&&((va=He==null?void 0:He.calculatorFilter)==null?void 0:va.includes("Manual"))}))){let He=(Ja=Je==null?void 0:Je.map(va=>va==null?void 0:va.calculatorFilter))==null?void 0:Ja.filter(va=>va&&(va==null?void 0:va.includes("Manual")));He==null||He.forEach(va=>{var cl;let ca=oe.analyzeSplitToContent(va,",");if(ca=ca==null?void 0:ca.map(Le=>((Le==null?void 0:Le[(Le==null?void 0:Le.length)-1])===","&&(Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1)),Le)),ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=ca==null?void 0:ca.find(ja=>ja==null?void 0:ja.includes("@FunctionButton"));Le=(cl=Le==null?void 0:Le.split("="))==null?void 0:cl[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],wa.push(Le)}}),wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(va=>({label:va,prop:va,type:"methodButton"}))}else if(Array.isArray(Je==null?void 0:Je[0])&&((R=oe.getColumnChild(Je==null?void 0:Je[0]))!=null&&R.some(He=>{var va;return(He==null?void 0:He.calculatorFilter)&&((va=He==null?void 0:He.calculatorFilter)==null?void 0:va.includes("Manual"))}))){let He=(X=(H=oe.getColumnChild(Je==null?void 0:Je[0]))==null?void 0:H.map(va=>va==null?void 0:va.calculatorFilter))==null?void 0:X.filter(va=>va&&(va==null?void 0:va.includes("Manual")));He==null||He.forEach(va=>{var cl;let ca=oe.analyzeSplitToContent(va,",");if(ca=ca==null?void 0:ca.map(Le=>((Le==null?void 0:Le[(Le==null?void 0:Le.length)-1])===","&&(Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1)),Le)),ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(ca!=null&&ca.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=ca==null?void 0:ca.find(ja=>ja==null?void 0:ja.includes("@FunctionButton"));Le=(cl=Le==null?void 0:Le.split("="))==null?void 0:cl[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],wa.push(Le)}}),wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(va=>({label:va,prop:va,type:"methodButton"}))}if(Oa.push({key:"extraButton",contents:ie}),Oa.push({key:"rowButton",contents:[...Xe,...wa]}),m.compData=await Po(Oa,l,m==null?void 0:m.nameContents),(he=m.compData)!=null&&he.find(He=>(He==null?void 0:He.key)==="tab")&&(m.tab=(ma=(de=m.compData)==null?void 0:de.find(He=>(He==null?void 0:He.key)==="tab"))==null?void 0:ma.contents),(oa=m.compData)!=null&&oa.find(He=>(He==null?void 0:He.key)==="step")&&(m.step=(_a=(Ve=m.compData)==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="step"))==null?void 0:_a.contents),(ze=m.compData)!=null&&ze.find(He=>(He==null?void 0:He.key)==="choice")&&(m.choice=(La=(ya=m.compData)==null?void 0:ya.find(He=>(He==null?void 0:He.key)==="choice"))==null?void 0:La.contents),(za=m.compData)!=null&&za.find(He=>(He==null?void 0:He.key)==="newType")){let He=(Ca=(ha=m.compData)==null?void 0:ha.find(va=>(va==null?void 0:va.key)==="newType"))==null?void 0:Ca.contents;m.comp=He,m.compData=(Ne=m.compData)==null?void 0:Ne.filter(va=>(va==null?void 0:va.key)!=="newType")}let Fa="",Za=(ye=m==null?void 0:m.compData)==null?void 0:ye.filter(He=>(He==null?void 0:He.key)==="fixType");(Za==null?void 0:Za.length)>0&&n&&(Fa=(Y=Za==null?void 0:Za[0])==null?void 0:Y.contents,m.comp=Fa)}else if(h==="Form"){let _e=[],Oa=(qe=(pe=(xe=s==null?void 0:s.contents)==null?void 0:xe.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("content")}))==null?void 0:pe.value)==null?void 0:qe[0],Je=[],ie=Array.isArray((sa=s==null?void 0:s.filter)==null?void 0:sa.menuFilter)?($a=s==null?void 0:s.filter)==null?void 0:$a.menuFilter:[];ie==null||ie.forEach(Ze=>{if(Ze!=null&&Ze.includes("@Param(Hide=Yes, prop=")||Ze!=null&&Ze.includes("(Hide=Yes, prop=")){const wa=Ze==null?void 0:Ze.match(/prop=([^,)]+)/);wa!=null&&wa[1]&&Je.push(wa==null?void 0:wa[1])}});let Xe=(aa=(Ie=(Ue=(Va=(Ma=s==null?void 0:s.contents)==null?void 0:Ma.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("struct")}))==null?void 0:Va.value)==null?void 0:Ue[0])==null?void 0:Ie.结构)==null?void 0:aa.contents,Aa=(ke=Xe==null?void 0:Xe.map(Ze=>(Ze.value=Oa==null?void 0:Oa[Ze==null?void 0:Ze.prop],Ze)))==null?void 0:ke.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId");Aa=Aa==null?void 0:Aa.map(Ze=>(Je!=null&&Je.includes(Ze==null?void 0:Ze.prop)&&(Ze.isHideInForm=!0),Ze)),_e.push({key:"filter",contents:(Vl=(El=(Cl=(tl=(We=s==null?void 0:s.contents)==null?void 0:We.find(Ze=>{var wa;return(wa=Ze==null?void 0:Ze.key)==null?void 0:wa.includes("struct")}))==null?void 0:tl.value)==null?void 0:Cl[0])==null?void 0:El.引用)==null?void 0:Vl.contents}),_e.push({key:"formContent",contents:Aa}),_e.push({key:"paramHideProps",contents:Je}),m.compData=await Mp(_e,l,m==null?void 0:m.nameContents),(_l=m.compData)!=null&&_l.find(Ze=>(Ze==null?void 0:Ze.key)==="tab")&&(m.tab=(Qe=(jl=m.compData)==null?void 0:jl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab"))==null?void 0:Qe.contents),(Xa=m.compData)!=null&&Xa.find(Ze=>(Ze==null?void 0:Ze.key)==="step")&&(m.step=(ll=(ba=m.compData)==null?void 0:ba.find(Ze=>(Ze==null?void 0:Ze.key)==="step"))==null?void 0:ll.contents),(Ia=m.compData)!=null&&Ia.find(Ze=>(Ze==null?void 0:Ze.key)==="choice")&&(m.choice=(rl=(il=m.compData)==null?void 0:il.find(Ze=>(Ze==null?void 0:Ze.key)==="choice"))==null?void 0:rl.contents)}return m});return r=await Promise.all(o),r},Pp=A.useLoginState(A.pinia),{loginUserInfo:Ei}=A.storeToRefs(Pp),Fp=async(a,l="Manual",n=[])=>{var h;let r=a;r=r==null?void 0:r.filter(c=>c==null?void 0:c.functionName);let o=(h=r==null?void 0:r.filter(c=>{var d;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((d=c==null?void 0:c.calculatorFilter)==null?void 0:d.includes(l))||l!=="Manual")}))==null?void 0:h.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),s=r==null?void 0:r.map(async c=>{let d=o==null?void 0:o.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await dc(c,d,r,l,r,n),c});return s=await Promise.all(s),s},xt=async(a,l,n="Manual",r=[])=>{var d;let o=a,s;Array.isArray(l==null?void 0:l[0])?s=oe.getColumnChild(l==null?void 0:l[0]):s=l;let h=(d=s==null?void 0:s.filter(m=>{var b;return(m==null?void 0:m.calculatorFilter)&&((b=m==null?void 0:m.calculatorFilter)==null?void 0:b.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:d.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),c=o==null?void 0:o.map(async m=>(m=await dc(m,h,s,n,o,r),m));return c=await Promise.all(c),c},jp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(h=>{var c;if(l!=null&&l[h]){let d=l==null?void 0:l[h];s=s?d?Al.isEqual(d.toString(),s.toString()):void 0:d}else{let d=(c=o==null?void 0:o.find(b=>(b==null?void 0:b.label)===h))==null?void 0:c.prop,m=(l==null?void 0:l[d])??0;s=s?m?Al.isEqual(m.toString(),s.toString()):void 0:m}}),l[r]=s===void 0?void 0:s?1:0,l},Dr=a=>{const[l,n,r]=A.cloneDeep(a).split(":").map(Number);let o=+a;return!a||!(a!=null&&a.includes(":"))?o:(l??0)*3600+(n??0)*60+(r??0)},Kn=a=>{const l=s=>s.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),o=a%60;return`${l(n)}:${l(r)}:${parseInt(l(o))}`},Hp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W,I,j;if(l!=null&&l[d]){if(s==="Row")if(!((b=((m=l==null?void 0:l[d])==null?void 0:m.toString())??"")!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let L=+(l==null?void 0:l[d]);c=c+L}else c=Dr(c.toString())+Dr((C=l==null?void 0:l[d])==null?void 0:C.toString()),c=Kn(c)}else if(s==="Row"){let L=(M=o==null?void 0:o.find(E=>(E==null?void 0:E.label)===d))==null?void 0:M.prop;if(!((W=Number.isNaN(l==null?void 0:l[L])?"":(k=l==null?void 0:l[L])==null?void 0:k.toString())!=null&&W.includes(":"))&&!((I=c==null?void 0:c.toString())!=null&&I.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=Dr(c==null?void 0:c.toString())+Dr((j=(l==null?void 0:l[L])??0)==null?void 0:j.toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u+C},0)}return l[r]=c,l},Up=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c-I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())-Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c-j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())-Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u-C},0)}return l[r]=c,l},qp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c*I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())*Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!(l!=null&&l[I]))c=void 0;else if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c*j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())*Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u*C},0)}return l[r]=c,l},Wp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=oe.getValueToObjectValue(l,oe.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c/I}else c=c===0?Dr(c.toString())+Dr(l==null?void 0:l[d].toString()):Dr(c.toString())/Dr(l==null?void 0:l[d].toString()),c=Kn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c/j}else c=c===0?Dr(c.toString())+Dr(((l==null?void 0:l[I])??0).toString()):Dr(c.toString())/Dr(((l==null?void 0:l[I])??0).toString()),c=Kn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u/C},0)}return l[r]=c.toFixed(2),l},Kp=async a=>{var s,h,c,d,m,b,u,C,M,k,W;let l=(s=a==null?void 0:a.valueString)==null?void 0:s[0],n=(h=a==null?void 0:a.contents)==null?void 0:h.calculatorFilter,r=0,o=a==null?void 0:a.contents;if(l!=null&&l.includes("$")&&!(l!=null&&l.includes("{"))){(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let I=(d=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:d.replaceAll(":","/"),j=await en(I,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(j=(b=j==null?void 0:j.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:b[0],n!==""){let E=j.compData;E=E==null?void 0:E.filter(x=>(x==null?void 0:x.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Po(E,{}),r=(C=(u=E==null?void 0:E.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:C.length}else r=(W=(k=(M=j==null?void 0:j.compData)==null?void 0:M.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:W.length}return o.value=r,o},go={Sum:Hp,Substract:Up,Multiple:qp,Divide:Wp,Compare:jp,VecDimCount:Kp},dc=async(a,l,n,r="Auto",o,s=[])=>{var b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F;let h=a,c=[],d=await A.getPageDataApi({platId:parseInt((b=Ei==null?void 0:Ei.value)==null?void 0:b.plat_id),pageName:"menu"});d=(M=(C=(u=d==null?void 0:d.data)==null?void 0:u.result)==null?void 0:C.filter(ne=>(ne==null?void 0:ne.property_name)===""))==null?void 0:M[0];let m=[];if(d!=null&&d.object_name){d=d==null?void 0:d.object_name;let ne=await A.getPageDataApi({platId:parseInt((k=Ei==null?void 0:Ei.value)==null?void 0:k.plat_id),pageName:d});ne=(E=(L=(j=(I=(W=ne==null?void 0:ne.data)==null?void 0:W.result)==null?void 0:I[0])==null?void 0:j.contents)==null?void 0:L.find(J=>{var ce;return(ce=J==null?void 0:J.key)==null?void 0:ce.includes("content")}))==null?void 0:E.value,c=(x=ne==null?void 0:ne.map(J=>({functionName:J==null?void 0:J.函数名称,functionContent:J==null?void 0:J.输出值})))==null?void 0:x.filter(J=>(J==null?void 0:J.functionContent)!==""),c==null||c.forEach(J=>{m.push(J.functionName),go[J.functionName]=new Function("return "+J.functionContent)()})}if((l==null?void 0:l.length)===0)return h;for(let ne in l){let J=(w=l==null?void 0:l[ne])==null?void 0:w.functionName;const ce=go==null?void 0:go[J];let Te=(g=l==null?void 0:l[ne])==null?void 0:g.methods;if(Te=oe.analyzeSplitToContent(Te,","),(S=Te==null?void 0:Te.find($e=>$e==null?void 0:$e.includes("@FunctionType")))!=null&&S.includes(r)||r==="Auto"||(Te==null?void 0:Te.length)===0){let $e=((ae=(V=($=Te==null?void 0:Te.find(fe=>fe==null?void 0:fe.includes("@FunctionExtent")))==null?void 0:$.replace(":","="))==null?void 0:V.split("="))==null?void 0:ae[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(fe=>fe===J)){let fe="";try{let te=(Z=l==null?void 0:l[ne])==null?void 0:Z.functionRelatedWords,U=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Me=>{var Pe;return Me==null?void 0:Me[(Pe=l==null?void 0:l[ne])==null?void 0:Pe.prop]}):["0"];U=U==null?void 0:U.map(Me=>Me==null?void 0:Me.slice((Me==null?void 0:Me.length)-5,Me==null?void 0:Me.length)),U=U==null?void 0:U.map(Me=>oe.isNumber(parseInt(Me))&&parseInt(Me)?parseInt(Me):0);let Ce=Math.max(...U);te=te==null?void 0:te.map(Me=>{if(Me!=null&&Me.includes("'"))return Me==null?void 0:Me.replaceAll("'","");if(Me!=null&&Me.includes("@"))return Ce+1;{let Pe=Object.keys(h);return Me=(h==null?void 0:h[Me])??(h==null?void 0:h[Pe==null?void 0:Pe.find(ra=>ra==null?void 0:ra.includes("."+Me))]),Me}}),fe=ce(...te)}catch(te){qa.ElMessage.warning("关联数据出现错误,"+te.message)}let N=(me=l==null?void 0:l[ne])==null?void 0:me.prop;h[N]=fe}else h=await ce({contents:h,valueString:(Ae=l==null?void 0:l[ne])==null?void 0:Ae.functionRelatedWords,prop:(F=l==null?void 0:l[ne])==null?void 0:F.prop,headers:n,typeString:$e,allContents:o})}}return h},Gp=A.useLoginState(A.pinia),{loginUserInfo:pn}=A.storeToRefs(Gp),Yp=A.useMenuState(A.pinia),{activeMenuPath:ps,currentMenuPath:bo}=A.storeToRefs(Yp),pc=A.useUnit(A.pinia);let fs="$R";const{selectTitle:Ti}=A.storeToRefs(pc),fc=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L;let n=ps.value,r="",o=((h=Ti==null?void 0:Ti.value)==null?void 0:h.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(d=a==null?void 0:a[0])==null?void 0:d.father_name);let s=[];if(r!==""){let E=r;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let x=await en(E,!1);x=(m=x==null?void 0:x[0])==null?void 0:m.compData;let w=(b=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:b.contents;w=((u=w==null?void 0:w.find(S=>S==null?void 0:S.isMainKey))==null?void 0:u.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let g=(k=(M=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:k.map(S=>({label:S==null?void 0:S[w],value:S==null?void 0:S[w]}));s=(W=r==null?void 0:r.split("/"))==null?void 0:W.map(S=>(S===""?o?(o.isShow=!0,S=o):S={value:S,condition:"child",options:g,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:S={condition:"parent",value:S.trim(),isShow:!0},S))}if(n!==""){let E=(I=n==null?void 0:n.split("/"))==null?void 0:I.map(x=>(x={condition:"normal",value:x.trim(),isShow:!0},x));((j=E==null?void 0:E[0])==null?void 0:j.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((x,w)=>w!==0)),s=[...s??[],...E??[]]}r===""&&o&&((o==null?void 0:o.parentContent)!==ps.value&&(o.isShow=!1),(o==null?void 0:o.value)!==""&&s.push(o)),pc.setSelectTitle(s)},Jp=async a=>{var s,h,c,d,m,b,u,C,M;let l=await A.getPageDataApi({platId:parseInt((s=pn==null?void 0:pn.value)==null?void 0:s.plat_id),pageName:"menu"}),n=(h=l==null?void 0:l.data)==null?void 0:h.result,r=(b=(m=(d=(c=a==null?void 0:a.filter(k=>(k==null?void 0:k.comp)==="Table"))==null?void 0:c[0])==null?void 0:d.compData)==null?void 0:m.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:b.contents;r=(M=(C=(u=r==null?void 0:r.replace("(",fs))==null?void 0:u.split(fs))==null?void 0:C[0])==null?void 0:M.replaceAll(":","/");let o=n==null?void 0:n.filter(k=>{var W;return(k==null?void 0:k.object_name)===bo.value+"/"||((W=bo.value)==null?void 0:W.includes(r))&&r+"/"===(k==null?void 0:k.object_name)||r===(k==null?void 0:k.object_name)});return(o==null?void 0:o.length)>0&&(a=a==null?void 0:a.map(k=>{var W;return(k==null?void 0:k.comp)==="Table"&&(k.compData=(W=k==null?void 0:k.compData)==null?void 0:W.map(I=>{var j,L,E;return(I==null?void 0:I.key)==="header"&&(Array.isArray((j=I.contents)==null?void 0:j[0])?I.contents[0]=(E=I.contents[0])==null?void 0:E.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,((g=bo.value)!=null&&g.includes(r)||r)&&(x.fatherPath=r)),x}):I.contents=(L=I.contents)==null?void 0:L.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,((g=bo.value)!=null&&g.includes(r)||r)&&(x.fatherPath=r)),x})),I})),k})),a},en=async(a,l,n={})=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r=await A.getPageDataApi({platId:parseInt((h=pn==null?void 0:pn.value)==null?void 0:h.plat_id),pageName:a}),o=(c=r==null?void 0:r.data)==null?void 0:c.result;if((o==null?void 0:o.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await A.getPageDataApi({platId:parseInt((d=pn==null?void 0:pn.value)==null?void 0:d.plat_id),pageName:n==null?void 0:n.originPath});if(((b=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:b.length)>0){let E=await ds((u=L==null?void 0:L.data)==null?void 0:u.result,n,!1);E=E==null?void 0:E.map(async g=>{var V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja;let S=[],$=(V=Object.keys(g))==null?void 0:V.filter(R=>(R==null?void 0:R.includes("name"))&&R!=="nameContents");for(let R in g)$!=null&&$.find(H=>H===R)&&S.push(g==null?void 0:g[R]);if(S=S.reverse(),(g==null?void 0:g.comp)==="Table"){let R=(me=(Z=(ae=g==null?void 0:g.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:Z.contents)==null?void 0:me.map(X=>{let he={};for(let de in X)de!=="id"&&de!=="create_time"&&de!=="update_time"&&de!=="sort"&&de!=="create_user_id"&&de!=="update_user_id"&&de!=="department_id"&&de!=="relatedId"&&(he[de]=X==null?void 0:X[de]);return X=Object.values(he),X}),H=(F=(Ae=g==null?void 0:g.compData)==null?void 0:Ae.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:F.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ne=H[0])!=null&&ne.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H[0]=(J=H[0])==null?void 0:J.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H=H==null?void 0:H.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(X=>{var he;return(X==null?void 0:X.calculatorFilter)&&((he=X==null?void 0:X.calculatorFilter)==null?void 0:he.includes("Auto"))})&&(R=await xt(R,H,"Auto"),R=R==null?void 0:R.map(X=>Object.values(X))),g!=null&&g.fatherSyncContents){Array.isArray((ce=g==null?void 0:g.fatherSyncContents)==null?void 0:ce[0])&&(g.fatherSyncContents=(Te=g==null?void 0:g.fatherSyncContents)==null?void 0:Te[0]);let X=($e=Ti.value)==null?void 0:$e.find(he=>(he==null?void 0:he.condition)==="child");g.fatherSyncContents=(fe=g==null?void 0:g.fatherSyncContents)==null?void 0:fe.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}if(g!=null&&g.sonSyncContents){Array.isArray((N=g==null?void 0:g.sonSyncContents)==null?void 0:N[0])&&(g.sonSyncContents=(te=g==null?void 0:g.sonSyncContents)==null?void 0:te[0]);let X=(U=Ti.value)==null?void 0:U.find(he=>(he==null?void 0:he.condition)==="child");g.sonSyncContents=(Ce=g==null?void 0:g.sonSyncContents)==null?void 0:Ce.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}if(g!=null&&g.relatedQuotes){Array.isArray((Me=g==null?void 0:g.relatedQuotes)==null?void 0:Me[0])&&(g.relatedQuotes=(Pe=g==null?void 0:g.relatedQuotes)==null?void 0:Pe[0]);let X=(ra=Ti.value)==null?void 0:ra.find(he=>(he==null?void 0:he.condition)==="child");g.relatedQuotes=(Ta=g==null?void 0:g.relatedQuotes)==null?void 0:Ta.map(he=>{var de,ma,oa,Ve,_a,ze;return((ma=he==null?void 0:he.menus)==null?void 0:ma[((de=he==null?void 0:he.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(X==null?void 0:X.value):((Ve=he==null?void 0:he.menus)==null?void 0:Ve[((oa=he==null?void 0:he.menus)==null?void 0:oa.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ze=he.menus)==null?void 0:ze.slice(0,((_a=he.menus)==null?void 0:_a.length)-1)),he})}g={filter:(pa=(ee=g==null?void 0:g.compData)==null?void 0:ee.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:pa.contents,key:g==null?void 0:g.comp,name:S,tableColumns:H,tableContents:R,menuFilter:g==null?void 0:g.menuFilter,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}else{let R=(Se=(ua=(ue=g==null?void 0:g.compData)==null?void 0:ue.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ua.contents)==null?void 0:Se.map(X=>(X==null?void 0:X.value)??"");R=[R];let H=(Ge=(Be=(se=g==null?void 0:g.compData)==null?void 0:se.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:Ge.map(X=>(X.value="",X));g={contents:R,filter:(Ja=(da=g==null?void 0:g.compData)==null?void 0:da.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Ja.contents,key:g==null?void 0:g.comp,name:S,value:H,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}return g.isShow=!1,g}),E=await Promise.all(E);let x=[{key:"menuPath",contents:[{path:a,fatherPath:(k=(M=(C=L==null?void 0:L.data)==null?void 0:C.result)==null?void 0:M[0])==null?void 0:k.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((W=pn==null?void 0:pn.value)==null?void 0:W.plat_id),changeData:x});let w=await A.getPageDataApi({platId:parseInt((I=pn==null?void 0:pn.value)==null?void 0:I.plat_id),pageName:a});o=(j=w==null?void 0:w.data)==null?void 0:j.result}}l&&await fc(o,!!(n!=null&&n.originPath));let s=await ds(o,n);return l&&(s=await Jp(s)),s==null?void 0:s.filter(L=>L)},hs=async a=>{var r,o,s,h,c,d,m,b,u,C,M;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(o=a.value)==null?void 0:o.split(" "))==null?void 0:s[0]));let n=await en(l,!1);if(n=(h=n==null?void 0:n.filter(k=>{var W,I;return(k==null?void 0:k.name)===((I=a==null?void 0:a.groups)==null?void 0:I[((W=a==null?void 0:a.groups)==null?void 0:W.length)-1])}))==null?void 0:h[0],(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="tableContents"))!=null&&d.contents){n=(b=(m=n==null?void 0:n.compData)==null?void 0:m.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:b.contents;let k=((u=a==null?void 0:a.words)==null?void 0:u[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(W=>{var I,j,L,E;return(W==null?void 0:W[a!=null&&a.endChildMenu?k:(I=a==null?void 0:a.words)==null?void 0:I[0]])===(a!=null&&a.relatedWords&&((j=a==null?void 0:a.relatedWords)==null?void 0:j.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let k=(M=(C=n==null?void 0:n.compData)==null?void 0:C.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:M.contents,W={};return k==null||k.forEach(I=>{W[I.prop]=I.value}),W}},Xp={key:0,class:"extra-button-content"},Zp={class:"table-operator-wrap"},Qp={key:0,class:"extra-button-filter"},ef={key:1,class:"extra-header"},af=["onClick"],lf={class:"table-op-text"},rf={class:"table-op-text"},nf={class:"drop-menu",style:{width:"120px"}},of=["onClick"],tf={key:0},sf={key:1},cf=["onClick"],uf={class:"table-op-text"},df={key:1,class:"extra-button-content tabs-button-wrapper"},pf={class:"table-operator-wrap"},ff={class:"extra-button-filter"},hf={key:0,class:"extra-header"},vf={class:"table-op-action"},mf={class:"table-op-text"},yf={class:"drop-menu",style:{width:"120px"}},gf={key:0},bf={key:1},kf=["onClick"],xf={class:"table-op-text"},wf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,o=()=>{const $=(r==null?void 0:r.menuFilter)||[];return Array.isArray($)&&($==null?void 0:$.some(V=>{const ae=typeof V=="string"?V:JSON.stringify(V);return ae==null?void 0:ae.includes("HideGroup=Yes")}))},s=e.ref(""),h=e.ref(!1),c=e.ref(!1),d=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),b=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function u($,V){return $.map(ae=>{const Z={...ae};return V.forEach(me=>{delete Z[me]}),Z})}function C($){if(!$||$.t!=="n")return($==null?void 0:$.v)??"";const V=$.v;if($.z){const ae=String($.z).toLowerCase(),Z=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const F of Z)if(ae.includes(F))return M(V);const me=/[ymdhms]/.test(ae),Ae=/^[0#\.\,\s]+$/.test(ae.replace(/[\\\/\-:]/g,""));if(me&&!Ae)return M(V)}if(V>=1&&V<=73050){if(V<5e3)return V;if(V>=5e3&&V<4e4){const ae=Math.floor((V-25569)/365.25)+1970;return ae>=1970&&ae<=2e3&&$.z&&/[ymd]/.test(String($.z).toLowerCase())?M(V):V}if(V>=4e4)return M(V)}return V}function M($){if(typeof $!="number")return $;try{const V=new Date(($-25569)*86400*1e3);if(isNaN(V.getTime()))return $;const ae=V.getFullYear(),Z=String(V.getMonth()+1).padStart(2,"0"),me=String(V.getDate()).padStart(2,"0");return`${ae}-${Z}-${me}`}catch{return $}}const k=$=>{const V=$.raw;if(!V)return;const ae=new FileReader;ae.onload=Z=>{try{const me=new Uint8Array(Z.target.result),Ae=oe.readSync(me,{type:"array"}),F=Ae.SheetNames[0],ne=Ae.Sheets[F],ce=oe.utils.decode_range(ne["!ref"]).e.c+1,Te=new Array(ce).fill(""),$e=[];for(const Ce in ne){if(Ce[0]==="!")continue;const{r:Me,c:Pe}=oe.utils.decode_cell(Ce),ra=ne[Ce];let Ta=C(ra);if((Ta==null||Ta==="")&&(Ta=""),Me===0)Te[Pe]=Ta;else{if(!$e[Me-1]){$e[Me-1]={};for(let ee=0;ee<ce;ee++)$e[Me-1][`col_${ee}`]=""}$e[Me-1][`col_${Pe}`]=Ta}}for(let Ce=0;Ce<ce;Ce++)Te[Ce]===void 0&&(Te[Ce]="");const fe=[];for(let Ce=0;Ce<Te.length;Ce++)(!Te[Ce]||Te[Ce].toString().trim()==="")&&fe.push(Ce);let N,te;(fe==null?void 0:fe.length)>0?(qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=Te.filter((Ce,Me)=>!fe.includes(Me)),te=u($e,fe==null?void 0:fe.map(Ce=>`col_${Ce}`))):(N=Te,te=$e);const U=$e==null?void 0:$e[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",N,te)}catch(me){throw qa.ElMessage.error(me.message),new Error(me.message)}},ae.readAsArrayBuffer(V)},W=$=>{var ae;const V=(ae=d.value)==null?void 0:ae.reduce((Z,me,Ae)=>(Ae===0?Z[me.label]=$:Z[me.label]=me==null?void 0:me.value,Z),{});n("filter",V,$,!0)},I=($,V={})=>{n("buttonClick",$,"",V)},j=$=>{var V,ae;d.value=(ae=(V=oe.getColumnChild(A.cloneDeep($)))==null?void 0:V.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:ae.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.prop)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2,prop:(Z==null?void 0:Z.prop)??""}))},L=e.ref(!1),E=$=>{var V;if(($==null?void 0:$.buttonName)==="确认"&&(n("filter",$==null?void 0:$.content),L.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ae=A.cloneDeep($==null?void 0:$.content);for(const Z in ae)ae[Z]="";d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""})),n("filter",ae),L.value=!1}h.value=!1},x=()=>{h.value=!h.value,c.value=!0},w=()=>{var V,ae;d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""}));const $=(ae=d.value)==null?void 0:ae.reduce((Z,me)=>(Z[me.label]=me.value,Z),{});n("filter",$)},g=e.ref(null);let S;return S=$=>{var me;if(!h.value)return;const V=(me=g==null?void 0:g.value)==null?void 0:me.$el,ae=V==null?void 0:V.contains($.target);let Z=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Ae=>{Ae.contains($.target)&&(Z=!0)}),!ae&&!Z&&(h.value=!1)},e.onMounted(()=>{document.addEventListener("click",S),j(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",S)}),e.watch(()=>r.columns,()=>{j(r.columns)},{deep:!0,immediate:!0}),($,V)=>{var ne,J,ce,Te,$e,fe,N,te;const ae=e.resolveComponent("el-icon"),Z=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-input"),Ae=e.resolveComponent("el-upload"),F=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Xp,[o()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Zp,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(Pu,{trigger:"contextmenu",ref_key:"popOverRef",ref:g,title:"",width:800,placement:"bottom-start",isVisible:h.value,"onUpdate:isVisible":V[4]||(V[4]=U=>h.value=U)},{reference:e.withCtx(()=>{var U,Ce,Me,Pe;return[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":V[0]||(V[0]=ra=>s.value=ra),style:{"min-width":"80px"},placeholder:L.value?(Me=(Ce=(U=a.filterValues)==null?void 0:U.filter(ra=>ra))==null?void 0:Ce.slice(0,3))==null?void 0:Me.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:W,disabled:((Pe=d.value)==null?void 0:Pe.length)===0},{suffix:e.withCtx(()=>{var ra,Ta;return[!s.value&&((Ta=(ra=a.filterValues)==null?void 0:ra.filter(ee=>ee))!=null&&Ta.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-content-value",onKeydown:V[1]||(V[1]=e.withModifiers(()=>{},["stop"])),onKeyup:V[2]||(V[2]=e.withModifiers(()=>{},["stop"])),onKeypress:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((ne=a.buttons)==null?void 0:ne.length)>0?(e.openBlock(),e.createElementBlock("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=a.buttons)==null?void 0:J.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,Ce)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ce},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Ae,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:ra=>I(U==null?void 0:U.label)},[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",lf,e.toDisplayString(U==null?void 0:U.label),1)],10,af)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(sl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",rf,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Pe=>{var ra,Ta;return e.openBlock(),e.createElementBlock("div",{key:Pe==null?void 0:Pe.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ee=>!a.lockingPage&&I(Pe==null?void 0:Pe.label)},[e.createTextVNode(e.toDisplayString(Pe==null?void 0:Pe.label),1),(ra=Pe==null?void 0:Pe.label)!=null&&ra.includes("选中")?(e.openBlock(),e.createElementBlock("span",tf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=Pe==null?void 0:Pe.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",sf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,of)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Pe=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:((Me=b==null?void 0:b.find(Pe=>(Pe==null?void 0:Pe.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",uf,e.toDisplayString(U==null?void 0:U.label),1)],10,cf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",df,[e.createElementVNode("div",pf,[e.createElementVNode("div",ff,[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":V[5]||(V[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:L.value?($e=(Te=(ce=a.filterValues)==null?void 0:ce.filter(U=>U))==null?void 0:Te.slice(0,3))==null?void 0:$e.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:W,disabled:((fe=d.value)==null?void 0:fe.length)===0},{suffix:e.withCtx(()=>{var U,Ce;return[!s.value&&((Ce=(U=a.filterValues)==null?void 0:U.filter(Me=>Me))!=null&&Ce.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((N=a.buttons)==null?void 0:N.length)>0?(e.openBlock(),e.createElementBlock("div",hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=a.buttons)==null?void 0:te.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,Ce)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ce},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Ae,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",vf,[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"]),e.createElementVNode("span",mf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(sl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(F,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Pe;return[e.createVNode(Z,{class:"table-op-icon",name:(Pe=b==null?void 0:b.find(ra=>(ra==null?void 0:ra.label)===(U==null?void 0:U.label)))==null?void 0:Pe.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",yf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Pe=>(e.openBlock(),e.createBlock(F,{key:Pe==null?void 0:Pe.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ra=>I(Pe==null?void 0:Pe.label)},{default:e.withCtx(()=>{var ra,Ta;return[e.createTextVNode(e.toDisplayString(Pe==null?void 0:Pe.label),1),(ra=Pe==null?void 0:Pe.label)!=null&&ra.includes("选中")?(e.openBlock(),e.createElementBlock("span",gf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=Pe==null?void 0:Pe.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",bf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Pe=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:(Me=b==null?void 0:b.find(Pe=>(Pe==null?void 0:Pe.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon},null,8,["name"]),e.createElementVNode("span",xf,e.toDisplayString(U==null?void 0:U.label),1)],10,kf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},_f=Zl._export_sfc(wf,[["__scopeId","data-v-44a17652"]]),Sf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=e.resolveComponent("el-table-column"),o=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(o,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var h;return e.openBlock(),e.createBlock(r,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((h=s==null?void 0:s.label)==null?void 0:h.length)*2||4)*27)},{default:e.withCtx(c=>[e.renderSlot(l.$slots,"content",{row:c.row,column:c.column,$index:c.$index,scope:c}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(d,m)=>(e.openBlock(),e.createBlock(sl._sfc_main$2,{key:m,column:d,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(b,u)=>({name:u,fn:e.withCtx(({row:C,slotData:M,item:k,column:W})=>[e.renderSlot(l.$slots,u,e.mergeProps({ref_for:!0},M??C,{item:k??d,slotData:M??C,row:C,column:W,columnProp:d}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Ef extends Al.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,o){const s=this,h=new Al.FileLoader(s.manager);h.setPath(s.path),h.setResponseType("arraybuffer"),h.setRequestHeader(s.requestHeader),h.setWithCredentials(s.withCredentials),h.load(l,function(c){try{n(s.parse(c))}catch(d){o?o(d):console.error(d),s.manager.itemError(l)}},r,o)}_getDataView(l,n,r,o){switch(r){case"F":return o===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return o===1?l.getInt8(n):o===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return o===1?l.getUint8(n):o===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(M,k){const W=M.length,I=new Uint8Array(k);let j=0,L=0,E,x,w;do if(E=M[j++],E<32){if(E++,L+E>k)throw new Error("Output buffer is not large enough");if(j+E>W)throw new Error("Invalid compressed data");do I[L++]=M[j++];while(--E)}else{if(x=E>>5,w=L-((E&31)<<8)-1,j>=W)throw new Error("Invalid compressed data");if(x===7&&(x+=M[j++],j>=W))throw new Error("Invalid compressed data");if(w-=M[j++],L+x+2>k)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=L)throw new Error("Invalid compressed data");do I[L++]=I[w++];while(--x+2)}while(j<W);return I}function r(M){const k={},W=new Uint8Array(M);let I="",j="",L=0,E=!1;const x=W.length;for(;L<x&&E===!1;){const $=String.fromCharCode(W[L++]);$===`
|
|
2
2
|
`||$==="\r"?(j.trim().toLowerCase().startsWith("data")&&(E=!0),j=""):j+=$,I+=$}const w=I.search(/[\r\n]DATA\s(\S*)\s/i),g=/[\r\n]DATA\s(\S*)\s/i.exec(I.slice(w-1));if(k.data=g[1],k.headerLen=g[0].length+w,k.str=I.slice(0,k.headerLen),k.str=k.str.replace(/#.*/gi,""),k.version=/^VERSION (.*)/im.exec(k.str),k.fields=/^FIELDS (.*)/im.exec(k.str),k.size=/^SIZE (.*)/im.exec(k.str),k.type=/^TYPE (.*)/im.exec(k.str),k.count=/^COUNT (.*)/im.exec(k.str),k.width=/^WIDTH (.*)/im.exec(k.str),k.height=/^HEIGHT (.*)/im.exec(k.str),k.viewpoint=/^VIEWPOINT (.*)/im.exec(k.str),k.points=/^POINTS (.*)/im.exec(k.str),k.version!==null&&(k.version=parseFloat(k.version[1])),k.fields=k.fields!==null?k.fields[1].split(" "):[],k.type!==null&&(k.type=k.type[1].split(" ")),k.width!==null&&(k.width=parseInt(k.width[1])),k.height!==null&&(k.height=parseInt(k.height[1])),k.viewpoint!==null&&(k.viewpoint=k.viewpoint[1]),k.points!==null&&(k.points=parseInt(k.points[1],10)),k.points===null&&(k.points=k.width*k.height),k.size!==null&&(k.size=k.size[1].split(" ").map(function($){return parseInt($,10)})),k.count!==null)k.count=k.count[1].split(" ").map(function($){return parseInt($,10)});else{k.count=[];for(let $=0,V=k.fields.length;$<V;$++)k.count.push(1)}k.offset={};let S=0;for(let $=0,V=k.fields.length;$<V;$++)k.data==="ascii"?k.offset[k.fields[$]]=$:(k.offset[k.fields[$]]=S,S+=k.size[$]*k.count[$]);return k.rowSize=S,k}const o=r(l),s=[],h=[],c=[],d=[],m=[],b=new Al.Color;if(o.data==="ascii"){const M=o.offset,I=new TextDecoder().decode(l).slice(o.headerLen).split(`
|
|
3
3
|
`);for(let j=0,L=I.length;j<L;j++){if(I[j]==="")continue;const E=I[j].split(" ");if(M.x!==void 0&&(s.push(parseFloat(E[M.x])),s.push(parseFloat(E[M.y])),s.push(parseFloat(E[M.z]))),M.rgb!==void 0){const x=o.fields.findIndex(Z=>Z==="rgb"),w=o.type[x],g=parseFloat(E[M.rgb]);let S=g;if(w==="F"){const Z=new Float32Array(1);Z[0]=g,S=new Int32Array(Z.buffer)[0]}const $=(S>>16&255)/255,V=(S>>8&255)/255,ae=(S>>0&255)/255;b.setRGB($,V,ae,Al.SRGBColorSpace),c.push(b.r,b.g,b.b)}M.normal_x!==void 0&&(h.push(parseFloat(E[M.normal_x])),h.push(parseFloat(E[M.normal_y])),h.push(parseFloat(E[M.normal_z]))),M.intensity!==void 0&&d.push(parseFloat(E[M.intensity])),M.label!==void 0&&m.push(parseInt(E[M.label]))}}if(o.data==="binary_compressed"){const M=new Uint32Array(l.slice(o.headerLen,o.headerLen+8)),k=M[0],W=M[1],I=n(new Uint8Array(l,o.headerLen+8,k),W),j=new DataView(I.buffer),L=o.offset;for(let E=0;E<o.points;E++){if(L.x!==void 0){const x=o.fields.indexOf("x"),w=o.fields.indexOf("y"),g=o.fields.indexOf("z");s.push(this._getDataView(j,o.points*L.x+o.size[x]*E,o.type[x],o.size[x])),s.push(this._getDataView(j,o.points*L.y+o.size[w]*E,o.type[w],o.size[w])),s.push(this._getDataView(j,o.points*L.z+o.size[g]*E,o.type[g],o.size[g]))}if(L.rgb!==void 0){const x=o.fields.indexOf("rgb"),w=j.getUint8(o.points*L.rgb+o.size[x]*E+2)/255,g=j.getUint8(o.points*L.rgb+o.size[x]*E+1)/255,S=j.getUint8(o.points*L.rgb+o.size[x]*E+0)/255;b.setRGB(w,g,S,Al.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(L.normal_x!==void 0){const x=o.fields.indexOf("normal_x"),w=o.fields.indexOf("normal_y"),g=o.fields.indexOf("normal_z");h.push(this._getDataView(j,o.points*L.normal_x+o.size[x]*E,o.type[x],o.size[x])),h.push(this._getDataView(j,o.points*L.normal_y+o.size[w]*E,o.type[w],o.size[w])),h.push(this._getDataView(j,o.points*L.normal_z+o.size[g]*E,o.type[g],o.size[g]))}if(L.intensity!==void 0){const x=o.fields.indexOf("intensity");d.push(this._getDataView(j,o.points*L.intensity+o.size[x]*E,o.type[x],o.size[x]))}if(L.label!==void 0){const x=o.fields.indexOf("label");m.push(j.getInt32(o.points*L.label+o.size[x]*E,this.littleEndian))}}}if(o.data==="binary"){const M=new DataView(l,o.headerLen),k=o.offset;for(let W=0,I=0;W<o.points;W++,I+=o.rowSize){if(k.x!==void 0){const j=o.fields.indexOf("x"),L=o.fields.indexOf("y"),E=o.fields.indexOf("z");s.push(this._getDataView(M,I+k.x,o.type[j],o.size[j])),s.push(this._getDataView(M,I+k.y,o.type[L],o.size[L])),s.push(this._getDataView(M,I+k.z,o.type[E],o.size[E]))}if(k.rgb!==void 0){const j=M.getUint8(I+k.rgb+2)/255,L=M.getUint8(I+k.rgb+1)/255,E=M.getUint8(I+k.rgb+0)/255;b.setRGB(j,L,E,Al.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(k.normal_x!==void 0){const j=o.fields.indexOf("normal_x"),L=o.fields.indexOf("normal_y"),E=o.fields.indexOf("normal_z");h.push(this._getDataView(M,I+k.normal_x,o.type[j],o.size[j])),h.push(this._getDataView(M,I+k.normal_y,o.type[L],o.size[L])),h.push(this._getDataView(M,I+k.normal_z,o.type[E],o.size[E]))}if(k.intensity!==void 0){const j=o.fields.indexOf("intensity");d.push(this._getDataView(M,I+k.intensity,o.type[j],o.size[j]))}k.label!==void 0&&m.push(M.getInt32(I+k.label,this.littleEndian))}}const u=new Al.BufferGeometry;s.length>0&&u.setAttribute("position",new Al.Float32BufferAttribute(s,3)),h.length>0&&u.setAttribute("normal",new Al.Float32BufferAttribute(h,3)),c.length>0&&u.setAttribute("color",new Al.Float32BufferAttribute(c,3)),d.length>0&&u.setAttribute("intensity",new Al.Float32BufferAttribute(d,1)),m.length>0&&u.setAttribute("label",new Al.Int32BufferAttribute(m,1)),u.computeBoundingSphere();const C=new Al.PointsMaterial({size:.005});return c.length>0&&(C.vertexColors=!0),new Al.Points(u,C)}}const Cf=A.useModelComp(A.pinia),{systemPath:vs}=A.storeToRefs(Cf),ko=e.ref(),ms=new WeakMap;function Df(a,l,n,r,o){const s=async C=>{try{const M=await A.platformDownloadFile({url:C});if(M.status!==200)throw new Error(`下载失败: ${M.status}`);return M.data}catch(M){throw console.error("addModelFromUrl失败:",M),M}},h=C=>new Promise((M,k)=>{const W=new FileReader;W.onload=I=>{try{const j=I.target.result,E=new $n.MTLLoader().parse(j);E.preload(),M(E)}catch(j){k(j)}},W.onerror=()=>{k(new Error("MTL文件读取失败"))},W.readAsText(C)}),c=async C=>{const M={materials:{},create:function(k){return this.materials[k]?this.materials[k]:(console.warn(`Material '${k}' not found, using default material`),new Al.MeshPhongMaterial({color:8947848,side:Al.DoubleSide}))},getAsArray:function(){const k=[];for(const W in this.materials)k.push(this.materials[W]);return k},preload:function(){for(const k in this.materials)this.materials[k].map&&(this.materials[k].map.needsUpdate=!0)}};for(const k of C){const W=await h(k);Object.assign(M.materials,W.materials)}return M.preload(),M},d=async(C,M=[])=>new Promise((k,W)=>{const I=new FileReader;I.onload=async j=>{try{const L=j.target.result;let E=null;M&&M.length>0&&(M.length===1?E=await h(M[0]):E=await c(M));const x=new $n.OBJLoader;E&&x.setMaterials(E);const w=x.parse(L);E||w.traverse(g=>{g.isMesh&&(g.material=new Al.MeshPhongMaterial({color:8947848,side:Al.DoubleSide}))}),k(w)}catch(L){W(L)}},I.onerror=()=>{W(new Error("OBJ文件读取失败"))},I.readAsText(C)}),m=async C=>{var M;try{n.value=!0;const{scene:k}=a();if(!k)throw new Error("Scene not initialized");o();const W=[];for(let I=0;I<C.length;I++){const j=C[I];r.value=`正在加载模型 ${I+1}/${C.length}...`;const L=await s(j.objUrl),E=((M=j.objUrl)==null?void 0:M.split("/").pop())||`model_${I}.obj`,x=new File([L],E,{type:L.type});let w=[];if(j.mtlUrls){const S=Array.isArray(j.mtlUrls)?j.mtlUrls:[j.mtlUrls];for(let $=0;$<S.length;$++){const V=S[$],ae=await s(V),Z=(V==null?void 0:V.split("/").pop())||`material_${I}_${$}.mtl`,me=new File([ae],Z,{type:ae.type});w.push(me)}}const g=await d(x,w);k.add(g),l.value.push(g),W.push(g)}return n.value=!1,W}catch(k){throw console.error("加载模型失败:",k),n.value=!1,k}},b=async(C,M,k=[],W=[])=>{let I;const j=C.toLowerCase();switch(j){case".txt":case".cpt":case".obj":const L=await M.text();if(j===".txt"||j===".cpt"){const ee=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,ue=[...L.matchAll(ee)].map(se=>({x:parseFloat(se[1]),y:parseFloat(se[2]),z:parseFloat(se[3])})),ua=new Al.BufferGeometry,Se=ue.flatMap(se=>[se.x,se.y,se.z]);if(ua.setAttribute("position",new Al.Float32BufferAttribute(Se,3)),j===".txt"){const se=new Al.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});I=new Al.Points(ua,se)}else if(j===".cpt"){const se=new Al.LineBasicMaterial({color:"#5B5C99",linewidth:100});I=new Al.Line(ua,se)}}else if(j===".obj"){const ee=new $n.OBJLoader;if(k&&k.length>0){const pa=new $n.MTLLoader;for(const ue of k){const ua=await ue.text(),Se=pa.parse(ua);Se.preload(),ee.setMaterials(Se);break}}I=ee.parse(L),(!k||k.length===0)&&I.traverse(pa=>{pa.isMesh&&(pa.material=new Al.MeshPhongMaterial({color:"#B3B3D4"})),pa instanceof Al.Mesh&&(pa.material.side=Al.DoubleSide)})}break;case".stl":const E=await M.arrayBuffer(),w=new $n.STLLoader().parse(E),g=new Al.MeshPhongMaterial({color:"#B3B3D4",side:Al.DoubleSide});I=new Al.Mesh(w,g);break;case".nc":const S=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],$={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},V=new Al.Group,ae=S.map(ee=>new Promise((pa,ue)=>{new $n.STLLoader().load(vs.value===""?`/model/${ee}`:`${vs.value}\\${ee}`,Se=>{const se=new Al.MeshPhongMaterial({color:$[ee]||"#B3B3D4",side:Al.DoubleSide}),Be=new Al.Mesh(Se,se);pa(Be)},void 0,ue)}));try{(await Promise.all(ae)).forEach(pa=>V.add(pa)),I=V}catch(ee){throw console.error("加载NC文件对应的STL文件失败:",ee),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Z=new Ef,me=new Al.Group;try{const ee=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),pa=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),ue=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ua=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"}),Se=await new Promise((Be,Ge)=>{const da=URL.createObjectURL(pa);Z.load(da,Ja=>{const R=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)R[H*3]=1,R[H*3+1]=0,R[H*3+2]=0;Ja.geometry.setAttribute("color",new Al.BufferAttribute(R,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(da),Be(Ja)},void 0,Ge)}),se=await new Promise((Be,Ge)=>{const da=URL.createObjectURL(ua);Z.load(da,Ja=>{const R=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)R[H*3]=0,R[H*3+1]=1,R[H*3+2]=0;Ja.geometry.setAttribute("color",new Al.BufferAttribute(R,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(da),Be(Ja)},void 0,Ge)});me.add(Se),me.add(se),I=me}catch(ee){throw console.error("PCD文件加载失败:",ee),new Error("无法加载PCD文件")}break;case".urdf":const Ae=URL.createObjectURL(M),F=new Lu.URDFLoader,ne="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",J={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ce=new WeakMap,Te=new WeakMap,$e=new WeakMap,fe=async ee=>{if(ce.has(ee))return console.log(`从缓存加载: ${ee}`),ce.get(ee);try{const pa=await qa.axios.get(`${ne}/${ee}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),ue=new Blob([pa.data],{type:"application/octet-stream;charset=UTF-8"});return J.enableCache&&ce.set(ee,ue),ue}catch(pa){throw console.error(`加载文件失败: ${ee}`,pa),new Error(`无法加载文件: ${ee}`)}},N=(ee="default")=>{if(Te.has(ee))return Te.get(ee);const pa=new Al.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Al.FrontSide});return Te.set(ee,pa),pa},te=ee=>{try{ee.isBufferGeometry&&ee.mergeVertices&&ee.mergeVertices(),ee.computeVertexNormals&&ee.computeVertexNormals(),ee.computeBoundingSphere&&ee.computeBoundingSphere(),ee.deleteAttribute&&ee.deleteAttribute("uv2")}catch(pa){console.warn("几何体优化失败,使用原始几何体:",pa)}return ee},U=async(ee,pa,ue)=>{const ua=`stl_${pa}`;if($e.has(ua)){const Ge=$e.get(ua);return new Al.Mesh(Ge,N())}const Se=await ee.arrayBuffer();let Be=new $n.STLLoader(ue).parse(Se);return Be=te(Be),$e.set(ua,Be),new Al.Mesh(Be,N())},Ce=async(ee,pa,ue)=>{const ua=`obj_${pa}`;if(ce.has(ua))return ce.get(ua).clone();const Se=await ee.text(),se=new $n.OBJLoader(ue),Be=pa.replace(".obj",".mtl");try{const Ja=await(await fe(Be)).text(),H=new $n.MTLLoader(ue).parse(Ja);H.preload(),se.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Be}`)}const Ge=se.parse(Se);return Ge.traverse(da=>{da.isMesh&&(da.geometry=te(da.geometry),da.castShadow=!0,da.receiveShadow=!0,da.renderOrder=1)}),ce.set(ua,Ge),Ge},Me=(ee,pa)=>{const ue=new Al.LOD;if(ue.addLevel(ee,0),ee.geometry){const ua=ee.geometry.clone(),Se=new Al.Mesh(ua,ee.material);ue.addLevel(Se,50)}return ue};let Pe=0,ra=0;const Ta=[];F.loadMeshCb=async(ee,pa,ue,ua,Se)=>{const se=ee.split("/").pop(),Be=ue||(()=>{});Pe++;const Ge=new Promise(async(da,Ja)=>{try{const R=await fe(se);if(!R||R.size===0)throw new Error(`文件为空: ${se}`);const H=se.split(".").pop().toLowerCase();let X;switch(H){case"stl":X=await U(R,se,pa);break;case"obj":X=await Ce(R,se,pa);break;default:throw new Error(`不支持的文件格式: ${H}`)}J.enableLOD&&X.isMesh&&(X=Me(X,se)),Be(X),ra++,ua&&ua({loaded:ra,total:Pe,progress:ra/Pe}),da(X)}catch(R){console.error(`mesh文件加载失败: ${se}`,R);const H=new Al.Group;Be(H),da(H);const X=new Al.BoxGeometry(.1,.1,.1),he=new Al.MeshStandardMaterial({color:16711680,wireframe:!0});return new Al.Mesh(X,he)}});Ta.push(Ge)};try{if(!Ae){ko.value=void 0;break}if(I=await F.loadAsync(Ae),console.log(`URDF文件加载完成,等待${Pe}个mesh文件加载...`),Ta.length>0)try{await Promise.allSettled(Ta),console.log(`所有mesh文件处理完成,成功加载: ${ra}/${Pe}`)}catch(ue){console.warn("部分mesh文件加载失败,但继续显示模型",ue)}I.traverse(ue=>{ue.isMesh&&(ue.castShadow=!0,ue.receiveShadow=!0,ue.renderOrder=1,ue.material&&(ue.material.needsUpdate=!0))}),console.time("计算包围盒");const ee=new Al.Box3;ee.expandByObject(I);const pa=`urdf_${Date.now()}`;I.userData.boundingBox=ee.clone(),I.userData.modelId=pa,ms.set(pa,{box:ee.clone(),center:ee.getCenter(new Al.Vector3),size:ee.getSize(new Al.Vector3),maxSize:Math.max(...ee.getSize(new Al.Vector3).toArray())}),ko.value=I,console.log("URDF模型加载完成并优化")}catch(ee){console.error("URDF加载失败:",ee),ko.value=void 0}finally{Ae&&URL.revokeObjectURL(Ae)}break;default:throw new Error(`不支持的文件格式: ${C}`)}return I};return{addModelsFromUrls:m,loadModelByDefaultPath:async C=>{console.log(C);try{n.value=!0,r.value="正在加载模型...";const{scene:M}=a();if(!M)throw new Error("Scene not initialized");o(),await new Promise(W=>setTimeout(W,100));const k=[];for(let W=0;W<C.length;W++){const I=C[W],j=await b(I.suffix,I.blob,I.mtlBlobs||[],I.meshFiles||[]);j&&(M.add(j),l.value.push(j),k.push(j))}return n.value=!1,r.value="",k}catch(M){throw console.error("加载模型失败:",M),n.value=!1,r.value="",M}},urdfModel:ko,modelBoundingBoxes:ms}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,o,s,h,c,d=function(u,C){C.parentNode.insertBefore(u,C)};if(l&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(u){console&&console.log(u)}}r=function(){var u,C=document.createElement("div");C.innerHTML=a._iconfont_svg_string_4827314,(C=C.getElementsByTagName("svg")[0])&&(C.setAttribute("aria-hidden","true"),C.style.position="absolute",C.style.width=0,C.style.height=0,C.style.overflow="hidden",C=C,(u=document.body).firstChild?d(C,u.firstChild):u.appendChild(C))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),r()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(s=r,h=a.document,c=!1,b(),h.onreadystatechange=function(){h.readyState=="complete"&&(h.onreadystatechange=null,m())})}function m(){c||(c=!0,s())}function b(){try{h.documentElement.doScroll("left")}catch{return void setTimeout(b,50)}m()}})(window);const Tf=["onClick"],Bf=e.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(null),h=e.computed(()=>{const x=Number(n==null?void 0:n.textSize),w=oe.rgbaToColor(n==null?void 0:n.textColor),g={},S={};return!Number.isNaN(x)&&x&&(g.fontSize=`${x}px`,S.fontSize=`${x}px`),w&&(g.color=w,S.color=w),{label:g,value:S}}),c=e.ref(""),d=e.ref(""),m=e.ref(!1),b=async x=>{if(x){d.value&&(URL.revokeObjectURL(d.value),d.value="");try{const w=await A.platformDownloadFile({url:x}),g=new Blob([w==null?void 0:w.data],{type:(w==null?void 0:w.headers["content-type"])||"image/*"});d.value=URL.createObjectURL(g)}catch{d.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,x=>{x&&(c.value=x)},{immediate:!0}),e.watch(c,x=>{b(x)},{immediate:!0});const u=()=>{var x;(x=s.value)==null||x.click()},C=async x=>{var S,$,V;const w=x.target,g=(S=w==null?void 0:w.files)==null?void 0:S[0];if(!g){w.value="";return}m.value=!0;try{const ae=new FormData;ae.append("file",g);const Z=await A.platformUploadFile(ae),me=(V=($=Z==null?void 0:Z.data)==null?void 0:$.result)==null?void 0:V.url;me?(c.value=me,r("update:backGroundImage",me),b(me),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{m.value=!1,w.value=""}},M=e.computed(()=>{var x;return d.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(x=n==null?void 0:n.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),k=x=>sl.getComponent(x),W=x=>{if(!x)return;const w=x.querySelector("input, textarea, .el-input__inner");w&&typeof w.focus=="function"&&w.focus()},I=(x,w,g)=>{n.disabled||x.field&&(o.value=w,e.nextTick(()=>{W(g.currentTarget)}))},j=()=>{o.value=null},L=x=>{var g;const w=((g=x==null?void 0:x.field)==null?void 0:g.value)??(x==null?void 0:x.value);return w==null||w===""?"-":w},E=x=>{const w=x!=null&&x.width&&x.width>0?x.width:1,S=`calc((100% - ${(w-1)*16}px) / ${w})`;return{flex:`0 0 ${S}`,maxWidth:S,minWidth:"140px",boxSizing:"border-box"}};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(M.value),onClick:w[2]||(w[2]=g=>(n==null?void 0:n.backGround)&&u())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:w[0]||(w[0]=e.withModifiers(g=>u(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:C},null,544),w[3]||(w[3]=e.createElementVNode("img",{src:sl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(g,S)=>{var $,V,ae,Z,me,Ae,F,ne;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:S,style:e.normalizeStyle(E(g)),onClick:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(h.value.label)},e.toDisplayString(g==null?void 0:g.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(h.value.value),onClick:J=>{var ce;return(ce=g.field)!=null&&ce.isNoClick?null:I(g,S,J)}},[o.value===S&&g.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k((($=g.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":J=>g.field.value=J,isEdit:!0,disabled:(V=g.field)==null?void 0:V.disabled,content:((ae=g.field)==null?void 0:ae.contents)??[],optionUrl:g.field,originalValue:(Z=g.field)==null?void 0:Z.value,config:(me=g.field)==null?void 0:me.config,configModel:((Ae=g.field)==null?void 0:Ae.prop)??((F=g.field)==null?void 0:F.name),selectedTagList:((ne=g.field)==null?void 0:ne.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(L(g)),1)],64))],12,Tf)],4)}),128))],4))}}),Nf=Zl._export_sfc(Bf,[["__scopeId","data-v-af63fc22"]]),hc=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Af={class:"calculator-content"},zf={class:"calculator-child"},Mf={class:"calculator-child"},If=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,o)=>(e.openBlock(),e.createElementBlock("div",Af,[e.createElementVNode("div",zf,[e.createVNode(sl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Mf,[e.createVNode(sl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Of=Zl._export_sfc(If,[["__scopeId","data-v-73db0fe7"]]),wt=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((o,s)=>{if(Array.isArray(o)){let h={};return o=o==null?void 0:o.forEach((c,d)=>{var m;(m=r==null?void 0:r[d])!=null&&m.prop?h[r[d].prop]=c:Array.isArray(c)&&(h.children=wt(c,r))}),Object.assign(h,{id:s})}else return o})),n},vc=(a,l,n)=>{let r=a,o=l;return r=r==null?void 0:r.map((s,h)=>{var c,d;return!Array.isArray(s)||!((c=o==null?void 0:o[h])!=null&&c.label)&&!n||(s.unshift(((d=o==null?void 0:o[h])==null?void 0:d.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var b;return Array.isArray(m)&&(m=vc(m,(b=o==null?void 0:o[h])==null?void 0:b.children,n)),m}))),s}),r},Lf=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return Rf(a,r,n)}},Rf=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=r==null?void 0:r.filter(s=>s.id!==n):r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=mc(s,o,n)),s)),r},mc=(a,l,n)=>{var s,h;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=(s=r.children)==null?void 0:s.filter(c=>c.id!==n):r.children=(h=r.children)==null?void 0:h.map(c=>(c.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),c=mc(c,o,n)),c)),r},$f=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return Vf(a,r,n)}},Vf=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=n:r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=yc(s,o,n)),s)),r},yc=(a,l,n)=>{var s;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=n:r.children=(s=r.children)==null?void 0:s.map(h=>(h.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),h=yc(h,o,n)),h)),r};class Pf{constructor(l={}){tn(this,"url");tn(this,"heartbeatInterval");tn(this,"socket",null);tn(this,"isConnected",!1);tn(this,"heartTimer",null);tn(this,"canvas",null);tn(this,"ctx",null);tn(this,"mainCamCutMode",0);tn(this,"pMainShowStartX",0);tn(this,"pMainShowStartY",0);tn(this,"onLog");tn(this,"onDevCount");tn(this,"onResolution");tn(this,"onCameraStatus");tn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var h;(h=this.canvas)!=null&&h.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const o=document.createElement("canvas");o.style.border="solid 1px #A0A0A0",o.id="MainCamCanvas",o.width=n,o.height=r;const s=o.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(o),this.canvas=o,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=o=>{this.isConnected=!1,this.log("socket.onerror"),n(o)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.onmessage=o=>{this.handleMessage(o)}})}destroy(){var l;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const n=l.find(o=>o.width===2592&&o.height===1944);return n||[...l].sort((o,s)=>s.width*s.height-o.width*o.height)[0]||null}openCamera(l=0,n=1280,r=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=1,o[3]=l,o[4]=this.canvas.width>>8&255,o[5]=this.canvas.width&255,o[6]=this.canvas.height>>8&255,o[7]=this.canvas.height&255,o[8]=n>>8&255,o[9]=n&255,o[10]=r>>8&255,o[11]=r&255,this.sendBytes(o)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=16,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=0,this.sendBytes(o)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(l){var n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var o,s,h,c,d,m;const n=new Uint8Array(l.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const r=n[2];if(r===80){const b=n[3],u=n.length-4,C=new Uint8Array(u);for(let W=0;W<u;W++)C[W]=n[4+W];const k=decodeURIComponent(this.byteToString(C)).split("|");(o=this.onDevCount)==null||o.call(this,b,k);return}if(r===81){const b=n[3]||0,u=[];for(let C=0;C<b;C++){const M=(n[4+C*4+0]||0)*256+(n[4+C*4+1]||0),k=(n[4+C*4+2]||0)*256+(n[4+C*4+3]||0);u.push({width:M,height:k,text:`${M}*${k}`})}(s=this.onResolution)==null||s.call(this,b,u);return}if(r===1){n[3]===1&&((h=this.onCameraStatus)==null||h.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const u=n[4]*256+n[5],C=n[6]*65536+n[7]*256+n[8];let M="";if(u>0){const I=new Uint8Array(u);for(let j=0;j<u;j++)I[j]=n[9+j];M=decodeURIComponent(this.byteToString(I))}const k=new Uint8Array(C);for(let I=0;I<C;I++)k[I]=n[9+u+I];const W=this.uint8ArrayToString(k);(d=this.onPhoto)==null||d.call(this,{flag:0,imgPath:M,base64:W})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const b=n[3]*256+n[4],u=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const C=this.ctx.createImageData(b,u);let M=11;for(let k=0;k<C.data.length;k+=4)C.data[k+0]=n[M],C.data[k+1]=n[M+1],C.data[k+2]=n[M+2],C.data[k+3]=255,M+=3;this.ctx.putImageData(C,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const Ff={style:{display:"flex",gap:"16px",height:"100%"}},jf={key:0,style:{color:"var(--el-text-color-secondary)"}},Hf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Uf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},qf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},Wf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Kf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Gf=["src","onClick"],Yf=["onClick"],Jf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Xf={class:"dialog-footer"},Zf=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(!1),h=e.ref([]),c=e.ref(""),d=e.ref(!1),m=e.ref([]),b=new Pf({url:"ws://127.0.0.1:22225"});function u(V,ae){var J;const Z=V.split(","),me=((J=Z[0].match(/:(.*?);/))==null?void 0:J[1])??"image/jpeg",Ae=atob(Z[1]);let F=Ae.length;const ne=new Uint8Array(F);for(;F--;)ne[F]=Ae.charCodeAt(F);return new File([ne],ae,{type:me})}function C(){b.onLog=V=>{console.log("[GPY]",V)},b.onDevCount=(V,ae)=>{if(c.value+=`设备数量=${V},设备=${ae.join(",")}
|
|
4
4
|
`,V>0){c.value+=`检测到设备,正在获取分辨率...
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
`,b.getDevCount()},k=()=>{try{b.destroy()}catch(V){console.error(V)}s.value=!1,h.value=[],c.value="",d.value=!1,m.value=[]};e.watch(()=>n.visible,V=>{V?M():k()});const W=()=>{try{b.bestSize()}catch(V){console.error(V)}},I=()=>{try{b.rotateLeft()}catch(V){console.error(V)}},j=()=>{try{b.rotateRight()}catch(V){console.error(V)}},L=()=>{try{b.focus()}catch(V){console.error(V)}},E=()=>{c.value+=`正在拍照...
|
|
21
21
|
`;try{b.photo()}catch(V){c.value+=`拍照调用失败:${(V==null?void 0:V.message)??V}
|
|
22
22
|
`}},x=()=>{h.value.length>0?r("confirm",h.value.map(V=>V.file)):r("confirm",[])},w=V=>{V<0||V>=h.value.length||(h.value.splice(V,1),c.value+=`已删除一张图片(剩余 ${h.value.length} 张)
|
|
23
|
-
`)},g=V=>{if(!V)return;const ae=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:ae,blobUrl:V}],d.value=!0},S=()=>{d.value=!1},$=()=>{k(),r("cancel")};return(V,ae)=>{const Z=e.resolveComponent("el-input"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Br.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Ff,[e.createElementVNode("div",{ref_key:"cameraBox",ref:o,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jf,"初始化摄像头..."))],512),e.createElementVNode("div",Hf,[e.createElementVNode("div",Uf,[ae[0]||(ae[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",qf,[h.value.length===0?(e.openBlock(),e.createElementBlock("div",Wf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Kf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ae,F)=>(e.openBlock(),e.createElementBlock("div",{key:Ae.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:Ae.url,onClick:ne=>g(Ae.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Gf),e.createElementVNode("div",{onClick:ne=>w(F),style:{position:"absolute",top:"4px",right:"4px",width:"18px",height:"18px","border-radius":"50%",background:"rgba(0,0,0,0.55)",color:"#fff",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","font-size":"12px"},title:"删除"},"×",8,Yf)]))),128))]))],512)]),e.createElementVNode("div",Jf,[ae[1]||(ae[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Z,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xf,[e.createVNode(me,{onClick:W,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[2]||(ae[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{onClick:I,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(me,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[4]||(ae[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(me,{onClick:L,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(me,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>ae[6]||(ae[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),ae[9]||(ae[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(me,{onClick:x,disabled:h.value.length===0,id:"themeButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(me,{onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),d.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:S},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Qf=Zl._export_sfc(Zf,[["__scopeId","data-v-24a2050a"]]),ys=A.useMenuState(A.pinia),e0=async a=>{var s,h,c,d,m,b;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(s=l==null?void 0:l[0])==null?void 0:s.url,o="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){ys.setContentLoading(!0);const u=await A.platformDownloadFile({url:r});let C=u==null?void 0:u.data;const M=new FormData;M.append("file",C,((h=l==null?void 0:l[0])==null?void 0:h.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),M.append("query",n);let k=await lc(M);k=(b=(m=(d=k==null?void 0:k.data)==null?void 0:d.data)==null?void 0:m.response)==null?void 0:b.replace("generateResult",a==null?void 0:a.函数名称),o=k,ys.setContentLoading(!1)}return o},At=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),a0=A.useModelComp(A.pinia),{extraContents:pv}=A.storeToRefs(a0),l0=A.useLoginState(A.pinia),{extraUrl:ui}=A.storeToRefs(l0);let gc=ui.value===""||!ui.value?"http://139.196.154.85:20015":ui.value;e.watch(()=>ui.value,()=>{gc=ui.value===""||!ui.value?"http://139.196.154.85:20015":ui.value},{deep:!0,immediate:!0});const zo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},gs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:gc+"/api/public/paddleOCR"};class r0{constructor(l){tn(this,"config");this.config={...gs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=qa.Local.get(qa.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),o=this.buildOCRRequest(l,n),s=this.config.apiUrl||gs.apiUrl||"";return(await qa.axios.post(s,o,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return zo[l]?zo[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,o=h=>{const c=h==null?void 0:h.label;return!(!c||c==="操作"||c===this.config.columnName||(h==null?void 0:h.type)==="operate"||(h==null?void 0:h.prop)==="operate")},s=h=>{(h||[]).forEach(c=>{if(!c)return;const d=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(d)&&d.length>0){s(d);return}if(o(c)){const m=c.label;if(!r.has(m)){r.add(m);const b=this.getFieldAliases(m);n.push(b)}}})};return s(l||[]),n}}function bc(a){return new r0(a)}bc();const _t=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g;let n=(c=(h=A.cloneDeep(a))==null?void 0:h.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(S=>{});let o="",s=await oe.menuToParent(n);if(s==null||s.forEach(S=>{var $,V,ae,Z;(S==null?void 0:S.name)===(((Z=(ae=(V=($=A.cloneDeep(a))==null?void 0:$.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ae[0])==null?void 0:Z.replaceAll("'",""))??"")&&(o=S==null?void 0:S.id)}),l){o=l;const S=await Rr.getInsofDataApi({id:o}),$=(u=(b=(m=(d=S==null?void 0:S.data)==null?void 0:d.result)==null?void 0:m[0])==null?void 0:b.key)==null?void 0:u.pageKey;s=await oe.getItemData($,sessionStorage.getItem("systemKey"),"")}if(o!==""){let S;l?S=(C=s==null?void 0:s.find(ae=>(ae==null?void 0:ae.id)===l))==null?void 0:C.compData:S=(M=s==null?void 0:s.find(ae=>{var Z,me,Ae,F;return(ae==null?void 0:ae.name)===(((me=(Z=a==null?void 0:a.groupSelect)==null?void 0:Z.split(":"))==null?void 0:me[0])||((F=(Ae=a==null?void 0:a.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:F[0]))}))==null?void 0:M.compData;let $=(W=(k=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:k.contents)==null?void 0:W.map(ae=>ae==null?void 0:ae.label);(j=(I=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:I.contents)!=null&&j.every(ae=>Array.isArray(ae))&&($=(x=oe.getColumnChild((E=(L=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:x.map(ae=>ae==null?void 0:ae.prop));let V=(g=(w=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:g.map(ae=>{if(Array.isArray(ae))ae=ae==null?void 0:ae.filter(Z=>!(Z!=null&&Z.id));else{let Z={};for(let me in ae)me!=="id"&&(Z[me]=ae==null?void 0:ae[me]);ae=Z}return ae});V==null||V.forEach(ae=>{Array.isArray(ae)?r.push(oe.getValueToObjectValue(ae,$)):r.push(ae)})}return r},n0=A.useMenuState(A.pinia),{activeMenuPath:fv}=A.storeToRefs(n0),i0=A.useUnit(A.pinia),{chooseTitle:hv}=A.storeToRefs(i0),o0="col-operate",kc=a=>`${o0}-${a}`,t0=(a,l)=>{const n=new Map;a.forEach(o=>{const{prop:s}=o;n.set(s,o)});const r=o=>{Array.isArray(o)&&o.forEach(s=>{const{prop:h}=s||{},c=n.get(h);s0(c,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&r(s.children)})};return r(l),l},s0=(a,l)=>(a&&(l.sortable=a==null?void 0:a.sortable,l.filterable=a==null?void 0:a.filterable,l.showSummary=a==null?void 0:a.showSummary,l.operable=a==null?void 0:a.operable,l.fixed=a==null?void 0:a.fixed),l),c0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:o=!1,operable:s=!1,fixed:h=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:o,operable:s,fixed:h}},u0=async a=>{var s,h;if(!a)return;const l=kc(a),n=await Rr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(s=n==null?void 0:n.data)==null?void 0:s.code,o=(h=n==null?void 0:n.data)==null?void 0:h.result;if(r==200)return o==null?void 0:o[0]},d0=async a=>{if(a)return[]},p0=async(a,l)=>{if(!a||!l)return;const n=kc(a);return await Rr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},f0=async(a,l)=>!a||!l?void 0:await Rr.updateInsofDataApi({id:a,value:{columns:l}}),bs=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await u0(a);return r?await f0(r==null?void 0:r.id,l):await p0(a,l)};var Co={exports:{}},h0=Co.exports,ks;function v0(){return ks||(ks=1,function(a,l){(function(n,r){r()})(h0,function(){function n(m,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.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 r(m,b,u){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){d(C.response,b,u)},C.onerror=function(){console.error("could not download file")},C.send()}function o(m){var b=new XMLHttpRequest;b.open("HEAD",m,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(b)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,c=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,b,u){var C=h.URL||h.webkitURL,M=document.createElement("a");b=b||m.name||"download",M.download=b,M.rel="noopener",typeof m=="string"?(M.href=m,M.origin===location.origin?s(M):o(M.href)?r(m,b,u):s(M,M.target="_blank")):(M.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(M.href)},4e4),setTimeout(function(){s(M)},0))}:"msSaveOrOpenBlob"in navigator?function(m,b,u){if(b=b||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,u),b);else if(o(m))r(m,b,u);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,b,u,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return r(m,b,u);var M=m.type==="application/octet-stream",k=/constructor/i.test(h.HTMLElement)||h.safari,W=/CriOS\/[\d]+/.test(navigator.userAgent);if((W||M&&k||c)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var E=I.result;E=W?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=E:location=E,C=null},I.readAsDataURL(m)}else{var j=h.URL||h.webkitURL,L=j.createObjectURL(m);C?C.location=L:location.href=L,C=null,setTimeout(function(){j.revokeObjectURL(L)},4e4)}});h.saveAs=d.saveAs=d,a.exports=d})}(Co)),Co.exports}v0();const Yn=A.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),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},setSelectTab(a){this.selectTab=a}}}),m0=A.useLoginState(A.pinia),{loginUserInfo:ht}=A.storeToRefs(m0),y0=async a=>{var r,o,s;let l=await A.getAllTables({platId:parseInt((r=ht==null?void 0:ht.value)==null?void 0:r.plat_id),tableNames:[a]});return l=(s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s[0],await fc(l,!1),[{comp:"Table",isShow:!0,name:"日志管理",compData:[{key:"extraButton",contents:[]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"请求类型",prop:"request_method",formType:"Input",align:"center"},{label:"请求路径",prop:"request_url",formType:"Input",align:"center"},{label:"请求参数",prop:"request_param",formType:"Upload",align:"center"},{label:"返回结果",prop:"request_result",formType:"Upload",align:"center"},{label:"返回信息",prop:"request_message",formType:"Input",align:"center"},{label:"请求表格",prop:"request_table",formType:"Input",align:"center"},{label:"请求种类",prop:"request_type",formType:"Input",align:"center"},{label:"请求创建时间",prop:"create_time",formType:"Date",align:"center"},{label:"请求创建人",prop:"create_user_id",formType:"Input",align:"center"}]},{key:"tableContents",contents:l}]}]},g0=A.useLoginState(),{loginUserInfo:yl}=A.storeToRefs(g0);let xo="$R";const Lr=A.useModelComp(A.pinia),xc=e.ref(!1),{itemData:b0,itemGridData:ti,curStructureCompIds:xs,isSubmitCurStructure:k0,routeToChildPath:x0,pageMapState:St,itemExtendData:wo,refreshTable:ws}=A.storeToRefs(Lr),Fo=Yn(A.pinia),Hr=A.useMenuState(A.pinia),ur=e.shallowRef([]),{asideMenus:w0,activeTopMenuPath:_0,activeMenuPath:kl,platform:vv,buttonTriggerType:S0,currentMenuPath:fn}=A.storeToRefs(Hr),xn=A.useUnit(A.pinia),{selectTitle:Wn,chooseTitle:Mo}=A.storeToRefs(xn);e.ref();const Ai=e.ref(!0),Gn=e.ref(0),Et=e.ref([]);e.ref(!1);const zt=e.ref(!1),Xi=e.ref(),wc=e.ref(),_c=e.ref(),E0=()=>{Lr.setItemGridData([]),Lr.setIsEdit("edit"),Lr.setSubmitCurStructure(kl.value!=="/平台管理/菜单管理")},C0=()=>{Lr.setIsEdit("view"),Lr.setRefreshCurStructure(!0)},D0=async a=>{var o;let l=Wn.value,n=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((s,h)=>h<=n);xn.setSelectTitle(sl.safeClone(r)),r=(o=r==null?void 0:r.map(s=>s==null?void 0:s.value))==null?void 0:o.join("/"),Hr.setActiveMenuPath(null),Hr.setActiveMenuPath(r)},vt=async(a,l,n,r="contentConfig")=>{var o;try{if(!Array.isArray(a))return;let s,h;l==="create"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Rr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{id:d==null?void 0:d.id,value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Rr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},h=Rr.batchDeleteInsofDataApi);const c=await h(s);if(((o=c==null?void 0:c.data)==null?void 0:o.code)===200)return c.data.result;throw qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{qa.ElMessage.error("保存响应失败")}},_s=async(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k;try{const W=(s=(o=a==null?void 0:a.results)==null?void 0:o.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:w}})),I=(c=(h=a==null?void 0:a.results)==null?void 0:h.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:c.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),j=JSON.parse(JSON.stringify(a)),L=(d=j==null?void 0:j.results)==null?void 0:d.map(w=>w.id);let E;n?E=(u=(b=(m=St.value)==null?void 0:m[kl.value])==null?void 0:b.filter(w=>{var g,S,$;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l&&(($=(S=w==null?void 0:w.key)==null?void 0:S.relatedInfo)==null?void 0:$.target)===r}))==null?void 0:u.map(w=>w==null?void 0:w.id):E=(k=(M=(C=St.value)==null?void 0:C[kl.value])==null?void 0:M.filter(w=>{var g;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l}))==null?void 0:k.map(w=>w==null?void 0:w.id);const x=E==null?void 0:E.filter(w=>!(L!=null&&L.includes(w))&&typeof w=="number");(W==null?void 0:W.length)>0&&await Rr.batchAddInsofDataApi({dataList:W}),(I==null?void 0:I.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:I}),(x==null?void 0:x.length)>0&&await Rr.batchDeleteInsofDataApi({ids:x})}catch(W){throw new Error(W)}},T0=async a=>{var m,b,u,C,M,k,W,I,j,L;Hr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(b0.value));if(!k0.value)return Hr.setCacheStructures({key:S0.value,data:l}),qa.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var x;return!((x=xs.value)!=null&&x.includes(E))}),o=(m=xs.value)==null?void 0:m.filter(E=>!n.includes(E)),s=[...r,...o].filter(E=>typeof E!==null&&typeof E<"u"),h=l==null?void 0:l.filter(E=>!E.id),c=l==null?void 0:l.filter(E=>E.id);let d=[];if(s&&(s==null?void 0:s.length)>0&&d.push(vt(s,"delete",a)),h&&(h==null?void 0:h.length)>0&&d.push(vt(h,"create",a)),c&&(c==null?void 0:c.length)>0&&d.push(vt(c,"update",a)),ti.value&&((b=ti.value)!=null&&b.isDelete&&((C=(u=ti.value)==null?void 0:u.results)==null?void 0:C.length)>0&&((k=(M=ti.value)==null?void 0:M.results)!=null&&k.every(E=>typeof E=="number"))?await Rr.batchDeleteInsofDataApi({ids:(W=ti.value)==null?void 0:W.results}):(console.log("itemGridData.value",ti.value),d.push(await _s(ti.value,"gridLayout")))),wo.value)for(const E in wo.value)d.push(await _s((I=wo.value)==null?void 0:I[E],"extend",{target:E,compId:(L=(j=wo.value)==null?void 0:j[E])==null?void 0:L.compId},E));await Promise.all(d).then(()=>{qa.ElMessage.success("保存成功"),Lr.setRefreshCurStructure(!0)}).catch(E=>{qa.ElMessage.success(E)}),Hr.setContentLoading(!1)},Zi=a=>zi(a),B0=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Sc=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Ec=e.ref(0),Cc=e.ref(null),N0="ocr_committed_temp_ids_v1",A0=(a,l)=>`${N0}:${String(a??"")}:${String(l??"")}`,z0=(a,l,n)=>{try{const r=A0(a,l),o=sessionStorage.getItem(r),s=o?JSON.parse(o):[],h=Array.isArray(s)?s:[],c=Array.from(new Set([...h,...n||[]].map(d=>String(d)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},Io=async(a,l="data",n)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl;let r=((h=(s=(o=Wn.value)==null?void 0:o.filter(Qe=>(Qe==null?void 0:Qe.condition)==="child"))==null?void 0:s[0])==null?void 0:h.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Qe=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(_e=>{let Oa={};for(let Je in _e)Array.isArray(_e==null?void 0:_e[Je])?Oa[Je]=JSON.stringify(_e==null?void 0:_e[Je]):Oa[Je]=_e==null?void 0:_e[Je];return Oa}),Xa=await A.quoteApi({platId:parseInt((d=yl==null?void 0:yl.value)==null?void 0:d.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Xa=(m=Xa==null?void 0:Xa.data)==null?void 0:m.result,Xa=Xa==null?void 0:Xa.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let ba=Xa==null?void 0:Xa.map(_e=>{var Xe,Aa;let Oa={},Je=Qe==null?void 0:Qe[0],ie;return Array.isArray((Xe=_e==null?void 0:_e.struct)==null?void 0:Xe[0])?ie=oe.getColumnChild((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0]):ie=_e==null?void 0:_e.struct,ie=ie==null?void 0:ie.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="relatedId"),ie==null||ie.forEach(Ze=>{var wa,Fa;Oa[Ze.prop]=((wa=Ze==null?void 0:Ze.words)!=null&&wa[0]?(Je==null?void 0:Je[(Fa=Ze==null?void 0:Ze.words)==null?void 0:Fa[0]])??(Je==null?void 0:Je[Ze==null?void 0:Ze.prop]):Je==null?void 0:Je[Ze==null?void 0:Ze.prop])??""}),Oa.id="1",Oa.relatedId=`[${Oa.id}]`,delete Oa.sort,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Oa]}}),ll=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(_e=>_e==null?void 0:_e.includes("content")),tableContents:Qe}];ll=[...ll,...ba];let Ia=await A.quoteApi({platId:parseInt((u=yl==null?void 0:yl.value)==null?void 0:u.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Ia=(M=(C=Ia==null?void 0:Ia.data)==null?void 0:C.result)==null?void 0:M.filter(_e=>!(ll!=null&&ll.find(Oa=>(Oa==null?void 0:Oa.tableName)==="content_"+(_e==null?void 0:_e.id)))),Ia=Ia==null?void 0:Ia.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let il=Ia==null?void 0:Ia.map(_e=>{var Xe,Aa,Ze,wa,Fa,Za,He;let Oa={},Je=Qe==null?void 0:Qe[0],ie;return Array.isArray((Xe=_e==null?void 0:_e.struct)==null?void 0:Xe[0])?ie=oe.getColumnChild((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0]):ie=_e==null?void 0:_e.struct,ie=ie==null?void 0:ie.filter(va=>(va==null?void 0:va.prop)!=="relatedId"),((wa=(Ze=ie==null?void 0:ie[0])==null?void 0:Ze.words)!=null&&wa[0]?Je!=null&&Je[(Za=(Fa=ie==null?void 0:ie[0])==null?void 0:Fa.words)==null?void 0:Za[0]]:Je!=null&&Je[(He=ie==null?void 0:ie[0])==null?void 0:He.prop])?(ie==null||ie.forEach(va=>{var ca,cl;Oa[va.prop]=((ca=va==null?void 0:va.words)!=null&&ca[0]?(Je==null?void 0:Je[(cl=va==null?void 0:va.words)==null?void 0:cl[0]])??(Je==null?void 0:Je[va==null?void 0:va.prop]):Je==null?void 0:Je[va==null?void 0:va.prop])??""}),Oa.id="1",Oa.relatedId=`[${Oa.id}]`,delete Oa.sort):Oa=void 0,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Oa]}});il=il==null?void 0:il.filter(_e=>{var Oa;return!((Oa=_e==null?void 0:_e.tableContents)!=null&&Oa.every(Je=>Je===void 0))}),ll=[...ll,...il],await A.pageBatchAddApi({platId:parseInt((k=yl==null?void 0:yl.value)==null?void 0:k.plat_id),changeContents:ll});let rl=[];ll==null||ll.forEach(_e=>{var Oa;(Oa=_e==null?void 0:_e.tableContents)==null||Oa.forEach(Je=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:_e==null?void 0:_e.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((W=yl==null?void 0:yl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Qe=((a==null?void 0:a.ocrRows)||[]).map(Ia=>Ia==null?void 0:Ia.id).filter(Ia=>Ia!=null),Xa=((a==null?void 0:a.ocrRows)||[]).map(Ia=>{const il={...Ia};return delete il._isOCRRow,delete il._ocrTableId,Object.keys(il).forEach(rl=>{/(^|\.)证书附件$/.test(rl)&&Array.isArray(il[rl])&&(il[rl]=JSON.stringify(il[rl].map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name)))}),il});let ba=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find(Ia=>Ia==null?void 0:Ia.includes("content")),tableContents:Xa}];await A.pageBatchAddApi({platId:parseInt((j=yl==null?void 0:yl.value)==null?void 0:j.plat_id),changeContents:ba});let ll=[];ba==null||ba.forEach(Ia=>{var il;(il=Ia==null?void 0:Ia.tableContents)==null||il.forEach(rl=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:[{tableName:"log",tableContents:ll}]}),z0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Qe)}if((a==null?void 0:a.buttonName)==="编辑"){const Xa=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(ie=>{const Xe={...ie};return delete Xe._isOCRRow,delete Xe._ocrTableId,delete Xe._isTemp,delete Xe.tableEditType,delete Xe.index,Xe});let ba=Xa==null?void 0:Xa.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ll=await A.quoteApi({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});ll=(x=ll==null?void 0:ll.data)==null?void 0:x.result,ll=ll==null?void 0:ll.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let Ia=(w=ba==null?void 0:ba[0])==null?void 0:w.id,il=[{tableName:(g=a==null?void 0:a.relatedContents)==null?void 0:g.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:ba}],rl=(S=ll==null?void 0:ll.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va,ca;return JSON.stringify(He==null?void 0:He.relatedId)!=="{}"&&(He==null?void 0:He.relatedId)!==""&&(He!=null&&He.relatedId)?(va=He==null?void 0:He.relatedId)==null?void 0:va.includes(parseInt(Ia)):(He==null?void 0:He.sort)===((ca=ba==null?void 0:ba[0])==null?void 0:ca.sort)});if((Xe==null?void 0:Xe.length)>0){let He=ba==null?void 0:ba[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul;va[Le.prop]=((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??""}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,delete va.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:S.filter(ie=>ie);il=[...il,...rl];let _e=await A.quoteApi({platId:parseInt(($=yl==null?void 0:yl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});_e=(ae=(V=_e==null?void 0:_e.data)==null?void 0:V.result)==null?void 0:ae.filter(ie=>!(il!=null&&il.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),_e=_e==null?void 0:_e.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let Oa=(Z=_e==null?void 0:_e.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va,ca,cl;return JSON.stringify(He==null?void 0:He.relatedId)!=="{}"&&(He==null?void 0:He.relatedId)!==""&&(He!=null&&He.relatedId)?(va=He==null?void 0:He.relatedId)==null?void 0:va.includes(parseInt(Ia)):(He==null?void 0:He.sort)===((ca=ba==null?void 0:ba[0])==null?void 0:ca.sort)||(He==null?void 0:He.sort)===(parseInt(((cl=ba==null?void 0:ba[0])==null?void 0:cl.sort)??"0")+1).toString()});if((Xe==null?void 0:Xe.length)>0){let He=ba==null?void 0:ba[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul,hr,dr;((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca!=null&&ca[Le==null?void 0:Le.prop])&&(va[Le.prop]=((hr=Le==null?void 0:Le.words)!=null&&hr[0]?(ca==null?void 0:ca[(dr=Le==null?void 0:Le.words)==null?void 0:dr[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??"")}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,delete va.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Z.filter(ie=>ie);il=[...il,...Oa],await A.pageBatchUpdateApi({platId:parseInt((me=yl==null?void 0:yl.value)==null?void 0:me.plat_id),changeContents:il});let Je=[];il==null||il.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((Ae=yl==null?void 0:yl.value)==null?void 0:Ae.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}if((a==null?void 0:a.buttonName)==="删除"){let Qe=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(_e=>_e==null?void 0:_e.includes("content")),tableContents:a==null?void 0:a.fixContent}],Xa=await A.quoteApi({platId:parseInt((ne=yl==null?void 0:yl.value)==null?void 0:ne.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Xa=(J=Xa==null?void 0:Xa.data)==null?void 0:J.result,Xa=Xa==null?void 0:Xa.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let ba=(Te=(ce=a==null?void 0:a.fixContent)==null?void 0:ce[0])==null?void 0:Te.id,ll=($e=Xa==null?void 0:Xa.map(_e=>{var Je,ie,Xe,Aa,Ze,wa;let Oa=(Je=_e==null?void 0:_e.contents)==null?void 0:Je.filter(Fa=>{var Za,He,va;return JSON.stringify(Fa==null?void 0:Fa.relatedId)!=="{}"&&(Fa==null?void 0:Fa.relatedId)!==""&&(Fa!=null&&Fa.relatedId)?(Za=Fa==null?void 0:Fa.relatedId)==null?void 0:Za.includes(parseInt(ba)):(Fa==null?void 0:Fa.sort)===((va=(He=a==null?void 0:a.fixContent)==null?void 0:He[0])==null?void 0:va.sort)});if((Oa==null?void 0:Oa.length)>0){let Fa=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Fa={...Fa,id:(Xe=Oa==null?void 0:Oa[0])==null?void 0:Xe.id};let Za={},He=Fa,va;return Array.isArray((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0])?va=oe.getColumnChild((Ze=_e==null?void 0:_e.struct)==null?void 0:Ze[0]):va=_e==null?void 0:_e.struct,va=va==null?void 0:va.filter(ca=>(ca==null?void 0:ca.prop)!=="relatedId"),va==null||va.forEach(ca=>{var cl,Le;Za[ca.prop]=((cl=ca==null?void 0:ca.words)!=null&&cl[0]?(He==null?void 0:He[(Le=ca==null?void 0:ca.words)==null?void 0:Le[0]])??(He==null?void 0:He[ca==null?void 0:ca.prop]):He==null?void 0:He[ca==null?void 0:ca.prop])??""}),Za.id=(wa=Oa==null?void 0:Oa[0])==null?void 0:wa.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Za]}}else return}))==null?void 0:$e.filter(_e=>_e);Qe=[...Qe,...ll];let Ia=await A.quoteApi({platId:parseInt((fe=yl==null?void 0:yl.value)==null?void 0:fe.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Ia=(te=(N=Ia==null?void 0:Ia.data)==null?void 0:N.result)==null?void 0:te.filter(_e=>!(Qe!=null&&Qe.find(Oa=>(Oa==null?void 0:Oa.tableName)==="content_"+(_e==null?void 0:_e.id)))),Ia=Ia==null?void 0:Ia.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let il=(U=Ia==null?void 0:Ia.map(_e=>{var Je,ie,Xe,Aa,Ze,wa;let Oa=(Je=_e==null?void 0:_e.contents)==null?void 0:Je.filter(Fa=>{var Za,He,va;return JSON.stringify(Fa==null?void 0:Fa.relatedId)!=="{}"&&(Fa==null?void 0:Fa.relatedId)!==""&&(Fa!=null&&Fa.relatedId)?(Za=Fa==null?void 0:Fa.relatedId)==null?void 0:Za.includes(parseInt(ba)):(Fa==null?void 0:Fa.sort)===((va=(He=a==null?void 0:a.fixContent)==null?void 0:He[0])==null?void 0:va.sort)});if((Oa==null?void 0:Oa.length)>0){let Fa=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Fa={...Fa,id:(Xe=Oa==null?void 0:Oa[0])==null?void 0:Xe.id};let Za={},He=Fa,va;return Array.isArray((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0])?va=oe.getColumnChild((Ze=_e==null?void 0:_e.struct)==null?void 0:Ze[0]):va=_e==null?void 0:_e.struct,va=va==null?void 0:va.filter(ca=>(ca==null?void 0:ca.prop)!=="relatedId"),va==null||va.forEach(ca=>{var cl,Le;Za[ca.prop]=((cl=ca==null?void 0:ca.words)!=null&&cl[0]?(He==null?void 0:He[(Le=ca==null?void 0:ca.words)==null?void 0:Le[0]])??(He==null?void 0:He[ca==null?void 0:ca.prop]):He==null?void 0:He[ca==null?void 0:ca.prop])??""}),Za.id=(wa=Oa==null?void 0:Oa[0])==null?void 0:wa.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Za]}}else return}))==null?void 0:U.filter(_e=>_e);Qe=[...Qe,...il],await A.pageBatchDeleteApi({platId:parseInt((Ce=yl==null?void 0:yl.value)==null?void 0:Ce.plat_id),changeContents:Qe});let rl=[];Qe==null||Qe.forEach(_e=>{var Oa;(Oa=_e==null?void 0:_e.tableContents)==null||Oa.forEach(Je=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:_e==null?void 0:_e.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Me=yl==null?void 0:yl.value)==null?void 0:Me.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Qe=await A.getPageDataApi({platId:parseInt((Pe=yl==null?void 0:yl.value)==null?void 0:Pe.plat_id),pageName:"menu"});if(Qe=(ra=Qe==null?void 0:Qe.data)==null?void 0:ra.result,Qe!=null&&Qe.find(Xa=>(Xa==null?void 0:Xa.father_name)===kl.value+"/")){_c.value=a,wc.value=Qe==null?void 0:Qe.filter(ll=>(ll==null?void 0:ll.father_name)===kl.value+"/");let Xa=(ee=(Ta=a==null?void 0:a.columns)==null?void 0:Ta.find(ll=>ll==null?void 0:ll.mainKey))==null?void 0:ee.prop,ba=(ue=(pa=a==null?void 0:a.fixContent)==null?void 0:pa[0])==null?void 0:ue[Xa];zt.value=!0,Xi.value=[{prop:Xa,label:Xa,name:Xa,value:ba}]}else{let Xa=(ua=a==null?void 0:a.fixContent)==null?void 0:ua.map(Ia=>{let il={};for(let rl in Ia)Array.isArray(Ia==null?void 0:Ia[rl])?il[rl]=JSON.stringify(Ia==null?void 0:Ia[rl]):il[rl]=Ia==null?void 0:Ia[rl];return il.relatedId="",il}),ba=[{tableName:(Se=a==null?void 0:a.relatedContents)==null?void 0:Se.find(Ia=>Ia==null?void 0:Ia.includes("content")),tableContents:Xa}];await A.pageBatchAddApi({platId:parseInt((se=yl==null?void 0:yl.value)==null?void 0:se.plat_id),changeContents:ba});let ll=[];ba==null||ba.forEach(Ia=>{var il;(il=Ia==null?void 0:Ia.tableContents)==null||il.forEach(rl=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Be=yl==null?void 0:yl.value)==null?void 0:Be.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Qe=((Ja=(da=(Ge=a==null?void 0:a.columns)==null?void 0:Ge.map(ie=>ie==null?void 0:ie.filter))==null?void 0:da.filter(ie=>ie!==""))==null?void 0:Ja[0])??"";Qe=oe.analyzeSplitToContent(Qe,","),Qe=(Qe==null?void 0:Qe.find(ie=>ie==null?void 0:ie.includes("@Filter")))??"";let Xa=(R=a==null?void 0:a.fixContent)==null?void 0:R.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ba=await A.quoteApi({platId:parseInt((H=yl==null?void 0:yl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});ba=(X=ba==null?void 0:ba.data)==null?void 0:X.result,ba=ba==null?void 0:ba.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let ll=(de=(he=a==null?void 0:a.columns)==null?void 0:he[0])==null?void 0:de.prop,Ia=(ma=Xa==null?void 0:Xa[0])==null?void 0:ma[ll],il=[{tableName:(oa=a==null?void 0:a.relatedContents)==null?void 0:oa.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:Xa}],rl=(Ve=ba==null?void 0:ba.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va;return(va=Object.values(He))==null?void 0:va.find(ca=>ca===Ia)});if((Xe==null?void 0:Xe.length)>0){let He=Xa==null?void 0:Xa[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul;va[Le.prop]=((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??""}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Ve.filter(ie=>ie);il=[...il,...rl];let _e=await A.quoteApi({platId:parseInt((_a=yl==null?void 0:yl.value)==null?void 0:_a.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});if(_e=(ya=(ze=_e==null?void 0:_e.data)==null?void 0:ze.result)==null?void 0:ya.filter(ie=>!(il!=null&&il.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),_e=_e==null?void 0:_e.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))}),Qe&&Qe!==""){(Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])===","&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1)),Qe=(za=(La=Qe==null?void 0:Qe.replace("(",xo))==null?void 0:La.split(xo))==null?void 0:za[1],Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1),(Qe==null?void 0:Qe[0])==="*"&&(Qe="{"+((Ca=(ha=Qe==null?void 0:Qe.replace("{",xo))==null?void 0:ha.split(xo))==null?void 0:Ca[1])),Qe=(Ne=Qe==null?void 0:Qe.replaceAll("{",""))==null?void 0:Ne.replaceAll("}","");let ie=oe.calculatorAndToOr(Qe);ie=ie==null?void 0:ie[0];let Xe;if((ye=Object.values(ie))!=null&&ye.some(Aa=>(Aa==null?void 0:Aa[0])==="*")){let Aa=(xe=(Y=Wn.value)==null?void 0:Y.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))!=null&&xe.value?(fn==null?void 0:fn.value)+"/"+((qe=(pe=Wn.value)==null?void 0:pe.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:qe.value):fn==null?void 0:fn.value;Xe=await en(Aa,!1)}for(let Aa in ie)if(((sa=ie==null?void 0:ie[Aa])==null?void 0:sa[0])==="*"){let Ze=(Ue=(Va=(Ma=ie[Aa])==null?void 0:Ma.slice(1,($a=ie[Aa])==null?void 0:$a.length))==null?void 0:Va.split(":"))==null?void 0:Ue[0],wa=(aa=(Ie=ie[Aa])==null?void 0:Ie.split(":"))==null?void 0:aa[1],Fa=(ke=Xe==null?void 0:Xe.filter(Za=>(Za==null?void 0:Za.name)===Ze))==null?void 0:ke[0];Fa=(tl=(We=Fa==null?void 0:Fa.compData)==null?void 0:We.find(Za=>(Za==null?void 0:Za.key)==="tableContents"))==null?void 0:tl.contents,Fa=(Cl=Fa==null?void 0:Fa[0])==null?void 0:Cl[wa],ie[Aa]=Fa}Qe=((El=Object.values(ie))==null?void 0:El[0])??""}let Oa=(Vl=_e==null?void 0:_e.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va;return(va=Object.values(He))==null?void 0:va.find(ca=>ca===(Qe===""?Ia:Qe))});if((Xe==null?void 0:Xe.length)>0){let He=Xa==null?void 0:Xa[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ul,hr,dr,Ql;let ja=(ul=a==null?void 0:a.columns)==null?void 0:ul.find(nr=>{var pr,gr,Oe;return((gr=(pr=nr==null?void 0:nr.words)==null?void 0:pr[0])==null?void 0:gr.replaceAll("'",""))===(Le==null?void 0:Le.prop)&&((Oe=nr==null?void 0:nr.functionRelatedWords)==null?void 0:Oe.length)>0});ja=(hr=ja==null?void 0:ja.prop)==null?void 0:hr.replaceAll("'",""),va[Le.prop]=((dr=Le==null?void 0:Le.words)!=null&&dr[0]?(ca==null?void 0:ca[(Ql=Le==null?void 0:Le.words)==null?void 0:Ql[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop])??(ca==null?void 0:ca[ja]):(ca==null?void 0:ca[Le==null?void 0:Le.prop])??(ca==null?void 0:ca[ja]))??void 0}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Vl.filter(ie=>ie);il=[...il,...Oa],await A.pageBatchUpdateApi({platId:parseInt((_l=yl==null?void 0:yl.value)==null?void 0:_l.plat_id),changeContents:il});let Je=[];il==null||il.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt((jl=yl==null?void 0:yl.value)==null?void 0:jl.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}Lr.setRefreshCurStructure(!0),await Dt(a)},Ct=async(a,l,n)=>{var o;let r=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(r){let s=(o=r.compData)==null?void 0:o.map(h=>{var c;if((h==null?void 0:h.key)==="tableContents"){let d={...h,contents:n};return d.contents=(c=(d==null?void 0:d.contents)??[])==null?void 0:c.map(m=>{let b={};for(let u in m)JSON.stringify(m==null?void 0:m[u])==="{}"?b[u]="":b[u]=m==null?void 0:m[u];return b}),d}return h});return r.compData=await Po(s,{}),a=a==null?void 0:a.map(h=>((h==null?void 0:h.id)===(r==null?void 0:r.id)&&(h=r),h)),a}else{let s=a==null?void 0:a.filter(c=>{var d;return(c==null?void 0:c.children)&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0||(c==null?void 0:c.comp)==="Tabs"}),h=s==null?void 0:s.map(async c=>{var d;return c!=null&&c.children&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0?c.children=await Ct(c==null?void 0:c.children,l,n):c.compData=await Ct(c==null?void 0:c.compData,l,n),c});return s=await Promise.all(h),s}},Dt=async a=>{var s,h,c,d,m,b,u;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let n=await A.getAllTables({platId:parseInt((h=yl==null?void 0:yl.value)==null?void 0:h.plat_id),tableNames:l??[]});if(n=(d=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:d[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(C=>{C==null||delete C.source_table;const M={};for(let k in C){const W=C==null?void 0:C[k],I=W&&Object.prototype.toString.call(W)==="[object Object]"&&Object.keys(W).length===0,j=Array.isArray(W)&&W.length===0;W==null||W==="{}"||I||j?M[k]="":M[k]=W}return M});let r=(b=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:b[1],o=await Ct(ur.value,r,n);ur.value=(u=ur.value)==null?void 0:u.map(C=>{var M,k;return(M=o==null?void 0:o[0])!=null&&M.tabInform&&((k=o==null?void 0:o[0])==null?void 0:k.tabInform)===(C==null?void 0:C.tabInform)?C=o==null?void 0:o[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(o==null?void 0:o.name):(C==null?void 0:C.id)===(o==null?void 0:o.id))&&(C=o),C})},M0=a=>{let l=Xi.value;Xi.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},I0=async()=>{var C,M,k,W,I,j,L,E,x,w;let a=_c.value,l=wc.value,n=(M=(C=a==null?void 0:a.columns)==null?void 0:C.find(g=>g==null?void 0:g.mainKey))==null?void 0:M.prop,r=(W=(k=Xi.value)==null?void 0:k[0])==null?void 0:W.value,o=(I=a==null?void 0:a.fixContent)==null?void 0:I.map(g=>{var $;let S={};for(let V in g)Array.isArray(g==null?void 0:g[V])?S[V]=JSON.stringify(g==null?void 0:g[V]):S[V]=g==null?void 0:g[V];return($=a==null?void 0:a.columns)==null||$.forEach(V=>{(V==null?void 0:V.formType)==="Upload"&&(S==null?void 0:S[V==null?void 0:V.prop])===""&&(S[V==null?void 0:V.prop]="{}")}),S[n]=r,S}),s=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(g=>g==null?void 0:g.includes("content")),tableContents:o}];await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:s}),l=l==null?void 0:l.filter(g=>{var S,$,V;return(V=g==null?void 0:g.object_name)==null?void 0:V.includes(($=(S=a==null?void 0:a.fixContent)==null?void 0:S[0])==null?void 0:$[n])});let h=[],c=new Map;l==null||l.forEach(g=>{h.push(`content_${g==null?void 0:g.object_id}`),h.push(`struct_${g==null?void 0:g.object_id}`),c.set(g==null?void 0:g.object_id,g)});let d=await A.getAllTables({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),tableNames:h??[]});d=(x=d==null?void 0:d.data)==null?void 0:x.result;let m=[],b=[];d=oe.chunk(d,2),d==null||d.forEach(g=>{var V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee;let S=c.get((me=(Z=(ae=(V=g==null?void 0:g[1])==null?void 0:V[0])==null?void 0:ae.source_table)==null?void 0:Z.split("_"))==null?void 0:me[1]),$=(ne=(F=(Ae=S==null?void 0:S.object_name)==null?void 0:Ae.split("/"))==null?void 0:F.filter((pa,ue)=>{var ua,Se;return((Se=(ua=S==null?void 0:S.object_name)==null?void 0:ua.split("/"))==null?void 0:Se.length)-1!==ue}))==null?void 0:ne.join("/");if($=$+"/"+r,b!=null&&b.find(pa=>(pa==null?void 0:pa.path)===$)||b.push({fatherPath:S==null?void 0:S.father_name,isShow:S==null?void 0:S.is_show,path:$}),((ce=(J=g==null?void 0:g[1])==null?void 0:J[0])==null?void 0:ce.类型)==="Table"){let pa=((fe=($e=(Te=g==null?void 0:g[1])==null?void 0:Te[0])==null?void 0:$e.结构)==null?void 0:fe.contents)??[],ue=sl.safeClone(pa);Array.isArray(ue==null?void 0:ue[0])&&(ue=oe.getColumnChild(ue==null?void 0:ue[0]));let ua=[];if(((N=g==null?void 0:g[0])==null?void 0:N.length)>0&&(ua=(te=g==null?void 0:g[0])==null?void 0:te.map(Se=>ue==null?void 0:ue.map(Be=>(Be=(Se==null?void 0:Se[Be==null?void 0:Be.prop])??"",Be)))),m!=null&&m.find(Se=>(Se==null?void 0:Se.key)===$)){let Se=(U=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.key)===$))==null?void 0:U.contents;Se.push({isShow:S==null?void 0:S.is_show,filter:((Pe=(Me=(Ce=g==null?void 0:g[1])==null?void 0:Ce[0])==null?void 0:Me.引用)==null?void 0:Pe.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:pa,tableContents:ua});let se=m==null?void 0:m.findIndex(Be=>(Be==null?void 0:Be.key)===$);m[se].contents=Se}else m.push({key:$,contents:[{isShow:S==null?void 0:S.is_show,filter:((ee=(Ta=(ra=g==null?void 0:g[1])==null?void 0:ra[0])==null?void 0:Ta.引用)==null?void 0:ee.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:pa,tableContents:ua}]})}});let u=[];u.push({key:"menuPath",contents:b}),u=[...u,...m],await A.createPlatFormDataApi({platId:parseInt((w=yl==null?void 0:yl.value)==null?void 0:w.plat_id),changeData:u}),zt.value=!1,Lr.setRefreshTable(!0)},Oo=async(a,l)=>{},Lo=async a=>{ur.value=await oe.getDeepDiffItems(a),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value)};e.ref();const O0=e.ref(null),L0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=kl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Dc=e.ref([]),R0=e.computed(()=>{var a,l;return(l=(a=St.value)==null?void 0:a[kl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[_0.value],()=>{xn.setSelectTitle([]),xn.setChooseTitle([])},{deep:!0});e.watch(()=>Mo.value,async(a,l)=>{var r,o,s,h,c,d;let n=(r=Mo.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==fn.value);if((n==null?void 0:n.length)>0){Hr.setContentLoading(!0);let m=((o=n==null?void 0:n[0])==null?void 0:o.relatedContent)??(kl==null?void 0:kl.value),b=m+"/"+((s=n==null?void 0:n[0])==null?void 0:s.value),u=!!((h=n==null?void 0:n[0])!=null&&h.parentContent),C=await en(b,u,{originPath:m});C=(c=C==null?void 0:C.filter(W=>W))==null?void 0:c.map(W=>(W.isShow=!0,W)),console.log(C,"loadingContents");let M=await oe.getDeepDiffItems(C),k=M==null?void 0:M.filter(W=>W==null?void 0:W.choice);Fo.setSelectTab((d=k==null?void 0:k[0])==null?void 0:d.choiceName),M=M==null?void 0:M.filter(W=>{var I;return!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===((I=k==null?void 0:k[0])==null?void 0:I.choiceName)}),ur.value=M,Hr.setContentLoading(!1)}});const $0=(a,l)=>{setTimeout(async()=>{var c,d,m;let n=(c=Mo.value)==null?void 0:c.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==fn.value),r=kl==null?void 0:kl.value,o=kl==null?void 0:kl.value;(n==null?void 0:n.length)>0&&(o=((d=n==null?void 0:n[0])==null?void 0:d.relatedContent)??(kl==null?void 0:kl.value),r=o+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let s=await en(r,!1,{originPath:o});s=s==null?void 0:s.map(b=>(b.isShow=!0,b));let h=await oe.getDeepDiffItems(s);ur.value=h==null?void 0:h.filter(b=>!(b!=null&&b.step)||(b==null?void 0:b.step)===(a==null?void 0:a.title))},10)},V0=a=>{setTimeout(async()=>{var h,c,d;let l=(h=Mo.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)!==fn.value),n=kl==null?void 0:kl.value,r=kl==null?void 0:kl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(kl==null?void 0:kl.value),n=r+"/"+((d=l==null?void 0:l[0])==null?void 0:d.value));let o=await en(n,!1,{originPath:r});o=o==null?void 0:o.map(m=>(m.isShow=!0,m)),Fo.setSelectTab(a);let s=await oe.getDeepDiffItems(o);ur.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>w0.value,a=>{a!=null&&a.length||(ur.value=[])},{immediate:!0});e.watch(()=>[kl.value],async a=>{var s,h,c,d;if(!kl.value)return;if(kl.value==="/"){ur.value=[];return}Hr.setCurrentMenuPath(kl.value),Lr.setLockingPage(""),ur.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Ai.value=!1,Hr.setContentLoading(!0),xc.value=!0;let n=a==null?void 0:a[0],r=n,o=(h=Wn.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)!==kl.value&&!(m!=null&&m.relatedContent));if((o==null?void 0:o.length)>0&&(n=n+"/"+((c=o==null?void 0:o[0])==null?void 0:c.value)),n==="系统管理/日志管理")ur.value=await y0("log");else{let m=await en(n,!0,{originPath:r});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let b=await oe.getDeepDiffItems(m),u=b==null?void 0:b.filter(C=>C==null?void 0:C.choice);Fo.setSelectTab((d=u==null?void 0:u[0])==null?void 0:d.choiceName),ur.value=b==null?void 0:b.filter(C=>{var M;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((M=u==null?void 0:u[0])==null?void 0:M.choiceName)})}Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value),Lr.setRefreshTable(!1),e.nextTick(()=>{Gn.value=Gn.value++,Ai.value=!0})},{immediate:!0});e.watch(()=>[ws.value],async()=>{var a,l,n,r;if(ws.value){ur.value=[];let o=e.getCurrentInstance();(a=o==null?void 0:o.scope)==null||a.stop(),o=null,Ai.value=!1,Hr.setContentLoading(!0),xc.value=!0;let s=fn==null?void 0:fn.value,h=s,c=(l=Wn.value)==null?void 0:l.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==(fn==null?void 0:fn.value));(c==null?void 0:c.length)>0&&(s=s+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let d=await en(s,!0,{originPath:h});d=d==null?void 0:d.map(u=>(u.isShow=!0,u));let m=await oe.getDeepDiffItems(d),b=m==null?void 0:m.filter(u=>u==null?void 0:u.choice);if(Fo.setSelectTab((r=b==null?void 0:b[0])==null?void 0:r.choiceName),ur.value=m==null?void 0:m.filter(u=>{var C;return!(u!=null&&u.choiceName)||(u==null?void 0:u.choiceName)===((C=b==null?void 0:b[0])==null?void 0:C.choiceName)}),Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value),Lr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let u=[...Wn.value,...c];xn.setSelectTitle(u)}e.nextTick(()=>{Gn.value=Gn.value++,Ai.value=!0})}},{immediate:!0,deep:!0});const P0=async()=>{Hr.setLinkMenuInfo(null),Hr.setActiveMenuPath(x0.value),ur.value=null,Lr.setRouteToChildPath(""),Hr.setChildMenu("")},F0=a=>new RegExp("button","i").test(a),j0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Tc=a=>{if(j0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Hr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Bc=async(a,l,n)=>{var C,M,k,W,I,j,L,E,x,w,g,S;let r="",o="";for(let $ in l)(l==null?void 0:l[$])===a&&(o=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===o&&(r=$==null?void 0:$.fatherPath)});let s=r===""?kl.value:r;r!==""&&Hr.setCurrentMenuPath(s),Hr.setCurrentMenuPath(s+"/"+a),Hr.setContentLoading(!0),ur.value=await en(s+"/"+a,!0,{originPath:s+"/",row:l});let h=await en(s,!1),c=(C=h==null?void 0:h.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:C[0],d=((I=(W=(k=(M=c==null?void 0:c.compData)==null?void 0:M.find($=>($==null?void 0:$.key)==="header"))==null?void 0:k.contents)==null?void 0:W[0])==null?void 0:I.prop)??((w=(x=(E=(L=(j=c==null?void 0:c.compData)==null?void 0:j.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:x[0])==null?void 0:w.prop),m=(S=(g=c==null?void 0:c.compData)==null?void 0:g.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:S.contents;m=m==null?void 0:m.map($=>({label:$==null?void 0:$[d],value:$==null?void 0:$[d]}));let b=Wn.value,u={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};b=b==null?void 0:b.filter($=>($==null?void 0:$.condition)!=="child"),b.push(u),xn.setSelectTitle(b),xn.setChooseTitle([u]),Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value)},H0=a=>{Ec.value=a},Di=e.reactive({index:0,comp:null}),U0=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:q0(l,n)}))}),Nc=(a,l)=>{var d,m,b,u,C;const n=l?a:a-2,r=(d=ur.value)==null?void 0:d[n],o=(b=(m=r==null?void 0:r.compData)==null?void 0:m.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:b.contents,s=o==null?void 0:o.findIndex(M=>(M==null?void 0:M.isMainKey)&&(M==null?void 0:M.label)!=="操作"),h=s===-1?0:s,c=(C=(u=r==null?void 0:r.compData)==null?void 0:u.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:C.contents;return{valid:c==null?void 0:c.every(M=>M==null?void 0:M[h+1]),length:(c==null?void 0:c.length)||0}},q0=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:o,length:s}=Nc(l,!0);Di.index===l?n="process":s===0?n="wait":n=o?"success":"error"}return n},Ac=a=>{var n,r,o,s,h;const l=a+1;if(l>1&&((o=(r=(n=ur.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c}=Nc(l);c?(Di.index=l,Di.comp=(s=ur.value)==null?void 0:s[a]):qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Di.index=l,Di.comp=(h=ur.value)==null?void 0:h[a]},zc=e.computed(()=>{var a,l;return(l=(a=Sc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>zc.value,a=>{a&&Ac(0)},{immediate:!0});const W0={class:"table-content"},K0={class:"menu-config-wrap"},G0=["onClick"],Y0={key:0,class:"viewport-wrap"},J0=["onClick"],X0={title:"选择显示列信息"},Z0={key:0,class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Q0=["title"],e3={class:"col-operate-wrap"},a3={key:0,class:"col-operate-radio-wrapper"},l3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},r3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},n3={class:"pop-view"},i3={class:"pop-wrapper"},o3={class:"file-list-pop"},t3=["title","onClick"],s3=["onClick"],c3=["onClick"],u3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},d3={class:"form-content"},p3={key:0,class:"dialog-footer"},f3={class:"dialog-footer"},h3={class:"ocr-dialog-content"},v3={class:"ocr-steps"},m3={key:0,class:"ocr-action-buttons"},y3={key:1,class:"ocr-preview-area"},g3={class:"ocr-file-grid"},b3={class:"file-thumbnail"},k3=["src"],x3={key:1,class:"thumbnail-placeholder"},w3={class:"progress-svg",viewBox:"0 0 36 36"},_3=["stroke","stroke-width","stroke-dasharray"],S3={key:0,class:"progress-icon"},E3={key:1,class:"progress-icon"},C3=["onClick"],D3={class:"file-name"},T3={key:0,class:"ocr-recognize-button"},B3={key:2,class:"ocr-progress-section"},N3={key:3,class:"ocr-confirm-area"},A3={class:"ocr-preview-tip"},z3={class:"ocr-preview-table"},M3={style:{display:"flex","align-items":"center",gap:"8px"}},I3={key:0},O3={key:4,class:"ocr-success-area"},L3={key:0,class:"ocr-dialog-footer"},R3={class:"form-content"},$3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},V3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},P3={style:{display:"flex"}},Ss="ss-ocr-upload-history",F3="ss-ocr-cert-history-v1",j3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(a,{emit:l}){var Ut;const n=e.ref([]),r=At(A.pinia),o=e.ref(null),s=e.ref(new Set),h=e.ref(new Map),c=e.ref(!1),d=e.ref(new Map),m=new Map,b=e.ref(new Map),u=a,C=e.ref((u==null?void 0:u.allowSelect)??!0),M=e.ref(((Ut=u==null?void 0:u.config)==null?void 0:Ut.showIndex)??!0),k=e.ref(),W=e.ref(!0),I=e.ref(!1),j=e.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),x=oe.useOriginalState(A.pinia);let w="$R";const{originalPath:g}=A.storeToRefs(x),S=g.value,$=e.computed(()=>{var v;const p=(v=oe.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate");return p.length>0?p.every(T=>!!(T!=null&&T.sortable)):!1});e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(T=>T==null?void 0:T.filterable)}),e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(T=>T==null?void 0:T.operable)});const V=e.ref(!0),ae=e.ref([]),Z=e.reactive({column:{},status:!1,text:"合计"}),me=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Ae=l,F=e.ref([]),ne=e.ref([]),J=e.ref([]),ce=e.reactive({prop:"",order:null}),Te=e.ref([]),$e=e.ref(!1),fe=e.ref(!1),N=e.ref(null),{isUseBackdrop:te,initTrackFileType:U,getFileExtension:Ce,setData:Me,getFileInfo:Pe,getFilesInfo:ra}=Bo.useThreeSystem(),Ta=e.ref([]),ee=e.ref(!1),pa=e.ref(),ue=A.useMenuState(),{importLoading:ua,activeMenuPath:Se,contentLoading:se,linkMenuInfo:Be}=A.storeToRefs(ue),Ge=oe.useTableComp(A.pinia),da=A.useModelComp(A.pinia),Ja=Yn(A.pinia),{extraContents:R,cacheUpdatingData:H,tableViewContents:X,tableLoading:he,pageMapState:de,lockingPage:ma}=A.storeToRefs(da),{selectTab:oa}=A.storeToRefs(Ja),{compType:Ve,hasEditable:_a}=Qs.useRole(),ze=e.ref([]),ya=e.ref([]),La=e.ref(new Map);e.ref(!1);const za=e.ref("");e.ref();const ha=e.ref(!0),Ca=e.ref(0),Ne=e.ref(!0),ye=e.ref(""),Y=e.ref(!1),xe=e.ref(null);e.ref([]);const pe=e.ref({label:"查看三维模型"}),qe=e.ref(!1),sa=e.ref(),$a=e.ref([]),Ma=e.ref([]),Va=e.ref(!1),Ue=e.ref([]),Ie=e.ref([]),aa=e.ref([]),ke=e.ref([]),We=e.ref([]),tl=()=>{try{const p=localStorage.getItem(Ss),v=p?JSON.parse(p):[];We.value=Array.isArray(v)?v:[]}catch{We.value=[]}},Cl=()=>{try{localStorage.setItem(Ss,JSON.stringify(We.value||[]))}catch{}},El=p=>{var re,le,q;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",T=p.name||((le=p==null?void 0:p.uploadResult)==null?void 0:le.name)||((q=p==null?void 0:p.uploadResult)==null?void 0:q.fileName)||"";if(!v&&!T)return;const z={name:T,url:v,ts:Date.now()},P=String(z.name||"").trim().toLowerCase(),D=(We.value||[]).findIndex(be=>String((be==null?void 0:be.name)||"").trim().toLowerCase()===P);D>-1&&We.value.splice(D,1),We.value.unshift(z),We.value.length>20&&(We.value=We.value.slice(0,20)),Cl()};tl();const Vl=(p,v)=>`${F3}:${String(p??"")}:${String(v??"")}`,_l=(p,v)=>{try{const T=sessionStorage.getItem(Vl(p,v)),z=T?JSON.parse(T):[];return Array.isArray(z)?z:[]}catch{return[]}},jl=(p,v,T)=>{try{sessionStorage.setItem(Vl(p,v),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},Qe=(p,v,T)=>{if(!v)return;const z=_l(p,v),P=[T,...z||[]].filter(Boolean).slice(0,1);return jl(p,v,P),P},Xa=(p,v,T)=>{if(!v||!T)return;const z=Vl(p,v),P=Vl(p,T);try{const D=sessionStorage.getItem(z);if(!D)return;const re=(()=>{try{const be=JSON.parse(D);return Array.isArray(be)?be:[]}catch{return[]}})(),le=_l(p,T),q=[...re,...le||[]].filter(Boolean).sort((be,De)=>Number((De==null?void 0:De.ts)||0)-Number((be==null?void 0:be.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(q)),sessionStorage.removeItem(z)}catch{}},ba=e.ref(!1),ll=e.ref(!1),Ia=e.ref([]),il=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const rl=e.ref(!1),_e=e.ref([]),Oa=e.ref(1),Je=e.ref(new Map),ie=e.ref(new Map),Xe=e.ref(0),Aa=e.ref(!1),Ze=e.ref([]),wa=e.ref([]),Fa=p=>{var v;try{const T=(v=oe.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(T==null?void 0:T.find(z=>(z==null?void 0:z.prop)===p||(z==null?void 0:z.label)===p))||null}catch{return null}},Za=p=>{const v=Fa(p),T=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return sl.getComponent(T)||sl.getComponent("Input")},He=e.ref([]),va=e.ref(null),ca=e.ref([]),cl=e.ref(null),Le=e.ref(""),ja=e.ref(!1),ul=e.ref([]),hr=e.ref(""),dr=e.ref(!1),Ql=e.ref([]),nr=e.ref([]),pr=e.ref([]),gr=e.ref(null),Oe=e.ref([]),er=e.ref("");e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("编号")||""}catch{return""}});const Sr=e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("名称")||""}catch{return""}}),Mr=e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("制造厂")||""}catch{return""}}),zl=()=>{dr.value=!1,Ql.value=[],nr.value=[],pr.value=[],gr.value=null,Oe.value=[],er.value=""},Nr=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,qr=(p,v)=>{const T=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(T))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Nr(T[P])&&(v[P]=T[P]);const z=ya.value.find(P=>P.id===v.id);if(z)for(const P of Object.keys(T))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Nr(T[P])&&(z[P]=T[P]);La.value&&La.value.set(v.id,v),Qe(u==null?void 0:u.index,v.id,p==null?void 0:p.versionItem),nr.value=[...nr.value||[],JSON.parse(JSON.stringify(v))]},Kl=async(p,v=null)=>{var T,z,P,D,re,le,q;try{const be=(T=oe.getAllLeafNodes(F.value)||[])==null?void 0:T.filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),De=new Map;be==null||be.forEach(ka=>{ka!=null&&ka.label&&(ka!=null&&ka.prop)&&De.set(ka.label,ka.prop)});const Ke=De.get("系统编号")||De.get("编号");if(!Ke){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const je=v||gr.value;if((Array.isArray(je==null?void 0:je.result)?je.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ka=0;ka<p.length;ka++){const Na=p[ka],Ra=Na[Ke];if(!Ra){console.warn(`第 ${ka+1} 条匹配行缺少系统编号,跳过`);continue}const la=`设备管理/试验设备/${Ra}`,el=await A.getPageDataApi({platId:parseInt((z=vl.value)==null?void 0:z.plat_id),pageName:la});if(!((P=el==null?void 0:el.data)!=null&&P.result)||!Array.isArray(el.data.result)){console.warn(`未找到详情页数据: ${la}`);continue}const xa=el.data.result.find(ta=>(ta==null?void 0:ta.property_name)==="校检记录");if(!xa){console.warn(`详情页 ${la} 中未找到校检记录表`);continue}const al=(D=xa.contents)==null?void 0:D.find(ta=>(ta==null?void 0:ta.key)&&ta.key.startsWith("content_"));if(!al||!al.key){console.warn("校检记录表中未找到 content item");continue}const ve=al.key,Pa=Array.isArray(al.value)?al.value:[];if(Pa.length>=5){const we=[...Pa].sort((fa,Ba)=>{const ol=Number((fa==null?void 0:fa.create_time)||0),Wa=Number((Ba==null?void 0:Ba.create_time)||0);return ol-Wa})[0];we!=null&&we.id&&await A.pageBatchDeleteApi({platId:parseInt((re=vl.value)==null?void 0:re.plat_id),changeContents:[{tableName:ve,tableContents:[{id:we.id}]}]})}const ga=(le=be==null?void 0:be.find(ta=>(ta==null?void 0:ta.label)==="证书附件"))==null?void 0:le.prop,Ea=String(Date.now()),Sa={id:Ea},B=Pa[0]||{},G=new Date().toISOString().split("T")[0];if(Object.keys(B||{}).forEach(ta=>{if(ta!=="id"){if(ta==="证书附件"){Sa[ta]="";return}if(ta==="校检日期"||ta==="检校日期"){Sa[ta]=Na[ta]||Na.校检日期||Na.检校日期||G;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ta)){Sa[ta]=Na[ta]??"";return}Sa[ta]=Na[ta]??""}}),ga&&Na[ga]){const ta=Na[ga];if(Array.isArray(ta)&&ta.length>0)Sa.证书附件=JSON.stringify(ta.map(we=>({url:(we==null?void 0:we.url)||"",name:(we==null?void 0:we.name)||(we==null?void 0:we.fileName)||"",fileName:(we==null?void 0:we.fileName)||(we==null?void 0:we.name)||""})).filter(we=>we.url||we.name));else if(typeof ta=="string")try{const we=JSON.parse(ta);Sa.证书附件=ta}catch{Sa.证书附件=JSON.stringify([{url:ta,name:ta,fileName:ta}])}}console.log(ve,"tableName","inspectionRecordRow",Sa),await A.pageBatchAddApi({platId:parseInt((q=vl.value)==null?void 0:q.plat_id),changeContents:[{tableName:ve,tableContents:[Sa]}]});const Re=xa==null?void 0:xa.object_id;if(Re&&Ea){const ta=ga&&Na[ga]?Na[ga]:null;let we=[],fa="",Ba=!1;if(Array.isArray(ta)&&ta.length>0){we=ta.map(hl=>({name:(hl==null?void 0:hl.name)||(hl==null?void 0:hl.fileName)||"",url:(hl==null?void 0:hl.url)||""})).filter(hl=>hl.url||hl.name);const Wa=ta[0];fa=(Wa==null?void 0:Wa.url)||"";const fl=(Wa==null?void 0:Wa.name)||(Wa==null?void 0:Wa.fileName)||"";Ba=String(fl).toLowerCase().endsWith(".pdf")||String(fa).toLowerCase().endsWith(".pdf")}else if(typeof ta=="string")try{const Wa=JSON.parse(ta);Array.isArray(Wa)?(we=Wa.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name),we.length>0&&(fa=we[0].url||"",Ba=String(we[0].name).toLowerCase().endsWith(".pdf")||String(fa).toLowerCase().endsWith(".pdf"))):(fa=ta,Ba=String(ta).toLowerCase().endsWith(".pdf"))}catch{fa=ta,Ba=String(ta).toLowerCase().endsWith(".pdf")}const ol={ts:Date.now(),versionId:String(Date.now())+"_"+String(ka),label:new Date().toLocaleString(),certType:Na.证书类型||"",certNo:Na.证书编号||"",fileType:Ba?"pdf":"image",sourceUrl:Ba?fa:"",images:we};Qe(Re,Ea,ol)}}}catch(be){console.error("向校检记录表插入OCR识别结果失败:",be),qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},br=p=>{const v=Array.isArray(p)?p:Ql.value||[];if(v.length===0){zl();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var le;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Qe(u==null?void 0:u.index,(le=D==null?void 0:D.ocrRow)==null?void 0:le.id,D==null?void 0:D.versionItem),pr.value=[...pr.value||[],D.ocrRow];return}if(re==="replace"){const q=D==null?void 0:D.selectedTargetId,be=(ze.value||[]).find(De=>String(De==null?void 0:De.id)===String(q));if(!be)return;qr(D,be)}}}),(nr.value||[]).length>0&&(ze.value=[...ze.value||[]]),(pr.value||[]).length>0&&(ze.value=[...ze.value||[],...pr.value||[]],ya.value=[...ya.value||[],...pr.value||[]],(pr.value||[]).forEach(D=>{var re,le;return(le=(re=La.value)==null?void 0:re.set)==null?void 0:le.call(re,D.id,D)})),Ur.value=ze.value;const z=nr.value||[],P=pr.value||[];if(z.length>0&&(Ae("change",{buttonName:"编辑",singleContent:z,content:ze.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:F.value,name:u==null?void 0:u.compName}),Kl(z)),P.length>0){const D=gr.value;Ae("change",{buttonName:"OCR批量新增",content:ze.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:F.value,ocrRows:P,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(le=>({url:(le==null?void 0:le.url)||"",name:(le==null?void 0:le.name)||"",fileName:(le==null?void 0:le.name)||""})).filter(le=>le.url)),ocrResult:D,matchedCount:(z||[]).length,newCount:(P||[]).length})}qa.ElMessage.success("已提交候选处理结果"),zl()},$r=bc(),jr=e.computed(()=>$r.getConfig()),Pl=e.ref(),lr=e.ref(),Wr=hc(A.pinia),Ur=e.ref(),Vr=e.ref(0),Kr=A.useUnit(A.pinia),{selectIndex:an,selectMenu:hn,selectTitle:Jl}=A.storeToRefs(Kr),{selectString:vr}=A.storeToRefs(Wr),Jr=A.useLoginState(A.pinia),{loginUserInfo:vl}=A.storeToRefs(Jr),ir=e.ref(720),Rl=e.ref(!1),Er=e.ref(!1),Hl=e.ref([]),mr=e.ref(),ar=e.ref(!0),Xr=e.ref(!0);e.ref([]);const sn=e.inject("contentRef");e.provide("contentRef",sn),e.provide("getSuggestListForCell",Tu),e.provide("getSuggestLoadingForCell",(p,v)=>{const T=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return b.value.get(T)||!1}),e.watch(()=>{var p;return(p=ze.value)==null?void 0:p.length},p=>{me.total=p}),e.watch(()=>X.value,async()=>{var v,T,z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la;if(((v=X.value)==null?void 0:v.length)===0||!((T=u==null?void 0:u.itemData)!=null&&T.find(el=>(el==null?void 0:el.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(el=>(el==null?void 0:el.key)==="pageColumn")))return;let p=(be=(q=(le=(re=(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:le[1])==null?void 0:q.split("]"))==null?void 0:be[0];((ea=(je=(Ke=(De=u==null?void 0:u.itemData)==null?void 0:De.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:Ke.contents)==null?void 0:je.split("["))==null?void 0:ea[0])+((Na=(ka=X.value)==null?void 0:ka.find(el=>(el==null?void 0:el.key)===p))==null?void 0:Na.value),(la=(Ra=u==null?void 0:u.itemData)==null?void 0:Ra.find(el=>(el==null?void 0:el.key)==="pageGroup"))==null||la.contents,Ht(compData,u.allMapContents)},{deep:!0});const Cn=p=>{var T,z,P,D,re;const v=(z=(T=F.value)==null?void 0:T.filter(le=>le==null?void 0:le.mainKey))==null?void 0:z.map(le=>le==null?void 0:le.prop);if(v.length===0){const le=(P=F.value)==null?void 0:P.map(q=>q==null?void 0:q.prop);return(D=le==null?void 0:le.map(q=>p==null?void 0:p[q]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(le=>p==null?void 0:p[le]))==null?void 0:re.join("|")},Jn=p=>{var le,q,be,De,Ke;const v=(q=(le=F.value)==null?void 0:le.filter(je=>je==null?void 0:je.required))==null?void 0:q.map(je=>je==null?void 0:je.prop),T=[];if(p==null||p.forEach(je=>{v==null||v.forEach(ea=>{const ka=je[ea];(ka==null||ka==="")&&(T.includes(ea)||T.push(ea))})}),T.length>0)return qa.ElMessage.warning(`请填写必填项:${T.join("、")}`);const z=new Map,P=new Map;(be=ze.value)==null||be.forEach(je=>{const ea=Cn(je);z.set(ea,je)}),p==null||p.forEach(je=>{const ea=Cn(je);P.set(ea,je)});const D=p==null?void 0:p.filter(je=>z.has(Cn(je))),re=(De=ze.value)==null?void 0:De.filter(je=>P.has(Cn(je)));return(D==null?void 0:D.length)>0&&(y.columns=(Ke=F.value)==null?void 0:Ke.filter(je=>(je==null?void 0:je.label)!=="操作"),y.existRows=re,y.tableData=D,y.show=!0),y.newRows=p==null?void 0:p.filter(je=>{const ea=Cn(je);return!z.has(ea)}),y.newRows},Fn=e.ref(""),Dn=e.ref(null),In=async()=>{var p,v,T,z,P,D;try{const re=await A.quoteApi({related:[{menus:Se.value,groups:u==null?void 0:u.compName}],platId:parseInt((p=vl.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){Dn.value=(T=re==null?void 0:re.data)==null?void 0:T.result;const le=(z=F.value)==null?void 0:z.map(De=>(De==null?void 0:De.prop)||(De==null?void 0:De.label)),q=jn(le,(P=re==null?void 0:re.data)==null?void 0:P.result),be=q==null?void 0:q.flatMap(De=>De==null?void 0:De.quote);(be==null?void 0:be.length)>0&&(Fn.value=(D=be==null?void 0:be.map(De=>De==null?void 0:De.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function jn(p,v){var T;return(T=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:T.map(z=>{const P={...z};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const vn=async(p,v)=>{var T,z;try{Dn.value||await In();const P=v==null?void 0:v.map(re=>{const le=Object.keys(re),q={};return le.forEach((be,De)=>{q[p[De]]=re[be]}),q}),D=Jn(P);if(!D||(D==null?void 0:D.length)===0)return;y.show||await O(D)}catch(P){throw qa.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((T=vl==null?void 0:vl.value)==null?void 0:T.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(z=u==null?void 0:u.related)==null?void 0:z.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},On=async p=>{var D,re,le,q,be,De,Ke;let v=J.value;v!=null&&v.find(je=>(p==null?void 0:p.key)===(je==null?void 0:je.key))&&(v=v==null?void 0:v.filter(je=>(p==null?void 0:p.key)!==(je==null?void 0:je.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let T=ke.value;T=T==null?void 0:T.map(je=>{var ea,ka;return(je==null?void 0:je.type)==="Select"&&(p==null?void 0:p.key)===(je==null?void 0:je.prop)&&Array.isArray(je.value)&&(ea=je.value)!=null&&ea.every(Na=>typeof Na=="string")&&(je.selectValue=(ka=v==null?void 0:v.find(Na=>(Na==null?void 0:Na.key)===(je==null?void 0:je.prop)))==null?void 0:ka.value),je});let z=(q=(le=T==null?void 0:T.find(je=>(je==null?void 0:je.prop)===(p==null?void 0:p.key)))==null?void 0:le.optionUrl)==null?void 0:q.menuId,P=T==null?void 0:T.find(je=>(je==null?void 0:je.prop)===(p==null?void 0:p.key));if(z){let je=await _t(P==null?void 0:P.optionUrl,z),ea,ka=ae.value,Na=(Ke=(De=(be=ke.value)==null?void 0:be.find(Ra=>{var la;return(la=P==null?void 0:P.optionUrl)==null?void 0:la.menuId}))==null?void 0:De.selectValue)==null?void 0:Ke[0];if(je==null||je.forEach(Ra=>{var la,el,xa,al,ve,Pa,ga,Ea,Sa,B;if(z){let G=(el=(la=ke.value)==null?void 0:la.find(ta=>{var we,fa;return((we=P==null?void 0:P.optionUrl)==null?void 0:we.menuId)===((fa=ta==null?void 0:ta.optionUrl)==null?void 0:fa.menuId)}))==null?void 0:el.prop,Re=(al=(xa=T==null?void 0:T.find(ta=>(ta==null?void 0:ta.prop)===G))==null?void 0:xa.selectValue)==null?void 0:al[0];G!=null&&G.includes("·")&&(G=(ve=G==null?void 0:G.split("·"))==null?void 0:ve[0],Re=(Sa=(Ea=(ga=p==null?void 0:p.value)==null?void 0:ga[((Pa=p==null?void 0:p.value)==null?void 0:Pa.length)-1])==null?void 0:Ea.split(" "))==null?void 0:Sa[0]),ka!=null&&ka.find(ta=>(ta==null?void 0:ta.value)===Na)?ea=(B=ka==null?void 0:ka.find(ta=>(ta==null?void 0:ta.value)===Na))==null?void 0:B.objectValue:Ra[G]===Re&&(ea=Ra)}}),ea){let Ra=T;Ra=Ra==null?void 0:Ra.map(la=>{var el,xa,al,ve,Pa,ga;return z&&(ea!=null&&ea[la==null?void 0:la.prop])&&ye.value==="新增"&&(la==null?void 0:la.prop)!==(P==null?void 0:P.prop)?la.value=(ea==null?void 0:ea[la==null?void 0:la.prop])||(ea==null?void 0:ea[(ve=(al=(xa=(el=la==null?void 0:la.optionUrl)==null?void 0:el.groupSelect)==null?void 0:xa[1])==null?void 0:al.replaceAll("[",""))==null?void 0:ve.replaceAll("]","")]):la.value=(ga=(Pa=ke.value)==null?void 0:Pa.find(Ea=>(Ea==null?void 0:Ea.prop)===(la==null?void 0:la.prop)))==null?void 0:ga.value,la}),ke.value=Ra}}J.value=v},Xn=async(p,v)=>{var T,z,P,D,re;if((T=p==null?void 0:p.toString())!=null&&T.includes(".txt")||(z=p==null?void 0:p.toString())!=null&&z.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const le=await qa.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),q=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"});let be=URL.createObjectURL(q);pa.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:be}],ee.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&Ae("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Xr.value=!1;let p=Vr.value;Vr.value=p+1});const Gr=e.reactive({prop:"",order:null}),Zn=e.computed(()=>{const p=(ze.value??[]).slice(),v=Gr.prop||ce.prop,T=Gr.order||ce.order;if(!v||!T)return p;const z=T==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((le,q)=>le==null?le:le[q],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const le=String(re).trim();if(le==="")return{ok:!1,value:NaN};const q=le.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(q))return{ok:!1,value:NaN};const be=Number(q);return{ok:Number.isFinite(be),value:be}};return p.sort((re,le)=>{const q=P(re),be=P(le);if(q==null&&be==null)return 0;if(q==null)return z?-1:1;if(be==null)return z?1:-1;const De=D(q),Ke=D(be);if(De.ok&&Ke.ok)return z?De.value-Ke.value:Ke.value-De.value;const je=ve=>{if(ve==null)return{ok:!1,value:NaN};const Pa=String(ve).trim();if(Pa==="")return{ok:!1,value:NaN};const ga=Pa.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ga)return{ok:!1,value:NaN};const Ea=ga[1]?-1:1,Sa=Number(ga[2]),B=Number(ga[3]),G=Number(ga[4]);return[Sa,B,G].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:B>=60||G>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(Sa*3600+B*60+G)}},ea=je(q),ka=je(be);if(ea.ok&&ka.ok)return z?ea.value-ka.value:ka.value-ea.value;const Na=new Date(q).getTime(),Ra=new Date(be).getTime(),la=!Number.isNaN(Na),el=!Number.isNaN(Ra);if(la&&el)return z?Na-Ra:Ra-Na;const xa=String(q),al=String(be);return z?xa.localeCompare(al):al.localeCompare(xa)})}),wn=e.computed(()=>{var T;const p=(me.currentPage-1)*me.pageSize,v=p+me.pageSize;return Ae("getSliceContLength",me),(T=Zn.value)==null?void 0:T.slice(p,v)}),Mi=p=>{me.currentPage=p,Ae("getSliceContLength",me)},jo=p=>{var z;me.pageSize=p;const v=((z=ze.value)==null?void 0:z.length)??0,T=p>0?Math.ceil(v/p):1;me.currentPage>T&&(me.currentPage=T||1,qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Ae("getSliceContLength",me)},Ho=({prop:p,order:v})=>{Gr.prop=p,Gr.order=v,me.currentPage=1};function Nn(p){const v=[];function T(z,P=""){z.forEach(D=>{D.children&&D.children.length>0?T(D.children,D.prop):v.push(D.prop)})}return T(p),v}const Uo=(p,v)=>{var le,q,be,De;let T=(q=(le=F.value)==null?void 0:le.map(Ke=>Ke==null?void 0:Ke.prop))==null?void 0:q.filter(Ke=>Ke!=="operate");((be=F.value)==null?void 0:be.some(Ke=>{var je;return((je=Ke==null?void 0:Ke.children)==null?void 0:je.length)>0}))&&(T=Nn((De=F.value)==null?void 0:De.filter(Ke=>(Ke==null?void 0:Ke.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(T==null?void 0:T.length)?p:p.slice(0,T==null?void 0:T.length),!(P==null?void 0:P.every(Ke=>T==null?void 0:T.find(je=>Ke===je))))return qa.ElMessage.error("导入的数据表头不匹配");vn(P,v)},qo=(p,v)=>{var P;const T=p==null?void 0:p.filter(D=>D!=="序号"),z=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});da.setRefreshCurStructure(!1),((P=F.value)==null?void 0:P.length)===0||Uo(T,z)},Wo=(p,v,T,z)=>{const P=[],D=[],re=be=>Object.keys(be).length;for(const be in p)if(p[be]!==void 0){const De=p[be],Ke=[];for(const[je,ea]of Object.entries(De))Ke.push(ea),D.length<re(De)&&D.push(je);P.push(Ke)}P.unshift(D);const le=oe.utils.aoa_to_sheet(P),q=oe.utils.book_new();oe.utils.book_append_sheet(q,le,z),oe.writeFileSync(q,`${v}.xlsx`),Hl.value=[]},Ii=async(p,v,T,z=!1,P)=>{try{da.setRefreshCurStructure(!1)}catch(D){qa.ElMessage.error(D)}},eo=async(p,v)=>{await Ii()},ln=async(p,v)=>{await Ii("columnType",v,p,!1)},Ko=async({newRow:p,targetIndex:v})=>{var P;if(!_a(u.config,{type:Ve.TABLE}))return;const z=(me.currentPage-1)*me.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=ri(z,ze.value||[]))}catch{}ze.value.splice(z,0,p),await e.nextTick(),h.value.has(p.id)||h.value.set(p.id,A.cloneDeep(p)),ze.value=(P=ze.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),s.value.add(p.id),Rl.value=!0},Go=(p,v,T,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const le=new Set([...(Array.isArray(T)?T:[]).filter(De=>(De==null?void 0:De.id)!==(p==null?void 0:p.id)).map(De=>De==null?void 0:De[D]).filter(De=>De!=null).map(De=>String(De)),...(Array.isArray(z)?z:[]).map(De=>De==null?void 0:De[D]).filter(De=>De!=null).map(De=>String(De))]);if(!le.has(re))return;let q=1,be="";for(;be=`${re}(${q})`,!!le.has(be);)q++;p[D]=be}),p),Oi=async()=>{var P,D,re,le,q,be,De,Ke;const p=Array.from(s.value||[]);if(p.length===0)return;const v=(D=oe.getColumnChild((P=A.cloneDeep(F.value))==null?void 0:P.filter(je=>(je==null?void 0:je.label)!=="操作")))==null?void 0:D.filter(je=>(je==null?void 0:je.required)===!0);if((v==null?void 0:v.length)>0)for(let je=0;je<p.length;je++){const ea=p[je],ka=(re=ze.value)==null?void 0:re.find(Na=>(Na==null?void 0:Na.id)===ea);if(ka)for(let Na=0;Na<v.length;Na++){const Ra=v[Na],la=Ra==null?void 0:Ra.prop,el=(Ra==null?void 0:Ra.label)??la,xa=ka==null?void 0:ka[la];if(xa===""||xa===null||xa===void 0||Array.isArray(xa)&&xa.length===0){qa.ElMessage.error(`${el}不能为空`);let ve={};ve.id=ka==null?void 0:ka.id;const Pa={fixContent:[ve],buttonName:"修改",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};Ae("change",Pa);return}}}const T=[],z=[];if(p.forEach(je=>{var el;const ea=(el=ze.value)==null?void 0:el.find(xa=>(xa==null?void 0:xa.id)===je);if(!ea)return;if(ea!=null&&ea._isTemp){const al=(oe.getAllLeafNodes(F.value)||[]).filter(B=>(B==null?void 0:B.mainKey)===!0||(B==null?void 0:B.isMainKey)===!0),ve=ze.value.findIndex(B=>(B==null?void 0:B.id)===je),Pa=ve>=0?ve+1:ze.value.length+1;Go(ea,al,ze.value,T);const ga={id:Pa.toString()};(ea==null?void 0:ea.sort)!==void 0&&(ea==null?void 0:ea.sort)!==null&&String(ea.sort).trim()!==""?ga.sort=String(ea.sort):ga.sort=ri(ve>=0?ve:ze.value.length-1,ze.value||[]),(oe.getAllLeafNodes(F.value)||[]).filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate").forEach(B=>{const G=B==null?void 0:B.prop;if(G){const Re=ea[G];Re!==void 0?ga[G]=Re??"":ga[G]=""}}),T.push(ga);return}const Na=(oe.getAllLeafNodes(F.value)||[]).filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),Ra=new Set(Na.map(xa=>xa==null?void 0:xa.prop).filter(Boolean)),la={};for(const xa of Ra)Object.prototype.hasOwnProperty.call(ea,xa)&&(la[xa]=ea[xa]);z.push({id:ea.id,value:{tableData:la}})}),da.setTableLoading(u==null?void 0:u.index),z.length>0){const je=z.map(ka=>{const Na={id:ka.id,...ka.value.tableData};return delete Na._isOCRRow,delete Na._ocrTableId,delete Na._isTemp,delete Na.tableEditType,delete Na.index,Na}),ea=[{tableName:((le=u==null?void 0:u.related)==null?void 0:le.find(ka=>ka==null?void 0:ka.includes("content")))??"content_"+(u==null?void 0:u.index),tableContents:je}];try{await A.pageBatchUpdateApi({platId:parseInt((q=vl.value)==null?void 0:q.plat_id),changeContents:ea})}catch(ka){qa.ElMessage.error(((De=(be=ka==null?void 0:ka.response)==null?void 0:be.data)==null?void 0:De.message)||(ka==null?void 0:ka.message)||"保存失败"),da.setTableLoading(!1);return}}if(T.length>0){const je={fixContent:T,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};Ae("change",je)}qa.ElMessage.success("保存成功"),s.value.clear(),h.value.clear(),ze.value=(Ke=ze.value)==null?void 0:Ke.map(je=>({...je,tableEditType:"text"})),Rl.value=!1,da.setRefreshCurStructure(!0)},Yo=()=>{var v;const p=Array.from(s.value||[]);if(p.length===0){Rl.value=!1;return}p.forEach(T=>{var D,re;const z=h.value.get(T),P=(D=ze.value)==null?void 0:D.find(le=>(le==null?void 0:le.id)===T);if(P!=null&&P._isTemp){ze.value=ze.value.filter(le=>(le==null?void 0:le.id)!==P.id);return}if(z){const le=(re=ze.value)==null?void 0:re.findIndex(q=>(q==null?void 0:q.id)===T);le!==-1&&(ze.value[le]={...ze.value[le],...z})}}),s.value.clear(),h.value.clear(),ze.value=(v=ze.value)==null?void 0:v.map(T=>({...T,tableEditType:"text"})),Rl.value=!1},Li=e.ref(!1),ao=async p=>{var P,D,re,le;if(!Rl.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(le=p.preventDefault)==null||le.call(p),await e.nextTick(),await lo())},lo=async()=>{if(H.value){Rl.value=!1;return}if(!Li.value){Li.value=!0;try{Array.from(s.value||[]).length>0?await Oi():Rl.value=!1}finally{Promise.resolve().then(()=>{Li.value=!1})}}},Jo=p=>{Hl.value=p},ro=(p,v)=>{mr.value===v?ar.value=!1:ar.value=!0,mr.value=v==null?void 0:v.changeProp},hi=p=>{if(!p)return;const{item:v,value:T}=p,z=ke.value.find(P=>P.prop==v.prop);z&&z.contents.push({label:T,value:T})},gn=e.computed(()=>{var T,z,P;const p=(T=F.value)==null?void 0:T.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(z=F.value)==null?void 0:z.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Qn=async(p,v,T)=>{const z=A.cloneDeep(F.value);await e.nextTick();const P=z==null?void 0:z.map(re=>(T==null?void 0:T.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Ri(P);await bs(u.index,D),F.value=P,ne.value=D},Ri=p=>{var P;const v=p||[];return((P=oe.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return c0(re,D)})},no=async p=>{let v=await d0(u.index);v||(v=Ri(p)),ne.value=v},io=async(p,v)=>{const T=A.cloneDeep(F.value),z=re=>Array.isArray(re)?re.map(le=>{const q=Array.isArray(le==null?void 0:le.children)&&le.children.length>0,be={...le};return(be==null?void 0:be.prop)==="operate"||(be==null?void 0:be.label)==="操作"||(be==null?void 0:be.type)==="operate"?(be.sortable=!1,be.filterable=!1,be.operable=!1):be.sortable=q?!1:!!p,q&&(be.children=z(be.children)),be}):re,P=z(T),D=Ri(P);await bs(u.index,D),F.value=P,ne.value=D,await e.nextTick(),Vr.value=Vr.value+1},oo=()=>{Y.value=!1},ei=p=>{Ae("clickTrigger",p)},to=async p=>{var D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa;const v=p==null?void 0:p.row,T=p==null?void 0:p.rowData,z=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(te(v)){const ve={files:[Pe(v)],data:{}};Me(ve);return}Ue.value=[{url:v,extension:Ce(v)}],fe.value=!0,N.value={data:A.cloneDeep(T)},$e.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(le=v==null?void 0:v.toString())!=null&&le.includes(".STL")||(q=v==null?void 0:v.toString())!=null&&q.includes(".obj")||(be=v==null?void 0:v.toString())!=null&&be.includes(".mtl")){const al=(De=v==null?void 0:v.toString())==null?void 0:De.split(","),ve=ra(al),Pa=ve==null?void 0:ve[0];if(te(Pa==null?void 0:Pa.extension)){Me({files:ve,data:{}});return}Ue.value=ve,fe.value=!1,$e.value=!0;return}if((Ke=v==null?void 0:v.toString())!=null&&Ke.includes(".stl")||(je=v==null?void 0:v.toString())!=null&&je.includes(".STL")||(ea=v==null?void 0:v.toString())!=null&&ea.includes(".obj")||(ka=v==null?void 0:v.toString())!=null&&ka.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let al,ve=[],Pa={};if(Array.isArray(v)?al=v:al=v==null?void 0:v.split(","),al==null||al.forEach(ga=>{ga.includes(".mtl")?ve.push(ga):Pa.blob=Pa.blob?Pa.blob+","+ga:ga}),(ve==null?void 0:ve.length)>0&&(Pa.mtlBlobs=ve),z&&(Pa.suffix=z),(Ra=(Na=Object.values(Pa))==null?void 0:Na[0])!=null&&Ra.includes("http:"))P.push(Pa);else{const ga=new Blob([Pa.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ga),Sa="";(la=v==null?void 0:v.split("/"))==null||la.forEach((B,G)=>{var Re;G===((Re=v==null?void 0:v.split("/"))==null?void 0:Re.length)-1&&(Sa=B)}),(el=Pa.blob)!=null&&el.includes(".stl")&&(Sa=(Sa==null?void 0:Sa.replaceAll(">",""))+".urdf"),pa.value=[{name:Sa,blobUrl:Ea}],ee.value=!0}}else{const al=await qa.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ve=new Blob([al.data],{type:"application/octet-stream;charset=UTF-8"});let Pa=URL.createObjectURL(ve),ga="";if((xa=v==null?void 0:v.split("/"))==null||xa.forEach((Ea,Sa)=>{var B;Sa===((B=v==null?void 0:v.split("/"))==null?void 0:B.length)-1&&(ga=Ea)}),te(ga)){const Ea=U(ga),Sa=Pe(v);Me({files:[Sa],data:{trackFileType:Ea}});return}pa.value=[{name:ga,blobUrl:Pa}],ee.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},ai=p=>{var z,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(z=p==null?void 0:p.url)==null?void 0:z.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},so=p=>{if(!p)return"未知文件";try{const z=ai(p);if(typeof z=="string"&&z.includes("."))return z}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",T=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${T}`},co=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const T=Number(v[1]),z=Number(v[2]);return!Number.isFinite(T)||!Number.isFinite(z)?p:String(T*1e3+z)},li=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const T=Number(v);return Number.isFinite(T)?T:null},Xo=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const T=v.includes("T")?v:v.replace(" ","T"),z=Date.parse(T);return Number.isFinite(z)?z:null},vi=(p,v=[])=>{const T=Array.isArray(p)?p.slice():[];if(T.length<=1)return T;const z=new Map((v||[]).map((re,le)=>[String(re),le])),P=T.some(re=>li(re==null?void 0:re.sort)!==null),D=T.map((re,le)=>({r:re,idx:le,id:String((re==null?void 0:re.id)??""),sortVal:li(re==null?void 0:re.sort),createTimeMs:Xo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,le)=>{if(P){const De=re.sortVal,Ke=le.sortVal;if(De===null&&Ke!==null)return 1;if(De!==null&&Ke===null)return-1;if(De!==null&&Ke!==null&&De!==Ke)return De-Ke}const q=re.createTimeMs,be=le.createTimeMs;return q!==null&&be!==null&&q!==be?be-q:q!==null&&be===null?-1:q===null&&be!==null?1:re.prevIdx!==le.prevIdx?re.prevIdx-le.prevIdx:re.idx-le.idx}),D.map(re=>re.r)},ri=(p,v=[])=>{const T=v==null?void 0:v[p-1],z=v==null?void 0:v[p],P=li(T==null?void 0:T.sort),D=li(z==null?void 0:z.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const le=Number(re.toFixed(6));return String(Number.isFinite(le)?le:re)},mi=async p=>{let v=null,T=null;if(p!=null&&p.id){const P=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),T=so(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await yi(),D=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await qa.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),T=p==null?void 0:p.name}else{const P=await A.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),T=ai(p)):v=p==null?void 0:p.url}if(te(v)){const P={row:`${v}`,suffix:Ce(T)};to(P);return}const z={name:T,blobUrl:v};pa.value=[z],ee.value=!0},Zo=async p=>{let v=null,T=null;if(p!=null&&p.id){const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),T=so(p)}else if(p!=null&&p.downloadUrl){const D=await yi(),re=await qa.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),T=p==null?void 0:p.name}else{const D=await A.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),T=ai(p)}const z={name:T,blobUrl:v},P=document.createElement("a");P.href=z.blobUrl,P.download=z.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},$i=(p,v)=>{var z;if(Object.values(v).length===0)return;let T=p;return Object.values(v).find(P=>{var D,re,le;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((le=P==null?void 0:P.toString())==null?void 0:le.includes(".obj"))})?T=[...p,pe.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(T=[...p,{label:"迁移"}]),T},Qo=()=>{I.value=!0},et=e.ref([]),uo=async(p,v,T=!1)=>{var re,le,q,be;if(!p)return;if(T){ze.value=[...La.value.values()].filter(De=>Object.values(De).some(Ke=>typeof Ke=="string"?Ke==null?void 0:Ke.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let De in p)(p==null?void 0:p[De])!==""&&(z[De]=p==null?void 0:p[De]);if(JSON.stringify(z)==="{}"){ze.value=Array.from(((re=La.value)==null?void 0:re.values())??[]);return}let P=(le=u==null?void 0:u.related)==null?void 0:le.find(De=>De==null?void 0:De.includes("content_")),D=await A.getFillFind({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),tableName:P,params:z});D=(be=D==null?void 0:D.data)==null?void 0:be.result,ze.value=D,da.setTableLoading(!1)},ni=e.computed(()=>{var v,T;return((T=(v=u==null?void 0:u.itemData)==null?void 0:v.find(z=>(z==null?void 0:z.key)==="isEdit"))==null?void 0:T.contents)??!0}),An=async p=>{var z,P,D,re;if(!_a(u.config,{type:Ve.TABLE})||!(((P=(z=u==null?void 0:u.itemData)==null?void 0:z.find(le=>(le==null?void 0:le.key)==="isEdit"))==null?void 0:P.contents)??!0)||!p)return;((D=Array.from(s.value))==null?void 0:D.length)>0&&await Oi();const T=p==null?void 0:p.id;T!=null&&(s.value.clear(),h.value.clear(),h.value.has(T)||h.value.set(T,A.cloneDeep(p)),ze.value=(re=ze.value)==null?void 0:re.map(le=>({...le,tableEditType:(le==null?void 0:le.id)===T?"edit":"text"})),s.value.add(T),Rl.value=!0)},Vi=async(p,v,T,z)=>{z!=null&&z.isExistChild&&Ae("clickMainKey",p,T,F.value)},Pi=()=>{ee.value=!1},at=p=>{Ae("rowClick",p)};e.watch(()=>u.changedContent,()=>{var T,z;if(!u.changedContent)return;let p=(T=ze.value)==null?void 0:T.map(P=>{var D;return P.id===((D=u.changedContent)==null?void 0:D.id)&&(P={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete P.newId),P});const v=(z=u.itemData)==null?void 0:z.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));ze.value=p,Ae("contentChange",{contents:v,index:u.index}),Ae("change",{content:p,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const lt=()=>{},rt=async()=>{const p=Se.value,v=sessionStorage.getItem("systemKey"),T=await oe.getItemData(p,v,""),z=(T==null?void 0:T.find(le=>(le==null?void 0:le.name)==="方法明细"))||(T==null?void 0:T[0]),P=(z==null?void 0:z.compData)||[],D=P==null?void 0:P.find(le=>{const q=le==null?void 0:le.key;return q==="formContent"||q==="tableContents"});return D==null?void 0:D.contents},yi=async()=>{const v=qa.Local.get("access-token");return v?`Bearer ${v}`:""},nt=async(p,{token:v,inputData:T}={})=>await qa.axios.post(p,T,{headers:{Authorization:v}}).catch(P=>(ue.setImportLoading(!1),Promise.reject(P))),it=p=>{var z;let v={};const T=[];return v.form={},(z=A.cloneDeep(p))==null||z.forEach((P,D)=>{var re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa;if((P==null?void 0:P.comp)==="Table"){(le=(re=P==null?void 0:P.compData)==null?void 0:re.find(ga=>(ga==null?void 0:ga.key)==="header"))==null||le.contents;let al=(De=(be=(q=P==null?void 0:P.compData)==null?void 0:q.find(ga=>(ga==null?void 0:ga.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:De.map(ga=>ga.slice(1));(Na=(ka=(ea=(je=(Ke=P==null?void 0:P.compData)==null?void 0:Ke.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:je.contents)==null?void 0:ea[0])==null?void 0:ka[0])==null||Na.label;let ve=(la=(Ra=P==null?void 0:P.compData)==null?void 0:Ra.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:la.contents,Pa=[];al==null||al.forEach(ga=>{let Ea=[];ga==null||ga.forEach((Sa,B)=>{var Re;let G={};((Re=ve[B])==null?void 0:Re.label)!=="操作"&&(G[ve[B].label]=Sa,Ea.push(G))}),Pa.push(Ea)}),v[P.name]=Pa}else{const al=(xa=(el=P.compData)==null?void 0:el.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:xa.contents;al==null||al.forEach(ve=>{var Pa,ga;if(ve.prop!==""){let Ea=ve==null?void 0:ve.value;Array.isArray(Ea)?Ea=((Pa=Ea==null?void 0:Ea[0])==null?void 0:Pa.oldUrl)||"http://222.92.178.198:62001/"+((ga=Ea==null?void 0:Ea[0])==null?void 0:ga.url):Ea=Ea.toString(),ve={key:(ve==null?void 0:ve.prop)??(ve==null?void 0:ve.label),value:Ea},T.push(ve)}})}}),v.form=oe.getFormContents(T),v},ot=p=>{const v=[],T=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(T):v.push(z)};return T(p),v},tt=async(p,v,T)=>{var ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl;ue.setImportLoading(!0),da.setFreshContent(!1);let z=await rt().catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua)));z=z==null?void 0:z.filter(Ua=>{var bl;return((bl=Ua==null?void 0:Ua.find(Ha=>Ha==null?void 0:Ha.id))==null?void 0:bl.id)===(v==null?void 0:v.id)});let P=oe.getEqualChild([(ve=F.value)==null?void 0:ve.filter(Ua=>(Ua==null?void 0:Ua.label)!=="操作")]);const D=(ga=(Pa=oe.tableToForm(z,P))==null?void 0:Pa[0])==null?void 0:ga.find(Ua=>{const bl=Ua==null?void 0:Ua.key;return bl==="Interface"||bl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),ue.setImportLoading(!1);return}const le=F.value?oe.getEqualChild([F.value]):[],q=le.find(Ua=>{const bl=Ua==null?void 0:Ua.prop;return bl==="Input1"||bl==="输入数据.输入1"||bl==="样本输入数据"}),be=q==null?void 0:q.prop;let De=v==null?void 0:v[be];const Ke=await yi().catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua)));let je=!0,ea="";(Ea=F.value)==null||Ea.forEach(Ua=>{(Ua==null?void 0:Ua.prop)===be&&(je=!!(Ua!=null&&Ua.childPath),ea=Ua==null?void 0:Ua.childPath)});let ka="";if(je){let Ua=(B=(Sa=F.value)==null?void 0:Sa.find(pl=>(pl==null?void 0:pl.isMainKey)===!0))==null?void 0:B.prop;ka=v==null?void 0:v[Ua];let bl=ea==null?void 0:ea.split(S),Ha=[];bl==null||bl.forEach((pl,Dl)=>{(bl==null?void 0:bl.length)-1===Dl&&Ha.push(ka),Ha.push(pl)}),Ha=Ha==null?void 0:Ha[0];let dl=await oe.getItemData(Ha,sessionStorage.getItem("systemKey"),""),Ga=dl==null?void 0:dl.filter(pl=>(pl==null?void 0:pl.name)===be);Ga=Ga==null?void 0:Ga.map(pl=>{var Dl;return pl.compData=(Dl=pl==null?void 0:pl.compData)==null?void 0:Dl.map(Nl=>{var Tr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(Tr=Nl==null?void 0:Nl.contents)==null?void 0:Tr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[be]))),Nl}),pl}),(!Ga||(Ga==null?void 0:Ga.length)===0)&&(Ga=dl,Ga=Ga==null?void 0:Ga.map(pl=>{var Dl;return pl.compData=(Dl=pl==null?void 0:pl.compData)==null?void 0:Dl.map(Nl=>{var Tr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(Tr=Nl==null?void 0:Nl.contents)==null?void 0:Tr.filter($l=>{var xl,Il;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Il=(xl=F==null?void 0:F.value)==null?void 0:xl[0])==null?void 0:Il.prop])})),Nl}),pl})),De=it(Ga)}const Na=await nt(re,{token:Ke,inputData:De}).catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua))),Ra=(G=Na==null?void 0:Na.data)==null?void 0:G.data,la=le.find(Ua=>(Ua==null?void 0:Ua.prop)==="Output1"),el=la==null?void 0:la.prop;let xa=[],al=[];if(Ra&&((Re=Object.values(Ra))==null?void 0:Re.length)>0){let Ua=[];const bl=new FormData,Ha=(ta=ot(Ra))==null?void 0:ta.map(async Ga=>{var pl,Dl;if(!Array.isArray(Ga)&&(Ga!=null&&Ga.includes("http"))){let Nl=await qa.axios.get(Ga,{responseType:"blob"}),Tr=(Dl=Ga==null?void 0:Ga.split("/"))==null?void 0:Dl[((pl=Ga==null?void 0:Ga.split("/"))==null?void 0:pl.length)-1];bl.append("files",Nl.data,Tr)}else Ua.push(Ga)});if(await Promise.all(Ha),!oe.isFormDataEmpty(bl)){let Ga=await A.uploadAmountApi(bl),pl=(fa=(we=Ga==null?void 0:Ga.data)==null?void 0:we.result)==null?void 0:fa.map(Dl=>{var Nl,Tr,$l,xl,Il,Xl;return{name:(Xl=(Il=(xl=(Nl=Dl==null?void 0:Dl.url)==null?void 0:Nl.split("/"))==null?void 0:xl[(($l=(Tr=Dl==null?void 0:Dl.url)==null?void 0:Tr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Il.split("."))==null?void 0:Xl[0],url:Dl==null?void 0:Dl.url}});Ua=[...Ua,...pl]}let dl={};for(let Ga in v)Ga!=="id"&&(dl[Ga]=v[Ga]);dl[el]=Ua,al.push({id:v==null?void 0:v.id,value:{tableData:dl}})}if((al==null?void 0:al.length)>0){const Ua=al.map(Ha=>{const dl={id:Ha.id,...Ha.value.tableData};return delete dl._isOCRRow,delete dl._ocrTableId,delete dl._isTemp,delete dl.tableEditType,delete dl.index,dl}),bl=[{tableName:(Ba=u==null?void 0:u.related)==null?void 0:Ba.find(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:Ua}];await A.pageBatchUpdateApi({platId:parseInt((ol=vl.value)==null?void 0:ol.plat_id),changeContents:bl})}if((xa==null?void 0:xa.length)>0)try{await A.pageBatchAddApi({platId:parseInt((Wa=vl.value)==null?void 0:Wa.plat_id),changeContents:[{tableName:(fl=u==null?void 0:u.related)==null?void 0:fl.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:xa.map(Ua=>{var Ha,dl,Ga;const bl={id:((Ha=Ua==null?void 0:Ua.key)==null?void 0:Ha.id)??((dl=Ua==null?void 0:Ua.key)==null?void 0:dl.rowId)??(Ua==null?void 0:Ua.id),...((Ga=Ua==null?void 0:Ua.value)==null?void 0:Ga.tableData)||{}};return delete bl._isOCRRow,delete bl._ocrTableId,delete bl._isTemp,delete bl.tableEditType,delete bl.index,Object.keys(bl).forEach(pl=>{pl==="证书附件"&&Array.isArray(bl[pl])&&(bl[pl]=JSON.stringify(bl[pl]))}),bl})}]})}catch(Ua){qa.ElMessage.error(((Fl=(hl=Ua==null?void 0:Ua.response)==null?void 0:hl.data)==null?void 0:Fl.message)||(Ua==null?void 0:Ua.message)||"保存失败"),da.setTableLoading(!1);return}Hi(!0),ue.setImportLoading(!1),da.setFreshContent(!0)},po=(p,v)=>(p=p==null?void 0:p.map(T=>{var z,P;return T!=null&&T.children&&((z=T.children)!=null&&z.find(D=>D.id===(v==null?void 0:v.id))?T.children=(P=T.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):T.children=po(T.children,v)),T}),p),gi=e.ref(!1),t=()=>{gi.value=!0},i=async p=>{var T,z,P,D;gi.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const le={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};Ia.value.push(le),or(le,"uploading"),Ol(le,0);try{const q=new FormData;q.append("file",re,le.name);const be=await A.platformUploadFile(q);le.uploadResult=((T=be==null?void 0:be.data)==null?void 0:T.result)||{name:le.name,url:"",fileName:le.name},El({name:((z=le.uploadResult)==null?void 0:z.name)||le.name,url:((P=le.uploadResult)==null?void 0:P.url)||"",id:(D=le.uploadResult)==null?void 0:D.id}),or(le,"uploaded"),Ol(le,100)}catch(q){console.error("文件上传失败:",q),qa.ElMessage.error(`文件 ${le.name} 上传失败,请重试`),or(le,"pending"),Ol(le,0);const be=Ia.value.findIndex(De=>De.uid===le.uid);be>-1&&Ia.value.splice(be,1)}}},f=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(p,v,T)=>{v===(u==null?void 0:u.index)?T(new Error("选择源不能和目标源一致")):T()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),y=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],buttonValue:[{label:"跳过",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),_=()=>{y.show=!1},O=async p=>{var v,T,z,P,D,re,le,q;try{const be=[];let De=(v=ze.value||[])==null?void 0:v.slice();(p||[]).forEach(Na=>{const Ra={...Na};try{Ra.sort=ri(0,De)}catch{}be.push(Ra),De.unshift(Ra)});let Ke=await A.quoteApi({platId:parseInt((T=vl==null?void 0:vl.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:Se.value,groups:""},{menus:Se.value,groups:u==null?void 0:u.compName}]});Ke=(z=Ke==null?void 0:Ke.data)==null?void 0:z.result;let je=Ke==null?void 0:Ke.map(Na=>({tableName:"content_"+(Na==null?void 0:Na.id),tableContents:be==null?void 0:be.map((Ra,la)=>({id:la,...Ra}))})),ea=[{tableName:(P=u==null?void 0:u.related)==null?void 0:P.find(Na=>Na==null?void 0:Na.includes("content")),tableContents:be==null?void 0:be.map((Na,Ra)=>({id:Ra,...Na}))}];ea=[...ea,...je];const ka=await A.pageBatchAddApi({platId:parseInt((D=vl.value)==null?void 0:D.plat_id),changeContents:ea});if(((re=ka==null?void 0:ka.data)==null?void 0:re.code)===200){const Na={buttonName:"新增",columns:F.value,fixContent:be==null?void 0:be.map((la,el)=>({id:el,...la})),relatedContents:u==null?void 0:u.related};await Dt(Na),qa.ElMessage.success("数据导入成功");let Ra=[];ea==null||ea.forEach(la=>{var el;(el=la==null?void 0:la.tableContents)==null||el.forEach(xa=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(xa),request_result:"{}",is_delete:!1,request_table:la==null?void 0:la.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((le=vl==null?void 0:vl.value)==null?void 0:le.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}else{let Na=[];ea==null||ea.forEach(Ra=>{var la;(la=Ra==null?void 0:Ra.tableContents)==null||la.forEach(el=>{Na.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(el),request_result:"{}",is_delete:!1,request_table:Ra==null?void 0:Ra.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),changeContents:[{tableName:"log",tableContents:Na}]}),qa.ElMessage.error("数据导入响应失败")}}catch(be){throw new Error(be)}},K=async p=>{var v,T,z,P,D,re,le,q,be,De;try{if(p==="cancel"&&(y.show=!1),p==="replace"&&((v=y==null?void 0:y.existRows)==null?void 0:v.length)>0){await A.pageBatchDeleteApi({platId:parseInt((T=vl.value)==null?void 0:T.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(je=>je==null?void 0:je.includes("content_")))||((P=u==null?void 0:u.related)==null?void 0:P.find(je=>je==null?void 0:je.includes("content"))),tableContents:y==null?void 0:y.existRows}]});const Ke=await A.pageBatchAddApi({platId:parseInt((D=vl.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=u==null?void 0:u.related)==null?void 0:re.find(je=>je==null?void 0:je.includes("content")),tableContents:(()=>{const je=(ze.value||[]).filter(Ra=>!((y==null?void 0:y.existRows)||[]).some(la=>String(la==null?void 0:la.id)===String(Ra==null?void 0:Ra.id))),ea=(y==null?void 0:y.tableData)||[],ka=[];let Na=je.slice();return ea.forEach(Ra=>{const la={...Ra};try{la.sort=ri(0,Na)}catch{}ka.push(la),Na.unshift(la)}),ka.map((Ra,la)=>({id:la,...Ra}))})()}]});if(((le=Ke==null?void 0:Ke.data)==null?void 0:le.code)!==200)return;(q=y.newRows)!=null&&q.length&&await O(y.newRows),await Dt({buttonName:"新增",columns:F.value,fixContent:(be=y==null?void 0:y.tableData)==null?void 0:be.map((je,ea)=>({id:ea,...je})),relatedContents:u==null?void 0:u.related}),(De=y.newRows)!=null&&De.length||qa.ElMessage.success("数据导入成功")}}catch(Ke){throw new Error(Ke)}finally{y.show=!1,y.columns=[],y.tableData=[],y.existRows=[]}},Q=()=>{f.show=!1},ge=p=>{var v,T;if((p==null?void 0:p.buttonName)==="取消")return f.show=!1;f.to=p==null?void 0:p.content,!(!(u!=null&&u.index)||!((v=f.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((T=f.to)==null?void 0:T.groupName)&&(Ae("change",{buttonName:"迁移",value:{from:f.from,to:f.to,data:f.selectRow}}),f.show=!1)},Fe=async p=>{var v,T,z,P;if(p){if(!$r.validateFileSize(p.raw)){qa.ElMessage.warning(`文件大小不能超过 ${jr.value.maxSize}MB`);const D=Ia.value.findIndex(re=>re.uid===p.uid);D>-1&&Ia.value.splice(D,1),Ee();return}if(!$r.validateFileType(p.raw)){qa.ElMessage.warning("请上传图片文件");const D=Ia.value.findIndex(re=>re.uid===p.uid);D>-1&&Ia.value.splice(D,1),Ee();return}or(p,"uploading"),Ol(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await A.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},El({name:((T=p.uploadResult)==null?void 0:T.name)||p.name,url:((z=p.uploadResult)==null?void 0:z.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),or(p,"uploaded"),Ol(p,100)}catch(D){console.error("文件上传失败:",D),qa.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),or(p,"pending"),Ol(p,0);const re=Ia.value.findIndex(le=>le.uid===p.uid);re>-1&&Ia.value.splice(re,1)}finally{Ee()}}},Ee=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},na=async()=>{var T,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Ia.value.length===0){qa.ElMessage.warning("请先选择要上传的图片");return}if(Ia.value.filter(P=>{const D=Bl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ll.value=!0,Xe.value=0;let v=null;try{Ia.value.forEach(la=>{or(la,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{Xe.value<P?Xe.value+=1:clearInterval(v)},50);const D=Ia.value.map(la=>{var el,xa,al;return{name:((el=la.uploadResult)==null?void 0:el.name)||la.name,url:((xa=la.uploadResult)==null?void 0:xa.url)||"",fileName:((al=la.uploadResult)==null?void 0:al.fileName)||la.name}}),re=$r.extractTableHeaders(F.value),le=D.map(la=>({name:(la==null?void 0:la.fileName)||(la==null?void 0:la.name),url:(la==null?void 0:la.url)||""})),q=await $r.recognize(le,re);if(console.log(q,"ocrResult"),clearInterval(v),v=null,(q==null?void 0:q.code)===500||(q==null?void 0:q.type)==="error"||!(q!=null&&q.result)){Xe.value=0,Ia.value.forEach(la=>{or(la,"failed"),Ol(la,0)}),qa.ElMessage.error((q==null?void 0:q.message)||"OCR识别失败,请重试"),ll.value=!1;return}Xe.value=P;const be=Array.isArray(q==null?void 0:q.result)?q.result:[];if(be.length===0){Xe.value=0,Ia.value.forEach(la=>{or(la,"failed"),Ol(la,0)}),qa.ElMessage.warning("OCR识别未返回有效数据"),ll.value=!1;return}const De=new Set,Ke=[];be.forEach((la,el)=>{const xa=la!=null&&la.数据&&typeof(la==null?void 0:la.数据)=="object"?la.数据:{},al=Array.isArray(la==null?void 0:la.图片信息)?la.图片信息:[],ve=new Map;al.forEach(ga=>{ga!=null&&ga.name&&ve.set(ga.name,ga.url||"")});const Pa={_index:el,_certType:(la==null?void 0:la.证书类型)||"",_certNo:(la==null?void 0:la.证书编号)||"",_ocrImages:al,__ocrFieldMeta:{}};Object.entries(xa).forEach(([ga,Ea])=>{let Sa="",B=0,G=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(Sa=(Ea==null?void 0:Ea.value)??"",B=(Ea==null?void 0:Ea.score)??0,G=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(Sa=Ea[0]??"",B=Ea[1]??0):(Sa=Ea??"",B=0),Pa[ga]=Sa,Pa[`${ga}_accuracy`]=B,De.add(ga),Pa.__ocrFieldMeta[ga]={value:Sa,score:B,bboxNorm:G,imageName:Re,imageUrl:Re&&ve.get(Re)||"",images:al}}),Ke.push(Pa)});const je=[],ea=new Set;Ke.forEach(la=>{la&&De.forEach(el=>{const xa=la[`${el}_accuracy`];(typeof xa=="number"?xa>0:xa!=null&&String(xa).trim()!==""&&String(xa)!=="0")&&ea.add(el)})}),De.forEach(la=>{je.push({prop:la,label:la,editable:!0,minWidth:230}),ea.has(la)&&je.push({prop:`${la}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Ia.value.forEach(la=>{or(la,"completed")}),Xe.value=100,wa.value=je,Ze.value=Ke,He.value=D,va.value=q;const ka=["出厂编号","设备名称","制造厂"],Na=je.filter(la=>la&&!la.isAccuracy&&typeof la.prop=="string").map(la=>la.prop),Ra=["出厂编号","设备名称","制造厂"];ca.value=Na.filter(la=>Ra.includes(la)),console.log("[OCR] 默认勾选字段 props:",ca.value),Oa.value=2,ll.value=!1,Aa.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),qa.ElMessage.error(((z=(T=P==null?void 0:P.response)==null?void 0:T.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ll.value=!1,Xe.value=0,Ia.value.forEach(D=>{or(D,"pending"),Ol(D,0)})}},Da=p=>{if(p==null)return"";let v=String(p);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,T=>String.fromCharCode(T.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Qa=()=>{var la,el;const p=He.value,v=va.value,T=Ze.value;if(!T||T.length===0){qa.ElMessage.warning("暂无数据可添加");return}const z=(la=oe.getAllLeafNodes(F.value)||[])==null?void 0:la.filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),P=new Map,D=new Map,re=(el=z==null?void 0:z.find(xa=>(xa==null?void 0:xa.label)==="证书附件"))==null?void 0:el.prop;z==null||z.forEach(xa=>{xa!=null&&xa.label&&(xa!=null&&xa.prop)&&(P.set(xa.label,xa.prop),D.set(xa.prop,xa.label))});const le=Date.now(),q=xa=>String(le*1e3+xa),be=[],De=[],Ke=xa=>{const al=zo&&zo[xa]||[xa];for(const ve of al){const Pa=P.get(ve);if(Pa)return Pa}return""},je=Ke("出厂编号"),ea=Ke("设备名称"),ka=Ke("制造厂"),Na=[],Ra=xa=>{var Sa,B;if(!re)return[];const al=(Array.isArray(p)?p[xa]:null)||null,ve=(al==null?void 0:al.url)||"",Pa=(al==null?void 0:al.fileName)||(al==null?void 0:al.name)||"";return(String(Pa).toLowerCase().endsWith(".pdf")||String(ve).toLowerCase().endsWith(".pdf"))&&ve?[{url:ve,name:Pa,fileName:Pa}]:(Array.isArray((B=(Sa=v==null?void 0:v.result)==null?void 0:Sa[xa])==null?void 0:B.图片信息)?v.result[xa].图片信息:[]).map(G=>({url:(G==null?void 0:G.url)||"",name:(G==null?void 0:G.name)||"",fileName:(G==null?void 0:G.name)||""})).filter(G=>G.url)};if(T.forEach((xa,al)=>{var ol;const ve={id:q(al),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Wa,fl]of P.entries())Object.prototype.hasOwnProperty.call(xa,Wa)&&(ve[fl]=xa[Wa]);re&&(ve[re]=Ra(al));const Pa=(Array.isArray(v==null?void 0:v.result)?v.result[al]:null)||null,ga=(Array.isArray(p)?p[al]:null)||null,Ea=(ga==null?void 0:ga.url)||"",Sa=(ga==null?void 0:ga.fileName)||(ga==null?void 0:ga.name)||"",B=String(Sa).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),G={ts:Date.now(),versionId:String(Date.now())+"_"+String(al),label:new Date().toLocaleString(),certType:(Pa==null?void 0:Pa.证书类型)||"",certNo:(Pa==null?void 0:Pa.证书编号)||"",fileType:B?"pdf":"image",sourceUrl:B?Ea:"",images:Array.isArray(Pa==null?void 0:Pa.图片信息)?Pa.图片信息.map(Wa=>({name:(Wa==null?void 0:Wa.name)||"",url:(Wa==null?void 0:Wa.url)||""})).filter(Wa=>Wa.url):[]},Re=Wa=>Da(Wa?ve==null?void 0:ve[Wa]:""),ta=Re(je),we=Re(ea),fa=Re(ka);if(!!(je&&ea&&ka&&ta&&we&&fa)){const Wa=(ze.value||[]).find(fl=>{const hl=Da(je?fl==null?void 0:fl[je]:""),Fl=Da(ea?fl==null?void 0:fl[ea]:""),Ua=Da(ka?fl==null?void 0:fl[ka]:"");return hl&&Fl&&Ua&&hl===ta&&Fl===we&&Ua===fa});if(Wa){Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:[Wa],selectedTargetId:String((Wa==null?void 0:Wa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ta&&je){const Wa=(ze.value||[]).filter(fl=>{const hl=Da(je?fl==null?void 0:fl[je]:"");return hl&&hl===ta});if(Wa.length>0){Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:Wa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ve.sort===void 0||ve.sort===null||String(ve.sort).trim()===""){const Wa=(ze.value||[]).map(hl=>li(hl==null?void 0:hl.sort)).filter(hl=>hl!==null),fl=Wa.length>0?Math.max(...Wa):((ol=ze.value)==null?void 0:ol.length)??0;ve.sort=String(Number((fl+1).toFixed(6)))}}catch{}Qe(u==null?void 0:u.index,ve.id,G),Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Na||[]).length>0){Ql.value=(Na||[]).map(xa=>({...xa,selectedTargetId:(xa==null?void 0:xa.selectedTargetId)||""})),dr.value=!0,nr.value=De,pr.value=be,gr.value=v,Oe.value=p,er.value=re||"";return}},Ka=(p,v,T)=>{Ze.value[p]&&(Ze.value[p][v]=T)},nl=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,wl=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},gl=p=>{var T,z,P,D;if(cl.value===p){cl.value=null,ja.value=!1,Le.value="";return}cl.value=p,Le.value="";const v=(T=Ze.value)==null?void 0:T[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){ul.value=v._ocrImages.map(q=>({name:(q==null?void 0:q.name)||"",url:(q==null?void 0:q.url)||""})).filter(q=>q.name||q.url);const re=v.__ocrFieldMeta||{},le=(z=Object.values(re))==null?void 0:z.find(q=>q==null?void 0:q.imageName);hr.value=(le==null?void 0:le.imageName)||((D=(P=ul.value)==null?void 0:P[0])==null?void 0:D.name)||"",ja.value=ul.value.length>0}else ul.value=[],ja.value=!1,hr.value=""},Tl=()=>{ba.value=!1,Ia.value=[],il.value=null,Oa.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0,ja.value=!1},Ul=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Bl=p=>{const v=p.uid||p.name;return Je.value.get(v)||"pending"},Ll=p=>{const v=p.uid||p.name;return ie.value.get(v)||0},Ol=(p,v)=>{const T=p.uid||p.name;ie.value.set(T,Math.min(100,Math.max(0,v)))},rn=p=>{const v=Bl(p),T=100.53;if(v==="completed"||v==="uploaded")return`${T} ${T}`;if(v==="failed")return`${T} ${T}`;if(v==="uploading"){const z=Ll(p);return`${T*(z/100)} ${T}`}else if(v==="processing")return`${T*.5} ${T}`;return`0 ${T}`},or=(p,v)=>{const T=p.uid||p.name;Je.value.set(T,v),(v==="completed"||v==="uploaded")&&Ol(p,100)},cn=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async T=>{const z=Array.from(T.target.files||[]);for(const P of z){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};Ia.value.push(D),await Fe(D)}T.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},bn=()=>{Oa.value>1&&Oa.value--},Tn=()=>{Oa.value===1?Ia.value.length>0&&!ll.value&&na():Oa.value===2&&(Qa(),Oa.value=3)},bi=async p=>{await It(p==null?void 0:p.row)},ii=async({row:p,prop:v})=>{!p||!v||await It(p,v)},It=async(p,v)=>{var P,D;const T=p==null?void 0:p.id;if(!T){qa.ElMessage.warning("暂无可预览数据");return}let z=_l(u==null?void 0:u.index,T);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),le=re!==null?Number(re):null;if(le!=null&&le!==""&&!Number.isNaN(le)){const q=_l(le,T);Array.isArray(q)&&q.length>0&&(jl(u==null?void 0:u.index,T,q),z=q)}}if(!z||z.length===0){const re=(P=oe.getAllLeafNodes(F.value)||[])==null?void 0:P.filter(q=>(q==null?void 0:q.type)!=="operate"&&(q==null?void 0:q.label)!=="操作"&&(q==null?void 0:q.prop)!=="operate"),le=v||((D=re==null?void 0:re.find(q=>(q==null?void 0:q.label)==="证书附件"))==null?void 0:D.prop);if(le&&p[le]){const q=p[le];let be=[],De="",Ke=!1;if(typeof q=="string")try{const je=JSON.parse(q);Array.isArray(je)&&(be=je.map(ea=>({name:(ea==null?void 0:ea.name)||(ea==null?void 0:ea.fileName)||"",url:(ea==null?void 0:ea.url)||""})).filter(ea=>ea.url||ea.name),be.length>0&&(De=be[0].url||"",Ke=String(be[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")))}catch{De=q,Ke=String(q).toLowerCase().endsWith(".pdf"),be=[{name:q,url:q}]}else Array.isArray(q)&&(be=q.map(je=>({name:(je==null?void 0:je.name)||(je==null?void 0:je.fileName)||"",url:(je==null?void 0:je.url)||""})).filter(je=>je.url||je.name),be.length>0&&(De=be[0].url||"",Ke=String(be[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")));if(be.length>0||De){const je={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ke?"pdf":"image",sourceUrl:Ke?De:"",images:be};z=[je],Qe(u==null?void 0:u.index,T,je)}}}if(!z||z.length===0){qa.ElMessage.warning("暂无可预览数据");return}_e.value=z,rl.value=!0},cu=p=>{Ia.value=Ia.value.filter((v,T)=>T!==p)},st=async(p,v,T)=>{var z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga;if(_a(u.config,{type:Ve.TABLE,tableOperate:p})){if(za.value="",Va.value=!0,ha.value=!0,Ae("onButtonClick",p,v),ae.value=[],p==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,Sa,B,G;(Ea=ze.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id))?ze.value=(Sa=A.cloneDeep(ze.value))==null?void 0:Sa.filter(Re=>(Re==null?void 0:Re.id)!==(v==null?void 0:v.id)):ze.value=po(A.cloneDeep(ze.value),v);try{v!=null&&v.id&&((G=(B=La.value)==null?void 0:B.has)!=null&&G.call(B,v==null?void 0:v.id))&&La.value.delete(v.id)}catch{}Lf(Ur.value,hn.value,v==null?void 0:v.id),da.setTableLoading(u==null?void 0:u.index),Ae("change",{content:ze.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:p,columns:F.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(p==="批量删除"){if(((z=Hl.value)==null?void 0:z.length)===0)return qa.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var B,G,Re,ta,we;const Ea=(B=Hl.value)==null?void 0:B.map(fa=>fa.id);ze.value=(G=A.cloneDeep(ze.value))==null?void 0:G.filter(fa=>!(Ea!=null&&Ea.includes(fa.id))),da.setTableLoading(u==null?void 0:u.index),Ae("change",{content:ze.value,fixContent:Hl.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:p,relatedContents:u==null?void 0:u.related,columns:F.value});const Sa=(Ea||[]).filter(Boolean);if(Sa.length>0&&Sa.every(fa=>fa!=null&&fa!=="")){const fa=(Hl.value||[]).map(Ba=>{const ol={...Ba};return delete ol._isOCRRow,delete ol._ocrTableId,delete ol._isTemp,delete ol.tableEditType,delete ol.index,ol});await A.pageBatchDeleteApi({platId:parseInt((Re=vl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ta=u==null?void 0:u.related)==null?void 0:ta.find(Ba=>Ba==null?void 0:Ba.includes("content_")))||((we=u==null?void 0:u.related)==null?void 0:we.find(Ba=>Ba==null?void 0:Ba.includes("content"))),tableContents:fa}]})}})}else if(p==="复制新增"){ye.value="复制新增",A.cloneDeep(v);const Ea=(P=F.value)==null?void 0:P.find(Sa=>Sa==null?void 0:Sa.isMainKey);Ea||((D=F.value)==null||D[0]),lr.value=v,Hi(!0)}else if(p==="新增")ye.value="新增",Fi(""),Y.value=!0;else if(p==="编辑")ye.value="编辑",Fi(v),Y.value=!0;else if(p==="查看")ye.value="查看",Fi(v),Va.value=!1,ha.value=!1,Y.value=!0;else if(p==="查看三维模型"){const Ea={};for(let B in v)B!=="id"&&(Ea[B]=v[B]);let Sa=(re=Object.values(Ea))==null?void 0:re[1];Ge.setTableShowThree(Sa)}else if(p==="切换视图")wu();else if(((le=T==null?void 0:T.extra)==null?void 0:le.type)==="modelExample")ye.value=p,qe.value=!0;else if(p==="新建"){let Ea=de.value,Sa=[];for(let we in Ea)we!=null&&we.includes(`loading${((q=vl.value)==null?void 0:q.account)||((be=vl.value)==null?void 0:be.账号)}`)&&(Sa=[...Sa,...we]);let B=[];for(let we in Ea)we!=null&&we.includes(`updateLoading${((De=vl.value)==null?void 0:De.account)||((Ke=vl.value)==null?void 0:Ke.账号)}`)&&(B=[...B,...we]);let G=Sa==null?void 0:Sa.map(we=>we==null?void 0:we.id);const Re=B==null?void 0:B.map(we=>we==null?void 0:we.id);G=[...A.cloneDeep(G),...Re],(G==null?void 0:G.length)>0&&(G!=null&&G.every(we=>we!==null&&we))&&await Rr.batchDeleteInsofDataApi({ids:G});const ta=(je=aa.value)==null?void 0:je.find(we=>(we==null?void 0:we.label)==="新建");await pu(!1,ta)}else if(p==="修改模板"){let Ea=A.cloneDeep(Se).value;da.setRouteToChildPath(Ea),ue.setActiveMenuPath(Ea+S)}else if(p==="执行")tt(p,v);else if(p==="导出paraform"){const Ea=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Sa=["推力","真空","压力","温度","流量"],B=xl=>{var Il,Xl,Ml;return xl?typeof(xl==null?void 0:xl.value)=="string"?xl.value:((Ml=(Xl=(Il=xl==null?void 0:xl._custom)==null?void 0:Il.value)==null?void 0:Xl.value)==null?void 0:Ml.value)||"":""},G=Array.isArray(Jl.value)?Jl.value:[],Re=B(G.find(xl=>(xl==null?void 0:xl.condition)==="child")),ta=String(Re||"").slice(0,8),we=xl=>{if(xl==null)return"";const Il=String(xl).trim();if(!Il)return"";if(/^\d{8}$/.test(Il))return Il;const Xl=Il.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Xl){const Yl=Xl[1],tr=Xl[2].padStart(2,"0"),Wl=Xl[3].padStart(2,"0");return`${Yl}${tr}${Wl}`}const Ml=Il.replace(/\D/g,"");return Ml.length>=8?Ml.slice(0,8):""},fa=async xl=>{var Il,Xl;if(!xl)return"";try{const Ml=await en("试验任务/任务管理",!1),Yl=(xr,fr=[])=>{if(!Array.isArray(xr))return fr;for(const yr of xr)(yr==null?void 0:yr.comp)==="Table"&&(yr!=null&&yr.name)&&fr.push(yr),Array.isArray(yr==null?void 0:yr.children)&&Yl(yr.children,fr),Array.isArray(yr==null?void 0:yr.tab)&&Yl(yr.tab,fr),Array.isArray(yr==null?void 0:yr.choice)&&Yl(yr.choice,fr);return fr},Wl=Yl(Ml||[]).find(xr=>(xr==null?void 0:xr.name)==="任务列表"),kr=((Xl=(Il=Wl==null?void 0:Wl.compData)==null?void 0:Il.find(xr=>(xr==null?void 0:xr.key)==="tableContents"))==null?void 0:Xl.contents)||[];if(!Array.isArray(kr)||kr.length===0)return"";const on=kr.find(xr=>String((xr==null?void 0:xr["试验代号(名称)"])||"").slice(0,8)===xl);return we(on==null?void 0:on.计划试验时间)}catch(Ml){return console.warn("获取任务列表计划试验时间失败:",Ml),""}},Ba=(Se.value||"").replace(/\/+$/,""),ol=Re?`${Ba}/${Re}`:Ba,Wa=await en(ol||Se.value,!1),fl=String(oa.value||"").trim(),hl=xl=>String(xl||"").trim(),Fl=(xl,Il=[],Xl="")=>{if(!Array.isArray(xl))return Il;for(const Ml of xl){const Yl=hl((Ml==null?void 0:Ml.choiceName)||(Ml==null?void 0:Ml.name0)||Xl);(Ml==null?void 0:Ml.comp)==="Table"&&(Ml==null?void 0:Ml.name)&&Sa.includes(Ml.name)&&(!fl||Yl===fl)&&Il.push(Ml),Array.isArray(Ml==null?void 0:Ml.children)&&Fl(Ml.children,Il,Yl),Array.isArray(Ml==null?void 0:Ml.tab)&&Fl(Ml.tab,Il,Yl),Array.isArray(Ml==null?void 0:Ml.choice)&&Fl(Ml.choice,Il,Yl)}return Il},Ua=Fl(Wa||[]),bl=new Map;for(const xl of Ua)xl!=null&&xl.name&&!bl.has(xl.name)&&bl.set(xl.name,xl);const Ha=Sa.map(xl=>bl.get(xl)).filter(Boolean);if(!Ha||Ha.length===0)return qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const dl=xl=>{const Il=new Map,Xl=(Ml,Yl=[])=>{if(Array.isArray(Ml))for(const tr of Ml){const Wl=((tr==null?void 0:tr.label)??"").toString().trim(),kr=Wl?[...Yl,Wl]:[...Yl];if(Array.isArray(tr==null?void 0:tr.children)&&tr.children.length>0)Xl(tr.children,kr);else{const xr=((tr==null?void 0:tr.prop)??"").toString();if(!xr)continue;const fr=Wl||xr,yr=(kr.length>0?[...Yl,fr]:[fr]).join(".");Il.set(xr,yr)}}};return Xl(xl,[]),Il},Ga=(xl,Il)=>{const Xl=dl(xl||[]),Yl=(oe.getAllLeafNodes(xl||[])||[]).filter(Wl=>(Wl==null?void 0:Wl.prop)&&(Wl==null?void 0:Wl.type)!=="operate"&&(Wl==null?void 0:Wl.label)!=="操作"&&(Wl==null?void 0:Wl.prop)!=="operate"),tr=Array.isArray(Il)?Il:[];return tr.length===0?[]:tr.map(Wl=>{const kr={};return Yl.forEach(on=>{const xr=String(on.prop),fr=Xl.get(xr)||String(on.label||on.prop);kr[fr]=(Wl==null?void 0:Wl[xr])??""}),kr})},pl=Ha.map(xl=>{var tr,Wl;const Il=(xl==null?void 0:xl.compData)||[];let Xl=(tr=Il==null?void 0:Il.find(kr=>(kr==null?void 0:kr.key)==="header"))==null?void 0:tr.contents;Array.isArray(Xl==null?void 0:Xl[0])&&(Xl=Xl[0]);const Ml=((Wl=Il==null?void 0:Il.find(kr=>(kr==null?void 0:kr.key)==="tableContents"))==null?void 0:Wl.contents)||[];if(!Array.isArray(Xl)||Xl.length===0||!Array.isArray(Ml)||Ml.length===0)return null;const Yl=Ga(Xl||[],Ml||[]);return!Array.isArray(Yl)||Yl.length===0?null:{类型:xl==null?void 0:xl.name,数据:Yl}}).filter(Boolean);if(!pl||pl.length===0)return qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Dl=await fa(ta),Nl={试验代号:ta,试验日期:Dl,ParaForm:pl},Tr=await yi().catch(()=>""),$l=await A.exportParaformApi(Nl,Tr);if(((ea=$l==null?void 0:$l.data)==null?void 0:ea.code)===200&&((Na=(ka=$l==null?void 0:$l.data)==null?void 0:ka.result)!=null&&Na.Excel文件)){const xl=$l.data.result.Excel文件,Il=await A.platformDownloadFile({url:xl}),Xl=new Blob([Il.data],{type:"application/vnd.ms-excel"}),Ml=URL.createObjectURL(Xl),Yl=A.dayjs().format("YYYYMMDD"),Wl=`${(ta||"UNKNOWN").trim()||"UNKNOWN"}_${Yl}_paraform.xls`,kr=document.createElement("a");kr.href=Ml,kr.download=Wl,kr.style.display="none",document.body.appendChild(kr),kr.click(),setTimeout(()=>{document.body.removeChild(kr),URL.revokeObjectURL(Ml)},100);const on=Array.isArray((la=(Ra=$l==null?void 0:$l.data)==null?void 0:Ra.result)==null?void 0:la.warnings)?$l.data.result.warnings:[];if(on.length>0){const xr=on.map((fr,yr)=>`${yr+1}. ${(fr==null?void 0:fr.field)||"未知字段"}:${(fr==null?void 0:fr.message)||""}`).join(`
|
|
23
|
+
`)},g=V=>{if(!V)return;const ae=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:ae,blobUrl:V}],d.value=!0},S=()=>{d.value=!1},$=()=>{k(),r("cancel")};return(V,ae)=>{const Z=e.resolveComponent("el-input"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Br.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Ff,[e.createElementVNode("div",{ref_key:"cameraBox",ref:o,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jf,"初始化摄像头..."))],512),e.createElementVNode("div",Hf,[e.createElementVNode("div",Uf,[ae[0]||(ae[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",qf,[h.value.length===0?(e.openBlock(),e.createElementBlock("div",Wf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Kf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ae,F)=>(e.openBlock(),e.createElementBlock("div",{key:Ae.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:Ae.url,onClick:ne=>g(Ae.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Gf),e.createElementVNode("div",{onClick:ne=>w(F),style:{position:"absolute",top:"4px",right:"4px",width:"18px",height:"18px","border-radius":"50%",background:"rgba(0,0,0,0.55)",color:"#fff",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","font-size":"12px"},title:"删除"},"×",8,Yf)]))),128))]))],512)]),e.createElementVNode("div",Jf,[ae[1]||(ae[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Z,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xf,[e.createVNode(me,{onClick:W,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[2]||(ae[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{onClick:I,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(me,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[4]||(ae[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(me,{onClick:L,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(me,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>ae[6]||(ae[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),ae[9]||(ae[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(me,{onClick:x,disabled:h.value.length===0,id:"themeButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(me,{onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),d.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:S},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Qf=Zl._export_sfc(Zf,[["__scopeId","data-v-24a2050a"]]),ys=A.useMenuState(A.pinia),e0=async a=>{var s,h,c,d,m,b;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(s=l==null?void 0:l[0])==null?void 0:s.url,o="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){ys.setContentLoading(!0);const u=await A.platformDownloadFile({url:r});let C=u==null?void 0:u.data;const M=new FormData;M.append("file",C,((h=l==null?void 0:l[0])==null?void 0:h.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),M.append("query",n);let k=await lc(M);k=(b=(m=(d=k==null?void 0:k.data)==null?void 0:d.data)==null?void 0:m.response)==null?void 0:b.replace("generateResult",a==null?void 0:a.函数名称),o=k,ys.setContentLoading(!1)}return o},At=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),a0=A.useModelComp(A.pinia),{extraContents:fv}=A.storeToRefs(a0),l0=A.useLoginState(A.pinia),{extraUrl:ui}=A.storeToRefs(l0);let gc=ui.value===""||!ui.value?"http://139.196.154.85:20015":ui.value;e.watch(()=>ui.value,()=>{gc=ui.value===""||!ui.value?"http://139.196.154.85:20015":ui.value},{deep:!0,immediate:!0});const zo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},gs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:gc+"/api/public/paddleOCR"};class r0{constructor(l){tn(this,"config");this.config={...gs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=qa.Local.get(qa.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),o=this.buildOCRRequest(l,n),s=this.config.apiUrl||gs.apiUrl||"";return(await qa.axios.post(s,o,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return zo[l]?zo[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,o=h=>{const c=h==null?void 0:h.label;return!(!c||c==="操作"||c===this.config.columnName||(h==null?void 0:h.type)==="operate"||(h==null?void 0:h.prop)==="operate")},s=h=>{(h||[]).forEach(c=>{if(!c)return;const d=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(d)&&d.length>0){s(d);return}if(o(c)){const m=c.label;if(!r.has(m)){r.add(m);const b=this.getFieldAliases(m);n.push(b)}}})};return s(l||[]),n}}function bc(a){return new r0(a)}bc();const _t=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g;let n=(c=(h=A.cloneDeep(a))==null?void 0:h.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(S=>{});let o="",s=await oe.menuToParent(n);if(s==null||s.forEach(S=>{var $,V,ae,Z;(S==null?void 0:S.name)===(((Z=(ae=(V=($=A.cloneDeep(a))==null?void 0:$.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ae[0])==null?void 0:Z.replaceAll("'",""))??"")&&(o=S==null?void 0:S.id)}),l){o=l;const S=await Rr.getInsofDataApi({id:o}),$=(u=(b=(m=(d=S==null?void 0:S.data)==null?void 0:d.result)==null?void 0:m[0])==null?void 0:b.key)==null?void 0:u.pageKey;s=await oe.getItemData($,sessionStorage.getItem("systemKey"),"")}if(o!==""){let S;l?S=(C=s==null?void 0:s.find(ae=>(ae==null?void 0:ae.id)===l))==null?void 0:C.compData:S=(M=s==null?void 0:s.find(ae=>{var Z,me,Ae,F;return(ae==null?void 0:ae.name)===(((me=(Z=a==null?void 0:a.groupSelect)==null?void 0:Z.split(":"))==null?void 0:me[0])||((F=(Ae=a==null?void 0:a.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:F[0]))}))==null?void 0:M.compData;let $=(W=(k=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:k.contents)==null?void 0:W.map(ae=>ae==null?void 0:ae.label);(j=(I=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:I.contents)!=null&&j.every(ae=>Array.isArray(ae))&&($=(x=oe.getColumnChild((E=(L=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:x.map(ae=>ae==null?void 0:ae.prop));let V=(g=(w=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:g.map(ae=>{if(Array.isArray(ae))ae=ae==null?void 0:ae.filter(Z=>!(Z!=null&&Z.id));else{let Z={};for(let me in ae)me!=="id"&&(Z[me]=ae==null?void 0:ae[me]);ae=Z}return ae});V==null||V.forEach(ae=>{Array.isArray(ae)?r.push(oe.getValueToObjectValue(ae,$)):r.push(ae)})}return r},n0=A.useMenuState(A.pinia),{activeMenuPath:hv}=A.storeToRefs(n0),i0=A.useUnit(A.pinia),{chooseTitle:vv}=A.storeToRefs(i0),o0="col-operate",kc=a=>`${o0}-${a}`,t0=(a,l)=>{const n=new Map;a.forEach(o=>{const{prop:s}=o;n.set(s,o)});const r=o=>{Array.isArray(o)&&o.forEach(s=>{const{prop:h}=s||{},c=n.get(h);s0(c,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&r(s.children)})};return r(l),l},s0=(a,l)=>(a&&(l.sortable=a==null?void 0:a.sortable,l.filterable=a==null?void 0:a.filterable,l.showSummary=a==null?void 0:a.showSummary,l.operable=a==null?void 0:a.operable,l.fixed=a==null?void 0:a.fixed),l),c0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:o=!1,operable:s=!1,fixed:h=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:o,operable:s,fixed:h}},u0=async a=>{var s,h;if(!a)return;const l=kc(a),n=await Rr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(s=n==null?void 0:n.data)==null?void 0:s.code,o=(h=n==null?void 0:n.data)==null?void 0:h.result;if(r==200)return o==null?void 0:o[0]},d0=async a=>{if(a)return[]},p0=async(a,l)=>{if(!a||!l)return;const n=kc(a);return await Rr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},f0=async(a,l)=>!a||!l?void 0:await Rr.updateInsofDataApi({id:a,value:{columns:l}}),bs=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await u0(a);return r?await f0(r==null?void 0:r.id,l):await p0(a,l)};var Co={exports:{}},h0=Co.exports,ks;function v0(){return ks||(ks=1,function(a,l){(function(n,r){r()})(h0,function(){function n(m,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.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 r(m,b,u){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){d(C.response,b,u)},C.onerror=function(){console.error("could not download file")},C.send()}function o(m){var b=new XMLHttpRequest;b.open("HEAD",m,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(b)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,c=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,b,u){var C=h.URL||h.webkitURL,M=document.createElement("a");b=b||m.name||"download",M.download=b,M.rel="noopener",typeof m=="string"?(M.href=m,M.origin===location.origin?s(M):o(M.href)?r(m,b,u):s(M,M.target="_blank")):(M.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(M.href)},4e4),setTimeout(function(){s(M)},0))}:"msSaveOrOpenBlob"in navigator?function(m,b,u){if(b=b||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,u),b);else if(o(m))r(m,b,u);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,b,u,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return r(m,b,u);var M=m.type==="application/octet-stream",k=/constructor/i.test(h.HTMLElement)||h.safari,W=/CriOS\/[\d]+/.test(navigator.userAgent);if((W||M&&k||c)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var E=I.result;E=W?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=E:location=E,C=null},I.readAsDataURL(m)}else{var j=h.URL||h.webkitURL,L=j.createObjectURL(m);C?C.location=L:location.href=L,C=null,setTimeout(function(){j.revokeObjectURL(L)},4e4)}});h.saveAs=d.saveAs=d,a.exports=d})}(Co)),Co.exports}v0();const Yn=A.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),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},setSelectTab(a){this.selectTab=a}}}),m0=A.useLoginState(A.pinia),{loginUserInfo:ht}=A.storeToRefs(m0),y0=async a=>{var r,o,s;let l=await A.getAllTables({platId:parseInt((r=ht==null?void 0:ht.value)==null?void 0:r.plat_id),tableNames:[a]});return l=(s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s[0],await fc(l,!1),[{comp:"Table",isShow:!0,name:"日志管理",compData:[{key:"extraButton",contents:[]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"请求类型",prop:"request_method",formType:"Input",align:"center"},{label:"请求路径",prop:"request_url",formType:"Input",align:"center"},{label:"请求参数",prop:"request_param",formType:"Upload",align:"center"},{label:"返回结果",prop:"request_result",formType:"Upload",align:"center"},{label:"返回信息",prop:"request_message",formType:"Input",align:"center"},{label:"请求表格",prop:"request_table",formType:"Input",align:"center"},{label:"请求种类",prop:"request_type",formType:"Input",align:"center"},{label:"请求创建时间",prop:"create_time",formType:"Date",align:"center"},{label:"请求创建人",prop:"create_user_id",formType:"Input",align:"center"}]},{key:"tableContents",contents:l}]}]},g0=A.useLoginState(),{loginUserInfo:yl}=A.storeToRefs(g0);let xo="$R";const Lr=A.useModelComp(A.pinia),xc=e.ref(!1),{itemData:b0,itemGridData:ti,curStructureCompIds:xs,isSubmitCurStructure:k0,routeToChildPath:x0,pageMapState:St,itemExtendData:wo,refreshTable:ws}=A.storeToRefs(Lr),Fo=Yn(A.pinia),Hr=A.useMenuState(A.pinia),ur=e.shallowRef([]),{asideMenus:w0,activeTopMenuPath:_0,activeMenuPath:kl,platform:mv,buttonTriggerType:S0,currentMenuPath:fn}=A.storeToRefs(Hr),xn=A.useUnit(A.pinia),{selectTitle:Wn,chooseTitle:Mo}=A.storeToRefs(xn);e.ref();const Ai=e.ref(!0),Gn=e.ref(0),Et=e.ref([]);e.ref(!1);const zt=e.ref(!1),Xi=e.ref(),wc=e.ref(),_c=e.ref(),E0=()=>{Lr.setItemGridData([]),Lr.setIsEdit("edit"),Lr.setSubmitCurStructure(kl.value!=="/平台管理/菜单管理")},C0=()=>{Lr.setIsEdit("view"),Lr.setRefreshCurStructure(!0)},D0=async a=>{var o;let l=Wn.value,n=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((s,h)=>h<=n);xn.setSelectTitle(sl.safeClone(r)),r=(o=r==null?void 0:r.map(s=>s==null?void 0:s.value))==null?void 0:o.join("/"),Hr.setActiveMenuPath(null),Hr.setActiveMenuPath(r)},vt=async(a,l,n,r="contentConfig")=>{var o;try{if(!Array.isArray(a))return;let s,h;l==="create"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Rr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{id:d==null?void 0:d.id,value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Rr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},h=Rr.batchDeleteInsofDataApi);const c=await h(s);if(((o=c==null?void 0:c.data)==null?void 0:o.code)===200)return c.data.result;throw qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{qa.ElMessage.error("保存响应失败")}},_s=async(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k;try{const W=(s=(o=a==null?void 0:a.results)==null?void 0:o.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:w}})),I=(c=(h=a==null?void 0:a.results)==null?void 0:h.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:c.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),j=JSON.parse(JSON.stringify(a)),L=(d=j==null?void 0:j.results)==null?void 0:d.map(w=>w.id);let E;n?E=(u=(b=(m=St.value)==null?void 0:m[kl.value])==null?void 0:b.filter(w=>{var g,S,$;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l&&(($=(S=w==null?void 0:w.key)==null?void 0:S.relatedInfo)==null?void 0:$.target)===r}))==null?void 0:u.map(w=>w==null?void 0:w.id):E=(k=(M=(C=St.value)==null?void 0:C[kl.value])==null?void 0:M.filter(w=>{var g;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l}))==null?void 0:k.map(w=>w==null?void 0:w.id);const x=E==null?void 0:E.filter(w=>!(L!=null&&L.includes(w))&&typeof w=="number");(W==null?void 0:W.length)>0&&await Rr.batchAddInsofDataApi({dataList:W}),(I==null?void 0:I.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:I}),(x==null?void 0:x.length)>0&&await Rr.batchDeleteInsofDataApi({ids:x})}catch(W){throw new Error(W)}},T0=async a=>{var m,b,u,C,M,k,W,I,j,L;Hr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(b0.value));if(!k0.value)return Hr.setCacheStructures({key:S0.value,data:l}),qa.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var x;return!((x=xs.value)!=null&&x.includes(E))}),o=(m=xs.value)==null?void 0:m.filter(E=>!n.includes(E)),s=[...r,...o].filter(E=>typeof E!==null&&typeof E<"u"),h=l==null?void 0:l.filter(E=>!E.id),c=l==null?void 0:l.filter(E=>E.id);let d=[];if(s&&(s==null?void 0:s.length)>0&&d.push(vt(s,"delete",a)),h&&(h==null?void 0:h.length)>0&&d.push(vt(h,"create",a)),c&&(c==null?void 0:c.length)>0&&d.push(vt(c,"update",a)),ti.value&&((b=ti.value)!=null&&b.isDelete&&((C=(u=ti.value)==null?void 0:u.results)==null?void 0:C.length)>0&&((k=(M=ti.value)==null?void 0:M.results)!=null&&k.every(E=>typeof E=="number"))?await Rr.batchDeleteInsofDataApi({ids:(W=ti.value)==null?void 0:W.results}):(console.log("itemGridData.value",ti.value),d.push(await _s(ti.value,"gridLayout")))),wo.value)for(const E in wo.value)d.push(await _s((I=wo.value)==null?void 0:I[E],"extend",{target:E,compId:(L=(j=wo.value)==null?void 0:j[E])==null?void 0:L.compId},E));await Promise.all(d).then(()=>{qa.ElMessage.success("保存成功"),Lr.setRefreshCurStructure(!0)}).catch(E=>{qa.ElMessage.success(E)}),Hr.setContentLoading(!1)},Zi=a=>zi(a),B0=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Sc=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Ec=e.ref(0),Cc=e.ref(null),N0="ocr_committed_temp_ids_v1",A0=(a,l)=>`${N0}:${String(a??"")}:${String(l??"")}`,z0=(a,l,n)=>{try{const r=A0(a,l),o=sessionStorage.getItem(r),s=o?JSON.parse(o):[],h=Array.isArray(s)?s:[],c=Array.from(new Set([...h,...n||[]].map(d=>String(d)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},Io=async(a,l="data",n)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl;let r=((h=(s=(o=Wn.value)==null?void 0:o.filter(Qe=>(Qe==null?void 0:Qe.condition)==="child"))==null?void 0:s[0])==null?void 0:h.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Qe=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(_e=>{let Oa={};for(let Je in _e)Array.isArray(_e==null?void 0:_e[Je])?Oa[Je]=JSON.stringify(_e==null?void 0:_e[Je]):Oa[Je]=_e==null?void 0:_e[Je];return Oa}),Xa=await A.quoteApi({platId:parseInt((d=yl==null?void 0:yl.value)==null?void 0:d.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Xa=(m=Xa==null?void 0:Xa.data)==null?void 0:m.result,Xa=Xa==null?void 0:Xa.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let ba=Xa==null?void 0:Xa.map(_e=>{var Xe,Aa;let Oa={},Je=Qe==null?void 0:Qe[0],ie;return Array.isArray((Xe=_e==null?void 0:_e.struct)==null?void 0:Xe[0])?ie=oe.getColumnChild((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0]):ie=_e==null?void 0:_e.struct,ie=ie==null?void 0:ie.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="relatedId"),ie==null||ie.forEach(Ze=>{var wa,Fa;Oa[Ze.prop]=((wa=Ze==null?void 0:Ze.words)!=null&&wa[0]?(Je==null?void 0:Je[(Fa=Ze==null?void 0:Ze.words)==null?void 0:Fa[0]])??(Je==null?void 0:Je[Ze==null?void 0:Ze.prop]):Je==null?void 0:Je[Ze==null?void 0:Ze.prop])??""}),Oa.id="1",Oa.relatedId=`[${Oa.id}]`,delete Oa.sort,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Oa]}}),ll=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(_e=>_e==null?void 0:_e.includes("content")),tableContents:Qe}];ll=[...ll,...ba];let Ia=await A.quoteApi({platId:parseInt((u=yl==null?void 0:yl.value)==null?void 0:u.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Ia=(M=(C=Ia==null?void 0:Ia.data)==null?void 0:C.result)==null?void 0:M.filter(_e=>!(ll!=null&&ll.find(Oa=>(Oa==null?void 0:Oa.tableName)==="content_"+(_e==null?void 0:_e.id)))),Ia=Ia==null?void 0:Ia.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let il=Ia==null?void 0:Ia.map(_e=>{var Xe,Aa,Ze,wa,Fa,Za,He;let Oa={},Je=Qe==null?void 0:Qe[0],ie;return Array.isArray((Xe=_e==null?void 0:_e.struct)==null?void 0:Xe[0])?ie=oe.getColumnChild((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0]):ie=_e==null?void 0:_e.struct,ie=ie==null?void 0:ie.filter(va=>(va==null?void 0:va.prop)!=="relatedId"),((wa=(Ze=ie==null?void 0:ie[0])==null?void 0:Ze.words)!=null&&wa[0]?Je!=null&&Je[(Za=(Fa=ie==null?void 0:ie[0])==null?void 0:Fa.words)==null?void 0:Za[0]]:Je!=null&&Je[(He=ie==null?void 0:ie[0])==null?void 0:He.prop])?(ie==null||ie.forEach(va=>{var ca,cl;Oa[va.prop]=((ca=va==null?void 0:va.words)!=null&&ca[0]?(Je==null?void 0:Je[(cl=va==null?void 0:va.words)==null?void 0:cl[0]])??(Je==null?void 0:Je[va==null?void 0:va.prop]):Je==null?void 0:Je[va==null?void 0:va.prop])??""}),Oa.id="1",Oa.relatedId=`[${Oa.id}]`,delete Oa.sort):Oa=void 0,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Oa]}});il=il==null?void 0:il.filter(_e=>{var Oa;return!((Oa=_e==null?void 0:_e.tableContents)!=null&&Oa.every(Je=>Je===void 0))}),ll=[...ll,...il],await A.pageBatchAddApi({platId:parseInt((k=yl==null?void 0:yl.value)==null?void 0:k.plat_id),changeContents:ll});let rl=[];ll==null||ll.forEach(_e=>{var Oa;(Oa=_e==null?void 0:_e.tableContents)==null||Oa.forEach(Je=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:_e==null?void 0:_e.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((W=yl==null?void 0:yl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Qe=((a==null?void 0:a.ocrRows)||[]).map(Ia=>Ia==null?void 0:Ia.id).filter(Ia=>Ia!=null),Xa=((a==null?void 0:a.ocrRows)||[]).map(Ia=>{const il={...Ia};return delete il._isOCRRow,delete il._ocrTableId,Object.keys(il).forEach(rl=>{/(^|\.)证书附件$/.test(rl)&&Array.isArray(il[rl])&&(il[rl]=JSON.stringify(il[rl].map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name)))}),il});let ba=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find(Ia=>Ia==null?void 0:Ia.includes("content")),tableContents:Xa}];await A.pageBatchAddApi({platId:parseInt((j=yl==null?void 0:yl.value)==null?void 0:j.plat_id),changeContents:ba});let ll=[];ba==null||ba.forEach(Ia=>{var il;(il=Ia==null?void 0:Ia.tableContents)==null||il.forEach(rl=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:[{tableName:"log",tableContents:ll}]}),z0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Qe)}if((a==null?void 0:a.buttonName)==="编辑"){const Xa=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(ie=>{const Xe={...ie};return delete Xe._isOCRRow,delete Xe._ocrTableId,delete Xe._isTemp,delete Xe.tableEditType,delete Xe.index,Xe});let ba=Xa==null?void 0:Xa.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ll=await A.quoteApi({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});ll=(x=ll==null?void 0:ll.data)==null?void 0:x.result,ll=ll==null?void 0:ll.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let Ia=(w=ba==null?void 0:ba[0])==null?void 0:w.id,il=[{tableName:(g=a==null?void 0:a.relatedContents)==null?void 0:g.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:ba}],rl=(S=ll==null?void 0:ll.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va,ca;return JSON.stringify(He==null?void 0:He.relatedId)!=="{}"&&(He==null?void 0:He.relatedId)!==""&&(He!=null&&He.relatedId)?(va=He==null?void 0:He.relatedId)==null?void 0:va.includes(parseInt(Ia)):(He==null?void 0:He.sort)===((ca=ba==null?void 0:ba[0])==null?void 0:ca.sort)});if((Xe==null?void 0:Xe.length)>0){let He=ba==null?void 0:ba[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul;va[Le.prop]=((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??""}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,delete va.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:S.filter(ie=>ie);il=[...il,...rl];let _e=await A.quoteApi({platId:parseInt(($=yl==null?void 0:yl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});_e=(ae=(V=_e==null?void 0:_e.data)==null?void 0:V.result)==null?void 0:ae.filter(ie=>!(il!=null&&il.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),_e=_e==null?void 0:_e.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let Oa=(Z=_e==null?void 0:_e.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va,ca,cl;return JSON.stringify(He==null?void 0:He.relatedId)!=="{}"&&(He==null?void 0:He.relatedId)!==""&&(He!=null&&He.relatedId)?(va=He==null?void 0:He.relatedId)==null?void 0:va.includes(parseInt(Ia)):(He==null?void 0:He.sort)===((ca=ba==null?void 0:ba[0])==null?void 0:ca.sort)||(He==null?void 0:He.sort)===(parseInt(((cl=ba==null?void 0:ba[0])==null?void 0:cl.sort)??"0")+1).toString()});if((Xe==null?void 0:Xe.length)>0){let He=ba==null?void 0:ba[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul,hr,dr;((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca!=null&&ca[Le==null?void 0:Le.prop])&&(va[Le.prop]=((hr=Le==null?void 0:Le.words)!=null&&hr[0]?(ca==null?void 0:ca[(dr=Le==null?void 0:Le.words)==null?void 0:dr[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??"")}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,delete va.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Z.filter(ie=>ie);il=[...il,...Oa],await A.pageBatchUpdateApi({platId:parseInt((me=yl==null?void 0:yl.value)==null?void 0:me.plat_id),changeContents:il});let Je=[];il==null||il.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((Ae=yl==null?void 0:yl.value)==null?void 0:Ae.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}if((a==null?void 0:a.buttonName)==="删除"){let Qe=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(_e=>_e==null?void 0:_e.includes("content")),tableContents:a==null?void 0:a.fixContent}],Xa=await A.quoteApi({platId:parseInt((ne=yl==null?void 0:yl.value)==null?void 0:ne.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Xa=(J=Xa==null?void 0:Xa.data)==null?void 0:J.result,Xa=Xa==null?void 0:Xa.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let ba=(Te=(ce=a==null?void 0:a.fixContent)==null?void 0:ce[0])==null?void 0:Te.id,ll=($e=Xa==null?void 0:Xa.map(_e=>{var Je,ie,Xe,Aa,Ze,wa;let Oa=(Je=_e==null?void 0:_e.contents)==null?void 0:Je.filter(Fa=>{var Za,He,va;return JSON.stringify(Fa==null?void 0:Fa.relatedId)!=="{}"&&(Fa==null?void 0:Fa.relatedId)!==""&&(Fa!=null&&Fa.relatedId)?(Za=Fa==null?void 0:Fa.relatedId)==null?void 0:Za.includes(parseInt(ba)):(Fa==null?void 0:Fa.sort)===((va=(He=a==null?void 0:a.fixContent)==null?void 0:He[0])==null?void 0:va.sort)});if((Oa==null?void 0:Oa.length)>0){let Fa=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Fa={...Fa,id:(Xe=Oa==null?void 0:Oa[0])==null?void 0:Xe.id};let Za={},He=Fa,va;return Array.isArray((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0])?va=oe.getColumnChild((Ze=_e==null?void 0:_e.struct)==null?void 0:Ze[0]):va=_e==null?void 0:_e.struct,va=va==null?void 0:va.filter(ca=>(ca==null?void 0:ca.prop)!=="relatedId"),va==null||va.forEach(ca=>{var cl,Le;Za[ca.prop]=((cl=ca==null?void 0:ca.words)!=null&&cl[0]?(He==null?void 0:He[(Le=ca==null?void 0:ca.words)==null?void 0:Le[0]])??(He==null?void 0:He[ca==null?void 0:ca.prop]):He==null?void 0:He[ca==null?void 0:ca.prop])??""}),Za.id=(wa=Oa==null?void 0:Oa[0])==null?void 0:wa.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Za]}}else return}))==null?void 0:$e.filter(_e=>_e);Qe=[...Qe,...ll];let Ia=await A.quoteApi({platId:parseInt((fe=yl==null?void 0:yl.value)==null?void 0:fe.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});Ia=(te=(N=Ia==null?void 0:Ia.data)==null?void 0:N.result)==null?void 0:te.filter(_e=>!(Qe!=null&&Qe.find(Oa=>(Oa==null?void 0:Oa.tableName)==="content_"+(_e==null?void 0:_e.id)))),Ia=Ia==null?void 0:Ia.filter(_e=>{var Oa,Je;return!((_e==null?void 0:_e.fatherPath)!==""&&((Je=(Oa=_e==null?void 0:_e.quote)==null?void 0:Oa[0])==null?void 0:Je.menus)===(kl==null?void 0:kl.value))});let il=(U=Ia==null?void 0:Ia.map(_e=>{var Je,ie,Xe,Aa,Ze,wa;let Oa=(Je=_e==null?void 0:_e.contents)==null?void 0:Je.filter(Fa=>{var Za,He,va;return JSON.stringify(Fa==null?void 0:Fa.relatedId)!=="{}"&&(Fa==null?void 0:Fa.relatedId)!==""&&(Fa!=null&&Fa.relatedId)?(Za=Fa==null?void 0:Fa.relatedId)==null?void 0:Za.includes(parseInt(ba)):(Fa==null?void 0:Fa.sort)===((va=(He=a==null?void 0:a.fixContent)==null?void 0:He[0])==null?void 0:va.sort)});if((Oa==null?void 0:Oa.length)>0){let Fa=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Fa={...Fa,id:(Xe=Oa==null?void 0:Oa[0])==null?void 0:Xe.id};let Za={},He=Fa,va;return Array.isArray((Aa=_e==null?void 0:_e.struct)==null?void 0:Aa[0])?va=oe.getColumnChild((Ze=_e==null?void 0:_e.struct)==null?void 0:Ze[0]):va=_e==null?void 0:_e.struct,va=va==null?void 0:va.filter(ca=>(ca==null?void 0:ca.prop)!=="relatedId"),va==null||va.forEach(ca=>{var cl,Le;Za[ca.prop]=((cl=ca==null?void 0:ca.words)!=null&&cl[0]?(He==null?void 0:He[(Le=ca==null?void 0:ca.words)==null?void 0:Le[0]])??(He==null?void 0:He[ca==null?void 0:ca.prop]):He==null?void 0:He[ca==null?void 0:ca.prop])??""}),Za.id=(wa=Oa==null?void 0:Oa[0])==null?void 0:wa.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(_e==null?void 0:_e.id),tableContents:[Za]}}else return}))==null?void 0:U.filter(_e=>_e);Qe=[...Qe,...il],await A.pageBatchDeleteApi({platId:parseInt((Ce=yl==null?void 0:yl.value)==null?void 0:Ce.plat_id),changeContents:Qe});let rl=[];Qe==null||Qe.forEach(_e=>{var Oa;(Oa=_e==null?void 0:_e.tableContents)==null||Oa.forEach(Je=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:_e==null?void 0:_e.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Me=yl==null?void 0:yl.value)==null?void 0:Me.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Qe=await A.getPageDataApi({platId:parseInt((Pe=yl==null?void 0:yl.value)==null?void 0:Pe.plat_id),pageName:"menu"});if(Qe=(ra=Qe==null?void 0:Qe.data)==null?void 0:ra.result,Qe!=null&&Qe.find(Xa=>(Xa==null?void 0:Xa.father_name)===kl.value+"/")){_c.value=a,wc.value=Qe==null?void 0:Qe.filter(ll=>(ll==null?void 0:ll.father_name)===kl.value+"/");let Xa=(ee=(Ta=a==null?void 0:a.columns)==null?void 0:Ta.find(ll=>ll==null?void 0:ll.mainKey))==null?void 0:ee.prop,ba=(ue=(pa=a==null?void 0:a.fixContent)==null?void 0:pa[0])==null?void 0:ue[Xa];zt.value=!0,Xi.value=[{prop:Xa,label:Xa,name:Xa,value:ba}]}else{let Xa=(ua=a==null?void 0:a.fixContent)==null?void 0:ua.map(Ia=>{let il={};for(let rl in Ia)Array.isArray(Ia==null?void 0:Ia[rl])?il[rl]=JSON.stringify(Ia==null?void 0:Ia[rl]):il[rl]=Ia==null?void 0:Ia[rl];return il.relatedId="",il}),ba=[{tableName:(Se=a==null?void 0:a.relatedContents)==null?void 0:Se.find(Ia=>Ia==null?void 0:Ia.includes("content")),tableContents:Xa}];await A.pageBatchAddApi({platId:parseInt((se=yl==null?void 0:yl.value)==null?void 0:se.plat_id),changeContents:ba});let ll=[];ba==null||ba.forEach(Ia=>{var il;(il=Ia==null?void 0:Ia.tableContents)==null||il.forEach(rl=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Be=yl==null?void 0:yl.value)==null?void 0:Be.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Qe=((Ja=(da=(Ge=a==null?void 0:a.columns)==null?void 0:Ge.map(ie=>ie==null?void 0:ie.filter))==null?void 0:da.filter(ie=>ie!==""))==null?void 0:Ja[0])??"";Qe=oe.analyzeSplitToContent(Qe,","),Qe=(Qe==null?void 0:Qe.find(ie=>ie==null?void 0:ie.includes("@Filter")))??"";let Xa=(R=a==null?void 0:a.fixContent)==null?void 0:R.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ba=await A.quoteApi({platId:parseInt((H=yl==null?void 0:yl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});ba=(X=ba==null?void 0:ba.data)==null?void 0:X.result,ba=ba==null?void 0:ba.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))});let ll=(de=(he=a==null?void 0:a.columns)==null?void 0:he[0])==null?void 0:de.prop,Ia=(ma=Xa==null?void 0:Xa[0])==null?void 0:ma[ll],il=[{tableName:(oa=a==null?void 0:a.relatedContents)==null?void 0:oa.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:Xa}],rl=(Ve=ba==null?void 0:ba.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va;return(va=Object.values(He))==null?void 0:va.find(ca=>ca===Ia)});if((Xe==null?void 0:Xe.length)>0){let He=Xa==null?void 0:Xa[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ja,ul;va[Le.prop]=((ja=Le==null?void 0:Le.words)!=null&&ja[0]?(ca==null?void 0:ca[(ul=Le==null?void 0:Le.words)==null?void 0:ul[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop]):ca==null?void 0:ca[Le==null?void 0:Le.prop])??""}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Ve.filter(ie=>ie);il=[...il,...rl];let _e=await A.quoteApi({platId:parseInt((_a=yl==null?void 0:yl.value)==null?void 0:_a.plat_id),type:"sonSyncs",related:[{menus:r!==""?kl.value+"/"+r:kl.value,groups:a==null?void 0:a.name}]});if(_e=(ya=(ze=_e==null?void 0:_e.data)==null?void 0:ze.result)==null?void 0:ya.filter(ie=>!(il!=null&&il.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),_e=_e==null?void 0:_e.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(kl==null?void 0:kl.value))}),Qe&&Qe!==""){(Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])===","&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1)),Qe=(za=(La=Qe==null?void 0:Qe.replace("(",xo))==null?void 0:La.split(xo))==null?void 0:za[1],Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1),(Qe==null?void 0:Qe[0])==="*"&&(Qe="{"+((Ca=(ha=Qe==null?void 0:Qe.replace("{",xo))==null?void 0:ha.split(xo))==null?void 0:Ca[1])),Qe=(Ne=Qe==null?void 0:Qe.replaceAll("{",""))==null?void 0:Ne.replaceAll("}","");let ie=oe.calculatorAndToOr(Qe);ie=ie==null?void 0:ie[0];let Xe;if((ye=Object.values(ie))!=null&&ye.some(Aa=>(Aa==null?void 0:Aa[0])==="*")){let Aa=(xe=(Y=Wn.value)==null?void 0:Y.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))!=null&&xe.value?(fn==null?void 0:fn.value)+"/"+((qe=(pe=Wn.value)==null?void 0:pe.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:qe.value):fn==null?void 0:fn.value;Xe=await en(Aa,!1)}for(let Aa in ie)if(((sa=ie==null?void 0:ie[Aa])==null?void 0:sa[0])==="*"){let Ze=(Ue=(Va=(Ma=ie[Aa])==null?void 0:Ma.slice(1,($a=ie[Aa])==null?void 0:$a.length))==null?void 0:Va.split(":"))==null?void 0:Ue[0],wa=(aa=(Ie=ie[Aa])==null?void 0:Ie.split(":"))==null?void 0:aa[1],Fa=(ke=Xe==null?void 0:Xe.filter(Za=>(Za==null?void 0:Za.name)===Ze))==null?void 0:ke[0];Fa=(tl=(We=Fa==null?void 0:Fa.compData)==null?void 0:We.find(Za=>(Za==null?void 0:Za.key)==="tableContents"))==null?void 0:tl.contents,Fa=(Cl=Fa==null?void 0:Fa[0])==null?void 0:Cl[wa],ie[Aa]=Fa}Qe=((El=Object.values(ie))==null?void 0:El[0])??""}let Oa=(Vl=_e==null?void 0:_e.map(ie=>{var Aa,Ze,wa,Fa,Za;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(He=>{var va;return(va=Object.values(He))==null?void 0:va.find(ca=>ca===(Qe===""?Ia:Qe))});if((Xe==null?void 0:Xe.length)>0){let He=Xa==null?void 0:Xa[0];He={...He,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let va={},ca=He,cl;return Array.isArray((wa=ie==null?void 0:ie.struct)==null?void 0:wa[0])?cl=oe.getColumnChild((Fa=ie==null?void 0:ie.struct)==null?void 0:Fa[0]):cl=ie==null?void 0:ie.struct,cl=cl==null?void 0:cl.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),cl==null||cl.forEach(Le=>{var ul,hr,dr,Ql;let ja=(ul=a==null?void 0:a.columns)==null?void 0:ul.find(nr=>{var pr,gr,Oe;return((gr=(pr=nr==null?void 0:nr.words)==null?void 0:pr[0])==null?void 0:gr.replaceAll("'",""))===(Le==null?void 0:Le.prop)&&((Oe=nr==null?void 0:nr.functionRelatedWords)==null?void 0:Oe.length)>0});ja=(hr=ja==null?void 0:ja.prop)==null?void 0:hr.replaceAll("'",""),va[Le.prop]=((dr=Le==null?void 0:Le.words)!=null&&dr[0]?(ca==null?void 0:ca[(Ql=Le==null?void 0:Le.words)==null?void 0:Ql[0]])??(ca==null?void 0:ca[Le==null?void 0:Le.prop])??(ca==null?void 0:ca[ja]):(ca==null?void 0:ca[Le==null?void 0:Le.prop])??(ca==null?void 0:ca[ja]))??void 0}),va.id=(Za=Xe==null?void 0:Xe[0])==null?void 0:Za.id,delete va.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[va]}}else return}))==null?void 0:Vl.filter(ie=>ie);il=[...il,...Oa],await A.pageBatchUpdateApi({platId:parseInt((_l=yl==null?void 0:yl.value)==null?void 0:_l.plat_id),changeContents:il});let Je=[];il==null||il.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt((jl=yl==null?void 0:yl.value)==null?void 0:jl.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}Lr.setRefreshCurStructure(!0),await Dt(a)},Ct=async(a,l,n)=>{var o;let r=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(r){let s=(o=r.compData)==null?void 0:o.map(h=>{var c;if((h==null?void 0:h.key)==="tableContents"){let d={...h,contents:n};return d.contents=(c=(d==null?void 0:d.contents)??[])==null?void 0:c.map(m=>{let b={};for(let u in m)JSON.stringify(m==null?void 0:m[u])==="{}"?b[u]="":b[u]=m==null?void 0:m[u];return b}),d}return h});return r.compData=await Po(s,{}),a=a==null?void 0:a.map(h=>((h==null?void 0:h.id)===(r==null?void 0:r.id)&&(h=r),h)),a}else{let s=a==null?void 0:a.filter(c=>{var d;return(c==null?void 0:c.children)&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0||(c==null?void 0:c.comp)==="Tabs"}),h=s==null?void 0:s.map(async c=>{var d;return c!=null&&c.children&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0?c.children=await Ct(c==null?void 0:c.children,l,n):c.compData=await Ct(c==null?void 0:c.compData,l,n),c});return s=await Promise.all(h),s}},Dt=async a=>{var s,h,c,d,m,b,u;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let n=await A.getAllTables({platId:parseInt((h=yl==null?void 0:yl.value)==null?void 0:h.plat_id),tableNames:l??[]});if(n=(d=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:d[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(C=>{C==null||delete C.source_table;const M={};for(let k in C){const W=C==null?void 0:C[k],I=W&&Object.prototype.toString.call(W)==="[object Object]"&&Object.keys(W).length===0,j=Array.isArray(W)&&W.length===0;W==null||W==="{}"||I||j?M[k]="":M[k]=W}return M});let r=(b=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:b[1],o=await Ct(ur.value,r,n);ur.value=(u=ur.value)==null?void 0:u.map(C=>{var M,k;return(M=o==null?void 0:o[0])!=null&&M.tabInform&&((k=o==null?void 0:o[0])==null?void 0:k.tabInform)===(C==null?void 0:C.tabInform)?C=o==null?void 0:o[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(o==null?void 0:o.name):(C==null?void 0:C.id)===(o==null?void 0:o.id))&&(C=o),C})},M0=a=>{let l=Xi.value;Xi.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},I0=async()=>{var C,M,k,W,I,j,L,E,x,w;let a=_c.value,l=wc.value,n=(M=(C=a==null?void 0:a.columns)==null?void 0:C.find(g=>g==null?void 0:g.mainKey))==null?void 0:M.prop,r=(W=(k=Xi.value)==null?void 0:k[0])==null?void 0:W.value,o=(I=a==null?void 0:a.fixContent)==null?void 0:I.map(g=>{var $;let S={};for(let V in g)Array.isArray(g==null?void 0:g[V])?S[V]=JSON.stringify(g==null?void 0:g[V]):S[V]=g==null?void 0:g[V];return($=a==null?void 0:a.columns)==null||$.forEach(V=>{(V==null?void 0:V.formType)==="Upload"&&(S==null?void 0:S[V==null?void 0:V.prop])===""&&(S[V==null?void 0:V.prop]="{}")}),S[n]=r,S}),s=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(g=>g==null?void 0:g.includes("content")),tableContents:o}];await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:s}),l=l==null?void 0:l.filter(g=>{var S,$,V;return(V=g==null?void 0:g.object_name)==null?void 0:V.includes(($=(S=a==null?void 0:a.fixContent)==null?void 0:S[0])==null?void 0:$[n])});let h=[],c=new Map;l==null||l.forEach(g=>{h.push(`content_${g==null?void 0:g.object_id}`),h.push(`struct_${g==null?void 0:g.object_id}`),c.set(g==null?void 0:g.object_id,g)});let d=await A.getAllTables({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),tableNames:h??[]});d=(x=d==null?void 0:d.data)==null?void 0:x.result;let m=[],b=[];d=oe.chunk(d,2),d==null||d.forEach(g=>{var V,ae,Z,me,Ae,F,ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta,ee;let S=c.get((me=(Z=(ae=(V=g==null?void 0:g[1])==null?void 0:V[0])==null?void 0:ae.source_table)==null?void 0:Z.split("_"))==null?void 0:me[1]),$=(ne=(F=(Ae=S==null?void 0:S.object_name)==null?void 0:Ae.split("/"))==null?void 0:F.filter((pa,ue)=>{var ua,Se;return((Se=(ua=S==null?void 0:S.object_name)==null?void 0:ua.split("/"))==null?void 0:Se.length)-1!==ue}))==null?void 0:ne.join("/");if($=$+"/"+r,b!=null&&b.find(pa=>(pa==null?void 0:pa.path)===$)||b.push({fatherPath:S==null?void 0:S.father_name,isShow:S==null?void 0:S.is_show,path:$}),((ce=(J=g==null?void 0:g[1])==null?void 0:J[0])==null?void 0:ce.类型)==="Table"){let pa=((fe=($e=(Te=g==null?void 0:g[1])==null?void 0:Te[0])==null?void 0:$e.结构)==null?void 0:fe.contents)??[],ue=sl.safeClone(pa);Array.isArray(ue==null?void 0:ue[0])&&(ue=oe.getColumnChild(ue==null?void 0:ue[0]));let ua=[];if(((N=g==null?void 0:g[0])==null?void 0:N.length)>0&&(ua=(te=g==null?void 0:g[0])==null?void 0:te.map(Se=>ue==null?void 0:ue.map(Be=>(Be=(Se==null?void 0:Se[Be==null?void 0:Be.prop])??"",Be)))),m!=null&&m.find(Se=>(Se==null?void 0:Se.key)===$)){let Se=(U=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.key)===$))==null?void 0:U.contents;Se.push({isShow:S==null?void 0:S.is_show,filter:((Pe=(Me=(Ce=g==null?void 0:g[1])==null?void 0:Ce[0])==null?void 0:Me.引用)==null?void 0:Pe.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:pa,tableContents:ua});let se=m==null?void 0:m.findIndex(Be=>(Be==null?void 0:Be.key)===$);m[se].contents=Se}else m.push({key:$,contents:[{isShow:S==null?void 0:S.is_show,filter:((ee=(Ta=(ra=g==null?void 0:g[1])==null?void 0:ra[0])==null?void 0:Ta.引用)==null?void 0:ee.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:pa,tableContents:ua}]})}});let u=[];u.push({key:"menuPath",contents:b}),u=[...u,...m],await A.createPlatFormDataApi({platId:parseInt((w=yl==null?void 0:yl.value)==null?void 0:w.plat_id),changeData:u}),zt.value=!1,Lr.setRefreshTable(!0)},Oo=async(a,l)=>{},Lo=async a=>{ur.value=await oe.getDeepDiffItems(a),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value)};e.ref();const O0=e.ref(null),L0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=kl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Dc=e.ref([]),R0=e.computed(()=>{var a,l;return(l=(a=St.value)==null?void 0:a[kl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[_0.value],()=>{xn.setSelectTitle([]),xn.setChooseTitle([])},{deep:!0});e.watch(()=>Mo.value,async(a,l)=>{var r,o,s,h,c,d;let n=(r=Mo.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==fn.value);if((n==null?void 0:n.length)>0){Hr.setContentLoading(!0);let m=((o=n==null?void 0:n[0])==null?void 0:o.relatedContent)??(kl==null?void 0:kl.value),b=m+"/"+((s=n==null?void 0:n[0])==null?void 0:s.value),u=!!((h=n==null?void 0:n[0])!=null&&h.parentContent),C=await en(b,u,{originPath:m});C=(c=C==null?void 0:C.filter(W=>W))==null?void 0:c.map(W=>(W.isShow=!0,W)),console.log(C,"loadingContents");let M=await oe.getDeepDiffItems(C),k=M==null?void 0:M.filter(W=>W==null?void 0:W.choice);Fo.setSelectTab((d=k==null?void 0:k[0])==null?void 0:d.choiceName),M=M==null?void 0:M.filter(W=>{var I;return!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===((I=k==null?void 0:k[0])==null?void 0:I.choiceName)}),ur.value=M,Hr.setContentLoading(!1)}});const $0=(a,l)=>{setTimeout(async()=>{var c,d,m;let n=(c=Mo.value)==null?void 0:c.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==fn.value),r=kl==null?void 0:kl.value,o=kl==null?void 0:kl.value;(n==null?void 0:n.length)>0&&(o=((d=n==null?void 0:n[0])==null?void 0:d.relatedContent)??(kl==null?void 0:kl.value),r=o+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let s=await en(r,!1,{originPath:o});s=s==null?void 0:s.map(b=>(b.isShow=!0,b));let h=await oe.getDeepDiffItems(s);ur.value=h==null?void 0:h.filter(b=>!(b!=null&&b.step)||(b==null?void 0:b.step)===(a==null?void 0:a.title))},10)},V0=a=>{setTimeout(async()=>{var h,c,d;let l=(h=Mo.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)!==fn.value),n=kl==null?void 0:kl.value,r=kl==null?void 0:kl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(kl==null?void 0:kl.value),n=r+"/"+((d=l==null?void 0:l[0])==null?void 0:d.value));let o=await en(n,!1,{originPath:r});o=o==null?void 0:o.map(m=>(m.isShow=!0,m)),Fo.setSelectTab(a);let s=await oe.getDeepDiffItems(o);ur.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>w0.value,a=>{a!=null&&a.length||(ur.value=[])},{immediate:!0});e.watch(()=>[kl.value],async a=>{var s,h,c,d;if(!kl.value)return;if(kl.value==="/"){ur.value=[];return}Hr.setCurrentMenuPath(kl.value),Lr.setLockingPage(""),ur.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Ai.value=!1,Hr.setContentLoading(!0),xc.value=!0;let n=a==null?void 0:a[0],r=n,o=(h=Wn.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)!==kl.value&&!(m!=null&&m.relatedContent));if((o==null?void 0:o.length)>0&&(n=n+"/"+((c=o==null?void 0:o[0])==null?void 0:c.value)),n==="系统管理/日志管理")ur.value=await y0("log");else{let m=await en(n,!0,{originPath:r});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let b=await oe.getDeepDiffItems(m),u=b==null?void 0:b.filter(C=>C==null?void 0:C.choice);Fo.setSelectTab((d=u==null?void 0:u[0])==null?void 0:d.choiceName),ur.value=b==null?void 0:b.filter(C=>{var M;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((M=u==null?void 0:u[0])==null?void 0:M.choiceName)})}Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value),Lr.setRefreshTable(!1),e.nextTick(()=>{Gn.value=Gn.value++,Ai.value=!0})},{immediate:!0});e.watch(()=>[ws.value],async()=>{var a,l,n,r;if(ws.value){ur.value=[];let o=e.getCurrentInstance();(a=o==null?void 0:o.scope)==null||a.stop(),o=null,Ai.value=!1,Hr.setContentLoading(!0),xc.value=!0;let s=fn==null?void 0:fn.value,h=s,c=(l=Wn.value)==null?void 0:l.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==(fn==null?void 0:fn.value));(c==null?void 0:c.length)>0&&(s=s+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let d=await en(s,!0,{originPath:h});d=d==null?void 0:d.map(u=>(u.isShow=!0,u));let m=await oe.getDeepDiffItems(d),b=m==null?void 0:m.filter(u=>u==null?void 0:u.choice);if(Fo.setSelectTab((r=b==null?void 0:b[0])==null?void 0:r.choiceName),ur.value=m==null?void 0:m.filter(u=>{var C;return!(u!=null&&u.choiceName)||(u==null?void 0:u.choiceName)===((C=b==null?void 0:b[0])==null?void 0:C.choiceName)}),Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value),Lr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let u=[...Wn.value,...c];xn.setSelectTitle(u)}e.nextTick(()=>{Gn.value=Gn.value++,Ai.value=!0})}},{immediate:!0,deep:!0});const P0=async()=>{Hr.setLinkMenuInfo(null),Hr.setActiveMenuPath(x0.value),ur.value=null,Lr.setRouteToChildPath(""),Hr.setChildMenu("")},F0=a=>new RegExp("button","i").test(a),j0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Tc=a=>{if(j0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Hr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Bc=async(a,l,n)=>{var C,M,k,W,I,j,L,E,x,w,g,S;let r="",o="";for(let $ in l)(l==null?void 0:l[$])===a&&(o=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===o&&(r=$==null?void 0:$.fatherPath)});let s=r===""?kl.value:r;r!==""&&Hr.setCurrentMenuPath(s),Hr.setCurrentMenuPath(s+"/"+a),Hr.setContentLoading(!0),ur.value=await en(s+"/"+a,!0,{originPath:s+"/",row:l});let h=await en(s,!1),c=(C=h==null?void 0:h.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:C[0],d=((I=(W=(k=(M=c==null?void 0:c.compData)==null?void 0:M.find($=>($==null?void 0:$.key)==="header"))==null?void 0:k.contents)==null?void 0:W[0])==null?void 0:I.prop)??((w=(x=(E=(L=(j=c==null?void 0:c.compData)==null?void 0:j.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:x[0])==null?void 0:w.prop),m=(S=(g=c==null?void 0:c.compData)==null?void 0:g.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:S.contents;m=m==null?void 0:m.map($=>({label:$==null?void 0:$[d],value:$==null?void 0:$[d]}));let b=Wn.value,u={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};b=b==null?void 0:b.filter($=>($==null?void 0:$.condition)!=="child"),b.push(u),xn.setSelectTitle(b),xn.setChooseTitle([u]),Hr.setContentLoading(!1),Lr.setExtraContents([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Lr.setItemData(ur.value),Lr.setOriginalData(ur.value)},H0=a=>{Ec.value=a},Di=e.reactive({index:0,comp:null}),U0=e.computed(()=>{var a;return(a=ur.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:q0(l,n)}))}),Nc=(a,l)=>{var d,m,b,u,C;const n=l?a:a-2,r=(d=ur.value)==null?void 0:d[n],o=(b=(m=r==null?void 0:r.compData)==null?void 0:m.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:b.contents,s=o==null?void 0:o.findIndex(M=>(M==null?void 0:M.isMainKey)&&(M==null?void 0:M.label)!=="操作"),h=s===-1?0:s,c=(C=(u=r==null?void 0:r.compData)==null?void 0:u.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:C.contents;return{valid:c==null?void 0:c.every(M=>M==null?void 0:M[h+1]),length:(c==null?void 0:c.length)||0}},q0=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:o,length:s}=Nc(l,!0);Di.index===l?n="process":s===0?n="wait":n=o?"success":"error"}return n},Ac=a=>{var n,r,o,s,h;const l=a+1;if(l>1&&((o=(r=(n=ur.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c}=Nc(l);c?(Di.index=l,Di.comp=(s=ur.value)==null?void 0:s[a]):qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Di.index=l,Di.comp=(h=ur.value)==null?void 0:h[a]},zc=e.computed(()=>{var a,l;return(l=(a=Sc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>zc.value,a=>{a&&Ac(0)},{immediate:!0});const W0={class:"table-content"},K0={class:"menu-config-wrap"},G0=["onClick"],Y0={key:0,class:"viewport-wrap"},J0=["onClick"],X0={title:"选择显示列信息"},Z0={key:0,class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Q0=["title"],e3={class:"col-operate-wrap"},a3={key:0,class:"col-operate-radio-wrapper"},l3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},r3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},n3={class:"pop-view"},i3={class:"pop-wrapper"},o3={class:"file-list-pop"},t3=["title","onClick"],s3=["onClick"],c3=["onClick"],u3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},d3={class:"form-content"},p3={key:0,class:"dialog-footer"},f3={class:"dialog-footer"},h3={class:"ocr-dialog-content"},v3={class:"ocr-steps"},m3={key:0,class:"ocr-action-buttons"},y3={key:1,class:"ocr-preview-area"},g3={class:"ocr-file-grid"},b3={class:"file-thumbnail"},k3=["src"],x3={key:1,class:"thumbnail-placeholder"},w3={class:"progress-svg",viewBox:"0 0 36 36"},_3=["stroke","stroke-width","stroke-dasharray"],S3={key:0,class:"progress-icon"},E3={key:1,class:"progress-icon"},C3=["onClick"],D3={class:"file-name"},T3={key:0,class:"ocr-recognize-button"},B3={key:2,class:"ocr-progress-section"},N3={key:3,class:"ocr-confirm-area"},A3={class:"ocr-preview-tip"},z3={class:"ocr-preview-table"},M3={style:{display:"flex","align-items":"center",gap:"8px"}},I3={key:0},O3={key:4,class:"ocr-success-area"},L3={key:0,class:"ocr-dialog-footer"},R3={class:"form-content"},$3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},V3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},P3={style:{display:"flex"}},Ss="ss-ocr-upload-history",F3="ss-ocr-cert-history-v1",j3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(a,{emit:l}){var Ut;const n=e.ref([]),r=At(A.pinia),o=e.ref(null),s=e.ref(new Set),h=e.ref(new Map),c=e.ref(!1),d=e.ref(new Map),m=new Map,b=e.ref(new Map),u=a,C=e.ref((u==null?void 0:u.allowSelect)??!0),M=e.ref(((Ut=u==null?void 0:u.config)==null?void 0:Ut.showIndex)??!0),k=e.ref(),W=e.ref(!0),I=e.ref(!1),j=e.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),x=oe.useOriginalState(A.pinia);let w="$R";const{originalPath:g}=A.storeToRefs(x),S=g.value,$=e.computed(()=>{var v;const p=(v=oe.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate");return p.length>0?p.every(T=>!!(T!=null&&T.sortable)):!1});e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(T=>T==null?void 0:T.filterable)}),e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(T=>T==null?void 0:T.operable)});const V=e.ref(!0),ae=e.ref([]),Z=e.reactive({column:{},status:!1,text:"合计"}),me=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Ae=l,F=e.ref([]),ne=e.ref([]),J=e.ref([]),ce=e.reactive({prop:"",order:null}),Te=e.ref([]),$e=e.ref(!1),fe=e.ref(!1),N=e.ref(null),{isUseBackdrop:te,initTrackFileType:U,getFileExtension:Ce,setData:Me,getFileInfo:Pe,getFilesInfo:ra}=Bo.useThreeSystem(),Ta=e.ref([]),ee=e.ref(!1),pa=e.ref(),ue=A.useMenuState(),{importLoading:ua,activeMenuPath:Se,contentLoading:se,linkMenuInfo:Be}=A.storeToRefs(ue),Ge=oe.useTableComp(A.pinia),da=A.useModelComp(A.pinia),Ja=Yn(A.pinia),{extraContents:R,cacheUpdatingData:H,tableViewContents:X,tableLoading:he,pageMapState:de,lockingPage:ma}=A.storeToRefs(da),{selectTab:oa}=A.storeToRefs(Ja),{compType:Ve,hasEditable:_a}=Qs.useRole(),ze=e.ref([]),ya=e.ref([]),La=e.ref(new Map);e.ref(!1);const za=e.ref("");e.ref();const ha=e.ref(!0),Ca=e.ref(0),Ne=e.ref(!0),ye=e.ref(""),Y=e.ref(!1),xe=e.ref(null);e.ref([]);const pe=e.ref({label:"查看三维模型"}),qe=e.ref(!1),sa=e.ref(),$a=e.ref([]),Ma=e.ref([]),Va=e.ref(!1),Ue=e.ref([]),Ie=e.ref([]),aa=e.ref([]),ke=e.ref([]),We=e.ref([]),tl=()=>{try{const p=localStorage.getItem(Ss),v=p?JSON.parse(p):[];We.value=Array.isArray(v)?v:[]}catch{We.value=[]}},Cl=()=>{try{localStorage.setItem(Ss,JSON.stringify(We.value||[]))}catch{}},El=p=>{var re,le,q;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",T=p.name||((le=p==null?void 0:p.uploadResult)==null?void 0:le.name)||((q=p==null?void 0:p.uploadResult)==null?void 0:q.fileName)||"";if(!v&&!T)return;const z={name:T,url:v,ts:Date.now()},P=String(z.name||"").trim().toLowerCase(),D=(We.value||[]).findIndex(be=>String((be==null?void 0:be.name)||"").trim().toLowerCase()===P);D>-1&&We.value.splice(D,1),We.value.unshift(z),We.value.length>20&&(We.value=We.value.slice(0,20)),Cl()};tl();const Vl=(p,v)=>`${F3}:${String(p??"")}:${String(v??"")}`,_l=(p,v)=>{try{const T=sessionStorage.getItem(Vl(p,v)),z=T?JSON.parse(T):[];return Array.isArray(z)?z:[]}catch{return[]}},jl=(p,v,T)=>{try{sessionStorage.setItem(Vl(p,v),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},Qe=(p,v,T)=>{if(!v)return;const z=_l(p,v),P=[T,...z||[]].filter(Boolean).slice(0,1);return jl(p,v,P),P},Xa=(p,v,T)=>{if(!v||!T)return;const z=Vl(p,v),P=Vl(p,T);try{const D=sessionStorage.getItem(z);if(!D)return;const re=(()=>{try{const be=JSON.parse(D);return Array.isArray(be)?be:[]}catch{return[]}})(),le=_l(p,T),q=[...re,...le||[]].filter(Boolean).sort((be,De)=>Number((De==null?void 0:De.ts)||0)-Number((be==null?void 0:be.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(q)),sessionStorage.removeItem(z)}catch{}},ba=e.ref(!1),ll=e.ref(!1),Ia=e.ref([]),il=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const rl=e.ref(!1),_e=e.ref([]),Oa=e.ref(1),Je=e.ref(new Map),ie=e.ref(new Map),Xe=e.ref(0),Aa=e.ref(!1),Ze=e.ref([]),wa=e.ref([]),Fa=p=>{var v;try{const T=(v=oe.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(T==null?void 0:T.find(z=>(z==null?void 0:z.prop)===p||(z==null?void 0:z.label)===p))||null}catch{return null}},Za=p=>{const v=Fa(p),T=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return sl.getComponent(T)||sl.getComponent("Input")},He=e.ref([]),va=e.ref(null),ca=e.ref([]),cl=e.ref(null),Le=e.ref(""),ja=e.ref(!1),ul=e.ref([]),hr=e.ref(""),dr=e.ref(!1),Ql=e.ref([]),nr=e.ref([]),pr=e.ref([]),gr=e.ref(null),Oe=e.ref([]),er=e.ref("");e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("编号")||""}catch{return""}});const Sr=e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("名称")||""}catch{return""}}),Mr=e.computed(()=>{var p;try{const v=(p=oe.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("制造厂")||""}catch{return""}}),zl=()=>{dr.value=!1,Ql.value=[],nr.value=[],pr.value=[],gr.value=null,Oe.value=[],er.value=""},Nr=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,qr=(p,v)=>{const T=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(T))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Nr(T[P])&&(v[P]=T[P]);const z=ya.value.find(P=>P.id===v.id);if(z)for(const P of Object.keys(T))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Nr(T[P])&&(z[P]=T[P]);La.value&&La.value.set(v.id,v),Qe(u==null?void 0:u.index,v.id,p==null?void 0:p.versionItem),nr.value=[...nr.value||[],JSON.parse(JSON.stringify(v))]},Kl=async(p,v=null)=>{var T,z,P,D,re,le,q;try{const be=(T=oe.getAllLeafNodes(F.value)||[])==null?void 0:T.filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),De=new Map;be==null||be.forEach(ka=>{ka!=null&&ka.label&&(ka!=null&&ka.prop)&&De.set(ka.label,ka.prop)});const Ke=De.get("系统编号")||De.get("编号");if(!Ke){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const je=v||gr.value;if((Array.isArray(je==null?void 0:je.result)?je.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ka=0;ka<p.length;ka++){const Na=p[ka],Ra=Na[Ke];if(!Ra){console.warn(`第 ${ka+1} 条匹配行缺少系统编号,跳过`);continue}const la=`设备管理/试验设备/${Ra}`,el=await A.getPageDataApi({platId:parseInt((z=vl.value)==null?void 0:z.plat_id),pageName:la});if(!((P=el==null?void 0:el.data)!=null&&P.result)||!Array.isArray(el.data.result)){console.warn(`未找到详情页数据: ${la}`);continue}const xa=el.data.result.find(ta=>(ta==null?void 0:ta.property_name)==="校检记录");if(!xa){console.warn(`详情页 ${la} 中未找到校检记录表`);continue}const al=(D=xa.contents)==null?void 0:D.find(ta=>(ta==null?void 0:ta.key)&&ta.key.startsWith("content_"));if(!al||!al.key){console.warn("校检记录表中未找到 content item");continue}const ve=al.key,Pa=Array.isArray(al.value)?al.value:[];if(Pa.length>=5){const we=[...Pa].sort((fa,Ba)=>{const ol=Number((fa==null?void 0:fa.create_time)||0),Wa=Number((Ba==null?void 0:Ba.create_time)||0);return ol-Wa})[0];we!=null&&we.id&&await A.pageBatchDeleteApi({platId:parseInt((re=vl.value)==null?void 0:re.plat_id),changeContents:[{tableName:ve,tableContents:[{id:we.id}]}]})}const ga=(le=be==null?void 0:be.find(ta=>(ta==null?void 0:ta.label)==="证书附件"))==null?void 0:le.prop,Ea=String(Date.now()),Sa={id:Ea},B=Pa[0]||{},G=new Date().toISOString().split("T")[0];if(Object.keys(B||{}).forEach(ta=>{if(ta!=="id"){if(ta==="证书附件"){Sa[ta]="";return}if(ta==="校检日期"||ta==="检校日期"){Sa[ta]=Na[ta]||Na.校检日期||Na.检校日期||G;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ta)){Sa[ta]=Na[ta]??"";return}Sa[ta]=Na[ta]??""}}),ga&&Na[ga]){const ta=Na[ga];if(Array.isArray(ta)&&ta.length>0)Sa.证书附件=JSON.stringify(ta.map(we=>({url:(we==null?void 0:we.url)||"",name:(we==null?void 0:we.name)||(we==null?void 0:we.fileName)||"",fileName:(we==null?void 0:we.fileName)||(we==null?void 0:we.name)||""})).filter(we=>we.url||we.name));else if(typeof ta=="string")try{const we=JSON.parse(ta);Sa.证书附件=ta}catch{Sa.证书附件=JSON.stringify([{url:ta,name:ta,fileName:ta}])}}console.log(ve,"tableName","inspectionRecordRow",Sa),await A.pageBatchAddApi({platId:parseInt((q=vl.value)==null?void 0:q.plat_id),changeContents:[{tableName:ve,tableContents:[Sa]}]});const Re=xa==null?void 0:xa.object_id;if(Re&&Ea){const ta=ga&&Na[ga]?Na[ga]:null;let we=[],fa="",Ba=!1;if(Array.isArray(ta)&&ta.length>0){we=ta.map(hl=>({name:(hl==null?void 0:hl.name)||(hl==null?void 0:hl.fileName)||"",url:(hl==null?void 0:hl.url)||""})).filter(hl=>hl.url||hl.name);const Wa=ta[0];fa=(Wa==null?void 0:Wa.url)||"";const fl=(Wa==null?void 0:Wa.name)||(Wa==null?void 0:Wa.fileName)||"";Ba=String(fl).toLowerCase().endsWith(".pdf")||String(fa).toLowerCase().endsWith(".pdf")}else if(typeof ta=="string")try{const Wa=JSON.parse(ta);Array.isArray(Wa)?(we=Wa.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name),we.length>0&&(fa=we[0].url||"",Ba=String(we[0].name).toLowerCase().endsWith(".pdf")||String(fa).toLowerCase().endsWith(".pdf"))):(fa=ta,Ba=String(ta).toLowerCase().endsWith(".pdf"))}catch{fa=ta,Ba=String(ta).toLowerCase().endsWith(".pdf")}const ol={ts:Date.now(),versionId:String(Date.now())+"_"+String(ka),label:new Date().toLocaleString(),certType:Na.证书类型||"",certNo:Na.证书编号||"",fileType:Ba?"pdf":"image",sourceUrl:Ba?fa:"",images:we};Qe(Re,Ea,ol)}}}catch(be){console.error("向校检记录表插入OCR识别结果失败:",be),qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},br=p=>{const v=Array.isArray(p)?p:Ql.value||[];if(v.length===0){zl();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var le;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Qe(u==null?void 0:u.index,(le=D==null?void 0:D.ocrRow)==null?void 0:le.id,D==null?void 0:D.versionItem),pr.value=[...pr.value||[],D.ocrRow];return}if(re==="replace"){const q=D==null?void 0:D.selectedTargetId,be=(ze.value||[]).find(De=>String(De==null?void 0:De.id)===String(q));if(!be)return;qr(D,be)}}}),(nr.value||[]).length>0&&(ze.value=[...ze.value||[]]),(pr.value||[]).length>0&&(ze.value=[...ze.value||[],...pr.value||[]],ya.value=[...ya.value||[],...pr.value||[]],(pr.value||[]).forEach(D=>{var re,le;return(le=(re=La.value)==null?void 0:re.set)==null?void 0:le.call(re,D.id,D)})),Ur.value=ze.value;const z=nr.value||[],P=pr.value||[];if(z.length>0&&(Ae("change",{buttonName:"编辑",singleContent:z,content:ze.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:F.value,name:u==null?void 0:u.compName}),Kl(z)),P.length>0){const D=gr.value;Ae("change",{buttonName:"OCR批量新增",content:ze.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:F.value,ocrRows:P,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(le=>({url:(le==null?void 0:le.url)||"",name:(le==null?void 0:le.name)||"",fileName:(le==null?void 0:le.name)||""})).filter(le=>le.url)),ocrResult:D,matchedCount:(z||[]).length,newCount:(P||[]).length})}qa.ElMessage.success("已提交候选处理结果"),zl()},$r=bc(),jr=e.computed(()=>$r.getConfig()),Pl=e.ref(),lr=e.ref(),Wr=hc(A.pinia),Ur=e.ref(),Vr=e.ref(0),Kr=A.useUnit(A.pinia),{selectIndex:an,selectMenu:hn,selectTitle:Jl}=A.storeToRefs(Kr),{selectString:vr}=A.storeToRefs(Wr),Jr=A.useLoginState(A.pinia),{loginUserInfo:vl}=A.storeToRefs(Jr),ir=e.ref(720),Rl=e.ref(!1),Er=e.ref(!1),Hl=e.ref([]),mr=e.ref(),ar=e.ref(!0),Xr=e.ref(!0);e.ref([]);const sn=e.inject("contentRef");e.provide("contentRef",sn),e.provide("getSuggestListForCell",Tu),e.provide("getSuggestLoadingForCell",(p,v)=>{const T=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return b.value.get(T)||!1}),e.watch(()=>{var p;return(p=ze.value)==null?void 0:p.length},p=>{me.total=p}),e.watch(()=>X.value,async()=>{var v,T,z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la;if(((v=X.value)==null?void 0:v.length)===0||!((T=u==null?void 0:u.itemData)!=null&&T.find(el=>(el==null?void 0:el.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(el=>(el==null?void 0:el.key)==="pageColumn")))return;let p=(be=(q=(le=(re=(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:le[1])==null?void 0:q.split("]"))==null?void 0:be[0];((ea=(je=(Ke=(De=u==null?void 0:u.itemData)==null?void 0:De.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:Ke.contents)==null?void 0:je.split("["))==null?void 0:ea[0])+((Na=(ka=X.value)==null?void 0:ka.find(el=>(el==null?void 0:el.key)===p))==null?void 0:Na.value),(la=(Ra=u==null?void 0:u.itemData)==null?void 0:Ra.find(el=>(el==null?void 0:el.key)==="pageGroup"))==null||la.contents,Ht(compData,u.allMapContents)},{deep:!0});const Cn=p=>{var T,z,P,D,re;const v=(z=(T=F.value)==null?void 0:T.filter(le=>le==null?void 0:le.mainKey))==null?void 0:z.map(le=>le==null?void 0:le.prop);if(v.length===0){const le=(P=F.value)==null?void 0:P.map(q=>q==null?void 0:q.prop);return(D=le==null?void 0:le.map(q=>p==null?void 0:p[q]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(le=>p==null?void 0:p[le]))==null?void 0:re.join("|")},Jn=p=>{var le,q,be,De,Ke;const v=(q=(le=F.value)==null?void 0:le.filter(je=>je==null?void 0:je.required))==null?void 0:q.map(je=>je==null?void 0:je.prop),T=[];if(p==null||p.forEach(je=>{v==null||v.forEach(ea=>{const ka=je[ea];(ka==null||ka==="")&&(T.includes(ea)||T.push(ea))})}),T.length>0)return qa.ElMessage.warning(`请填写必填项:${T.join("、")}`);const z=new Map,P=new Map;(be=ze.value)==null||be.forEach(je=>{const ea=Cn(je);z.set(ea,je)}),p==null||p.forEach(je=>{const ea=Cn(je);P.set(ea,je)});const D=p==null?void 0:p.filter(je=>z.has(Cn(je))),re=(De=ze.value)==null?void 0:De.filter(je=>P.has(Cn(je)));return(D==null?void 0:D.length)>0&&(y.columns=(Ke=F.value)==null?void 0:Ke.filter(je=>(je==null?void 0:je.label)!=="操作"),y.existRows=re,y.tableData=D,y.show=!0),y.newRows=p==null?void 0:p.filter(je=>{const ea=Cn(je);return!z.has(ea)}),y.newRows},Fn=e.ref(""),Dn=e.ref(null),In=async()=>{var p,v,T,z,P,D;try{const re=await A.quoteApi({related:[{menus:Se.value,groups:u==null?void 0:u.compName}],platId:parseInt((p=vl.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){Dn.value=(T=re==null?void 0:re.data)==null?void 0:T.result;const le=(z=F.value)==null?void 0:z.map(De=>(De==null?void 0:De.prop)||(De==null?void 0:De.label)),q=jn(le,(P=re==null?void 0:re.data)==null?void 0:P.result),be=q==null?void 0:q.flatMap(De=>De==null?void 0:De.quote);(be==null?void 0:be.length)>0&&(Fn.value=(D=be==null?void 0:be.map(De=>De==null?void 0:De.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function jn(p,v){var T;return(T=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:T.map(z=>{const P={...z};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const vn=async(p,v)=>{var T,z;try{Dn.value||await In();const P=v==null?void 0:v.map(re=>{const le=Object.keys(re),q={};return le.forEach((be,De)=>{q[p[De]]=re[be]}),q}),D=Jn(P);if(!D||(D==null?void 0:D.length)===0)return;y.show||await O(D)}catch(P){throw qa.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((T=vl==null?void 0:vl.value)==null?void 0:T.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(z=u==null?void 0:u.related)==null?void 0:z.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},On=async p=>{var D,re,le,q,be,De,Ke;let v=J.value;v!=null&&v.find(je=>(p==null?void 0:p.key)===(je==null?void 0:je.key))&&(v=v==null?void 0:v.filter(je=>(p==null?void 0:p.key)!==(je==null?void 0:je.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let T=ke.value;T=T==null?void 0:T.map(je=>{var ea,ka;return(je==null?void 0:je.type)==="Select"&&(p==null?void 0:p.key)===(je==null?void 0:je.prop)&&Array.isArray(je.value)&&(ea=je.value)!=null&&ea.every(Na=>typeof Na=="string")&&(je.selectValue=(ka=v==null?void 0:v.find(Na=>(Na==null?void 0:Na.key)===(je==null?void 0:je.prop)))==null?void 0:ka.value),je});let z=(q=(le=T==null?void 0:T.find(je=>(je==null?void 0:je.prop)===(p==null?void 0:p.key)))==null?void 0:le.optionUrl)==null?void 0:q.menuId,P=T==null?void 0:T.find(je=>(je==null?void 0:je.prop)===(p==null?void 0:p.key));if(z){let je=await _t(P==null?void 0:P.optionUrl,z),ea,ka=ae.value,Na=(Ke=(De=(be=ke.value)==null?void 0:be.find(Ra=>{var la;return(la=P==null?void 0:P.optionUrl)==null?void 0:la.menuId}))==null?void 0:De.selectValue)==null?void 0:Ke[0];if(je==null||je.forEach(Ra=>{var la,el,xa,al,ve,Pa,ga,Ea,Sa,B;if(z){let G=(el=(la=ke.value)==null?void 0:la.find(ta=>{var we,fa;return((we=P==null?void 0:P.optionUrl)==null?void 0:we.menuId)===((fa=ta==null?void 0:ta.optionUrl)==null?void 0:fa.menuId)}))==null?void 0:el.prop,Re=(al=(xa=T==null?void 0:T.find(ta=>(ta==null?void 0:ta.prop)===G))==null?void 0:xa.selectValue)==null?void 0:al[0];G!=null&&G.includes("·")&&(G=(ve=G==null?void 0:G.split("·"))==null?void 0:ve[0],Re=(Sa=(Ea=(ga=p==null?void 0:p.value)==null?void 0:ga[((Pa=p==null?void 0:p.value)==null?void 0:Pa.length)-1])==null?void 0:Ea.split(" "))==null?void 0:Sa[0]),ka!=null&&ka.find(ta=>(ta==null?void 0:ta.value)===Na)?ea=(B=ka==null?void 0:ka.find(ta=>(ta==null?void 0:ta.value)===Na))==null?void 0:B.objectValue:Ra[G]===Re&&(ea=Ra)}}),ea){let Ra=T;Ra=Ra==null?void 0:Ra.map(la=>{var el,xa,al,ve,Pa,ga;return z&&(ea!=null&&ea[la==null?void 0:la.prop])&&ye.value==="新增"&&(la==null?void 0:la.prop)!==(P==null?void 0:P.prop)?la.value=(ea==null?void 0:ea[la==null?void 0:la.prop])||(ea==null?void 0:ea[(ve=(al=(xa=(el=la==null?void 0:la.optionUrl)==null?void 0:el.groupSelect)==null?void 0:xa[1])==null?void 0:al.replaceAll("[",""))==null?void 0:ve.replaceAll("]","")]):la.value=(ga=(Pa=ke.value)==null?void 0:Pa.find(Ea=>(Ea==null?void 0:Ea.prop)===(la==null?void 0:la.prop)))==null?void 0:ga.value,la}),ke.value=Ra}}J.value=v},Xn=async(p,v)=>{var T,z,P,D,re;if((T=p==null?void 0:p.toString())!=null&&T.includes(".txt")||(z=p==null?void 0:p.toString())!=null&&z.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const le=await qa.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),q=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"});let be=URL.createObjectURL(q);pa.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:be}],ee.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&Ae("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Xr.value=!1;let p=Vr.value;Vr.value=p+1});const Gr=e.reactive({prop:"",order:null}),Zn=e.computed(()=>{const p=(ze.value??[]).slice(),v=Gr.prop||ce.prop,T=Gr.order||ce.order;if(!v||!T)return p;const z=T==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((le,q)=>le==null?le:le[q],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const le=String(re).trim();if(le==="")return{ok:!1,value:NaN};const q=le.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(q))return{ok:!1,value:NaN};const be=Number(q);return{ok:Number.isFinite(be),value:be}};return p.sort((re,le)=>{const q=P(re),be=P(le);if(q==null&&be==null)return 0;if(q==null)return z?-1:1;if(be==null)return z?1:-1;const De=D(q),Ke=D(be);if(De.ok&&Ke.ok)return z?De.value-Ke.value:Ke.value-De.value;const je=ve=>{if(ve==null)return{ok:!1,value:NaN};const Pa=String(ve).trim();if(Pa==="")return{ok:!1,value:NaN};const ga=Pa.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ga)return{ok:!1,value:NaN};const Ea=ga[1]?-1:1,Sa=Number(ga[2]),B=Number(ga[3]),G=Number(ga[4]);return[Sa,B,G].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:B>=60||G>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(Sa*3600+B*60+G)}},ea=je(q),ka=je(be);if(ea.ok&&ka.ok)return z?ea.value-ka.value:ka.value-ea.value;const Na=new Date(q).getTime(),Ra=new Date(be).getTime(),la=!Number.isNaN(Na),el=!Number.isNaN(Ra);if(la&&el)return z?Na-Ra:Ra-Na;const xa=String(q),al=String(be);return z?xa.localeCompare(al):al.localeCompare(xa)})}),wn=e.computed(()=>{var T;const p=(me.currentPage-1)*me.pageSize,v=p+me.pageSize;return Ae("getSliceContLength",me),(T=Zn.value)==null?void 0:T.slice(p,v)}),Mi=p=>{me.currentPage=p,Ae("getSliceContLength",me)},jo=p=>{var z;me.pageSize=p;const v=((z=ze.value)==null?void 0:z.length)??0,T=p>0?Math.ceil(v/p):1;me.currentPage>T&&(me.currentPage=T||1,qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Ae("getSliceContLength",me)},Ho=({prop:p,order:v})=>{Gr.prop=p,Gr.order=v,me.currentPage=1};function Nn(p){const v=[];function T(z,P=""){z.forEach(D=>{D.children&&D.children.length>0?T(D.children,D.prop):v.push(D.prop)})}return T(p),v}const Uo=(p,v)=>{var le,q,be,De;let T=(q=(le=F.value)==null?void 0:le.map(Ke=>Ke==null?void 0:Ke.prop))==null?void 0:q.filter(Ke=>Ke!=="operate");((be=F.value)==null?void 0:be.some(Ke=>{var je;return((je=Ke==null?void 0:Ke.children)==null?void 0:je.length)>0}))&&(T=Nn((De=F.value)==null?void 0:De.filter(Ke=>(Ke==null?void 0:Ke.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(T==null?void 0:T.length)?p:p.slice(0,T==null?void 0:T.length),!(P==null?void 0:P.every(Ke=>T==null?void 0:T.find(je=>Ke===je))))return qa.ElMessage.error("导入的数据表头不匹配");vn(P,v)},qo=(p,v)=>{var P;const T=p==null?void 0:p.filter(D=>D!=="序号"),z=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});da.setRefreshCurStructure(!1),((P=F.value)==null?void 0:P.length)===0||Uo(T,z)},Wo=(p,v,T,z)=>{const P=[],D=[],re=be=>Object.keys(be).length;for(const be in p)if(p[be]!==void 0){const De=p[be],Ke=[];for(const[je,ea]of Object.entries(De))Ke.push(ea),D.length<re(De)&&D.push(je);P.push(Ke)}P.unshift(D);const le=oe.utils.aoa_to_sheet(P),q=oe.utils.book_new();oe.utils.book_append_sheet(q,le,z),oe.writeFileSync(q,`${v}.xlsx`),Hl.value=[]},Ii=async(p,v,T,z=!1,P)=>{try{da.setRefreshCurStructure(!1)}catch(D){qa.ElMessage.error(D)}},eo=async(p,v)=>{await Ii()},ln=async(p,v)=>{await Ii("columnType",v,p,!1)},Ko=async({newRow:p,targetIndex:v})=>{var P;if(!_a(u.config,{type:Ve.TABLE}))return;const z=(me.currentPage-1)*me.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=ri(z,ze.value||[]))}catch{}ze.value.splice(z,0,p),await e.nextTick(),h.value.has(p.id)||h.value.set(p.id,A.cloneDeep(p)),ze.value=(P=ze.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),s.value.add(p.id),Rl.value=!0},Go=(p,v,T,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const le=new Set([...(Array.isArray(T)?T:[]).filter(De=>(De==null?void 0:De.id)!==(p==null?void 0:p.id)).map(De=>De==null?void 0:De[D]).filter(De=>De!=null).map(De=>String(De)),...(Array.isArray(z)?z:[]).map(De=>De==null?void 0:De[D]).filter(De=>De!=null).map(De=>String(De))]);if(!le.has(re))return;let q=1,be="";for(;be=`${re}(${q})`,!!le.has(be);)q++;p[D]=be}),p),Oi=async()=>{var P,D,re,le,q,be,De,Ke;const p=Array.from(s.value||[]);if(p.length===0)return;const v=(D=oe.getColumnChild((P=A.cloneDeep(F.value))==null?void 0:P.filter(je=>(je==null?void 0:je.label)!=="操作")))==null?void 0:D.filter(je=>(je==null?void 0:je.required)===!0);if((v==null?void 0:v.length)>0)for(let je=0;je<p.length;je++){const ea=p[je],ka=(re=ze.value)==null?void 0:re.find(Na=>(Na==null?void 0:Na.id)===ea);if(ka)for(let Na=0;Na<v.length;Na++){const Ra=v[Na],la=Ra==null?void 0:Ra.prop,el=(Ra==null?void 0:Ra.label)??la,xa=ka==null?void 0:ka[la];if(xa===""||xa===null||xa===void 0||Array.isArray(xa)&&xa.length===0){qa.ElMessage.error(`${el}不能为空`);let ve={};ve.id=ka==null?void 0:ka.id;const Pa={fixContent:[ve],buttonName:"修改",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};Ae("change",Pa);return}}}const T=[],z=[];if(p.forEach(je=>{var el;const ea=(el=ze.value)==null?void 0:el.find(xa=>(xa==null?void 0:xa.id)===je);if(!ea)return;if(ea!=null&&ea._isTemp){const al=(oe.getAllLeafNodes(F.value)||[]).filter(B=>(B==null?void 0:B.mainKey)===!0||(B==null?void 0:B.isMainKey)===!0),ve=ze.value.findIndex(B=>(B==null?void 0:B.id)===je),Pa=ve>=0?ve+1:ze.value.length+1;Go(ea,al,ze.value,T);const ga={id:Pa.toString()};(ea==null?void 0:ea.sort)!==void 0&&(ea==null?void 0:ea.sort)!==null&&String(ea.sort).trim()!==""?ga.sort=String(ea.sort):ga.sort=ri(ve>=0?ve:ze.value.length-1,ze.value||[]),(oe.getAllLeafNodes(F.value)||[]).filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate").forEach(B=>{const G=B==null?void 0:B.prop;if(G){const Re=ea[G];Re!==void 0?ga[G]=Re??"":ga[G]=""}}),T.push(ga);return}const Na=(oe.getAllLeafNodes(F.value)||[]).filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),Ra=new Set(Na.map(xa=>xa==null?void 0:xa.prop).filter(Boolean)),la={};for(const xa of Ra)Object.prototype.hasOwnProperty.call(ea,xa)&&(la[xa]=ea[xa]);z.push({id:ea.id,value:{tableData:la}})}),da.setTableLoading(u==null?void 0:u.index),z.length>0){const je=z.map(ka=>{const Na={id:ka.id,...ka.value.tableData};return delete Na._isOCRRow,delete Na._ocrTableId,delete Na._isTemp,delete Na.tableEditType,delete Na.index,Na}),ea=[{tableName:((le=u==null?void 0:u.related)==null?void 0:le.find(ka=>ka==null?void 0:ka.includes("content")))??"content_"+(u==null?void 0:u.index),tableContents:je}];try{await A.pageBatchUpdateApi({platId:parseInt((q=vl.value)==null?void 0:q.plat_id),changeContents:ea})}catch(ka){qa.ElMessage.error(((De=(be=ka==null?void 0:ka.response)==null?void 0:be.data)==null?void 0:De.message)||(ka==null?void 0:ka.message)||"保存失败"),da.setTableLoading(!1);return}}if(T.length>0){const je={fixContent:T,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};Ae("change",je)}qa.ElMessage.success("保存成功"),s.value.clear(),h.value.clear(),ze.value=(Ke=ze.value)==null?void 0:Ke.map(je=>({...je,tableEditType:"text"})),Rl.value=!1,da.setRefreshCurStructure(!0)},Yo=()=>{var v;const p=Array.from(s.value||[]);if(p.length===0){Rl.value=!1;return}p.forEach(T=>{var D,re;const z=h.value.get(T),P=(D=ze.value)==null?void 0:D.find(le=>(le==null?void 0:le.id)===T);if(P!=null&&P._isTemp){ze.value=ze.value.filter(le=>(le==null?void 0:le.id)!==P.id);return}if(z){const le=(re=ze.value)==null?void 0:re.findIndex(q=>(q==null?void 0:q.id)===T);le!==-1&&(ze.value[le]={...ze.value[le],...z})}}),s.value.clear(),h.value.clear(),ze.value=(v=ze.value)==null?void 0:v.map(T=>({...T,tableEditType:"text"})),Rl.value=!1},Li=e.ref(!1),ao=async p=>{var P,D,re,le;if(!Rl.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(le=p.preventDefault)==null||le.call(p),await e.nextTick(),await lo())},lo=async()=>{if(H.value){Rl.value=!1;return}if(!Li.value){Li.value=!0;try{Array.from(s.value||[]).length>0?await Oi():Rl.value=!1}finally{Promise.resolve().then(()=>{Li.value=!1})}}},Jo=p=>{Hl.value=p},ro=(p,v)=>{mr.value===v?ar.value=!1:ar.value=!0,mr.value=v==null?void 0:v.changeProp},hi=p=>{if(!p)return;const{item:v,value:T}=p,z=ke.value.find(P=>P.prop==v.prop);z&&z.contents.push({label:T,value:T})},gn=e.computed(()=>{var T,z,P;const p=(T=F.value)==null?void 0:T.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(z=F.value)==null?void 0:z.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Qn=async(p,v,T)=>{const z=A.cloneDeep(F.value);await e.nextTick();const P=z==null?void 0:z.map(re=>(T==null?void 0:T.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Ri(P);await bs(u.index,D),F.value=P,ne.value=D},Ri=p=>{var P;const v=p||[];return((P=oe.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return c0(re,D)})},no=async p=>{let v=await d0(u.index);v||(v=Ri(p)),ne.value=v},io=async(p,v)=>{const T=A.cloneDeep(F.value),z=re=>Array.isArray(re)?re.map(le=>{const q=Array.isArray(le==null?void 0:le.children)&&le.children.length>0,be={...le};return(be==null?void 0:be.prop)==="operate"||(be==null?void 0:be.label)==="操作"||(be==null?void 0:be.type)==="operate"?(be.sortable=!1,be.filterable=!1,be.operable=!1):be.sortable=q?!1:!!p,q&&(be.children=z(be.children)),be}):re,P=z(T),D=Ri(P);await bs(u.index,D),F.value=P,ne.value=D,await e.nextTick(),Vr.value=Vr.value+1},oo=()=>{Y.value=!1},ei=p=>{Ae("clickTrigger",p)},to=async p=>{var D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa;const v=p==null?void 0:p.row,T=p==null?void 0:p.rowData,z=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(te(v)){const ve={files:[Pe(v)],data:{}};Me(ve);return}Ue.value=[{url:v,extension:Ce(v)}],fe.value=!0,N.value={data:A.cloneDeep(T)},$e.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(le=v==null?void 0:v.toString())!=null&&le.includes(".STL")||(q=v==null?void 0:v.toString())!=null&&q.includes(".obj")||(be=v==null?void 0:v.toString())!=null&&be.includes(".mtl")){const al=(De=v==null?void 0:v.toString())==null?void 0:De.split(","),ve=ra(al),Pa=ve==null?void 0:ve[0];if(te(Pa==null?void 0:Pa.extension)){Me({files:ve,data:{}});return}Ue.value=ve,fe.value=!1,$e.value=!0;return}if((Ke=v==null?void 0:v.toString())!=null&&Ke.includes(".stl")||(je=v==null?void 0:v.toString())!=null&&je.includes(".STL")||(ea=v==null?void 0:v.toString())!=null&&ea.includes(".obj")||(ka=v==null?void 0:v.toString())!=null&&ka.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let al,ve=[],Pa={};if(Array.isArray(v)?al=v:al=v==null?void 0:v.split(","),al==null||al.forEach(ga=>{ga.includes(".mtl")?ve.push(ga):Pa.blob=Pa.blob?Pa.blob+","+ga:ga}),(ve==null?void 0:ve.length)>0&&(Pa.mtlBlobs=ve),z&&(Pa.suffix=z),(Ra=(Na=Object.values(Pa))==null?void 0:Na[0])!=null&&Ra.includes("http:"))P.push(Pa);else{const ga=new Blob([Pa.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ga),Sa="";(la=v==null?void 0:v.split("/"))==null||la.forEach((B,G)=>{var Re;G===((Re=v==null?void 0:v.split("/"))==null?void 0:Re.length)-1&&(Sa=B)}),(el=Pa.blob)!=null&&el.includes(".stl")&&(Sa=(Sa==null?void 0:Sa.replaceAll(">",""))+".urdf"),pa.value=[{name:Sa,blobUrl:Ea}],ee.value=!0}}else{const al=await qa.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ve=new Blob([al.data],{type:"application/octet-stream;charset=UTF-8"});let Pa=URL.createObjectURL(ve),ga="";if((xa=v==null?void 0:v.split("/"))==null||xa.forEach((Ea,Sa)=>{var B;Sa===((B=v==null?void 0:v.split("/"))==null?void 0:B.length)-1&&(ga=Ea)}),te(ga)){const Ea=U(ga),Sa=Pe(v);Me({files:[Sa],data:{trackFileType:Ea}});return}pa.value=[{name:ga,blobUrl:Pa}],ee.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},ai=p=>{var z,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(z=p==null?void 0:p.url)==null?void 0:z.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},so=p=>{if(!p)return"未知文件";try{const z=ai(p);if(typeof z=="string"&&z.includes("."))return z}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",T=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${T}`},co=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const T=Number(v[1]),z=Number(v[2]);return!Number.isFinite(T)||!Number.isFinite(z)?p:String(T*1e3+z)},li=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const T=Number(v);return Number.isFinite(T)?T:null},Xo=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const T=v.includes("T")?v:v.replace(" ","T"),z=Date.parse(T);return Number.isFinite(z)?z:null},vi=(p,v=[])=>{const T=Array.isArray(p)?p.slice():[];if(T.length<=1)return T;const z=new Map((v||[]).map((re,le)=>[String(re),le])),P=T.some(re=>li(re==null?void 0:re.sort)!==null),D=T.map((re,le)=>({r:re,idx:le,id:String((re==null?void 0:re.id)??""),sortVal:li(re==null?void 0:re.sort),createTimeMs:Xo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,le)=>{if(P){const De=re.sortVal,Ke=le.sortVal;if(De===null&&Ke!==null)return 1;if(De!==null&&Ke===null)return-1;if(De!==null&&Ke!==null&&De!==Ke)return De-Ke}const q=re.createTimeMs,be=le.createTimeMs;return q!==null&&be!==null&&q!==be?be-q:q!==null&&be===null?-1:q===null&&be!==null?1:re.prevIdx!==le.prevIdx?re.prevIdx-le.prevIdx:re.idx-le.idx}),D.map(re=>re.r)},ri=(p,v=[])=>{const T=v==null?void 0:v[p-1],z=v==null?void 0:v[p],P=li(T==null?void 0:T.sort),D=li(z==null?void 0:z.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const le=Number(re.toFixed(6));return String(Number.isFinite(le)?le:re)},mi=async p=>{let v=null,T=null;if(p!=null&&p.id){const P=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),T=so(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await yi(),D=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await qa.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),T=p==null?void 0:p.name}else{const P=await A.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),T=ai(p)):v=p==null?void 0:p.url}if(te(v)){const P={row:`${v}`,suffix:Ce(T)};to(P);return}const z={name:T,blobUrl:v};pa.value=[z],ee.value=!0},Zo=async p=>{let v=null,T=null;if(p!=null&&p.id){const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),T=so(p)}else if(p!=null&&p.downloadUrl){const D=await yi(),re=await qa.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),T=p==null?void 0:p.name}else{const D=await A.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),T=ai(p)}const z={name:T,blobUrl:v},P=document.createElement("a");P.href=z.blobUrl,P.download=z.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},$i=(p,v)=>{var z;if(Object.values(v).length===0)return;let T=p;return Object.values(v).find(P=>{var D,re,le;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((le=P==null?void 0:P.toString())==null?void 0:le.includes(".obj"))})?T=[...p,pe.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(T=[...p,{label:"迁移"}]),T},Qo=()=>{I.value=!0},et=e.ref([]),uo=async(p,v,T=!1)=>{var re,le,q,be;if(!p)return;if(T){ze.value=[...La.value.values()].filter(De=>Object.values(De).some(Ke=>typeof Ke=="string"?Ke==null?void 0:Ke.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let De in p)(p==null?void 0:p[De])!==""&&(z[De]=p==null?void 0:p[De]);if(JSON.stringify(z)==="{}"){ze.value=Array.from(((re=La.value)==null?void 0:re.values())??[]);return}let P=(le=u==null?void 0:u.related)==null?void 0:le.find(De=>De==null?void 0:De.includes("content_")),D=await A.getFillFind({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),tableName:P,params:z});D=(be=D==null?void 0:D.data)==null?void 0:be.result,ze.value=D,da.setTableLoading(!1)},ni=e.computed(()=>{var v,T;return((T=(v=u==null?void 0:u.itemData)==null?void 0:v.find(z=>(z==null?void 0:z.key)==="isEdit"))==null?void 0:T.contents)??!0}),An=async p=>{var z,P,D,re;if(!_a(u.config,{type:Ve.TABLE})||!(((P=(z=u==null?void 0:u.itemData)==null?void 0:z.find(le=>(le==null?void 0:le.key)==="isEdit"))==null?void 0:P.contents)??!0)||!p)return;((D=Array.from(s.value))==null?void 0:D.length)>0&&await Oi();const T=p==null?void 0:p.id;T!=null&&(s.value.clear(),h.value.clear(),h.value.has(T)||h.value.set(T,A.cloneDeep(p)),ze.value=(re=ze.value)==null?void 0:re.map(le=>({...le,tableEditType:(le==null?void 0:le.id)===T?"edit":"text"})),s.value.add(T),Rl.value=!0)},Vi=async(p,v,T,z)=>{z!=null&&z.isExistChild&&Ae("clickMainKey",p,T,F.value)},Pi=()=>{ee.value=!1},at=p=>{Ae("rowClick",p)};e.watch(()=>u.changedContent,()=>{var T,z;if(!u.changedContent)return;let p=(T=ze.value)==null?void 0:T.map(P=>{var D;return P.id===((D=u.changedContent)==null?void 0:D.id)&&(P={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete P.newId),P});const v=(z=u.itemData)==null?void 0:z.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));ze.value=p,Ae("contentChange",{contents:v,index:u.index}),Ae("change",{content:p,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const lt=()=>{},rt=async()=>{const p=Se.value,v=sessionStorage.getItem("systemKey"),T=await oe.getItemData(p,v,""),z=(T==null?void 0:T.find(le=>(le==null?void 0:le.name)==="方法明细"))||(T==null?void 0:T[0]),P=(z==null?void 0:z.compData)||[],D=P==null?void 0:P.find(le=>{const q=le==null?void 0:le.key;return q==="formContent"||q==="tableContents"});return D==null?void 0:D.contents},yi=async()=>{const v=qa.Local.get("access-token");return v?`Bearer ${v}`:""},nt=async(p,{token:v,inputData:T}={})=>await qa.axios.post(p,T,{headers:{Authorization:v}}).catch(P=>(ue.setImportLoading(!1),Promise.reject(P))),it=p=>{var z;let v={};const T=[];return v.form={},(z=A.cloneDeep(p))==null||z.forEach((P,D)=>{var re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa;if((P==null?void 0:P.comp)==="Table"){(le=(re=P==null?void 0:P.compData)==null?void 0:re.find(ga=>(ga==null?void 0:ga.key)==="header"))==null||le.contents;let al=(De=(be=(q=P==null?void 0:P.compData)==null?void 0:q.find(ga=>(ga==null?void 0:ga.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:De.map(ga=>ga.slice(1));(Na=(ka=(ea=(je=(Ke=P==null?void 0:P.compData)==null?void 0:Ke.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:je.contents)==null?void 0:ea[0])==null?void 0:ka[0])==null||Na.label;let ve=(la=(Ra=P==null?void 0:P.compData)==null?void 0:Ra.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:la.contents,Pa=[];al==null||al.forEach(ga=>{let Ea=[];ga==null||ga.forEach((Sa,B)=>{var Re;let G={};((Re=ve[B])==null?void 0:Re.label)!=="操作"&&(G[ve[B].label]=Sa,Ea.push(G))}),Pa.push(Ea)}),v[P.name]=Pa}else{const al=(xa=(el=P.compData)==null?void 0:el.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:xa.contents;al==null||al.forEach(ve=>{var Pa,ga;if(ve.prop!==""){let Ea=ve==null?void 0:ve.value;Array.isArray(Ea)?Ea=((Pa=Ea==null?void 0:Ea[0])==null?void 0:Pa.oldUrl)||"http://222.92.178.198:62001/"+((ga=Ea==null?void 0:Ea[0])==null?void 0:ga.url):Ea=Ea.toString(),ve={key:(ve==null?void 0:ve.prop)??(ve==null?void 0:ve.label),value:Ea},T.push(ve)}})}}),v.form=oe.getFormContents(T),v},ot=p=>{const v=[],T=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(T):v.push(z)};return T(p),v},tt=async(p,v,T)=>{var ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl;ue.setImportLoading(!0),da.setFreshContent(!1);let z=await rt().catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua)));z=z==null?void 0:z.filter(Ua=>{var bl;return((bl=Ua==null?void 0:Ua.find(Ha=>Ha==null?void 0:Ha.id))==null?void 0:bl.id)===(v==null?void 0:v.id)});let P=oe.getEqualChild([(ve=F.value)==null?void 0:ve.filter(Ua=>(Ua==null?void 0:Ua.label)!=="操作")]);const D=(ga=(Pa=oe.tableToForm(z,P))==null?void 0:Pa[0])==null?void 0:ga.find(Ua=>{const bl=Ua==null?void 0:Ua.key;return bl==="Interface"||bl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),ue.setImportLoading(!1);return}const le=F.value?oe.getEqualChild([F.value]):[],q=le.find(Ua=>{const bl=Ua==null?void 0:Ua.prop;return bl==="Input1"||bl==="输入数据.输入1"||bl==="样本输入数据"}),be=q==null?void 0:q.prop;let De=v==null?void 0:v[be];const Ke=await yi().catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua)));let je=!0,ea="";(Ea=F.value)==null||Ea.forEach(Ua=>{(Ua==null?void 0:Ua.prop)===be&&(je=!!(Ua!=null&&Ua.childPath),ea=Ua==null?void 0:Ua.childPath)});let ka="";if(je){let Ua=(B=(Sa=F.value)==null?void 0:Sa.find(pl=>(pl==null?void 0:pl.isMainKey)===!0))==null?void 0:B.prop;ka=v==null?void 0:v[Ua];let bl=ea==null?void 0:ea.split(S),Ha=[];bl==null||bl.forEach((pl,Dl)=>{(bl==null?void 0:bl.length)-1===Dl&&Ha.push(ka),Ha.push(pl)}),Ha=Ha==null?void 0:Ha[0];let dl=await oe.getItemData(Ha,sessionStorage.getItem("systemKey"),""),Ga=dl==null?void 0:dl.filter(pl=>(pl==null?void 0:pl.name)===be);Ga=Ga==null?void 0:Ga.map(pl=>{var Dl;return pl.compData=(Dl=pl==null?void 0:pl.compData)==null?void 0:Dl.map(Nl=>{var Tr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(Tr=Nl==null?void 0:Nl.contents)==null?void 0:Tr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[be]))),Nl}),pl}),(!Ga||(Ga==null?void 0:Ga.length)===0)&&(Ga=dl,Ga=Ga==null?void 0:Ga.map(pl=>{var Dl;return pl.compData=(Dl=pl==null?void 0:pl.compData)==null?void 0:Dl.map(Nl=>{var Tr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(Tr=Nl==null?void 0:Nl.contents)==null?void 0:Tr.filter($l=>{var xl,Il;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Il=(xl=F==null?void 0:F.value)==null?void 0:xl[0])==null?void 0:Il.prop])})),Nl}),pl})),De=it(Ga)}const Na=await nt(re,{token:Ke,inputData:De}).catch(Ua=>(ue.setImportLoading(!1),Promise.reject(Ua))),Ra=(G=Na==null?void 0:Na.data)==null?void 0:G.data,la=le.find(Ua=>(Ua==null?void 0:Ua.prop)==="Output1"),el=la==null?void 0:la.prop;let xa=[],al=[];if(Ra&&((Re=Object.values(Ra))==null?void 0:Re.length)>0){let Ua=[];const bl=new FormData,Ha=(ta=ot(Ra))==null?void 0:ta.map(async Ga=>{var pl,Dl;if(!Array.isArray(Ga)&&(Ga!=null&&Ga.includes("http"))){let Nl=await qa.axios.get(Ga,{responseType:"blob"}),Tr=(Dl=Ga==null?void 0:Ga.split("/"))==null?void 0:Dl[((pl=Ga==null?void 0:Ga.split("/"))==null?void 0:pl.length)-1];bl.append("files",Nl.data,Tr)}else Ua.push(Ga)});if(await Promise.all(Ha),!oe.isFormDataEmpty(bl)){let Ga=await A.uploadAmountApi(bl),pl=(fa=(we=Ga==null?void 0:Ga.data)==null?void 0:we.result)==null?void 0:fa.map(Dl=>{var Nl,Tr,$l,xl,Il,Xl;return{name:(Xl=(Il=(xl=(Nl=Dl==null?void 0:Dl.url)==null?void 0:Nl.split("/"))==null?void 0:xl[(($l=(Tr=Dl==null?void 0:Dl.url)==null?void 0:Tr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Il.split("."))==null?void 0:Xl[0],url:Dl==null?void 0:Dl.url}});Ua=[...Ua,...pl]}let dl={};for(let Ga in v)Ga!=="id"&&(dl[Ga]=v[Ga]);dl[el]=Ua,al.push({id:v==null?void 0:v.id,value:{tableData:dl}})}if((al==null?void 0:al.length)>0){const Ua=al.map(Ha=>{const dl={id:Ha.id,...Ha.value.tableData};return delete dl._isOCRRow,delete dl._ocrTableId,delete dl._isTemp,delete dl.tableEditType,delete dl.index,dl}),bl=[{tableName:(Ba=u==null?void 0:u.related)==null?void 0:Ba.find(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:Ua}];await A.pageBatchUpdateApi({platId:parseInt((ol=vl.value)==null?void 0:ol.plat_id),changeContents:bl})}if((xa==null?void 0:xa.length)>0)try{await A.pageBatchAddApi({platId:parseInt((Wa=vl.value)==null?void 0:Wa.plat_id),changeContents:[{tableName:(fl=u==null?void 0:u.related)==null?void 0:fl.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:xa.map(Ua=>{var Ha,dl,Ga;const bl={id:((Ha=Ua==null?void 0:Ua.key)==null?void 0:Ha.id)??((dl=Ua==null?void 0:Ua.key)==null?void 0:dl.rowId)??(Ua==null?void 0:Ua.id),...((Ga=Ua==null?void 0:Ua.value)==null?void 0:Ga.tableData)||{}};return delete bl._isOCRRow,delete bl._ocrTableId,delete bl._isTemp,delete bl.tableEditType,delete bl.index,Object.keys(bl).forEach(pl=>{pl==="证书附件"&&Array.isArray(bl[pl])&&(bl[pl]=JSON.stringify(bl[pl]))}),bl})}]})}catch(Ua){qa.ElMessage.error(((Fl=(hl=Ua==null?void 0:Ua.response)==null?void 0:hl.data)==null?void 0:Fl.message)||(Ua==null?void 0:Ua.message)||"保存失败"),da.setTableLoading(!1);return}Hi(!0),ue.setImportLoading(!1),da.setFreshContent(!0)},po=(p,v)=>(p=p==null?void 0:p.map(T=>{var z,P;return T!=null&&T.children&&((z=T.children)!=null&&z.find(D=>D.id===(v==null?void 0:v.id))?T.children=(P=T.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):T.children=po(T.children,v)),T}),p),gi=e.ref(!1),t=()=>{gi.value=!0},i=async p=>{var T,z,P,D;gi.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const le={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};Ia.value.push(le),or(le,"uploading"),Ol(le,0);try{const q=new FormData;q.append("file",re,le.name);const be=await A.platformUploadFile(q);le.uploadResult=((T=be==null?void 0:be.data)==null?void 0:T.result)||{name:le.name,url:"",fileName:le.name},El({name:((z=le.uploadResult)==null?void 0:z.name)||le.name,url:((P=le.uploadResult)==null?void 0:P.url)||"",id:(D=le.uploadResult)==null?void 0:D.id}),or(le,"uploaded"),Ol(le,100)}catch(q){console.error("文件上传失败:",q),qa.ElMessage.error(`文件 ${le.name} 上传失败,请重试`),or(le,"pending"),Ol(le,0);const be=Ia.value.findIndex(De=>De.uid===le.uid);be>-1&&Ia.value.splice(be,1)}}},f=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(p,v,T)=>{v===(u==null?void 0:u.index)?T(new Error("选择源不能和目标源一致")):T()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),y=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],buttonValue:[{label:"跳过",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),_=()=>{y.show=!1},O=async p=>{var v,T,z,P,D,re,le,q;try{const be=[];let De=(v=ze.value||[])==null?void 0:v.slice();(p||[]).forEach(Na=>{const Ra={...Na};try{Ra.sort=ri(0,De)}catch{}be.push(Ra),De.unshift(Ra)});let Ke=await A.quoteApi({platId:parseInt((T=vl==null?void 0:vl.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:Se.value,groups:""},{menus:Se.value,groups:u==null?void 0:u.compName}]});Ke=(z=Ke==null?void 0:Ke.data)==null?void 0:z.result;let je=Ke==null?void 0:Ke.map(Na=>({tableName:"content_"+(Na==null?void 0:Na.id),tableContents:be==null?void 0:be.map((Ra,la)=>({id:la,...Ra}))})),ea=[{tableName:(P=u==null?void 0:u.related)==null?void 0:P.find(Na=>Na==null?void 0:Na.includes("content")),tableContents:be==null?void 0:be.map((Na,Ra)=>({id:Ra,...Na}))}];ea=[...ea,...je];const ka=await A.pageBatchAddApi({platId:parseInt((D=vl.value)==null?void 0:D.plat_id),changeContents:ea});if(((re=ka==null?void 0:ka.data)==null?void 0:re.code)===200){const Na={buttonName:"新增",columns:F.value,fixContent:be==null?void 0:be.map((la,el)=>({id:el,...la})),relatedContents:u==null?void 0:u.related};await Dt(Na),qa.ElMessage.success("数据导入成功");let Ra=[];ea==null||ea.forEach(la=>{var el;(el=la==null?void 0:la.tableContents)==null||el.forEach(xa=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(xa),request_result:"{}",is_delete:!1,request_table:la==null?void 0:la.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((le=vl==null?void 0:vl.value)==null?void 0:le.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}else{let Na=[];ea==null||ea.forEach(Ra=>{var la;(la=Ra==null?void 0:Ra.tableContents)==null||la.forEach(el=>{Na.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(el),request_result:"{}",is_delete:!1,request_table:Ra==null?void 0:Ra.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),changeContents:[{tableName:"log",tableContents:Na}]}),qa.ElMessage.error("数据导入响应失败")}}catch(be){throw new Error(be)}},K=async p=>{var v,T,z,P,D,re,le,q,be,De;try{if(p==="cancel"&&(y.show=!1),p==="replace"&&((v=y==null?void 0:y.existRows)==null?void 0:v.length)>0){await A.pageBatchDeleteApi({platId:parseInt((T=vl.value)==null?void 0:T.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(je=>je==null?void 0:je.includes("content_")))||((P=u==null?void 0:u.related)==null?void 0:P.find(je=>je==null?void 0:je.includes("content"))),tableContents:y==null?void 0:y.existRows}]});const Ke=await A.pageBatchAddApi({platId:parseInt((D=vl.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=u==null?void 0:u.related)==null?void 0:re.find(je=>je==null?void 0:je.includes("content")),tableContents:(()=>{const je=(ze.value||[]).filter(Ra=>!((y==null?void 0:y.existRows)||[]).some(la=>String(la==null?void 0:la.id)===String(Ra==null?void 0:Ra.id))),ea=(y==null?void 0:y.tableData)||[],ka=[];let Na=je.slice();return ea.forEach(Ra=>{const la={...Ra};try{la.sort=ri(0,Na)}catch{}ka.push(la),Na.unshift(la)}),ka.map((Ra,la)=>({id:la,...Ra}))})()}]});if(((le=Ke==null?void 0:Ke.data)==null?void 0:le.code)!==200)return;(q=y.newRows)!=null&&q.length&&await O(y.newRows),await Dt({buttonName:"新增",columns:F.value,fixContent:(be=y==null?void 0:y.tableData)==null?void 0:be.map((je,ea)=>({id:ea,...je})),relatedContents:u==null?void 0:u.related}),(De=y.newRows)!=null&&De.length||qa.ElMessage.success("数据导入成功")}}catch(Ke){throw new Error(Ke)}finally{y.show=!1,y.columns=[],y.tableData=[],y.existRows=[]}},Q=()=>{f.show=!1},ge=p=>{var v,T;if((p==null?void 0:p.buttonName)==="取消")return f.show=!1;f.to=p==null?void 0:p.content,!(!(u!=null&&u.index)||!((v=f.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((T=f.to)==null?void 0:T.groupName)&&(Ae("change",{buttonName:"迁移",value:{from:f.from,to:f.to,data:f.selectRow}}),f.show=!1)},Fe=async p=>{var v,T,z,P;if(p){if(!$r.validateFileSize(p.raw)){qa.ElMessage.warning(`文件大小不能超过 ${jr.value.maxSize}MB`);const D=Ia.value.findIndex(re=>re.uid===p.uid);D>-1&&Ia.value.splice(D,1),Ee();return}if(!$r.validateFileType(p.raw)){qa.ElMessage.warning("请上传图片文件");const D=Ia.value.findIndex(re=>re.uid===p.uid);D>-1&&Ia.value.splice(D,1),Ee();return}or(p,"uploading"),Ol(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await A.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},El({name:((T=p.uploadResult)==null?void 0:T.name)||p.name,url:((z=p.uploadResult)==null?void 0:z.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),or(p,"uploaded"),Ol(p,100)}catch(D){console.error("文件上传失败:",D),qa.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),or(p,"pending"),Ol(p,0);const re=Ia.value.findIndex(le=>le.uid===p.uid);re>-1&&Ia.value.splice(re,1)}finally{Ee()}}},Ee=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},na=async()=>{var T,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Ia.value.length===0){qa.ElMessage.warning("请先选择要上传的图片");return}if(Ia.value.filter(P=>{const D=Bl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ll.value=!0,Xe.value=0;let v=null;try{Ia.value.forEach(la=>{or(la,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{Xe.value<P?Xe.value+=1:clearInterval(v)},50);const D=Ia.value.map(la=>{var el,xa,al;return{name:((el=la.uploadResult)==null?void 0:el.name)||la.name,url:((xa=la.uploadResult)==null?void 0:xa.url)||"",fileName:((al=la.uploadResult)==null?void 0:al.fileName)||la.name}}),re=$r.extractTableHeaders(F.value),le=D.map(la=>({name:(la==null?void 0:la.fileName)||(la==null?void 0:la.name),url:(la==null?void 0:la.url)||""})),q=await $r.recognize(le,re);if(console.log(q,"ocrResult"),clearInterval(v),v=null,(q==null?void 0:q.code)===500||(q==null?void 0:q.type)==="error"||!(q!=null&&q.result)){Xe.value=0,Ia.value.forEach(la=>{or(la,"failed"),Ol(la,0)}),qa.ElMessage.error((q==null?void 0:q.message)||"OCR识别失败,请重试"),ll.value=!1;return}Xe.value=P;const be=Array.isArray(q==null?void 0:q.result)?q.result:[];if(be.length===0){Xe.value=0,Ia.value.forEach(la=>{or(la,"failed"),Ol(la,0)}),qa.ElMessage.warning("OCR识别未返回有效数据"),ll.value=!1;return}const De=new Set,Ke=[];be.forEach((la,el)=>{const xa=la!=null&&la.数据&&typeof(la==null?void 0:la.数据)=="object"?la.数据:{},al=Array.isArray(la==null?void 0:la.图片信息)?la.图片信息:[],ve=new Map;al.forEach(ga=>{ga!=null&&ga.name&&ve.set(ga.name,ga.url||"")});const Pa={_index:el,_certType:(la==null?void 0:la.证书类型)||"",_certNo:(la==null?void 0:la.证书编号)||"",_ocrImages:al,__ocrFieldMeta:{}};Object.entries(xa).forEach(([ga,Ea])=>{let Sa="",B=0,G=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(Sa=(Ea==null?void 0:Ea.value)??"",B=(Ea==null?void 0:Ea.score)??0,G=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(Sa=Ea[0]??"",B=Ea[1]??0):(Sa=Ea??"",B=0),Pa[ga]=Sa,Pa[`${ga}_accuracy`]=B,De.add(ga),Pa.__ocrFieldMeta[ga]={value:Sa,score:B,bboxNorm:G,imageName:Re,imageUrl:Re&&ve.get(Re)||"",images:al}}),Ke.push(Pa)});const je=[],ea=new Set;Ke.forEach(la=>{la&&De.forEach(el=>{const xa=la[`${el}_accuracy`];(typeof xa=="number"?xa>0:xa!=null&&String(xa).trim()!==""&&String(xa)!=="0")&&ea.add(el)})}),De.forEach(la=>{je.push({prop:la,label:la,editable:!0,minWidth:230}),ea.has(la)&&je.push({prop:`${la}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Ia.value.forEach(la=>{or(la,"completed")}),Xe.value=100,wa.value=je,Ze.value=Ke,He.value=D,va.value=q;const ka=["出厂编号","设备名称","制造厂"],Na=je.filter(la=>la&&!la.isAccuracy&&typeof la.prop=="string").map(la=>la.prop),Ra=["出厂编号","设备名称","制造厂"];ca.value=Na.filter(la=>Ra.includes(la)),console.log("[OCR] 默认勾选字段 props:",ca.value),Oa.value=2,ll.value=!1,Aa.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),qa.ElMessage.error(((z=(T=P==null?void 0:P.response)==null?void 0:T.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ll.value=!1,Xe.value=0,Ia.value.forEach(D=>{or(D,"pending"),Ol(D,0)})}},Da=p=>{if(p==null)return"";let v=String(p);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,T=>String.fromCharCode(T.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Qa=()=>{var la,el;const p=He.value,v=va.value,T=Ze.value;if(!T||T.length===0){qa.ElMessage.warning("暂无数据可添加");return}const z=(la=oe.getAllLeafNodes(F.value)||[])==null?void 0:la.filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),P=new Map,D=new Map,re=(el=z==null?void 0:z.find(xa=>(xa==null?void 0:xa.label)==="证书附件"))==null?void 0:el.prop;z==null||z.forEach(xa=>{xa!=null&&xa.label&&(xa!=null&&xa.prop)&&(P.set(xa.label,xa.prop),D.set(xa.prop,xa.label))});const le=Date.now(),q=xa=>String(le*1e3+xa),be=[],De=[],Ke=xa=>{const al=zo&&zo[xa]||[xa];for(const ve of al){const Pa=P.get(ve);if(Pa)return Pa}return""},je=Ke("出厂编号"),ea=Ke("设备名称"),ka=Ke("制造厂"),Na=[],Ra=xa=>{var Sa,B;if(!re)return[];const al=(Array.isArray(p)?p[xa]:null)||null,ve=(al==null?void 0:al.url)||"",Pa=(al==null?void 0:al.fileName)||(al==null?void 0:al.name)||"";return(String(Pa).toLowerCase().endsWith(".pdf")||String(ve).toLowerCase().endsWith(".pdf"))&&ve?[{url:ve,name:Pa,fileName:Pa}]:(Array.isArray((B=(Sa=v==null?void 0:v.result)==null?void 0:Sa[xa])==null?void 0:B.图片信息)?v.result[xa].图片信息:[]).map(G=>({url:(G==null?void 0:G.url)||"",name:(G==null?void 0:G.name)||"",fileName:(G==null?void 0:G.name)||""})).filter(G=>G.url)};if(T.forEach((xa,al)=>{var ol;const ve={id:q(al),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Wa,fl]of P.entries())Object.prototype.hasOwnProperty.call(xa,Wa)&&(ve[fl]=xa[Wa]);re&&(ve[re]=Ra(al));const Pa=(Array.isArray(v==null?void 0:v.result)?v.result[al]:null)||null,ga=(Array.isArray(p)?p[al]:null)||null,Ea=(ga==null?void 0:ga.url)||"",Sa=(ga==null?void 0:ga.fileName)||(ga==null?void 0:ga.name)||"",B=String(Sa).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),G={ts:Date.now(),versionId:String(Date.now())+"_"+String(al),label:new Date().toLocaleString(),certType:(Pa==null?void 0:Pa.证书类型)||"",certNo:(Pa==null?void 0:Pa.证书编号)||"",fileType:B?"pdf":"image",sourceUrl:B?Ea:"",images:Array.isArray(Pa==null?void 0:Pa.图片信息)?Pa.图片信息.map(Wa=>({name:(Wa==null?void 0:Wa.name)||"",url:(Wa==null?void 0:Wa.url)||""})).filter(Wa=>Wa.url):[]},Re=Wa=>Da(Wa?ve==null?void 0:ve[Wa]:""),ta=Re(je),we=Re(ea),fa=Re(ka);if(!!(je&&ea&&ka&&ta&&we&&fa)){const Wa=(ze.value||[]).find(fl=>{const hl=Da(je?fl==null?void 0:fl[je]:""),Fl=Da(ea?fl==null?void 0:fl[ea]:""),Ua=Da(ka?fl==null?void 0:fl[ka]:"");return hl&&Fl&&Ua&&hl===ta&&Fl===we&&Ua===fa});if(Wa){Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:[Wa],selectedTargetId:String((Wa==null?void 0:Wa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ta&&je){const Wa=(ze.value||[]).filter(fl=>{const hl=Da(je?fl==null?void 0:fl[je]:"");return hl&&hl===ta});if(Wa.length>0){Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:Wa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ve.sort===void 0||ve.sort===null||String(ve.sort).trim()===""){const Wa=(ze.value||[]).map(hl=>li(hl==null?void 0:hl.sort)).filter(hl=>hl!==null),fl=Wa.length>0?Math.max(...Wa):((ol=ze.value)==null?void 0:ol.length)??0;ve.sort=String(Number((fl+1).toFixed(6)))}}catch{}Qe(u==null?void 0:u.index,ve.id,G),Na.push({idx:al,ocrRow:ve,versionItem:G,ocrNo:ta,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Na||[]).length>0){Ql.value=(Na||[]).map(xa=>({...xa,selectedTargetId:(xa==null?void 0:xa.selectedTargetId)||""})),dr.value=!0,nr.value=De,pr.value=be,gr.value=v,Oe.value=p,er.value=re||"";return}},Ka=(p,v,T)=>{Ze.value[p]&&(Ze.value[p][v]=T)},nl=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,wl=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},gl=p=>{var T,z,P,D;if(cl.value===p){cl.value=null,ja.value=!1,Le.value="";return}cl.value=p,Le.value="";const v=(T=Ze.value)==null?void 0:T[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){ul.value=v._ocrImages.map(q=>({name:(q==null?void 0:q.name)||"",url:(q==null?void 0:q.url)||""})).filter(q=>q.name||q.url);const re=v.__ocrFieldMeta||{},le=(z=Object.values(re))==null?void 0:z.find(q=>q==null?void 0:q.imageName);hr.value=(le==null?void 0:le.imageName)||((D=(P=ul.value)==null?void 0:P[0])==null?void 0:D.name)||"",ja.value=ul.value.length>0}else ul.value=[],ja.value=!1,hr.value=""},Tl=()=>{ba.value=!1,Ia.value=[],il.value=null,Oa.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0,ja.value=!1},Ul=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Bl=p=>{const v=p.uid||p.name;return Je.value.get(v)||"pending"},Ll=p=>{const v=p.uid||p.name;return ie.value.get(v)||0},Ol=(p,v)=>{const T=p.uid||p.name;ie.value.set(T,Math.min(100,Math.max(0,v)))},rn=p=>{const v=Bl(p),T=100.53;if(v==="completed"||v==="uploaded")return`${T} ${T}`;if(v==="failed")return`${T} ${T}`;if(v==="uploading"){const z=Ll(p);return`${T*(z/100)} ${T}`}else if(v==="processing")return`${T*.5} ${T}`;return`0 ${T}`},or=(p,v)=>{const T=p.uid||p.name;Je.value.set(T,v),(v==="completed"||v==="uploaded")&&Ol(p,100)},cn=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async T=>{const z=Array.from(T.target.files||[]);for(const P of z){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};Ia.value.push(D),await Fe(D)}T.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},bn=()=>{Oa.value>1&&Oa.value--},Tn=()=>{Oa.value===1?Ia.value.length>0&&!ll.value&&na():Oa.value===2&&(Qa(),Oa.value=3)},bi=async p=>{await It(p==null?void 0:p.row)},ii=async({row:p,prop:v})=>{!p||!v||await It(p,v)},It=async(p,v)=>{var P,D;const T=p==null?void 0:p.id;if(!T){qa.ElMessage.warning("暂无可预览数据");return}let z=_l(u==null?void 0:u.index,T);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),le=re!==null?Number(re):null;if(le!=null&&le!==""&&!Number.isNaN(le)){const q=_l(le,T);Array.isArray(q)&&q.length>0&&(jl(u==null?void 0:u.index,T,q),z=q)}}if(!z||z.length===0){const re=(P=oe.getAllLeafNodes(F.value)||[])==null?void 0:P.filter(q=>(q==null?void 0:q.type)!=="operate"&&(q==null?void 0:q.label)!=="操作"&&(q==null?void 0:q.prop)!=="operate"),le=v||((D=re==null?void 0:re.find(q=>(q==null?void 0:q.label)==="证书附件"))==null?void 0:D.prop);if(le&&p[le]){const q=p[le];let be=[],De="",Ke=!1;if(typeof q=="string")try{const je=JSON.parse(q);Array.isArray(je)&&(be=je.map(ea=>({name:(ea==null?void 0:ea.name)||(ea==null?void 0:ea.fileName)||"",url:(ea==null?void 0:ea.url)||""})).filter(ea=>ea.url||ea.name),be.length>0&&(De=be[0].url||"",Ke=String(be[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")))}catch{De=q,Ke=String(q).toLowerCase().endsWith(".pdf"),be=[{name:q,url:q}]}else Array.isArray(q)&&(be=q.map(je=>({name:(je==null?void 0:je.name)||(je==null?void 0:je.fileName)||"",url:(je==null?void 0:je.url)||""})).filter(je=>je.url||je.name),be.length>0&&(De=be[0].url||"",Ke=String(be[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")));if(be.length>0||De){const je={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ke?"pdf":"image",sourceUrl:Ke?De:"",images:be};z=[je],Qe(u==null?void 0:u.index,T,je)}}}if(!z||z.length===0){qa.ElMessage.warning("暂无可预览数据");return}_e.value=z,rl.value=!0},cu=p=>{Ia.value=Ia.value.filter((v,T)=>T!==p)},st=async(p,v,T)=>{var z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga;if(_a(u.config,{type:Ve.TABLE,tableOperate:p})){if(za.value="",Va.value=!0,ha.value=!0,Ae("onButtonClick",p,v),ae.value=[],p==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,Sa,B,G;(Ea=ze.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id))?ze.value=(Sa=A.cloneDeep(ze.value))==null?void 0:Sa.filter(Re=>(Re==null?void 0:Re.id)!==(v==null?void 0:v.id)):ze.value=po(A.cloneDeep(ze.value),v);try{v!=null&&v.id&&((G=(B=La.value)==null?void 0:B.has)!=null&&G.call(B,v==null?void 0:v.id))&&La.value.delete(v.id)}catch{}Lf(Ur.value,hn.value,v==null?void 0:v.id),da.setTableLoading(u==null?void 0:u.index),Ae("change",{content:ze.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:p,columns:F.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(p==="批量删除"){if(((z=Hl.value)==null?void 0:z.length)===0)return qa.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var B,G,Re,ta,we;const Ea=(B=Hl.value)==null?void 0:B.map(fa=>fa.id);ze.value=(G=A.cloneDeep(ze.value))==null?void 0:G.filter(fa=>!(Ea!=null&&Ea.includes(fa.id))),da.setTableLoading(u==null?void 0:u.index),Ae("change",{content:ze.value,fixContent:Hl.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:p,relatedContents:u==null?void 0:u.related,columns:F.value});const Sa=(Ea||[]).filter(Boolean);if(Sa.length>0&&Sa.every(fa=>fa!=null&&fa!=="")){const fa=(Hl.value||[]).map(Ba=>{const ol={...Ba};return delete ol._isOCRRow,delete ol._ocrTableId,delete ol._isTemp,delete ol.tableEditType,delete ol.index,ol});await A.pageBatchDeleteApi({platId:parseInt((Re=vl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ta=u==null?void 0:u.related)==null?void 0:ta.find(Ba=>Ba==null?void 0:Ba.includes("content_")))||((we=u==null?void 0:u.related)==null?void 0:we.find(Ba=>Ba==null?void 0:Ba.includes("content"))),tableContents:fa}]})}})}else if(p==="复制新增"){ye.value="复制新增",A.cloneDeep(v);const Ea=(P=F.value)==null?void 0:P.find(Sa=>Sa==null?void 0:Sa.isMainKey);Ea||((D=F.value)==null||D[0]),lr.value=v,Hi(!0)}else if(p==="新增")ye.value="新增",Fi(""),Y.value=!0;else if(p==="编辑")ye.value="编辑",Fi(v),Y.value=!0;else if(p==="查看")ye.value="查看",Fi(v),Va.value=!1,ha.value=!1,Y.value=!0;else if(p==="查看三维模型"){const Ea={};for(let B in v)B!=="id"&&(Ea[B]=v[B]);let Sa=(re=Object.values(Ea))==null?void 0:re[1];Ge.setTableShowThree(Sa)}else if(p==="切换视图")wu();else if(((le=T==null?void 0:T.extra)==null?void 0:le.type)==="modelExample")ye.value=p,qe.value=!0;else if(p==="新建"){let Ea=de.value,Sa=[];for(let we in Ea)we!=null&&we.includes(`loading${((q=vl.value)==null?void 0:q.account)||((be=vl.value)==null?void 0:be.账号)}`)&&(Sa=[...Sa,...we]);let B=[];for(let we in Ea)we!=null&&we.includes(`updateLoading${((De=vl.value)==null?void 0:De.account)||((Ke=vl.value)==null?void 0:Ke.账号)}`)&&(B=[...B,...we]);let G=Sa==null?void 0:Sa.map(we=>we==null?void 0:we.id);const Re=B==null?void 0:B.map(we=>we==null?void 0:we.id);G=[...A.cloneDeep(G),...Re],(G==null?void 0:G.length)>0&&(G!=null&&G.every(we=>we!==null&&we))&&await Rr.batchDeleteInsofDataApi({ids:G});const ta=(je=aa.value)==null?void 0:je.find(we=>(we==null?void 0:we.label)==="新建");await pu(!1,ta)}else if(p==="修改模板"){let Ea=A.cloneDeep(Se).value;da.setRouteToChildPath(Ea),ue.setActiveMenuPath(Ea+S)}else if(p==="执行")tt(p,v);else if(p==="导出paraform"){const Ea=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Sa=["推力","真空","压力","温度","流量"],B=xl=>{var Il,Xl,Ml;return xl?typeof(xl==null?void 0:xl.value)=="string"?xl.value:((Ml=(Xl=(Il=xl==null?void 0:xl._custom)==null?void 0:Il.value)==null?void 0:Xl.value)==null?void 0:Ml.value)||"":""},G=Array.isArray(Jl.value)?Jl.value:[],Re=B(G.find(xl=>(xl==null?void 0:xl.condition)==="child")),ta=String(Re||"").slice(0,8),we=xl=>{if(xl==null)return"";const Il=String(xl).trim();if(!Il)return"";if(/^\d{8}$/.test(Il))return Il;const Xl=Il.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Xl){const Yl=Xl[1],tr=Xl[2].padStart(2,"0"),Wl=Xl[3].padStart(2,"0");return`${Yl}${tr}${Wl}`}const Ml=Il.replace(/\D/g,"");return Ml.length>=8?Ml.slice(0,8):""},fa=async xl=>{var Il,Xl;if(!xl)return"";try{const Ml=await en("试验任务/任务管理",!1),Yl=(xr,fr=[])=>{if(!Array.isArray(xr))return fr;for(const yr of xr)(yr==null?void 0:yr.comp)==="Table"&&(yr!=null&&yr.name)&&fr.push(yr),Array.isArray(yr==null?void 0:yr.children)&&Yl(yr.children,fr),Array.isArray(yr==null?void 0:yr.tab)&&Yl(yr.tab,fr),Array.isArray(yr==null?void 0:yr.choice)&&Yl(yr.choice,fr);return fr},Wl=Yl(Ml||[]).find(xr=>(xr==null?void 0:xr.name)==="任务列表"),kr=((Xl=(Il=Wl==null?void 0:Wl.compData)==null?void 0:Il.find(xr=>(xr==null?void 0:xr.key)==="tableContents"))==null?void 0:Xl.contents)||[];if(!Array.isArray(kr)||kr.length===0)return"";const on=kr.find(xr=>String((xr==null?void 0:xr["试验代号(名称)"])||"").slice(0,8)===xl);return we(on==null?void 0:on.计划试验时间)}catch(Ml){return console.warn("获取任务列表计划试验时间失败:",Ml),""}},Ba=(Se.value||"").replace(/\/+$/,""),ol=Re?`${Ba}/${Re}`:Ba,Wa=await en(ol||Se.value,!1),fl=String(oa.value||"").trim(),hl=xl=>String(xl||"").trim(),Fl=(xl,Il=[],Xl="")=>{if(!Array.isArray(xl))return Il;for(const Ml of xl){const Yl=hl((Ml==null?void 0:Ml.choiceName)||(Ml==null?void 0:Ml.name0)||Xl);(Ml==null?void 0:Ml.comp)==="Table"&&(Ml==null?void 0:Ml.name)&&Sa.includes(Ml.name)&&(!fl||Yl===fl)&&Il.push(Ml),Array.isArray(Ml==null?void 0:Ml.children)&&Fl(Ml.children,Il,Yl),Array.isArray(Ml==null?void 0:Ml.tab)&&Fl(Ml.tab,Il,Yl),Array.isArray(Ml==null?void 0:Ml.choice)&&Fl(Ml.choice,Il,Yl)}return Il},Ua=Fl(Wa||[]),bl=new Map;for(const xl of Ua)xl!=null&&xl.name&&!bl.has(xl.name)&&bl.set(xl.name,xl);const Ha=Sa.map(xl=>bl.get(xl)).filter(Boolean);if(!Ha||Ha.length===0)return qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const dl=xl=>{const Il=new Map,Xl=(Ml,Yl=[])=>{if(Array.isArray(Ml))for(const tr of Ml){const Wl=((tr==null?void 0:tr.label)??"").toString().trim(),kr=Wl?[...Yl,Wl]:[...Yl];if(Array.isArray(tr==null?void 0:tr.children)&&tr.children.length>0)Xl(tr.children,kr);else{const xr=((tr==null?void 0:tr.prop)??"").toString();if(!xr)continue;const fr=Wl||xr,yr=(kr.length>0?[...Yl,fr]:[fr]).join(".");Il.set(xr,yr)}}};return Xl(xl,[]),Il},Ga=(xl,Il)=>{const Xl=dl(xl||[]),Yl=(oe.getAllLeafNodes(xl||[])||[]).filter(Wl=>(Wl==null?void 0:Wl.prop)&&(Wl==null?void 0:Wl.type)!=="operate"&&(Wl==null?void 0:Wl.label)!=="操作"&&(Wl==null?void 0:Wl.prop)!=="operate"),tr=Array.isArray(Il)?Il:[];return tr.length===0?[]:tr.map(Wl=>{const kr={};return Yl.forEach(on=>{const xr=String(on.prop),fr=Xl.get(xr)||String(on.label||on.prop);kr[fr]=(Wl==null?void 0:Wl[xr])??""}),kr})},pl=Ha.map(xl=>{var tr,Wl;const Il=(xl==null?void 0:xl.compData)||[];let Xl=(tr=Il==null?void 0:Il.find(kr=>(kr==null?void 0:kr.key)==="header"))==null?void 0:tr.contents;Array.isArray(Xl==null?void 0:Xl[0])&&(Xl=Xl[0]);const Ml=((Wl=Il==null?void 0:Il.find(kr=>(kr==null?void 0:kr.key)==="tableContents"))==null?void 0:Wl.contents)||[];if(!Array.isArray(Xl)||Xl.length===0||!Array.isArray(Ml)||Ml.length===0)return null;const Yl=Ga(Xl||[],Ml||[]);return!Array.isArray(Yl)||Yl.length===0?null:{类型:xl==null?void 0:xl.name,数据:Yl}}).filter(Boolean);if(!pl||pl.length===0)return qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Dl=await fa(ta),Nl={试验代号:ta,试验日期:Dl,ParaForm:pl},Tr=await yi().catch(()=>""),$l=await A.exportParaformApi(Nl,Tr);if(((ea=$l==null?void 0:$l.data)==null?void 0:ea.code)===200&&((Na=(ka=$l==null?void 0:$l.data)==null?void 0:ka.result)!=null&&Na.Excel文件)){const xl=$l.data.result.Excel文件,Il=await A.platformDownloadFile({url:xl}),Xl=new Blob([Il.data],{type:"application/vnd.ms-excel"}),Ml=URL.createObjectURL(Xl),Yl=A.dayjs().format("YYYYMMDD"),Wl=`${(ta||"UNKNOWN").trim()||"UNKNOWN"}_${Yl}_paraform.xls`,kr=document.createElement("a");kr.href=Ml,kr.download=Wl,kr.style.display="none",document.body.appendChild(kr),kr.click(),setTimeout(()=>{document.body.removeChild(kr),URL.revokeObjectURL(Ml)},100);const on=Array.isArray((la=(Ra=$l==null?void 0:$l.data)==null?void 0:Ra.result)==null?void 0:la.warnings)?$l.data.result.warnings:[];if(on.length>0){const xr=on.map((fr,yr)=>`${yr+1}. ${(fr==null?void 0:fr.field)||"未知字段"}:${(fr==null?void 0:fr.message)||""}`).join(`
|
|
24
24
|
`);qa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
-
${xr}`,duration:5e3,showClose:!0})}else qa.ElMessage.success("导出成功")}else qa.ElMessage.error(((el=$l==null?void 0:$l.data)==null?void 0:el.message)||"导出失败")}catch(Sa){console.error("导出paraform失败:",Sa),qa.ElMessage.error("导出失败:"+((Sa==null?void 0:Sa.message)||"未知错误"))}finally{Ea.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((xa=Hl.value)==null?void 0:xa.length)===0)return qa.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((al=ze.value)==null?void 0:al.length)===0)return qa.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Pa=(ve=F.value)==null?void 0:ve.map(Re=>Re==null?void 0:Re.prop))==null?void 0:Pa.filter(Re=>Re!=="操作")],Sa=p==="导出全部"?ze.value:Hl.value;const B=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Sa=Sa==null?void 0:Sa.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ta])=>!B.includes(ta)))),Ea=["序号",...Ea],Sa=Sa==null?void 0:Sa.map((Re,ta)=>({序号:ta+1,...Re}));let G=(u==null?void 0:u.compName)||"表格信息";Wo(Sa,G,Ea,G)}else if(p==="OCR识别")ba.value=!0,Ia.value=[],Oa.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0;else if(p==="迁移")f.selectRow=v,f.show=!0;else if(p==="生成方法"){let Ea=await e0(v),Sa;v!==""?Sa=[v]:Sa=A.cloneDeep(ze.value),Sa=Sa==null?void 0:Sa.map(G=>(G.输出值=Ea,G));const B={fixContent:Sa,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};Ae("change",B)}else if(((ga=T==null?void 0:T.extra)==null?void 0:ga.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=A.cloneDeep(ze.value);const B={fixContent:await xt(Ea,F==null?void 0:F.value,"Manual",ze.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};Ae("change",B)}}},uu=async(p,v)=>{var T,z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve;try{let Pa,ga;const Ea=(T=de.value[Se.value+S])==null?void 0:T.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="structureMethod"}),Sa=(z=de.value[Se.value+S])==null?void 0:z.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="structure"}),B=Ea==null?void 0:Ea.find(Ba=>{var ol,Wa;return((Wa=(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.pageData)==null?void 0:Wa.method)==="保存"});if(!B)return;const G=(le=(re=de.value[(D=(P=B==null?void 0:B.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="data"}))==null?void 0:le.find(Ba=>{var ol,Wa,fl,hl;return((Wa=(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.tableData)==null?void 0:Wa.算法名称)===((hl=(fl=B==null?void 0:B.value)==null?void 0:fl.pageData)==null?void 0:hl.method)});if(!G)return;const Re={buttonName:(be=(q=B==null?void 0:B.value)==null?void 0:q.pageData)==null?void 0:be.method,api:(Ke=(De=G==null?void 0:G.value)==null?void 0:De.tableData)==null?void 0:Ke.算法体,content:Sa==null?void 0:Sa.map(Ba=>{var ol;return(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.pageData}),extraContent:[],extraValues:(ea=(je=B==null?void 0:B.value)==null?void 0:je.pageData)==null?void 0:ea.data,methodName:(Na=(ka=B==null?void 0:B.value)==null?void 0:ka.pageData)==null?void 0:Na.path};if(!p)return;const ta={...p,compData:(Ra=p==null?void 0:p.compData)==null?void 0:Ra.map(Ba=>{var ol;return(Ba==null?void 0:Ba.key)==="formContent"?{...Ba,contents:(ol=Ba==null?void 0:Ba.contents)==null?void 0:ol.map(Wa=>(Wa==null?void 0:Wa.prop)===v?{...Wa,value:""}:Wa)}:Ba})},we={key:{pageKey:Se.value+S,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ta}},fa=await qa.axios.post(Re.api,we,{headers:{"Content-Type":"application/json"}});return((la=fa==null?void 0:fa.data)==null?void 0:la.code)===200&&(Pa=(xa=(el=fa==null?void 0:fa.data)==null?void 0:el.result)==null?void 0:xa.latestReportCode,ga=(ve=(al=fa==null?void 0:fa.data)==null?void 0:al.result)==null?void 0:ve.status),{newMainKeyValue:Pa,newStatus:ga}}catch(Pa){throw qa.ElMessage.error(Pa),new Error(Pa)}},Ot=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const du=async(p,v,T)=>{var q,be;let z=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const le=A.cloneDeep(Se).value+S+z;if(le){Ot.value="",D=(q=de.value[le])==null?void 0:q.filter(je=>{var ea;return((ea=je==null?void 0:je.key)==null?void 0:ea.type)==="structure"});const De=D==null?void 0:D.find(je=>{var ea,ka,Na;return((Na=(ka=(ea=je==null?void 0:je.value)==null?void 0:ea.pageData)==null?void 0:ka.comp)==null?void 0:Na.toUpperCase())==="FORM"});re={...(be=De==null?void 0:De.value)==null?void 0:be.pageData,id:De==null?void 0:De.id};const Ke=await uu(re,v==null?void 0:v.prop);if(Ot.value=Ke==null?void 0:Ke.newStatus,Ke!=null&&Ke.newMainKeyValue)return Ke==null?void 0:Ke.newMainKeyValue}if(ze.value.some(De=>(De==null?void 0:De[v==null?void 0:v.prop])===z)){const De=z;for(;ze.value.some(Ke=>(Ke==null?void 0:Ke[v==null?void 0:v.prop])===`${De}(${P})`);)P++;z=`${De}(${P})`}return z},pu=async(p,v,T)=>{var D,re,le,q;let z,P;if(await du(T==null?void 0:T.data,T==null?void 0:T.firstCol),z=A.cloneDeep(Se).value+S,P=A.cloneDeep(z)+`loading${((D=vl.value)==null?void 0:D.account)||((re=vl.value)==null?void 0:re.账号)}`,v){const be=(q=(le=de.value[P])==null?void 0:le.filter(De=>{var Ke;return((Ke=De==null?void 0:De.key)==null?void 0:Ke.parentTable)===""}))==null?void 0:q.map(De=>{var Ke;return{id:De==null?void 0:De.id,...(Ke=De==null?void 0:De.value)==null?void 0:Ke.pageData}});(be==null?void 0:be.length)>0||await oe.loadingConstruct(z,P,null,null,null),da.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)}else da.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)},fu=()=>{$e.value=!1,Ue.value=[],fe.value=!1},Fi=p=>{var D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa;const v=[];Te.value=A.cloneDeep(F.value),(re=oe.getColumnChild((D=A.cloneDeep(F.value))==null?void 0:D.filter(B=>(B==null?void 0:B.label)!=="操作")))==null||re.forEach((B,G)=>{var Re,ta,we;B!=null&&B.formType&&((Re=B==null?void 0:B.formType)==null?void 0:Re.toUpperCase())==="SELECT"||B!=null&&B.menuId?v.push({label:(ta=B==null?void 0:B.prop)!=null&&ta.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",name:(B==null?void 0:B.prop)??"t"+G,prop:B==null?void 0:B.prop,type:"Select",value:(p==null?void 0:p[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??G,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,multipleLimit:B==null?void 0:B.multipleLimit,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,relatedValueId:B==null?void 0:B.relatedValueId,disabled:B==null?void 0:B.disabled,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,allSelectionContents:(B==null?void 0:B.allSelectionContents)??[],filterContent:B==null?void 0:B.filterContent,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly}):v.push({label:(we=B==null?void 0:B.prop)!=null&&we.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",prop:B==null?void 0:B.prop,name:(B==null?void 0:B.prop)??"t"+G,type:!(B!=null&&B.formType)||(B==null?void 0:B.formType)===""?"Input":B==null?void 0:B.formType,value:(B==null?void 0:B.formType)==="Upload"?(p==null?void 0:p[B==null?void 0:B.prop])??"{}":(p==null?void 0:p[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??G,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly})}),p===""||!p||(za.value=(p==null?void 0:p.id)??"");let T=oe.getColumnChild((le=A.cloneDeep(F.value))==null?void 0:le.filter(B=>(B==null?void 0:B.label)!=="操作"));$a.value&&((q=$a.value)==null?void 0:q.length)>0&&($a.value=(be=A.cloneDeep($a).value)==null?void 0:be.map(B=>{var Re;let G=(B==null?void 0:B.prop)||((Re=T==null?void 0:T.find(ta=>(ta==null?void 0:ta.label)===(B==null?void 0:B.label)))==null?void 0:Re.prop);return G&&(B.value=p[G]),B})),ke.value=$a.value&&((De=$a.value)==null?void 0:De.length)>0?oe.getTableFormToForm($a.value):v,ke.value=((Ke=ke.value)==null?void 0:Ke.map(B=>({...B,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled})))??ke.value;let z=[],P=((ka=(ea=(je=u.itemData)==null?void 0:je.filter(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:ea[0])==null?void 0:ka.contents)??"";if(P=oe.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(z=P.flat()),(z==null?void 0:z.length)>0){let B=z==null?void 0:z.filter(fa=>fa==null?void 0:fa.includes("@Type"));if(B=B==null?void 0:B[(B==null?void 0:B.length)-1],(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){let fa=(Ra=(Na=B==null?void 0:B.replace("=",w))==null?void 0:Na.split(w))==null?void 0:Ra[1];((la=fa==null?void 0:fa.trim())==null?void 0:la.toUpperCase())==="MANUAL"&&(u==null||u.index,ke.value=(el=ke.value)==null?void 0:el.map((Ba,ol)=>Ba))}let G=(xa=ke.value)==null?void 0:xa.filter(fa=>fa==null?void 0:fa.mainKey),Re;G==null||G.forEach(fa=>{var ol;if(Re!==void 0)return;let Ba=fa==null?void 0:fa.menus;((ol=G==null?void 0:G.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:ol.length)>1&&(Re=Ba,fa==null||fa.groups)});let ta=[],we=new Map;if(G==null||G.forEach(fa=>{var Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl;if((Ba=fa==null?void 0:fa.prop)!=null&&Ba.includes(".")){let Nl=[];we.get(((Wa=(ol=fa==null?void 0:fa.prop)==null?void 0:ol.split("."))==null?void 0:Wa[0])+(fa!=null&&fa.isMainPath?0:1)+((fl=fa==null?void 0:fa.groups)==null?void 0:fl[0]))&&(Nl=we.get(((Fl=(hl=fa==null?void 0:fa.prop)==null?void 0:hl.split("."))==null?void 0:Fl[0])+(fa!=null&&fa.isMainPath?0:1)+((Ua=fa==null?void 0:fa.groups)==null?void 0:Ua[0]))),Nl.push(fa),we.set(((Ha=(bl=fa==null?void 0:fa.prop)==null?void 0:bl.split("."))==null?void 0:Ha[0])+(fa!=null&&fa.isMainPath?0:1)+((dl=fa==null?void 0:fa.groups)==null?void 0:dl[0]),Nl)}else{let Nl=[];we.get("normal"+(fa!=null&&fa.isMainPath?0:1)+((Ga=fa==null?void 0:fa.groups)==null?void 0:Ga[0]))&&(Nl=we.get("normal"+(fa!=null&&fa.isMainPath?0:1)+((pl=fa==null?void 0:fa.groups)==null?void 0:pl[0]))),Nl.push(fa),we.set("normal"+(fa!=null&&fa.isMainPath?0:1)+((Dl=fa==null?void 0:fa.groups)==null?void 0:Dl[0]),Nl)}}),ta=Array.from(we.values()),(ta==null?void 0:ta.length)>0)for(let fa in ta){let Ba=ta==null?void 0:ta[fa];if((Ba==null?void 0:Ba.length)!==1){if((Ba==null?void 0:Ba.length)>1){let ol=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.prop),Wa=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.label),fl=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.value),hl=(al=A.cloneDeep(Ba))==null?void 0:al[0],Fl=(ve=ke.value)==null?void 0:ve.findIndex(dl=>(dl==null?void 0:dl.prop)===(hl==null?void 0:hl.prop)),Ua=(Pa=ke.value)==null?void 0:Pa.slice(0,Fl),bl=(Ea=ke.value)==null?void 0:Ea.slice(Fl,(ga=ke.value)==null?void 0:ga.length);hl.label=Wa==null?void 0:Wa.join("·"),hl.value=fl==null?void 0:fl.join(" "),hl.value.trim()===""&&(hl.value=""),hl.prop=ol==null?void 0:ol.join("·");let Ha=Ba==null?void 0:Ba.map(dl=>{var Ga;return(Ga=dl==null?void 0:dl.words)==null?void 0:Ga.join(".")});hl.relatedWords=Ha,hl.usingType="parent",bl.unshift(hl),ke.value=[...Ua,...bl],ke.value=(Sa=ke.value)==null?void 0:Sa.map(dl=>(ol!=null&&ol.find(Ga=>Ga===(dl==null?void 0:dl.prop))&&(dl.isFormColHidden=!0,dl.relatedWords=Ha),dl))}}}}},hu=()=>{var v;const p=(v=o.value)==null?void 0:v.$el;p&&Al.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var re;const{oldIndex:z,newIndex:P}=T;if(z===P)return;const D=gn.value.splice(z,1)[0];gn.value.splice(P,0,D),F.value=(re=F.value)==null?void 0:re.slice().sort((le,q)=>{if(le.label==="操作")return 1;if(q.label==="操作")return-1;const be=gn.value.findIndex(Ke=>Ke.label===le.label),De=gn.value.findIndex(Ke=>Ke.label===q.label);return be-De})}})};e.onMounted(()=>{sa.value=window.innerWidth-240*2,window.addEventListener("keydown",ao)});const vu=()=>{e.nextTick(()=>{hu()})},mu=()=>{c.value=!0},ct=(p,v)=>{var z;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let T;return p.children=(z=p.children)==null?void 0:z.map(P=>{var D,re;if((P==null?void 0:P.id)===za.value){let le={};for(let q in P){let be=(D=v==null?void 0:v.find(De=>(De==null?void 0:De.prop)===q))==null?void 0:D.label;be?le[q]=(re=lr.value)==null?void 0:re[be]:le[q]=P[q]??""}P=Object.assign(le,lr.value),T=P}else{let le=ct(P,v);P=le==null?void 0:le.contents,T=le==null?void 0:le.currentSelectContents}return P}),{contents:p,currentSelectContents:T}},Lt=(p,v)=>{let T,z;return p!=null&&p.find(P=>(P==null?void 0:P.id)===za.value)?T=p==null?void 0:p.map(P=>{var D,re,le;if((P==null?void 0:P.id)===za.value){let q={};for(let De in P){let Ke=(D=v==null?void 0:v.find(je=>(je==null?void 0:je.prop)===De))==null?void 0:D.label;Ke?q[De]=((re=lr.value)==null?void 0:re[Ke])??"":q[De]=P[De]??""}let be=lr.value;for(let De in q)(le=lr.value)!=null&&le[De]||(be[De]=(q==null?void 0:q[De])??"");P=be,z=P}return P}):T=p==null?void 0:p.map(P=>{var D,re,le,q;if((P==null?void 0:P.id)===za.value){let be={};for(let De in P){let Ke=(D=v==null?void 0:v.find(je=>(je==null?void 0:je.prop)===De))==null?void 0:D.label;Ke?be[De]=(re=lr.value)==null?void 0:re[Ke]:be[De]=P[De]??""}P=Object.assign(be,lr.value),z=P}else P=(le=ct(P,v))==null?void 0:le.contents,z=(q=ct(P,v))==null?void 0:q.currentSelectContents;return P}),{newContents:T,currentSelectContents:z}},Rt=(p,v,T)=>{var z,P;return p[v==null?void 0:v.prop]=T,typeof p.id=="number"&&(p.id=(z=p.id)==null?void 0:z.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(Rt)),p},$t=p=>{var T;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((T=p.children)==null||T.forEach(z=>{v.push(...$t(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const P={...z};return delete P.children,P}):[]},fo=["Pacific6000数据采集装置.通道号","通道号"],ji=p=>{if(!p)return"";const v=fo.map(T=>p==null?void 0:p[T]).find(T=>T!=null&&String(T).trim()!=="");return v==null?"":String(v).trim()},ut=async(p,v=void 0)=>{if(!p)return!1;try{const T=ea=>{var ka,Na,Ra;return ea?typeof(ea==null?void 0:ea.value)=="string"?ea.value:((Ra=(Na=(ka=ea==null?void 0:ea._custom)==null?void 0:ka.value)==null?void 0:Na.value)==null?void 0:Ra.value)||"":""},z=Array.isArray(Jl.value)?Jl.value:[],P=T(z.find(ea=>(ea==null?void 0:ea.condition)==="child")),D=(Se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,le=await en(re||Se.value,!1),q=String(oa.value||"").trim(),be=ea=>String(ea||"").trim(),De=(ea,ka=[],Na="")=>{if(!Array.isArray(ea))return ka;for(const Ra of ea){const la=be((Ra==null?void 0:Ra.choiceName)||(Ra==null?void 0:Ra.name0)||Na);(Ra==null?void 0:Ra.comp)==="Table"&&(!q||la===q)&&ka.push(Ra),Array.isArray(Ra==null?void 0:Ra.children)&&De(Ra.children,ka,la),Array.isArray(Ra==null?void 0:Ra.tab)&&De(Ra.tab,ka,la),Array.isArray(Ra==null?void 0:Ra.choice)&&De(Ra.choice,ka,la)}return ka},Ke=De(le||[]),je=String((u==null?void 0:u.compName)||"");return Ke.some(ea=>{var Na,Ra;const ka=((Ra=(Na=ea==null?void 0:ea.compData)==null?void 0:Na.find(la=>(la==null?void 0:la.key)==="tableContents"))==null?void 0:Ra.contents)||[];return!Array.isArray(ka)||ka.length===0?!1:ka.some(la=>{if(String((ea==null?void 0:ea.name)||"")===je&&(la==null?void 0:la.id)===v)return!1;const xa=ji(la);return!!xa&&xa===p})})}catch{return(ze.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const P=ji(z);return!!P&&P===p})}},Hi=async(p=!0,v,T)=>{var be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl;if(lr.value){const Ha=(De=oe.getColumnChild((be=A.cloneDeep(F.value))==null?void 0:be.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")))==null?void 0:De.filter(Ga=>(Ga==null?void 0:Ga.required)===!0);for(let Ga=0;Ga<((Ha==null?void 0:Ha.length)??0);Ga++){const pl=Ha[Ga],Dl=pl==null?void 0:pl.prop,Nl=(pl==null?void 0:pl.label)??Dl,Tr=(Ke=lr.value)==null?void 0:Ke[Dl];if(Tr===""||Tr===null||Tr===void 0||Array.isArray(Tr)&&Tr.length===0){qa.ElMessage.error(`${Nl}不能为空`);return}}const dl=ji(lr.value);if(dl&&await ut(dl,za.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=oe.getColumnChild((je=A.cloneDeep(F.value))==null?void 0:je.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")),P,D=A.cloneDeep(ze.value);if(!lr.value){Y.value=!1;return}if(za.value===""){Ca.value++;let Ha;Ha={id:Ca.value.toString()};try{Ha.sort=ri(0,ze.value||[])}catch{}Ha!=null&&Ha.children&&(Ha={...Ha,children:(ea=Ha.children)==null?void 0:ea.map(Ga=>Rt(Ga,v,T))});const dl=Object.assign(lr.value,Ha);D.unshift(dl),P=dl}else D=(ka=Lt(D,z))==null?void 0:ka.newContents,P=(Na=Lt(D,z))==null?void 0:Na.currentSelectContents;const re=(Ra=u.itemData)==null?void 0:Ra.filter(Ha=>(Ha==null?void 0:Ha.key)==="childTree")[0];if(((la=re==null?void 0:re.contents)==null?void 0:la.length)>0){ye.value="编辑";const Ha=[];D==null||D.forEach((pl,Dl)=>{var Tr;let Nl={};if(Array.isArray(pl)){let $l=[];pl==null||pl.filter(xl=>!(xl!=null&&xl.id)).forEach((xl,Il)=>{var Xl,Ml,Yl,tr,Wl,kr,on;if((Ml=(Xl=Pl.value)==null?void 0:Xl[Il])!=null&&Ml.prop&&!Array.isArray(xl)){let xr={};xr[Pl.value[Il].column]=xl,R!=null&&R.value&&((Yl=R==null?void 0:R.value)==null?void 0:Yl.length)>0&&((tr=R==null?void 0:R.value)!=null&&tr.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(xr)))&&($l=(Wl=R==null?void 0:R.value)==null?void 0:Wl.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(xr))),$l&&$l.length>0?Nl[Pl.value[Il].prop]=$l!=null&&$l.find(fr=>{var yr;return((yr=Object.keys(fr))==null?void 0:yr[0])===Pl.value[Il].column})?(kr=$l==null?void 0:$l.find(fr=>{var yr;return((yr=Object.keys(fr))==null?void 0:yr[0])===Pl.value[Il].column}))==null?void 0:kr[Pl.value[Il].column]:xl:Nl[Pl.value[Il].prop]=xl}else Array.isArray(xl)&&((on=Pl.value[Il])!=null&&on.prop?Nl[Pl.value[Il].prop]=xl:Nl.children=wt(xl,Pl.value))})}else Nl=pl;if(Array.isArray(pl)&&pl.some($l=>$l==null?void 0:$l.id)){const $l=(Tr=pl==null?void 0:pl.find(xl=>xl.id))==null?void 0:Tr.id;Ha.push(Object.assign(Nl,{id:co($l)}))}else Nl.id?Ha.push(Nl):Ha.push(Object.assign(Nl,{id:Dl.toString()}))});const dl=(ze.value||[]).map(pl=>String(pl==null?void 0:pl.id)),Ga=vi(Ha,dl);ze.value=jt(Ga,re,F.value)}Pt(ze.value),Ur.value=ze.value;const le=$f(Ur.value,hn.value,D);let q=[];if(H.value?(q=(el=A.cloneDeep(H).value.singleContent)==null?void 0:el.filter(Ha=>(Ha==null?void 0:Ha.id)!==(P==null?void 0:P.id)),q.push(P)):q=[P],Rl.value){const Ha={content:le,singleContent:((xa=re==null?void 0:re.contents)==null?void 0:xa.length)>0?q==null?void 0:q.flatMap($t):q,index:u==null?void 0:u.index,buttonName:"编辑",column:F.value,parentTableId:u==null?void 0:u.parentTableId};da.setCacheUpdatingData(Ha)}if((al=F.value)==null||al.forEach(Ha=>{(Ha==null?void 0:Ha.formType)==="Upload"&&(P[Ha.prop]=P[Ha.prop]===""?"{}":typeof P[Ha.prop]!="string"?JSON.stringify(P[Ha.prop]):P[Ha.prop])}),p){(Ea=(ga=(Pa=(ve=u.itemData)==null?void 0:ve.find(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType"))==null?void 0:Pa.value)==null?void 0:ga.find(Ga=>(Ga==null?void 0:Ga.value)==="onConditionContents"))==null||Ea.content;let Ha=(Sa=u.itemData)==null?void 0:Sa.filter(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType");Ha=Array.from(new Map(Ha.filter(Boolean).map((Ga,pl)=>[Ga.value,{...Ga,_idx:pl}])).values()).sort((Ga,pl)=>Ga._idx-pl._idx).map(({_idx:Ga,...pl})=>pl),Ha=(B=Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==null?void 0:B.value;const dl={fixContent:[P],buttonName:ye.value,relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};da.setTableLoading(u==null?void 0:u.index),Y.value=!1,lr.value=void 0,Ae("change",dl)}if((ta=(Re=(G=ke.value)==null?void 0:G[0])==null?void 0:Re.optionUrl)!=null&&ta.menuId){Y.value=!1;let Ha=(we=u.itemData)==null?void 0:we.filter(dl=>(dl==null?void 0:dl.key)==="filterAllType");if((Ha==null?void 0:Ha.length)>0){let dl=Ha==null?void 0:Ha.map(Dl=>Dl==null?void 0:Dl.value),Ga=(ol=(Ba=(fa=dl.flat().find(Dl=>{var Nl;return(Nl=Dl==null?void 0:Dl.content)==null?void 0:Nl.includes("@Num")}))==null?void 0:fa.content)==null?void 0:Ba.split(":"))==null?void 0:ol[1];((hl=(fl=(Wa=dl.flat().find(Dl=>{var Nl;return(Nl=Dl==null?void 0:Dl.content)==null?void 0:Nl.includes("@Type:")}))==null?void 0:Wa.content)==null?void 0:fl.split(":"))==null?void 0:hl[1])!=="Manual"&&(Ga=parseInt(Ga),ze.value=(bl=ze.value)==null?void 0:bl.slice(((Fl=ze.value)==null?void 0:Fl.length)-Ga,(Ua=ze.value)==null?void 0:Ua.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",ao),F.value=[],ze.value=[],Te.value=[],Ta.value=[],$a.value=[],Ma.value=[],Ue.value=[],Ie.value=[],ke.value=[],Hl.value=[],o.value=null,Fn.value=""});const ho=async(p,v,T)=>{var ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa;mr.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const z=A.cloneDeep(u.itemData),P=((ea=z==null?void 0:z.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:ea.contents)??[];let D=P==null?void 0:P.find((B,G)=>{var Re,ta,we;return(B==null?void 0:B.prop)===mr.value||(B==null?void 0:B.label)===mr.value||(G==null?void 0:G.toString())===((we=(ta=(Re=mr.value)==null?void 0:Re.split("a"))==null?void 0:ta[1])==null?void 0:we.toString())});const re=oe.getColumnChild((ka=A.cloneDeep(F.value))==null?void 0:ka.filter(B=>(B==null?void 0:B.label)!=="操作"));if(D||(D=re==null?void 0:re.find(B=>(B==null?void 0:B.prop)===mr.value||(B==null?void 0:B.label)===mr.value)),D&&!((Na=D==null?void 0:D.menus)!=null&&Na.length)&&!((Ra=D==null?void 0:D.groups)!=null&&Ra.length)&&!((la=D==null?void 0:D.words)!=null&&la.length)){const B=(el=ke.value)==null?void 0:el.find(G=>(G==null?void 0:G.prop)===mr.value);B&&(D={...D,menus:(B==null?void 0:B.menus)??(D==null?void 0:D.menus),groups:(B==null?void 0:B.groups)??(D==null?void 0:D.groups),words:(B==null?void 0:B.words)??(D==null?void 0:D.words),bindMenus:(B==null?void 0:B.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(B==null?void 0:B.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(B==null?void 0:B.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(B==null?void 0:B.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((xa=ke==null?void 0:ke.value)==null||xa.forEach(B=>{var G,Re,ta,we,fa;(B==null?void 0:B.prop)===(D==null?void 0:D.prop)&&(B!=null&&B.endChildMenu)&&((G=D==null?void 0:D.prop)!=null&&G.includes(".")&&((ta=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ta[0])!==((fa=(we=B==null?void 0:B.prop)==null?void 0:we.split("."))==null?void 0:fa[0])?D.endChildMenu=B==null?void 0:B.value:D.endChildMenu=B==null?void 0:B.endChildMenu)})),!D)return;const le=mr.value,q=(al=ze.value)==null?void 0:al.findIndex(B=>(B==null?void 0:B.id)===(v==null?void 0:v.id));q!==-1&&le&&(ze.value[q]={...ze.value[q],[le]:p});const be=B=>{Array.isArray(B)&&B.forEach(G=>{Array.isArray(G==null?void 0:G.allSelectionContents)&&G.allSelectionContents.length>0&&(G.contactValue=ze.value[q]??v),Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&be(G.children)})};be(F.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let De=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ke=B=>{Array.isArray(B)&&B.forEach(G=>{var ta,we;if(((G==null?void 0:G.type)==="Select"||(G==null?void 0:G.formType)&&G.formType.toUpperCase()==="SELECT"||(G==null?void 0:G.columnType)&&G.columnType.toUpperCase()==="SELECT")&&Array.isArray(G==null?void 0:G.menus)&&G.menus.length>0&&G.menus[G.menus.length-1]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const fa=(ta=G==null?void 0:G.prop)!=null&&ta.includes(".")?G.prop.split(".")[0]:null,Ba=(we=D==null?void 0:D.prop)!=null&&we.includes(".")?D.prop.split(".")[0]:null;(!fa||!Ba||fa===Ba)&&(G.endChildMenu=De)}Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&Ke(G.children)})};if(Ke(F.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let B=D!=null&&D.relatedContents&&((ve=D==null?void 0:D.relatedContents)==null?void 0:ve.length)>0?(Pa=D==null?void 0:D.relatedContents)==null?void 0:Pa.find(G=>{var Re,ta,we,fa;return(G==null?void 0:G[(fa=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:fa[((we=(ta=D==null?void 0:D.prop)==null?void 0:ta.split("."))==null?void 0:we.length)-1]])===(D==null?void 0:D.value)}):await hs(D);if(B){const G={...v};re==null||re.forEach(Re=>{var ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl;(Re==null?void 0:Re.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((ta=D==null?void 0:D.relatedContents)==null?void 0:ta.length)>0?(we=Re==null?void 0:Re.prop)!=null&&we.includes(".")&&((Ba=(fa=Re==null?void 0:Re.prop)==null?void 0:fa.split("."))==null?void 0:Ba[0])===((Wa=(ol=D==null?void 0:D.prop)==null?void 0:ol.split("."))==null?void 0:Wa[0])?G[Re.prop]=B[(Ua=(fl=Re==null?void 0:Re.prop)==null?void 0:fl.split("."))==null?void 0:Ua[((Fl=(hl=Re==null?void 0:Re.prop)==null?void 0:hl.split("."))==null?void 0:Fl.length)-1]]??G[Re.prop]:G[Re.prop]=(B==null?void 0:B[Re.prop])??G[Re.prop]:oe.same((D==null?void 0:D.menus)??[],(Re==null?void 0:Re.menus)??[])&&oe.same((D==null?void 0:D.groups)??[],(Re==null?void 0:Re.groups)??[])&&!oe.same((D==null?void 0:D.words)??[],(Re==null?void 0:Re.words)??[])?(bl=Re==null?void 0:Re.prop)!=null&&bl.includes(".")&&((dl=(Ha=Re==null?void 0:Re.prop)==null?void 0:Ha.split("."))==null?void 0:dl[0])!==((pl=(Ga=D==null?void 0:D.prop)==null?void 0:Ga.split("."))==null?void 0:pl[0])||(G[Re.prop]=(B==null?void 0:B[(Dl=Re==null?void 0:Re.words)==null?void 0:Dl.join(".")])??(B==null?void 0:B[Re.prop])??G[Re.prop]):(!(Re!=null&&Re.isMainPath)&&oe.same((D==null?void 0:D.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),G[Re.prop]=(B==null?void 0:B[Re.prop])??G[Re.prop]))}),ze.value=(ga=A.cloneDeep(ze.value))==null?void 0:ga.map(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id)?{...G,id:Re==null?void 0:Re.id}:Re)}}if((Ea=D==null?void 0:D.optionUrl)!=null&&Ea.menuSelect){let B="";re==null||re.forEach(ta=>{var we,fa,Ba,ol,Wa;B===""&&((Ba=(fa=(we=ta==null?void 0:ta.optionUrl)==null?void 0:we.groupSelect)==null?void 0:fa[1])!=null&&Ba.includes("["))&&(B=(Wa=(ol=ta==null?void 0:ta.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:Wa[1])});let G=await _t(D),Re;if(G==null||G.forEach(ta=>{var we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl;B===((fa=(we=D==null?void 0:D.optionUrl)==null?void 0:we.groupSelect)==null?void 0:fa[1])&&((Wa=(ol=(Ba=D==null?void 0:D.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ol[1])!=null&&Wa.includes("["))&&((bl=A.cloneDeep(ta))==null?void 0:bl[(Ua=(Fl=(hl=(fl=D==null?void 0:D.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])==null?void 0:Fl.replaceAll("[",""))==null?void 0:Ua.replaceAll("]","")])===(D==null?void 0:D.value)&&(Re=ta)}),Re){const ta={...v};re==null||re.forEach(we=>{var fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl;(Re!=null&&Re[we==null?void 0:we.label]||Re!=null&&Re[(Wa=(ol=(Ba=(fa=we==null?void 0:we.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:Ba[1])==null?void 0:ol.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])&&((Fl=(hl=(fl=we==null?void 0:we.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])!=null&&Fl.includes("["))&&(ta[we.prop]=(Re==null?void 0:Re[we==null?void 0:we.label])||(Re==null?void 0:Re[(dl=(Ha=(bl=(Ua=we==null?void 0:we.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:bl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:dl.replaceAll("]","")]))}),ze.value=(Sa=A.cloneDeep(ze.value))==null?void 0:Sa.map(we=>(we==null?void 0:we.id)===(v==null?void 0:v.id)?{...ta,id:we==null?void 0:we.id}:we)}}},yu=async p=>{var ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa,B;if(!p)return;const v=A.cloneDeep(lr.value||{});lr.value=p;const T=ji(v),z=ji(lr.value);if(z&&z!==T&&await ut(z,za.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),fo.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(lr.value||{},Re)||Object.prototype.hasOwnProperty.call(v||{},Re)){const ta=(v==null?void 0:v[Re])??"";lr.value[Re]=ta,p[Re]=ta}}),ke.value=(ke.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!fo.includes(Re.prop))return Re;const ta=(v==null?void 0:v[Re.prop])??"";return{...Re,value:ta,selectValue:ta===""?[]:[ta]}});return}let P=A.cloneDeep(u.itemData);P==null||P.map(G=>{var Re,ta,we,fa;return(G==null?void 0:G.key)==="header"&&(Array.isArray((Re=G.contents)==null?void 0:Re[0])?G.contents=(we=oe.getColumnChild((ta=G.contents)==null?void 0:ta[0]))==null?void 0:we.map((Ba,ol)=>{var Wa,fl,hl,Fl,Ua,bl;return((hl=(fl=(Wa=ke.value)==null?void 0:Wa.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Fl=Object.values(p))==null?void 0:Fl[ol])?Ba.value=[(Ua=Object.values(p))==null?void 0:Ua[ol]]:Ba.value=(bl=Object.values(p))==null?void 0:bl[ol],Ba}):G.contents=(fa=G.contents)==null?void 0:fa.map((Ba,ol)=>{var Wa,fl,hl,Fl,Ua,bl;return((hl=(fl=(Wa=ke.value)==null?void 0:Wa.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Fl=Object.values(p))==null?void 0:Fl[ol])?Ba.value=[(Ua=Object.values(p))==null?void 0:Ua[ol]]:Ba.value=(bl=Object.values(p))==null?void 0:bl[ol],Ba})),G});let D=ke.value,re=(ea=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:ea.contents;if(mr.value||(D=D==null?void 0:D.map(G=>{var Re;return G.value=G.value??((Re=re==null?void 0:re.find((ta,we)=>(ta==null?void 0:ta.prop)===(G==null?void 0:G.name)))==null?void 0:Re.value),G})),!ar.value)return;let le=A.cloneDeep(mr.value);(ka=mr.value)!=null&&ka.includes("·")&&(mr.value=(Ra=(Na=mr.value)==null?void 0:Na.split("·"))==null?void 0:Ra[0]);let q=(el=(la=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:la.contents)==null?void 0:el.find((G,Re)=>(G==null?void 0:G.prop)===mr.value);(xa=ke==null?void 0:ke.value)==null||xa.forEach(G=>{var Re,ta,we,fa,Ba,ol,Wa,fl,hl;(G==null?void 0:G.prop)===(q==null?void 0:q.prop)&&(G!=null&&G.endChildMenu)&&((Re=q==null?void 0:q.prop)!=null&&Re.includes(".")&&((we=(ta=q==null?void 0:q.prop)==null?void 0:ta.split("."))==null?void 0:we[0])!==((Ba=(fa=G==null?void 0:G.prop)==null?void 0:fa.split("."))==null?void 0:Ba[0])?q.endChildMenu=(Wa=(ol=G==null?void 0:G.value)==null?void 0:ol.split(" "))==null?void 0:Wa[0]:q.endChildMenu=(hl=(fl=G==null?void 0:G.endChildMenu)==null?void 0:fl.split(" "))==null?void 0:hl[0])});let be=q!=null&&q.isMainPath&&(q!=null&&q.mainKey)?q==null?void 0:q.value:"",De=D,Ke=J.value;if(Ke!=null&&Ke.find(G=>(q==null?void 0:q.prop)===(G==null?void 0:G.key))&&(Ke=Ke==null?void 0:Ke.filter(G=>(q==null?void 0:q.prop)!==(G==null?void 0:G.key))),Ke!=null&&Ke.find(G=>le===(G==null?void 0:G.key))&&(Ke=Ke==null?void 0:Ke.filter(G=>le!==(G==null?void 0:G.key))),(q==null?void 0:q.formType)==="Select"?De=De==null?void 0:De.map(G=>{var Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl;return(G==null?void 0:G.type)==="Select"&&(((Re=G==null?void 0:G.allSelectionContents)==null?void 0:Re.length)>0&&(G.contactValue=p),((q==null?void 0:q.prop)===(G==null?void 0:G.prop)||le===(G==null?void 0:G.prop))&&q&&(Array.isArray(q.value)&&((ta=q.value)==null?void 0:ta.length)>0&&((we=q.value)!=null&&we.every(Dl=>typeof Dl=="string"))?(Ke.push({key:G==null?void 0:G.prop,value:[(Ba=q.value)==null?void 0:Ba[((fa=q.value)==null?void 0:fa.length)-1]]}),G.selectValue=(ol=Ke==null?void 0:Ke.find(Dl=>(Dl==null?void 0:Dl.key)===(G==null?void 0:G.prop)))==null?void 0:ol.value):Array.isArray(q.value)&&((Wa=q.value)==null?void 0:Wa.length)===0?(Ke=[],G.selectValue=[],p[G==null?void 0:G.prop]=""):Array.isArray(G.value)&&Ke.push({key:G==null?void 0:G.prop,value:[(fl=G.value)==null?void 0:fl[(G==null?void 0:G.length)-1]]})),((Fl=G==null?void 0:G.menus)==null?void 0:Fl[((hl=G==null?void 0:G.menus)==null?void 0:hl.length)-1])===""&&(q!=null&&q.isMainPath)&&(q!=null&&q.mainKey)&&((Ua=G==null?void 0:G.prop)!=null&&Ua.includes(".")&&((Ha=(bl=G==null?void 0:G.prop)==null?void 0:bl.split("."))==null?void 0:Ha[0])!==((Ga=(dl=q==null?void 0:q.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])||(G.endChildMenu=(pl=be==null?void 0:be.split(" "))==null?void 0:pl[0]))),G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G}):(q==null?void 0:q.formType)!=="Input"&&(De=De==null?void 0:De.map(G=>(G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G))),J.value=Ke,De!=null&&De.some(G=>(G==null?void 0:G.functionName)&&(G==null?void 0:G.functionName)!=="")){let G=await xt([p],F==null?void 0:F.value,"Auto",ze.value),Re=[];(al=De==null?void 0:De.filter(we=>(we==null?void 0:we.functionName)&&(we==null?void 0:we.functionName)!==""))==null||al.forEach(we=>{var fa;((fa=we==null?void 0:we.functionRelatedWords)==null?void 0:fa.length)>0&&(Re=[...Re,...we==null?void 0:we.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(we=>(we==null?void 0:we[0])!=="@");let ta=[];for(let we in G==null?void 0:G[0])Re!=null&&Re.find(fa=>we===fa||(we==null?void 0:we.includes("."+fa)))&&ta.push(((ve=G==null?void 0:G[0])==null?void 0:ve[we])!=="");(G==null?void 0:G.length)>0&&ta.every(we=>we)&&(De=De==null?void 0:De.map(we=>{var fa;return we.value=((fa=G==null?void 0:G[0])==null?void 0:fa[we==null?void 0:we.prop])??we.value,we})),lr.value=G==null?void 0:G[0]}if(ke.value=De,q=Object.assign({},q??{},{relatedWords:(ga=(Pa=ke==null?void 0:ke.value)==null?void 0:Pa.find(G=>(G==null?void 0:G.prop)===(q==null?void 0:q.prop)))==null?void 0:ga.relatedWords}),(q==null?void 0:q.mainKey)&&(q!=null&&q.value)&&(q==null?void 0:q.value)!==""){let G=q!=null&&q.relatedContents&&((Ea=q==null?void 0:q.relatedContents)==null?void 0:Ea.length)>0?(Sa=q==null?void 0:q.relatedContents)==null?void 0:Sa.find(Re=>{var ta,we,fa,Ba;return(Re==null?void 0:Re[(Ba=(ta=q==null?void 0:q.prop)==null?void 0:ta.split("."))==null?void 0:Ba[((fa=(we=q==null?void 0:q.prop)==null?void 0:we.split("."))==null?void 0:fa.length)-1]])===(q==null?void 0:q.value)}):await hs(q);if(G&&JSON.stringify(G)!=="{}"){let Re=De;Re=Re==null?void 0:Re.map(we=>{var fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl,Nl,Tr,$l,xl,Il,Xl,Ml;if((q==null?void 0:q.prop)===(we==null?void 0:we.prop))we.value=(G==null?void 0:G[(fa=we==null?void 0:we.words)==null?void 0:fa.join(".")])??(G==null?void 0:G[we==null?void 0:we.prop])??G[(fl=(Ba=we==null?void 0:we.prop)==null?void 0:Ba.split("."))==null?void 0:fl[((Wa=(ol=we==null?void 0:we.prop)==null?void 0:ol.split("."))==null?void 0:Wa.length)-1]];else if(q!=null&&q.relatedContents&&((hl=q==null?void 0:q.relatedContents)==null?void 0:hl.length)>0)we.value=(Fl=we==null?void 0:we.prop)!=null&&Fl.includes(".")&&((bl=(Ua=we==null?void 0:we.prop)==null?void 0:Ua.split("."))==null?void 0:bl[0])===((dl=(Ha=q==null?void 0:q.prop)==null?void 0:Ha.split("."))==null?void 0:dl[0])?G[(Nl=(Ga=we==null?void 0:we.prop)==null?void 0:Ga.split("."))==null?void 0:Nl[((Dl=(pl=we==null?void 0:we.prop)==null?void 0:pl.split("."))==null?void 0:Dl.length)-1]]:(G==null?void 0:G[we==null?void 0:we.prop])??(we==null?void 0:we.value);else if(oe.same((q==null?void 0:q.menus)??[],(we==null?void 0:we.menus)??[])&&oe.same((q==null?void 0:q.groups)??[],(we==null?void 0:we.groups)??[])&&!oe.same((q==null?void 0:q.words)??[],(we==null?void 0:we.words)??[]))if((Tr=we==null?void 0:we.prop)!=null&&Tr.includes(".")&&((xl=($l=we==null?void 0:we.prop)==null?void 0:$l.split("."))==null?void 0:xl[0])!==((Xl=(Il=q==null?void 0:q.prop)==null?void 0:Il.split("."))==null?void 0:Xl[0])){let Yl=Object.keys(G);Yl=Yl==null?void 0:Yl.find(tr=>{var Wl;return tr==null?void 0:tr.includes("."+((Wl=we==null?void 0:we.words)==null?void 0:Wl.join(".")))}),we.value=(G==null?void 0:G[Yl])??(G==null?void 0:G[we==null?void 0:we.prop])??we.value}else{let Yl=Object.keys(G);Yl=Yl==null?void 0:Yl.find(tr=>{var Wl;return tr==null?void 0:tr.includes("."+((Wl=we==null?void 0:we.words)==null?void 0:Wl.join(".")))}),we.value=(G==null?void 0:G[(Ml=we==null?void 0:we.words)==null?void 0:Ml.join(".")])??(G==null?void 0:G[Yl])??(G==null?void 0:G[we==null?void 0:we.prop])??we.value}else!(we!=null&&we.isMainPath)&&oe.same((q==null?void 0:q.bindMenus)??[],(we==null?void 0:we.bindMenus)??[]),we.value=(G==null?void 0:G[we==null?void 0:we.prop])??we.value;return we}),ke.value=Re;let ta={};(B=ke.value)==null||B.forEach(we=>{ta[we.prop]=we==null?void 0:we.value}),lr.value=ta}}ar.value=!0,I.value=!1},gu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",bu=p=>{var D,re;const v=(re=(D=$a.value)==null?void 0:D.find(le=>(le==null?void 0:le.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,T=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;ze.value.forEach(le=>{const q=le==null?void 0:le[T];v&&No.isString(q)&&(le[T]=[q]),!v&&!No.isString(q)&&(le[T]="")})},Vt=(p,v)=>{var T;return v==null||v.forEach(z=>{p[z==null?void 0:z.prop]=z==null?void 0:z.value}),p.children&&((T=p.children)==null?void 0:T.length)>0&&(p.children=p.children.map(z=>Vt(z,v))),p},dt=p=>{var T,z,P,D,re,le;Fi("");const v=(T=ke.value)==null?void 0:T.reduce((q,be)=>(q[be.name]=be.value,q),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){lr.value=v,za.value="",Ca.value=(P=ze.value)==null?void 0:P.length,Ie.value=(D=aa.value)==null?void 0:D.filter(be=>(be==null?void 0:be.label)!=="新增");const q=(le=(re=Te.value)==null?void 0:re.filter(be=>(be==null?void 0:be.label)!=="操作"))==null?void 0:le.map(be=>{var Ke,je,ea;const De=(je=(Ke=$a.value)==null?void 0:Ke.find(ka=>(ka==null?void 0:ka.label)===(be==null?void 0:be.label)))==null?void 0:je.multiple;return bu(be),{...be,contents:(be==null?void 0:be.options)??[],optionUrl:be!=null&&be.formMenuSelect&&((ea=be==null?void 0:be.formMenuSelect)==null?void 0:ea.length)>0?{groupSelect:be==null?void 0:be.groupSelect,menuSelect:be==null?void 0:be.formMenuSelect,selectRelateType:"",type:be==null?void 0:be.formType,multiple:De}:null}});F.value=q==null?void 0:q.map(be=>Vt(be,[{prop:"type",value:"edit"},{prop:"columnType",value:gu(be==null?void 0:be.formType)||(be==null?void 0:be.columnType)}])),p==="createClick"&&(ye.value="新增",Hi(!0))}},ki={START:"开始时间",END:"结束时间",HOURS:"工时"},ku=(p,v)=>Number(A.dayjs(v).diff(A.dayjs(p),"day",!0).toFixed(1)),Pt=p=>{var D;const v=u.itemData,T=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,z=new Map;return T==null||T.forEach((re,le)=>{const{label:q}=re;z.set(q,le)}),!z.has(ki.START)||!z.has(ki.END)||!z.has(ki.HOURS)?p:p==null?void 0:p.map(re=>{const le=re==null?void 0:re[ki.START],q=re==null?void 0:re[ki.END],be=ku(le,q);return le&&q&&(re[ki.HOURS]=`${be}天`),re})},Ft=(p,v,T=0)=>{if(T>((v==null?void 0:v.length)??""))return p;const z=v==null?void 0:v[T],P=new Map;for(const re of p){const le=re[z];P.has(le)||P.set(le,[]),P.get(le)&&P.get(le).push(re)}const D=[];for(const[re,le]of P){const[q,...be]=le,De={...q};T+1===((v==null?void 0:v.length)??"")?De.children=le==null?void 0:le.map(Ke=>(Ke.level=A.cloneDeep(T)+1,Ke)).filter((Ke,je)=>je!==0):be.length>0&&(De.children=Ft(be,v,T+1)),De.level=T,D.push(De)}return D},jt=(p,v,T)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let z=[];return z=Ft(p,v==null?void 0:v.contents,0),z},Ht=async(p,v)=>{var la,el,xa,al,ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl,Nl,Tr,$l,xl,Il,Xl,Ml,Yl,tr,Wl,kr,on,xr,fr,yr,qt,Wt,Kt,Gt,Yt;const T=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="header");p==null||p.filter(ia=>(ia==null?void 0:ia.key)==="tableIndexColumn")[0];const z=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="childTree")[0];let P=!0;if((xa=(el=(la=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:la.value)==null?void 0:el.find(ia=>(ia==null?void 0:ia.value)==="onPamButtonContents"))!=null&&xa.content){let ia=(Pa=(ve=(al=p==null?void 0:p.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:al.value)==null?void 0:ve.find(Sl=>(Sl==null?void 0:Sl.value)==="onPamButtonContents"))==null?void 0:Pa.content;ia=(ga=ia==null?void 0:ia.split(":"))==null?void 0:ga[1],ia=(Ea=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Ea.split(","),P=!!(ia!=null&&ia.find(Sl=>Sl==="操作"))}const D=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="page"),re=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="rowButton"),le=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="extraButton"),q=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableContents"),be=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="bottomButton");let De=[];const Ke=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableIndex");$a.value=(B=(Sa=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableToForm"))==null?void 0:Sa[0])==null?void 0:B.contents,Ne.value=(D==null?void 0:D.contents)??!0;let je=[];vr.value===""?je=T==null?void 0:T[0]:je=(T==null?void 0:T.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+vr.value+")"))??(T==null?void 0:T.find(ia=>!(ia!=null&&ia.selectLabel)));let ea=[];vr.value===""?ea=Ke==null?void 0:Ke[0]:ea=(Ke==null?void 0:Ke.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+vr.value+")"))??(Ke==null?void 0:Ke.find(ia=>!(ia!=null&&ia.selectLabel)));let ka=[],Na=[];if(((G=je==null?void 0:je.contents)==null?void 0:G.length)>0){let ia=[],Sl=je==null?void 0:je.contents;if(Array.isArray(Sl==null?void 0:Sl[0])&&((Re=Sl==null?void 0:Sl[0])!=null&&Re.every(Ya=>!(Ya!=null&&Ya.children)))&&(Sl=Sl==null?void 0:Sl[0]),Sl.some(Ya=>Array.isArray(Ya)&&(Ya==null?void 0:Ya.find(Ye=>Ye.children))))ia=(ta=oe.getGradeColumns(Sl,P))==null?void 0:ta[0],ia!=null&&ia.find(Ya=>(Ya==null?void 0:Ya.label)==="操作")||ia.push({label:"操作",prop:"operate",type:"operate"});else{let Ya=Sl.some(Ye=>Array.isArray(Ye))?Sl==null?void 0:Sl[0]:Sl;Ya!=null&&Ya.find(Ye=>(Ye==null?void 0:Ye.label)==="操作")||Ya.push({label:"操作",prop:"operate",type:"operate"}),Ya==null||Ya.forEach((Ye,rr)=>{var Fr,Yr,Ir,oi,xi,wi,Cr,Bn,Un,_i,mn,qn,Jt,Xt,Zt,Qt,es,as,ls,rs,ns;if((Yr=(Fr=Se.value)==null?void 0:Fr.split("/"))==null||Yr.forEach(sr=>{var wr,zn,is;sr!==""&&((is=(zn=(wr=sr==null?void 0:sr.split(S+"updateLoading"))==null?void 0:wr[0])==null?void 0:zn.split(S+"loading"))==null||is[0])}),Ye!=null&&Ye.methodContent){let sr=(xi=(oi=(Ir=Ye==null?void 0:Ye.methodContent)==null?void 0:Ir.replace("@","%%#"))==null?void 0:oi.split("%%#"))==null?void 0:xi[1];if(sr=sr==null?void 0:sr.slice(0,(sr==null?void 0:sr.length)-1),sr=oe.contentTransArrayToAllNoExtra(sr??"",","),(wi=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("@Button")))!=null&&wi.includes("Prop")&&((Cr=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("Type")))!=null&&Cr.includes("Manual"))){let wr=(Un=(Bn=sr==null?void 0:sr.find(zn=>zn==null?void 0:zn.includes("@Button")))==null?void 0:Bn.split(":"))==null?void 0:Un[1];wr=((qn=(mn=(_i=wr==null?void 0:wr.replaceAll("[",""))==null?void 0:_i.replaceAll("]",""))==null?void 0:mn.split(","))==null?void 0:qn[1])??"算法执行",ka.push(wr)}else if((Jt=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("@Button")))!=null&&Jt.includes("Row")&&((Xt=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("Type")))!=null&&Xt.includes("Manual"))){let wr=(Qt=(Zt=sr==null?void 0:sr.find(zn=>zn==null?void 0:zn.includes("@Button")))==null?void 0:Zt.split(":"))==null?void 0:Qt[1];wr=((ls=(as=(es=wr==null?void 0:wr.replaceAll("[",""))==null?void 0:es.replaceAll("]",""))==null?void 0:as.split(","))==null?void 0:ls[1])??"算法执行",Na.push(wr)}}(rs=$a.value)==null||rs.find(sr=>(sr==null?void 0:sr.prop)===(Ye==null?void 0:Ye.prop));let Qr=((ns=Ye==null?void 0:Ye.filter)==null?void 0:ns.includes("@EditRead=Read"))??!1;ia.push({label:(Ye==null?void 0:Ye.label)==="操作"?P?"操作":"":(Ye==null?void 0:Ye.label)??"",prop:(Ye==null?void 0:Ye.label)==="操作"?"operate":(Ye==null?void 0:Ye.prop)??"a"+rr,width:Ye!=null&&Ye.width?parseInt(Ye.width):"",fixed:(Ye==null?void 0:Ye.fixed)??void 0,sortable:(Ye==null?void 0:Ye.sortable)??!1,filterable:(Ye==null?void 0:Ye.filterable)??!1,operable:(Ye==null?void 0:Ye.operable)??!1,showSummary:(Ye==null?void 0:Ye.showSummary)??!1,align:(Ye==null?void 0:Ye.align)??"left",showOverflowTooltip:(Ye==null?void 0:Ye.showOverflowTooltip)??!0,isNotDrag:(Ye==null?void 0:Ye.isNotDrag)??!1,isEditCol:(Ye==null?void 0:Ye.isEditCol)??!1,isOperate:(Ye==null?void 0:Ye.isOperate)??!1,id:(Ye==null?void 0:Ye.id)??rr,type:(Ye==null?void 0:Ye.label)==="操作"?"operate":void 0,formType:(Ye==null?void 0:Ye.formType)??(Ye!=null&&Ye.groupSelect?"Select":""),disabled:Ye==null?void 0:Ye.disabled,options:(Ye==null?void 0:Ye.options)??[],value:(Ye==null?void 0:Ye.value)??"",isExistChild:(Ye==null?void 0:Ye.isExistChild)??!1,mainKey:(Ye==null?void 0:Ye.mainKey)??rr===0,allSelectionContents:(Ye==null?void 0:Ye.allContents)??[],filterContent:Ye==null?void 0:Ye.filterContents,menus:Ye==null?void 0:Ye.menus,groups:Ye==null?void 0:Ye.groups,words:Ye==null?void 0:Ye.words,filter:Ye==null?void 0:Ye.filter,bindMenus:Ye==null?void 0:Ye.bindMenus,fatherPath:Ye==null?void 0:Ye.fatherPath,isMainPath:Ye==null?void 0:Ye.isMainPath,required:(Ye==null?void 0:Ye.required)??!1,relatedContents:Ye==null?void 0:Ye.relatedContents,functionName:Ye==null?void 0:Ye.functionName,functionRelatedWords:Ye==null?void 0:Ye.functionRelatedWords,calculatorFilter:Ye==null?void 0:Ye.calculatorFilter,relatedPages:Ye==null?void 0:Ye.relatedPages,multiple:(Ye==null?void 0:Ye.multiple)??!1,multipleLimit:Ye==null?void 0:Ye.multipleLimit,isReadonly:Qr})})}j.value=(we=be==null?void 0:be[0])==null?void 0:we.contents;const Zr=oe.getNewColumnChild(ia);De=oe.getColumnChild(Zr);const Hn=Ya=>Array.isArray(Ya)?Ya.map(Ye=>(Array.isArray(Ye==null?void 0:Ye.children)&&Ye.children.length>0?(Ye.sortable=!1,Hn(Ye.children)):(Ye==null?void 0:Ye.prop)==="operate"||(Ye==null?void 0:Ye.label)==="操作"||(Ye==null?void 0:Ye.type)==="operate"||(Ye.sortable=!1),Ye)):Ya;Hn(Zr),await no(Zr),t0(ne.value,Zr),F.value=Zr,Ta.value=Zr,n.value=(fa=F.value)==null?void 0:fa.map(Ya=>Ya==null?void 0:Ya.label);let Ar=(ol=(Ba=oe.getAllLeafNodes(F.value))==null?void 0:Ba.filter(Ya=>(Ya==null?void 0:Ya.type)!=="operate"))==null?void 0:ol.map((Ya,Ye)=>({prop:(Ya==null?void 0:Ya.prop)??"a"+Ye,column:Ya.label}));Pl.value=Ar;let Or=[];vr.value===""?Or=q==null?void 0:q[0]:Or=(q==null?void 0:q.find(Ya=>(Ya==null?void 0:Ya.selectLabel)==="("+vr.value+")"))??(q==null?void 0:q.find(Ya=>!(Ya!=null&&Ya.selectLabel)));let zr=Array.isArray((Wa=Or==null?void 0:Or.contents)==null?void 0:Wa[0])&&((fl=Or==null?void 0:Or.contents)!=null&&fl[0].every(Ya=>Array.isArray(Ya)))?(hl=Or==null?void 0:Or.contents)==null?void 0:hl[0]:Or==null?void 0:Or.contents;ea!=null&&ea.contents&&((Fl=ea==null?void 0:ea.contents)==null?void 0:Fl.length)!==0&&(zr=(Ua=A.cloneDeep(zr))==null?void 0:Ua.map((Ya,Ye)=>{if(!Array.isArray(Ya)){let rr={};for(let Qr in Ya)Qr!=="id"&&Qr!=="index"&&(rr[Qr]=Ya[Qr]);Ya=Object.values(rr)}return Ya}));const vo=!!((bl=F.value)!=null&&bl.find(Ya=>Ya.prop==="index"));zr=vc(zr,ea==null?void 0:ea.contents,vo);const Ln=[];zr==null||zr.forEach((Ya,Ye)=>{var Qr;let rr={};if(Array.isArray(Ya)){let Fr=[];Ya==null||Ya.filter(Yr=>!(Yr!=null&&Yr.id)).forEach((Yr,Ir)=>{var oi,xi,wi,Cr,Bn,Un;if((oi=Ar==null?void 0:Ar[Ir])!=null&&oi.prop&&!Array.isArray(Yr)){let _i={};_i[Ar[Ir].column]=Yr,R!=null&&R.value&&((xi=R==null?void 0:R.value)==null?void 0:xi.length)>0&&((wi=R==null?void 0:R.value)!=null&&wi.find(mn=>JSON.stringify(mn==null?void 0:mn[0])===JSON.stringify(_i)))&&(Fr=(Cr=R==null?void 0:R.value)==null?void 0:Cr.find(mn=>JSON.stringify(mn==null?void 0:mn[0])===JSON.stringify(_i))),Fr&&Fr.length>0?rr[Ar[Ir].prop]=Fr!=null&&Fr.find(mn=>{var qn;return((qn=Object.keys(mn))==null?void 0:qn[0])===Ar[Ir].column})?(Bn=Fr==null?void 0:Fr.find(mn=>{var qn;return((qn=Object.keys(mn))==null?void 0:qn[0])===Ar[Ir].column}))==null?void 0:Bn[Ar[Ir].column]:Yr:rr[Ar[Ir].prop]=Yr}else Array.isArray(Yr)&&((Un=Ar[Ir])!=null&&Un.prop?rr[Ar[Ir].prop]=Yr:rr.children=wt(Yr,Ar))})}else rr=Ya;if(Array.isArray(Ya)&&Ya.some(Fr=>Fr==null?void 0:Fr.id)){const Fr=(Qr=Ya==null?void 0:Ya.find(Yr=>Yr.id))==null?void 0:Qr.id;Ln.push(Object.assign(rr,{id:co(Fr)}))}else rr.id?Ln.push(rr):Ln.push(Object.assign(rr,{id:Ye.toString()}))});try{const Ya=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ye=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),rr=Ya==null?void 0:Ya.tableId,Qr=Ya==null?void 0:Ya.compIndex;if(rr&&Array.isArray(Ye)&&Ye.length>0&&String(rr)===String(u==null?void 0:u.parentTableId)&&String(Qr)===String(u==null?void 0:u.index)){const Fr=new Set(Ln.map(Ir=>String(Ir==null?void 0:Ir.id))),Yr=Ye.filter(Ir=>!Fr.has(String(Ir)));if(Yr.length>0){const Ir=Ya==null?void 0:Ya.pageKey,oi=Ir!=null&&Ir.startsWith("/")?Ir.substring(1):Ir;((v==null?void 0:v[Ir])||(v==null?void 0:v[oi])||[]).filter(Cr=>{var Bn,Un;return((Bn=Cr==null?void 0:Cr.key)==null?void 0:Bn.type)==="data"&&String((Un=Cr==null?void 0:Cr.key)==null?void 0:Un.tableId)===String(rr)&&Yr.includes(Cr==null?void 0:Cr.id)}).forEach(Cr=>{var Bn;Fr.has(String(Cr==null?void 0:Cr.id))||(Ln.push({id:Cr==null?void 0:Cr.id,...((Bn=Cr==null?void 0:Cr.value)==null?void 0:Bn.tableData)||{}}),Fr.add(String(Cr==null?void 0:Cr.id)))})}}}catch{}let Rn=null;try{const Ya=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ye=JSON.parse(sessionStorage.getItem(Ya)||"null");Array.isArray(Ye)&&Ye.length>0&&(Rn=new Set(Ye.map(rr=>String(rr))))}catch{}const Ui=Array.from(((Ha=La.value)==null?void 0:Ha.values())||[]).filter(Ya=>!(!(Ya!=null&&Ya._isOCRRow&&(Ya==null?void 0:Ya._ocrTableId)===(u==null?void 0:u.index))||Rn&&Rn.has(String(Ya==null?void 0:Ya.id)))),mo=(ze.value||[]).map(Ya=>String(Ya==null?void 0:Ya.id)),ql=vi(Ln,mo);if(ze.value=jt(ql,z,F.value),ya.value=ql,(dl=ya.value)==null||dl.forEach(Ya=>{var Ye;(Ye=La.value)==null||Ye.set(Ya.id,Ya)}),Rn&&Rn.size>0)try{const Ya=new Set(Array.from(Rn.values()));ze.value=(ze.value||[]).filter(Ye=>!Ya.has(String(Ye==null?void 0:Ye.id))),ya.value=(ya.value||[]).filter(Ye=>!Ya.has(String(Ye==null?void 0:Ye.id))),Ya.forEach(Ye=>{var rr,Qr;try{(Qr=(rr=La.value)==null?void 0:rr.delete)==null||Qr.call(rr,Ye)}catch{}})}catch{}const Pr=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),pt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(Pr&&Array.isArray(pt)&&pt.length>0&&String(Pr==null?void 0:Pr.compIndex)===String(u==null?void 0:u.index)){const Ya=new Set((ya.value||[]).map(Ye=>String(Ye==null?void 0:Ye.id)));pt.filter(Ye=>!Ya.has(String(Ye)))}if(Ui.length>0){const Ya=new Set((ze.value||[]).map(rr=>rr==null?void 0:rr.id)),Ye=Ui.filter(rr=>!Ya.has(rr.id));Ye.length>0&&(ze.value=[...ze.value||[],...Ye],ya.value=[...ya.value||[],...Ye],Ye.forEach(rr=>{var Qr;return(Qr=La.value)==null?void 0:Qr.set(rr.id,rr)}))}}else F.value=[],Te.value=[],ze.value=[],ya.value=[],La.value=new Map;if(Na=[...new Set(Na)],Na=Na==null?void 0:Na.map(ia=>({label:ia,type:"methodButton"})),((Ga=re==null?void 0:re.contents)==null?void 0:Ga.length)>0?Ma.value=re==null?void 0:re.contents:Ma.value=[],Ma.value=[...Ma.value,...Na],ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(ia=>({label:ia,type:"methodButton"})),((pl=le==null?void 0:le.contents)==null?void 0:pl.length)>0)if((Tr=(Nl=(Dl=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:Dl.value)==null?void 0:Nl.find(ia=>(ia==null?void 0:ia.value)==="onButtonContents"))!=null&&Tr.content){let ia=(Il=(xl=($l=p==null?void 0:p.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:$l.value)==null?void 0:xl.find(Sl=>(Sl==null?void 0:Sl.value)==="onButtonContents"))==null?void 0:Il.content;if(ia=(Xl=ia==null?void 0:ia.split(":"))==null?void 0:Xl[1],ia=(Ml=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Ml.split(","),Ie.value=(Yl=le==null?void 0:le.contents)==null?void 0:Yl.filter(Sl=>ia==null?void 0:ia.find(Zr=>Zr===(Sl==null?void 0:Sl.label))),aa.value=(tr=le==null?void 0:le.contents)==null?void 0:tr.filter(Sl=>ia==null?void 0:ia.find(Zr=>Zr===(Sl==null?void 0:Sl.label))),(Wl=le==null?void 0:le.contents)!=null&&Wl.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别")&&!((kr=Ie.value)!=null&&kr.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别"))){const Sl=(on=le==null?void 0:le.contents)==null?void 0:on.find(Zr=>(Zr==null?void 0:Zr.label)==="OCR识别");Ie.value=[...Ie.value,Sl],aa.value=[...aa.value,Sl]}W.value=!!(ia!=null&&ia.find(Sl=>Sl==="搜索")),V.value=!!(ia!=null&&ia.find(Sl=>Sl==="块状显示"))}else Ie.value=le==null?void 0:le.contents,aa.value=le==null?void 0:le.contents;else Ie.value=[],aa.value=[];if(Ie.value=[...Ie.value,...ka],aa.value=[...aa.value,...ka],typeof Se.value=="string"&&Se.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((xr=Ie.value)!=null&&xr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(Ie.value=[...Ie.value||[],{label:"OCR识别"}]),(fr=aa.value)!=null&&fr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(aa.value=[...aa.value||[],{label:"OCR识别"}])):(Ie.value=(Ie.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别"),aa.value=(aa.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别")),(yr=Ie.value)!=null&&yr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(Ie.value=[...Ie.value||[],{label:"切换视图"}]),(qt=aa.value)!=null&&qt.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(aa.value=[...aa.value||[],{label:"切换视图"}]),De!=null&&De.some(ia=>{var Sl;return(ia==null?void 0:ia.calculatorFilter)&&((Sl=ia==null?void 0:ia.calculatorFilter)==null?void 0:Sl.includes("@Button"))})){let ia=(Wt=De==null?void 0:De.filter(Ar=>{var Or;return(Ar==null?void 0:Ar.calculatorFilter)&&((Or=Ar==null?void 0:Ar.calculatorFilter)==null?void 0:Or.includes("@Button"))}))==null?void 0:Wt.map(Ar=>Ar==null?void 0:Ar.calculatorFilter),Sl=[],Zr=[],Hn=[];ia==null||ia.forEach(Ar=>{var vo,Ln,Rn,Ui,mo;let Or=(vo=oe.analyzeSplitToContent(Ar,","))==null?void 0:vo.map(ql=>((ql==null?void 0:ql[(ql==null?void 0:ql.length)-1])===","&&(ql=ql==null?void 0:ql.slice(0,(ql==null?void 0:ql.length)-1)),ql)),zr=Or==null?void 0:Or.find(ql=>ql==null?void 0:ql.includes("@Button"));if(Or!=null&&Or.find(ql=>ql==null?void 0:ql.includes("Manual"))){zr=(Rn=(Ln=zr==null?void 0:zr.replace("=","$R"))==null?void 0:Ln.split("$R"))==null?void 0:Rn[1],zr=zr==null?void 0:zr.slice(1,(zr==null?void 0:zr.length)-1);let ql=(Ui=oe.analyzeSplitToContent(zr,","))==null?void 0:Ui.map(Pr=>((Pr==null?void 0:Pr[(Pr==null?void 0:Pr.length)-1])===","&&(Pr=Pr==null?void 0:Pr.slice(0,(Pr==null?void 0:Pr.length)-1)),Pr));ql=ql==null?void 0:ql[0],ql=ql==null?void 0:ql.slice(1,(ql==null?void 0:ql.length)-1),ql=(mo=ql==null?void 0:ql.split(","))==null?void 0:mo.map(Pr=>({label:Pr,prop:Pr})),zr!=null&&zr.includes("Up")?Sl=[...Sl,...ql??[]]:zr!=null&&zr.includes("Line")?Zr=[...Zr,...ql??[]]:Hn=[...Hn,...ql??[]]}}),Ie.value=[...Sl,...Ie.value??[]],Ma.value=[...Zr,...Ma.value??[]],Hn.value=[...Hn,...Hn.value??[]]}Ca.value=((Kt=ze==null?void 0:ze.value)==null?void 0:Kt.length)??0,Pt(ze.value),Ur.value=ze.value,Rl.value&&(F.value=(Yt=(Gt=Te.value)==null?void 0:Gt.filter(ia=>(ia==null?void 0:ia.label)!=="操作"))==null?void 0:Yt.map(ia=>{var Sl;return{...ia,type:"edit",optionUrl:ia!=null&&ia.formMenuSelect&&((Sl=ia==null?void 0:ia.formMenuSelect)==null?void 0:Sl.length)>0?{groupSelect:ia==null?void 0:ia.groupSelect,menuSelect:ia==null?void 0:ia.formMenuSelect,selectRelateType:"",type:ia==null?void 0:ia.formType}:null}}),dt())};e.watch(()=>[u.itemData,vr.value,an.value,hn.value,R==null?void 0:R.value],async()=>{var p,v,T,z,P,D;if((p=u==null?void 0:u.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=X.value)!=null&&v.find(re=>{var le,q;return(re==null?void 0:re.key)===((q=(le=u==null?void 0:u.itemData)==null?void 0:le.find(be=>(be==null?void 0:be.key)==="columnPath"))==null?void 0:q.contents)}))){let re=X.value,le={key:(z=(T=u==null?void 0:u.itemData)==null?void 0:T.find(q=>(q==null?void 0:q.key)==="columnPath"))==null?void 0:z.contents,value:(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(q=>(q==null?void 0:q.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(q=>((q==null?void 0:q.key)===(le==null?void 0:le.key)&&(q.value=le.value),q)):re.push(le),da.setTableViewContents(re)}await Ht(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.operatingForm,p=>{p!=null&&p.form&&(Fi(p==null?void 0:p.form),ye.value=p==null?void 0:p.dialogTitle,Va.value=!0,Y.value=!0)},{immediate:!0,deep:!0});const xu=()=>{var p;(p=k.value)!=null&&p.includes("read")&&(Rl.value=!Rl.value)},wu=()=>{Er.value=!Er.value};e.watch(()=>{var p;return(p=u==null?void 0:u.config)==null?void 0:p.viewport},p=>{var v;k.value=p,(p==null?void 0:p.length)===0?Rl.value=!1:(p!=null&&p.includes("read")||(Rl.value=!0),p!=null&&p.includes("edit")||(Rl.value=!1)),M.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Rl.value},{immediate:!0}),e.watch(()=>Rl.value,p=>{var v;p?(dt("viewChange"),da.setCacheUpdatingData(null)):(Ie.value=aa.value,F.value=Ta.value,H.value&&(da.setTableLoading(u==null?void 0:u.index),Ae("change",H.value))),M.value=p||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),Hl.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=wn.value)==null?void 0:p.length},p=>{p===0&&(me.currentPage=1)}),e.watch(()=>u==null?void 0:u.compNames,p=>{f.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const _u=(p,v)=>{var T;dt("createClick"),v===me.pageSize&&(me.currentPage=Math.ceil(((T=ze.value)==null?void 0:T.length)/me.pageSize))},Su=async(p,v,T)=>{var P,D,re,le,q;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&fo.includes(z)&&T!==void 0&&T!==null&&String(T).trim()!==""){const be=String(T).trim();if(await ut(be,p==null?void 0:p.id)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ke=(P=ze.value)==null?void 0:P.findIndex(ea=>(ea==null?void 0:ea.id)===(p==null?void 0:p.id)),je=Ke!==-1?(re=(D=ze.value)==null?void 0:D[Ke])==null?void 0:re[z]:void 0;z&&(p[z]=je??"");return}}if(Rl.value){const be=p==null?void 0:p.id;be!=null&&(h.value.has(be)||h.value.set(be,A.cloneDeep(p)),s.value.add(be));const De=(le=ze.value)==null?void 0:le.findIndex(Ke=>(Ke==null?void 0:Ke.id)===(p==null?void 0:p.id));De!==-1&&z&&(ze.value[De]={...ze.value[De],[z]:T}),ho(T,p,v);return}ho(T,p,v),lr.value=A.cloneDeep(p),za.value=p==null?void 0:p.id,Ca.value=(q=ze.value)==null?void 0:q.length,ye.value=p!=null&&p._isTemp?"新增":"编辑",Hi(!1)},Eu=async()=>{var p,v;try{const T=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const P=z.split("_")[1];P&&(T.push(`content_${P}`),T.push(`struct_${P}`))}})),T.length===0&&(u!=null&&u.itemData)){const z=(v=(p=u.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;z&&(T.push(`content_${z}`),T.push(`struct_${z}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},Cu=async(p,v,T)=>{var D,re;if(!T||typeof T!="string"||T.trim()===""){const le=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${p==null?void 0:p.id}:${le}`;d.value.delete(q),b.value.set(q,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${z}`;b.value.set(P,!0);try{const le=await Eu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const q=parseInt((D=vl.value)==null?void 0:D.plat_id);if(!q){console.warn("platId 无效,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const be=await A.getAllTables({platId:q,tableNames:le??[]}),De=((re=be==null?void 0:be.data)==null?void 0:re.result)||[],Ke=[],je=[];for(let ea=0;ea<De.length;ea+=2)ea+1<De.length&&je.push([De[ea],De[ea+1]]);je.forEach(([ea,ka])=>{var al;if(!Array.isArray(ea)||ea.length===0||!Array.isArray(ka)||ka.length===0)return;const Na=ka[0];let Ra=((al=Na==null?void 0:Na.结构)==null?void 0:al.contents)??[];if(!Array.isArray(Ra)||Ra.length===0)return;let la=A.cloneDeep(Ra);if(Array.isArray(la==null?void 0:la[0])&&(la=oe.getColumnChild(la[0])),!Array.isArray(la)||la.length===0||!la.some(ve=>(ve==null?void 0:ve.prop)===z))return;[...ea].sort((ve,Pa)=>{const ga=Number((ve==null?void 0:ve.update_time)??0);return Number((Pa==null?void 0:Pa.update_time)??0)-ga}).slice(0,20).forEach(ve=>{const Pa=ve[z];if(Pa!=null){const ga=String(Pa);ga.toLowerCase().includes(T.toLowerCase())&&Ke.findIndex(Sa=>{var B;return ve.id&&((B=Sa.rowData)==null?void 0:B.id)===ve.id?!0:Sa.label===ga})===-1&&Ke.push({label:ga,rowData:A.cloneDeep(ve),sourceTable:(Na==null?void 0:Na.source_table)||""})}})}),d.value.set(P,Ke)}catch(le){console.error("全局搜索建议失败:",le),d.value.delete(P)}finally{b.value.set(P,!1)}},Du=(p,v,T)=>{if(!Rl.value)return;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${z}`;if(m.has(D)&&clearTimeout(m.get(D)),!T||T.trim()===""){d.value.delete(D),b.value.set(D,!1);return}const re=setTimeout(()=>{Cu(p,{prop:z,property:z},T),m.delete(D)},300);m.set(D,re)};function Tu(p,v){const T=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return d.value.get(T)||[]}const Bu=(p,v,T)=>{var be;if(!T||!T.rowData)return;const z=T.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(oe.getAllLeafNodes(F.value)||[]).filter(De=>(De==null?void 0:De.type)!=="operate"&&(De==null?void 0:De.label)!=="操作"&&(De==null?void 0:De.prop)!=="operate").forEach(De=>{const Ke=De==null?void 0:De.prop;Ke&&z[Ke]!==void 0&&(p[Ke]=z[Ke])}),(be=ze.value)==null||be.findIndex(De=>(De==null?void 0:De.id)===P),P!=null&&(h.value.has(P)||h.value.set(P,A.cloneDeep(p)),s.value.add(P));const q=`${P}:${D}`;d.value.delete(q),b.value.set(q,!1),ho(p[D],p,v)},nn=p=>{var q,be,De,Ke,je,ea,ka,Na,Ra,la,el;const{row:v,column:T,item:z,slotData:P}=p;let D=v!=null&&v[T==null?void 0:T.prop]||(v==null?void 0:v[T==null?void 0:T.prop])===0?((be=(q=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:q[0])==null?void 0:be.contents)??((v==null?void 0:v[T==null?void 0:T.prop])===0?"0":v==null?void 0:v[T==null?void 0:T.prop]):((Ke=(De=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:De[0])==null?void 0:Ke.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ea=(je=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:je[0])==null?void 0:ea.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((Ra=(Na=v==null?void 0:v[(ka=z==null?void 0:z.child)==null?void 0:ka.prop])==null?void 0:Na[0])==null?void 0:Ra.contents)??(v==null?void 0:v[(la=z==null?void 0:z.child)==null?void 0:la.prop]),le=Array.isArray(D)&&!(D!=null&&D.every(xa=>typeof xa=="string"||typeof xa=="number"))?"查看":D;if(le=Array.isArray(le)?le.join(","):le,(T==null?void 0:T.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const xa=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=xa.isValid()?xa.format("YYYYMMDD"):le??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((el=T==null?void 0:T.relatedPages)==null?void 0:el.length)>0&&(le="详情页"),le},Nu=p=>{var be,De,Ke,je,ea,ka,Na,Ra,la,el;const{row:v,column:T,item:z,slotData:P}=p;let D=v!=null&&v[T==null?void 0:T.prop]?((De=(be=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:be[0])==null?void 0:De.contents)??(v==null?void 0:v[T==null?void 0:T.prop]):((je=(Ke=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ke[0])==null?void 0:je.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ka=(ea=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:ea[0])==null?void 0:ka.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((la=(Ra=v==null?void 0:v[(Na=z==null?void 0:z.child)==null?void 0:Na.prop])==null?void 0:Ra[0])==null?void 0:la.contents)??(v==null?void 0:v[(el=z==null?void 0:z.child)==null?void 0:el.prop]);const le=Array.isArray(D)&&!(D!=null&&D.every(xa=>typeof xa=="string"||typeof xa=="number")),q=Array.isArray(D)&&(D==null?void 0:D.find(xa=>xa==null?void 0:xa.url));return le&&q},Au=p=>{var P,D,re,le;if(!(p!=null&&p.column))return!1;const v=Se.value==="试验任务/任务管理",T=(u==null?void 0:u.compName)==="任务列表",z=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((le=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:le.includes("@TextBackRGBA"));return v&&T&&z},zu=(p,v)=>p.find(T=>Object.values(T).some(z=>z===v));return e.watch(()=>Be.value,async p=>{if(p){ue.setContentLoading(!0),await e.nextTick();const v=zu(ze.value,p==null?void 0:p.data);if(!v)return ue.setContentLoading(!1);await Vi(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),ue.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(T=>{var z,P,D,re,le;if(换,String(T==null?void 0:T.compId)===String(u==null?void 0:u.index)&&(T!=null&&T.resId)&&((z=T==null?void 0:T.data)!=null&&z.id)){const q=(P=T==null?void 0:T.data)==null?void 0:P.id,be=T==null?void 0:T.resId;if(ze.value=(D=ze.value)==null?void 0:D.map(De=>{if((De==null?void 0:De.id)===q){const Ke={...De,id:be};return delete Ke._isOCRRow,delete Ke._ocrTableId,Ke}return De}),(le=(re=La.value)==null?void 0:re.has)!=null&&le.call(re,q)){const Ke={...La.value.get(q)||{},id:be};delete Ke._isOCRRow,delete Ke._ocrTableId,La.value.delete(q),La.value.set(be,Ke)}Xa(u==null?void 0:u.index,q,be)}}):String(p==null?void 0:p.compId)===String(u==null?void 0:u.index)&&(ze.value=(v=ze.value)==null?void 0:v.map(T=>{var z;if((T==null?void 0:T.id)===((z=p==null?void 0:p.data)==null?void 0:z.id)){const P={...T,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return T})))},{immediate:!0,deep:!0}),(p,v)=>{var la,el,xa,al;const T=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),le=e.resolveComponent("el-radio-group"),q=e.resolveComponent("el-checkbox-group"),be=e.resolveComponent("el-button"),De=e.resolveComponent("el-icon"),Ke=e.resolveComponent("el-progress"),je=e.resolveComponent("el-alert"),ea=e.resolveComponent("el-table-column"),ka=e.resolveComponent("el-table"),Na=e.resolveComponent("el-upload"),Ra=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",W0,[Xr.value?(e.openBlock(),e.createBlock(sl.ssTable,{id:"excel-table",pageObj:me,showIndex:M.value,isTree:(la=a.compItem)==null?void 0:la.isTree,summaryInfo:Z,columns:F.value,defaultSort:ce,isCardViewport:Er.value,checkedColumns:n.value,key:Vr.value+F.value,tableData:wn.value,isEditViewport:Rl.value,isShowPagination:Ne.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:An,extraButton:Ie.value,rowButton:Ma.value,cacheExtraButtons:aa.value,isClearSelection:((el=Hl.value)==null?void 0:el.length)===0,onDoCurrentChange:Mi,onDoSizeChange:jo,onSortChange:Ho,onContentClick:Vi,onRowClick:at,onSelectChange:Jo,onCellChange:Su,onCellInput:Du,onSelectSuggest:Bu,onChange:ho,onPreview:to,onSubmitEditingTable:lo,onHandleColEditChange:eo,onHandleColTypeChange:ln,onClickButton:st,onAddNewRow:Ko,bottomButton:j.value,allowRowAddOrDelete:ni.value},e.createSlots({headerButton:e.withCtx(ve=>{var Pa,ga,Ea,Sa;return[a.showHeader?(e.openBlock(),e.createBlock(_f,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ma)===e.unref(Se),filterValues:et.value,selectNums:(Pa=Hl.value)==null?void 0:Pa.length,dataNums:(ga=ze.value)==null?void 0:ga.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ve.buttons,menuFilter:(Sa=(Ea=a.compItem)==null?void 0:Ea.component)==null?void 0:Sa.menuFilter,onButtonClick:v[1]||(v[1]=(B,G,Re)=>st(B,G,{extra:Re})),columns:F.value,onFilter:uo,onGetImportData:qo,level:a.level,filterShow:W.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ve,Pa,ga,Ea;return[((ve=ze.value)==null?void 0:ve.length)>0&&a.allowOperate&&V.value?(e.openBlock(),e.createElementBlock("div",Y0,[(Pa=k.value)!=null&&Pa.includes("read")&&((ga=k.value)!=null&&ga.includes("edit"))&&((Ea=Ma.value)!=null&&Ea.some(Sa=>(Sa==null?void 0:Sa.label)==="编辑"))&&!Er.value&&e.unref(ma)!==e.unref(Se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:xu},[e.createVNode(T,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ve,index:Pa})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ga=>_u(ve,Pa)},[e.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,J0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:vu,onBeforeEnter:mu},{reference:e.withCtx(()=>[e.createElementVNode("span",X0,[e.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",Z0,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":$.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ve=>io(ve))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(q,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ve=>n.value=ve),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gn.value,ve=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ve.label},[e.createVNode(D,{value:ve.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ve.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ve.label),9,Q0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Pa;return[e.createElementVNode("div",e3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Pa=Object.keys(ve))==null?void 0:Pa.filter(ga=>{var Ea;return(Ea=E.value)==null?void 0:Ea.find(Sa=>(Sa==null?void 0:Sa.value)===ga)}),ga=>{var Ea,Sa;return e.openBlock(),e.createElementBlock("div",{key:ga},[L[ga]=="radio"?(e.openBlock(),e.createElementBlock("div",a3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(le,{"model-value":ve==null?void 0:ve[ga],onChange:B=>Qn(B,ga,ve)},{default:e.withCtx(()=>{var B,G;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=(B=E.value)==null?void 0:B.find(Re=>(Re==null?void 0:Re.value)===ga))==null?void 0:G.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),L[ga]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ve==null?void 0:ve[ga],"active-text":(Sa=(Ea=E.value)==null?void 0:Ea.find(B=>(B==null?void 0:B.value)===ga))==null?void 0:Sa.label,onChange:B=>Qn(B,ga,ve)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",l3,[e.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ve=>{var Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl;return[((Pa=ve==null?void 0:ve.column)==null?void 0:Pa.label)==="证书附件"||((ga=ve==null?void 0:ve.column)==null?void 0:ga.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",r3,[e.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ga=>bi(ve),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Nu(ve)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",n3,e.toDisplayString(nn(ve)),1)]),default:e.withCtx(()=>{var Ga,pl;return[e.createElementVNode("div",i3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((pl=ve==null?void 0:ve.row)==null?void 0:pl[(Ga=ve==null?void 0:ve.column)==null?void 0:Ga.prop],Dl=>(e.openBlock(),e.createElementBlock("div",o3,[e.createElementVNode("div",{class:"prop-url",title:ai(Dl),onClick:Nl=>mi(Dl)},e.toDisplayString(ai(Dl)),9,t3),e.createElementVNode("div",{class:"prop-download",onClick:Nl=>Zo(Dl)}," 下载 ",8,s3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Au(ve)?(e.openBlock(),e.createBlock(ju,{key:0,value:nn(ve),columnContent:ve==null?void 0:ve.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(nn(ve))&&((Sa=(Ea=nn(ve))==null?void 0:Ea.toString())!=null&&Sa.includes(".txt")||(G=(B=nn(ve))==null?void 0:B.toString())!=null&&G.includes(".cpt")||(ta=(Re=nn(ve))==null?void 0:Re.toString())!=null&&ta.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(nn(ve))&&((fa=(we=nn(ve))==null?void 0:we.toString())!=null&&fa.includes(".txt")||(ol=(Ba=nn(ve))==null?void 0:Ba.toString())!=null&&ol.includes(".cpt")||(fl=(Wa=nn(ve))==null?void 0:Wa.toString())!=null&&fl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(nn(ve))&&((Fl=(hl=nn(ve))==null?void 0:hl.toString())!=null&&Fl.includes(".txt")||(bl=(Ua=nn(ve))==null?void 0:Ua.toString())!=null&&bl.includes(".cpt")||(dl=(Ha=nn(ve))==null?void 0:Ha.toString())!=null&&dl.includes(".cyd"))?"pointer":"",marginLeft:(ve==null?void 0:ve.colIndex)===0?`${((ve==null?void 0:ve.level)??0)*20}px`:0}),onClick:Ga=>{var pl;return Xn(nn(ve),((pl=ve==null?void 0:ve.column)==null?void 0:pl.relatedPages)??[])}},e.toDisplayString(nn(ve)===0?"0":nn(ve)),13,c3))],64))]}),_:2},[((xa=Ma.value)==null?void 0:xa.length)>0?{name:"actions",fn:e.withCtx(({item:ve,fIndex:Pa})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",K0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($i(Ma.value,ve),(ga,Ea)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:e.withModifiers(Sa=>st(ga==null?void 0:ga.label,ve,{extra:ga}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ga==null?void 0:ga.textColor}),class:"extra-button-label"},e.toDisplayString(ga==null?void 0:ga.label),5)],8,G0))),128))])]),_:2},1024)]),key:"0"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection","bottomButton","allowRowAddOrDelete"])):e.createCommentVNode("",!0),Rl.value?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(be,{id:"themeBorderButton",onClick:Yo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:Oi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:ye.value,visible:Y.value,width:ir.value,onBeforeDestroy:oo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",d3,[e.createVNode(sl.ssForm,{ref_key:"formRef",ref:xe,rowContents:ke.value,showOperator:!1,onChange:yu,isEnableWrap:!1,onFixChangeValue:Qo,onClickTrigger:ei,isEdit:ha.value,onBlurChange:ro,onCreate:hi,onTagChange:On},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Va.value?(e.openBlock(),e.createElementBlock("div",p3,[e.createVNode(be,{onClick:v[4]||(v[4]=ve=>Y.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(be,{class:"ok-button",onClick:v[5]||(v[5]=ve=>Hi(!0)),id:"themeButton"},{default:e.withCtx(()=>v[25]||(v[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:ye.value,visible:qe.value,width:sa.value,onBeforeDestroy:v[7]||(v[7]=ve=>qe.value=!1)},{default:e.withCtx(()=>[e.createVNode(Of)]),footer:e.withCtx(()=>[e.createElementVNode("div",f3,[e.createVNode(be,{onClick:v[6]||(v[6]=ve=>qe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(be,{class:"ok-button",onClick:lt,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ee.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:2,fileDataList:pa.value,onDestroy:Pi},null,8,["fileDataList"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:3,visible:$e.value,onBeforeDestroy:fu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{files:Ue.value,threeData:N.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:"OCR扫描录入",visible:ba.value,"close-on-click-modal":!1,onBeforeDestroy:Tl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[v[38]||(v[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",h3,[e.createElementVNode("div",v3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===1}])},v[28]||(v[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===2}])},v[29]||(v[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===3}])},v[30]||(v[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Oa.value===1?(e.openBlock(),e.createElementBlock("div",m3,[e.createVNode(be,{onClick:t,class:"ocr-action-btn",disabled:ll.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(be,{onClick:cn,class:"ocr-action-btn",disabled:ll.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Oa.value===1?(e.openBlock(),e.createElementBlock("div",y3,[e.createElementVNode("div",g3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ia.value,(ve,Pa)=>{var ga;return e.openBlock(),e.createElementBlock("div",{key:Pa,class:"ocr-file-item"},[e.createElementVNode("div",b3,[ve.raw&&((ga=ve.raw.type)!=null&&ga.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Ul(ve),alt:"预览",class:"thumbnail-image"},null,8,k3)):(e.openBlock(),e.createElementBlock("div",x3,[e.createVNode(De,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Bl(ve)==="uploading",processing:Bl(ve)==="processing",completed:Bl(ve)==="completed"||Bl(ve)==="uploaded",failed:Bl(ve)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",w3,[v[35]||(v[35]=e.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),e.createElementVNode("circle",{class:e.normalizeClass(["progress-ring-fill",{completed:Bl(ve)==="completed"||Bl(ve)==="uploaded",uploading:Bl(ve)==="uploading",processing:Bl(ve)==="processing",failed:Bl(ve)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Bl(ve)==="failed"?"#f56c6c":Bl(ve)==="completed"||Bl(ve)==="uploaded"?"#67c23a":"#409eff","stroke-width":Bl(ve)==="completed"||Bl(ve)==="uploaded"||Bl(ve)==="failed"?3:2,"stroke-dasharray":rn(ve),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,_3)])),Bl(ve)==="completed"||Bl(ve)==="uploaded"?(e.openBlock(),e.createElementBlock("div",S3,[e.createVNode(De,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1})])):e.createCommentVNode("",!0),Bl(ve)==="failed"?(e.openBlock(),e.createElementBlock("div",E3,[e.createVNode(De,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>cu(Pa)},[e.createVNode(De,null,{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})],8,C3)]),e.createElementVNode("div",D3,e.toDisplayString(ve.name||"文件名123"),1)])}),128))]),Ia.value.length>0?(e.openBlock(),e.createElementBlock("div",T3,[e.createVNode(be,{onClick:na,class:"ocr-start-recognize-btn",disabled:ll.value||Ia.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Oa.value===1?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(Ke,{percentage:Xe.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Oa.value===2?(e.openBlock(),e.createElementBlock("div",N3,[e.createElementVNode("div",A3,[e.createVNode(je,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",z3,[e.createVNode(ka,{data:Ze.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(ea,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wa.value,ve=>(e.openBlock(),e.createBlock(ea,{key:ve.prop,prop:ve.prop,"min-width":ve.minWidth||230,"class-name":ve.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",M3,[e.createElementVNode("span",null,e.toDisplayString(ve.label),1)])]),default:e.withCtx(({row:Pa,$index:ga})=>{var Ea,Sa,B;return[ve.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:wl(Pa[ve.prop]),fontWeight:500})},e.toDisplayString(nl(Pa[ve.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[cl.value!==ga?(e.openBlock(),e.createElementBlock("span",I3,e.toDisplayString(Pa[ve.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Za(ve.prop)),{key:1,modelValue:Pa[ve.prop],"onUpdate:modelValue":G=>Pa[ve.prop]=G,size:"small",placeholder:"请输入"+ve.label,content:((Ea=Fa(ve.prop))==null?void 0:Ea.contents)??((Sa=Fa(ve.prop))==null?void 0:Sa.options)??[],optionUrl:(B=Fa(ve.prop))==null?void 0:B.optionUrl,onChange:G=>Ka(ga,ve.prop,G),onFocus:G=>Le.value=ve.prop,onBlur:v[8]||(v[8]=G=>Le.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(ea,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ve})=>[cl.value===ve?(e.openBlock(),e.createBlock(De,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Pa=>gl(ve),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Pa=>gl(ve),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Oa.value===3?(e.openBlock(),e.createElementBlock("div",O3,[e.createVNode(De,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Na,{ref:"ocrUploadRef","file-list":Ia.value,"onUpdate:fileList":v[9]||(v[9]=ve=>Ia.value=ve),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":Fe,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Oa.value!==3?(e.openBlock(),e.createElementBlock("div",L3,[e.createVNode(be,{onClick:bn,class:"ocr-start-recognize-btn",disabled:Oa.value===1||ll.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(be,{onClick:Tn,class:"ocr-start-recognize-btn",disabled:ll.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Qf,{visible:gi.value,onConfirm:i,onCancel:v[10]||(v[10]=ve=>gi.value=!1)},null,8,["visible"]),e.createVNode(_d,{visible:rl.value,"onUpdate:visible":v[11]||(v[11]=ve=>rl.value=ve),versions:_e.value},null,8,["visible","versions"]),e.createVNode(cd,{visible:ja.value,"onUpdate:visible":v[12]||(v[12]=ve=>ja.value=ve),images:ul.value,"default-image-name":hr.value,"field-meta":cl.value!==null?((al=Ze.value[cl.value])==null?void 0:al.__ocrFieldMeta)||{}:{},"focused-field-name":Le.value,onClose:v[13]||(v[13]=ve=>ja.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Ld,{visible:dr.value,"onUpdate:visible":v[14]||(v[14]=ve=>dr.value=ve),candidates:Ql.value,"name-prop":Sr.value,"mfr-prop":Mr.value,columns:F.value,onSubmit:br,onPreviewFile:ii},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Hd,{visible:Aa.value,"onUpdate:visible":v[15]||(v[15]=ve=>Aa.value=ve),ocrPreviewData:Ze.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ve=>Ze.value=ve),ocrSelectedFields:ca.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ve=>ca.value=ve),ocrPreviewColumns:wa.value,onConfirm:Qa,onFieldChange:v[18]||(v[18]=({rowIndex:ve,prop:Pa,value:ga})=>Ka(ve,Pa,ga))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Br.ssDialog,{title:f.title,visible:f.show,width:f.width,onBeforeDestroy:Q},{default:e.withCtx(()=>[e.createElementVNode("div",R3,[e.createVNode(sl.ssForm,{rowContents:f==null?void 0:f.contents,formRules:f==null?void 0:f.formRules,showOperator:!1,buttonValue:f.buttonValue,isEdit:ha.value,isStartJustify:!1,onOnButtonClick:ge},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:"",visible:y.show,width:y.width,alignCenter:!0,onBeforeDestroy:_},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",$3,e.toDisplayString(y.title),1),e.createVNode(Ra,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",V3,[e.createVNode(Ra,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Fn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",P3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y==null?void 0:y.buttonValue,ve=>(e.openBlock(),e.createBlock(be,{key:ve==null?void 0:ve.label,style:e.normalizeStyle({background:ve==null?void 0:ve.background,color:ve==null?void 0:ve.color}),onClick:Pa=>K(ve==null?void 0:ve.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ve==null?void 0:ve.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(Sf,{columns:y==null?void 0:y.columns,tableData:y==null?void 0:y.tableData},{content:e.withCtx(({row:ve,item:Pa,slotData:ga,scope:Ea,column:Sa,columnProp:B,$index:G})=>[e.createTextVNode(e.toDisplayString((ve==null?void 0:ve[Sa==null?void 0:Sa.prop])||(ve==null?void 0:ve[Sa==null?void 0:Sa.label])||(ve==null?void 0:ve[Sa==null?void 0:Sa.property])||(ga==null?void 0:ga[Sa==null?void 0:Sa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Mc=Zl._export_sfc(j3,[["__scopeId","data-v-e84b518d"]]),H3={key:1,class:"static-form-body"},U3=["onClick"],q3={key:1},W3=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=w=>{switch(w){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var $;const w=($=n.itemData)==null?void 0:$.find(V=>(V==null?void 0:V.key)==="formContent"),g=(w==null?void 0:w.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(V=>(V==null?void 0:V.label)||(V==null?void 0:V.isHideInForm)).map(V=>{let ae=V==null?void 0:V.value;Array.isArray(ae)&&(ae=ae.map(F=>F==null?"":typeof F=="object"?F.label??F.value??F.name??JSON.stringify(F):String(F)).filter(Boolean).join(",")),ae!=null&&typeof ae=="object"&&(ae=ae.label??ae.value??ae.name??JSON.stringify(ae));const Z=V.isHideInForm?"":V.label??"",me=ae==null||ae===""?"-":String(ae),Ae=Z==="使用状态";return{label:Z,value:me,isStatus:Ae,tagType:Ae?o(me):"",width:V.width??1,field:V}})}),h=e.ref(null),c=e.ref(null),d=e.computed(()=>{const w=Number(n==null?void 0:n.textSize),g=oe.rgbaToColor(n==null?void 0:n.textColor),S={},$={},V={},ae={};return!Number.isNaN(w)&&w&&(S.fontSize=`${w}px`,$.fontSize=`${w+1}px`,V.fontSize=`${w}px`,ae.fontSize=`${w}px`),g&&($.color=g,V.color=g,ae.color=g),{item:S,label:$,value:V,empty:ae}}),m=e.ref(""),b=e.ref(""),u=e.ref(!1),C=async w=>{if(w){b.value&&(URL.revokeObjectURL(b.value),b.value="");try{const g=await A.platformDownloadFile({url:w}),S=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});b.value=URL.createObjectURL(S)}catch{b.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,w=>{w&&(m.value=w)},{immediate:!0}),e.watch(m,w=>{C(w)},{immediate:!0});const M=()=>{var w;(w=c.value)==null||w.click()},k=async w=>{var $,V,ae;const g=w.target,S=($=g==null?void 0:g.files)==null?void 0:$[0];if(!S){g.value="";return}u.value=!0;try{const Z=new FormData;Z.append("file",S);const me=await A.platformUploadFile(Z),Ae=(ae=(V=me==null?void 0:me.data)==null?void 0:V.result)==null?void 0:ae.url;Ae?(m.value=Ae,r("update:backGroundImage",Ae),C(Ae),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{u.value=!1,g.value=""}},W=e.computed(()=>{var w;return b.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(w=n==null?void 0:n.backgroundUrl)==null?void 0:w.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),I=w=>sl.getComponent(w),j=w=>{if(!w)return;const g=w.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},L=(w,g,S)=>{n.disabled||(h.value=g,e.nextTick(()=>{j(S.currentTarget)}))},E=()=>{h.value=null},x=w=>{const g=w!=null&&w.width&&w.width>0?w.width:1,$=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(w,g)=>{const S=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(W.value),onClick:g[2]||(g[2]=$=>(n==null?void 0:n.backGround)==="Yes"&&M())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers($=>M(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:k},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:sl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",H3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,($,V)=>{var ae,Z,me,Ae,F,ne,J,ce,Te;return e.openBlock(),e.createElementBlock("div",{key:V,class:"static-form-item",style:e.normalizeStyle({...x($),...d.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[$.label&&!((ae=$==null?void 0:$.field)!=null&&ae.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(d.value.label)},e.toDisplayString($.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(d.value.value),onClick:$e=>{var fe;return(fe=$.field)!=null&&fe.isNoClick?null:L($,V,$e)}},[h.value===V&&$.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(((Z=$.field)==null?void 0:Z.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":$e=>$.field.value=$e,isEdit:!0,disabled:(me=$.field)==null?void 0:me.disabled,content:((Ae=$.field)==null?void 0:Ae.contents)??[],optionUrl:$.field,originalValue:(F=$.field)==null?void 0:F.value,config:(ne=$.field)==null?void 0:ne.config,configModel:((J=$.field)==null?void 0:J.prop)??((ce=$.field)==null?void 0:ce.name),selectedTagList:((Te=$.field)==null?void 0:Te.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$.isStatus?(e.openBlock(),e.createBlock(S,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",q3,e.toDisplayString($.value??"-"),1))],64))],12,U3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(d.value.empty)}," 暂无数据 ",4))],4)}}}),Ic=Zl._export_sfc(W3,[["__scopeId","data-v-5937a104"]]),K3={class:"form-content"},G3={title:"选择标签"},Y3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},J3={class:"col-operate-wrap"},X3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Z3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const n=()=>{c.value=!1,d.value=!1,m.value=[]},r=a;e.computed(()=>{var pe;const Y=(pe=ra.value)==null?void 0:pe.split("/");return(Y==null?void 0:Y.some(qe=>(qe==null?void 0:qe.includes("updateLoading"))||(qe==null?void 0:qe.includes("loading"))))?!1:$e.value==="view"});const o=l,s=e.ref(""),h=e.ref([]),c=e.ref(!1),d=e.ref(!1),m=e.ref([]),{getFileExtension:b}=Bo.useThreeSystem(),u=e.ref(),C=e.ref(!1),M=e.ref(!1),k=A.useUnit(A.pinia),{chooseTitle:W}=A.storeToRefs(k),I=e.ref([]),j=e.ref(),L=e.ref(!1),E=e.ref([]),x=hc(A.pinia),w=At(A.pinia),g=e.ref(!1),S=e.ref(),$=e.ref(),V=e.ref(),ae=e.ref(),Z=e.ref(),me=A.useLoginState(A.pinia),{loginUserInfo:Ae}=A.storeToRefs(me),F=e.ref(),ne=e.ref(!0),J=A.useModelComp(A.pinia),{tableViewContents:ce,itemData:Te,isEdit:$e,routeToChildPath:fe,lockingPage:N,homepageBackgroundTableId:te}=A.storeToRefs(J),U=e.ref(null),Ce=e.ref(!1),Me=e.ref(!1),Pe=A.useMenuState(),{activeMenuPath:ra}=A.storeToRefs(Pe),Ta=oe.useOriginalState(A.pinia),{originalPath:ee}=A.storeToRefs(Ta),{compType:pa,hasEditable:ue}=Qs.useRole(),ua=()=>!ue(r.config,{type:pa.FORM});e.computed(()=>ra.value==="设备管理/试验设备"&&r.compName==="设备概要");const Se=async()=>{var pe,qe,sa;const Y=te==null?void 0:te.value,xe=(pe=Ae==null?void 0:Ae.value)==null?void 0:pe.plat_id;if(!(!Y||!xe))try{const $a=await A.getAllTables({platId:parseInt(xe),tableNames:[`content_${Y}`,`struct_${Y}`],user_unique_id:"0"}),Ma=((sa=(qe=$a==null?void 0:$a.data)==null?void 0:qe.result)==null?void 0:sa[0])??[],Va=String((r==null?void 0:r.index)??""),Ue=Ma==null?void 0:Ma.find(Ie=>String(Ie==null?void 0:Ie.relatedForm_id)===Va);Ue!=null&&Ue.backgroundImg_url&&(ae.value=Ue.backgroundImg_url)}catch($a){console.error("获取首页背景图片表数据失败:",$a)}},se=e.ref([]),Be=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ge=async Y=>{Me.value=Y,await de("disabled",null,Y,!0)},da=async Y=>{await de("operable",null,Y,!0)};e.watch(()=>ra.value,async()=>{h.value=[],m.value=[]},{deep:!0,immediate:!0});const Ja=()=>{e.nextTick(()=>{he()})},R=Y=>{var xe;h.value=(xe=h.value)==null?void 0:xe.map(pe=>({...pe,isFormColHidden:!(Y!=null&&Y.includes(pe.label))}))};e.onUnmounted(()=>{U.value=null});const H=Y=>{o("clickTrigger",Y)},X=async Y=>{var xe,pe,qe,sa,$a,Ma;if(Y===""){let Va="";(xe=h.value)==null||xe.forEach(ke=>{ke!=null&&ke.isMain&&(Va=ke==null?void 0:ke.value)});let Ue=await oe.getItemData(fe.value,sessionStorage.getItem("systemKey"),"");Va=((Ma=($a=(sa=(qe=(pe=Ue==null?void 0:Ue[0])==null?void 0:pe.compData)==null?void 0:qe.find(ke=>(ke==null?void 0:ke.key)==="mainRouters"))==null?void 0:sa.contents)==null?void 0:$a[0])==null?void 0:Ma.routerContent)+ee.value+Va;let aa=await oe.getItemData(Va,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=aa==null?void 0:aa.filter(ke=>(ke==null?void 0:ke.comp)!=="methodButton"),o("routeUrl",E.value)}},he=()=>{var xe;const Y=(xe=U.value)==null?void 0:xe.$el;Y&&Al.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:pe=>{const{oldIndex:qe,newIndex:sa}=pe;if(qe===sa)return;const $a=h.value.splice(qe,1)[0];h.value.splice(sa,0,$a)}})},de=async(Y,xe,pe,qe=!1)=>{try{J.setRefreshCurStructure(!1)}catch{qa.ElMessage.error("编辑处理失败")}},ma=async(Y,xe)=>{await de()},oa=async(Y,xe)=>{Y&&await de()},Ve=async(Y,xe,pe)=>{await de(xe,pe,Y,!1)},_a=(Y,xe)=>{F.value===xe?ne.value=!1:ne.value=!0,F.value=xe==null?void 0:xe.changeProp},ze=async Y=>{var Ma;ae.value=Y;const xe=r.itemData,pe=xe==null?void 0:xe.find(Va=>(Va==null?void 0:Va.key)==="backGroundImage");pe?pe.contents=Y:xe==null||xe.push({key:"backGroundImage",contents:Y}),o("change",{key:"backGroundImage",contents:Y});const qe=te==null?void 0:te.value,sa=r==null?void 0:r.index,$a=(Ma=Ae==null?void 0:Ae.value)==null?void 0:Ma.plat_id;if(!(!qe||!$a||!sa||!Y))try{await A.pageBatchAddApi({platId:parseInt($a),changeContents:[{tableName:`content_${qe}`,tableContents:[{backgroundImg_url:Y,relatedForm_id:String(sa)}]}],user_unique_id:"0"})}catch(Va){console.error("保存背景图片记录失败:",Va),qa.ElMessage.error("背景图片记录保存失败")}},ya=async Y=>{var pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl;let xe=[];if((pe=Y==null?void 0:Y.toString())!=null&&pe.includes(".urdf")){if(Y.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:Y,extension:b(Y)}],d.value=!0,c.value=!0;return}if((qe=Y==null?void 0:Y.toString())!=null&&qe.includes(".stl")||(sa=Y==null?void 0:Y.toString())!=null&&sa.includes(".STL")||($a=Y==null?void 0:Y.toString())!=null&&$a.includes(".obj")||(Ma=Y==null?void 0:Y.toString())!=null&&Ma.includes(".mtl")){const jl=((Va=Y==null?void 0:Y.toString())==null?void 0:Va.split(",")).map(Qe=>({url:Qe,extension:b(Qe)}));m.value=jl,d.value=!1,c.value=!0;return}if((Ue=Y==null?void 0:Y.toString())!=null&&Ue.includes(".stl")||(Ie=Y==null?void 0:Y.toString())!=null&&Ie.includes(".STL")||(aa=Y==null?void 0:Y.toString())!=null&&aa.includes(".obj")||(ke=Y==null?void 0:Y.toString())!=null&&ke.includes(".mtl")){let _l,jl=[],Qe={};if(Array.isArray(Y)?_l=Y:_l=Y==null?void 0:Y.split(","),_l==null||_l.forEach(Xa=>{Xa.includes(".mtl")?jl.push(Xa):Qe.blob=Qe.blob?Qe.blob+","+Xa:Xa}),(jl==null?void 0:jl.length)>0&&(Qe.mtlBlobs=jl),(tl=(We=Object.values(Qe))==null?void 0:We[0])!=null&&tl.includes("http:"))xe.push(Qe);else{const Xa=new Blob([Qe.blob],{type:"application/octet-stream;charset=UTF-8"});let ba=URL.createObjectURL(Xa),ll="";(Cl=Y==null?void 0:Y.split("/"))==null||Cl.forEach((Ia,il)=>{var rl;il===((rl=Y==null?void 0:Y.split("/"))==null?void 0:rl.length)-1&&(ll=Ia)}),(El=Qe.blob)!=null&&El.includes(".stl")&&(ll=(ll==null?void 0:ll.replaceAll(">",""))+".urdf"),j.value=[{name:ll,blobUrl:ba}],M.value=!0}}else{const _l=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),jl=await qa.axios.get(Y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{_l.close()}),Qe=new Blob([jl.data],{type:"application/octet-stream;charset=UTF-8"});let Xa=URL.createObjectURL(Qe),ba="";(Vl=Y==null?void 0:Y.split("/"))==null||Vl.forEach((ll,Ia)=>{var il;Ia===((il=Y==null?void 0:Y.split("/"))==null?void 0:il.length)-1&&(ba=ll)}),j.value=[{name:ba,blobUrl:Xa}],M.value=!0}(xe==null?void 0:xe.length)>0&&w.setBlobUrls(xe)},La=()=>{M.value=!1},za=Y=>{var $a,Ma,Va,Ue;const xe=(Ma=($a=sl.safeClone(r.itemData))==null?void 0:$a.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Ma.contents,pe=sl.safeClone(Y.content);let qe={};pe&&((Va=Object.values(pe))==null?void 0:Va.length)>0&&((Ue=Object.values(pe))==null||Ue.forEach((Ie,aa)=>{qe[xe[aa].key]=Ie}));const sa={content:qe,index:r==null?void 0:r.index,buttonName:Y==null?void 0:Y.buttonName};o("change",sa)};e.computed(()=>"http://222.92.178.198:62001");const ha=async Y=>{var We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa;if(!Y)return;(tl=(We=r==null?void 0:r.itemData)==null?void 0:We.find(Je=>(Je==null?void 0:Je.key)==="parentFormPath"))==null||tl.contents;let xe=ce.value;(xe==null?void 0:xe.length)>0&&(xe=xe==null?void 0:xe.map(Je=>{var Xe,Aa,Ze,wa;let ie=(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.split("/");return(r==null?void 0:r.compName)===(ie==null?void 0:ie[0])&&(Aa=h.value)!=null&&Aa.find(Fa=>(Fa==null?void 0:Fa.prop)===(ie==null?void 0:ie[1]))&&(Je.value=(wa=(Ze=h.value)==null?void 0:Ze.find(Fa=>(Fa==null?void 0:Fa.prop)===(ie==null?void 0:ie[1])))==null?void 0:wa.value),Je}),J.setTableViewContents(xe));const pe=sl.safeClone(r.itemData);let qe=pe==null?void 0:pe.map(Je=>{var ie;return(Je==null?void 0:Je.key)==="formContent"&&((ie=Je.contents)==null||ie.map((Xe,Aa)=>{var Ze,wa,Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr,Ql,nr,pr,gr,Oe,er,Sr,Mr;return Xe.type=(wa=(Ze=h.value)==null?void 0:Ze.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:wa.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((He=(Za=(Fa=Xe==null?void 0:Xe.key)==null?void 0:Fa.split("$"))==null?void 0:Za[1])==null?void 0:He.length)>0?(Le=(cl=Vu((ca=(va=Xe==null?void 0:Xe.key)==null?void 0:va.split("$"))==null?void 0:ca[1]))==null?void 0:cl.split(","))==null?void 0:Le.map(zl=>({label:zl,value:zl})):[],(ja=Xe==null?void 0:Xe.key)!=null&&ja.includes("$")&&(Xe.key=(hr=(ul=Xe==null?void 0:Xe.key)==null?void 0:ul.split("$"))==null?void 0:hr[0]),Xe.signature=(Ql=(dr=h.value)==null?void 0:dr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Ql.signature,Xe.isLoginUser=(pr=(nr=h.value)==null?void 0:nr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:pr.isLoginUser,Xe.value=(gr=Object.values(Y))==null?void 0:gr[Aa],Xe.isFormColHidden=(er=(Oe=h.value)==null?void 0:Oe.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:er.isFormColHidden,Xe.isHideInForm=(Mr=(Sr=h.value)==null?void 0:Sr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Mr.isHideInForm,Xe})),Je}),sa=h.value,$a=(El=(Cl=sl.safeClone(qe))==null?void 0:Cl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:El.contents;if(sa=sa==null?void 0:sa.map(Je=>{var ie,Xe;return(Je==null?void 0:Je.type)==="Select"&&((ie=Je==null?void 0:Je.allSelectionContents)==null?void 0:ie.length)>0&&(Je.contactValue=Y),Je.value=(Xe=$a==null?void 0:$a.find((Aa,Ze)=>((Aa==null?void 0:Aa.id)??Ze)===(Je==null?void 0:Je.id)))==null?void 0:Xe.value,Je}),!ne.value){o("contentChange",{contents:qe,index:r.index});return}let Ma="",Va=(jl=(_l=(Vl=sl.safeClone(qe))==null?void 0:Vl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:_l.contents)==null?void 0:jl.find((Je,ie)=>{var Xe,Aa,Ze;return(Je==null?void 0:Je.label)===F.value||ie.toString()===((Ze=(Aa=(Xe=F.value)==null?void 0:Xe.split("t"))==null?void 0:Aa[1])==null?void 0:Ze.toString())}),Ue=(Qe=Va==null?void 0:Va.optionUrl)==null?void 0:Qe.menuSelect,Ie=!0;if((ll=(ba=(Xa=sl.safeClone(qe))==null?void 0:Xa.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:ba.contents)==null||ll.forEach(Je=>{var ie,Xe,Aa,Ze,wa,Fa;Ie&&((Aa=(Xe=(ie=Je==null?void 0:Je.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Xe[1])!=null&&Aa.includes("["))&&(Ma=(wa=(Ze=Je==null?void 0:Je.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:wa[1],JSON.stringify(Ue)===JSON.stringify((Fa=Je==null?void 0:Je.optionUrl)==null?void 0:Fa.menuSelect)&&(Ie=!1))}),(Ia=Va==null?void 0:Va.optionUrl)!=null&&Ia.menuSelect&&ne.value){let Je=await _t(Va),ie,Xe=(il=Va==null?void 0:Va.optionUrl)==null?void 0:il.menuSelect;if(Je==null||Je.forEach(Aa=>{var Ze,wa,Fa,Za,He,va,ca,cl,Le,ja;Ma===((wa=(Ze=Va==null?void 0:Va.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:wa[1])&&((He=(Za=(Fa=Va==null?void 0:Va.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:Za[1])!=null&&He.includes("["))&&((ja=sl.safeClone(Aa))==null?void 0:ja[(Le=(cl=(ca=(va=Va==null?void 0:Va.optionUrl)==null?void 0:va.groupSelect)==null?void 0:ca[1])==null?void 0:cl.replaceAll("[",""))==null?void 0:Le.replaceAll("]","")])===(Va==null?void 0:Va.value)&&(ie=Aa)}),ie){let Aa=sl.safeClone(sa);Aa=Aa==null?void 0:Aa.map(wa=>{var Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr;return(ie!=null&&ie[wa==null?void 0:wa.label]||ie!=null&&ie[(va=(He=(Za=(Fa=wa==null?void 0:wa.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:Za[1])==null?void 0:He.replaceAll("[",""))==null?void 0:va.replaceAll("]","")])&&((Le=(cl=(ca=wa==null?void 0:wa.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:cl[1])!=null&&Le.includes("["))&&Xe!=null&&Xe.every(Ql=>{var nr,pr;return(pr=(nr=wa==null?void 0:wa.optionUrl)==null?void 0:nr.menuSelect)==null?void 0:pr.includes(Ql)})&&(wa.value=(ie==null?void 0:ie[wa==null?void 0:wa.label])||(ie==null?void 0:ie[(dr=(hr=(ul=(ja=wa==null?void 0:wa.optionUrl)==null?void 0:ja.groupSelect)==null?void 0:ul[1])==null?void 0:hr.replaceAll("[",""))==null?void 0:dr.replaceAll("]","")]),Array.isArray(wa.value)&&wa.value.every(Ql=>(Ql==null?void 0:Ql.url)&&(Ql==null?void 0:Ql.name))&&(wa.type="Upload")),wa}),Aa=Aa==null?void 0:Aa.map(wa=>{var Fa,Za,He;return(Fa=wa==null?void 0:wa.optionUrl)!=null&&Fa.oldMenuSelect&&(wa.optionUrl.menuSelect=(He=(Za=sl.safeClone(wa))==null?void 0:Za.optionUrl)==null?void 0:He.oldMenuSelect),wa}),h.value=sl.safeClone(Aa);let Ze=sl.safeClone(Aa);Ze=Ze==null?void 0:Ze.map(wa=>{var Fa,Za,He,va,ca,cl;return(Za=(Fa=wa==null?void 0:wa.optionUrl)==null?void 0:Fa.menuSelect)!=null&&Za.some(Le=>Le==null?void 0:Le.includes("["))&&(wa.optionUrl.oldMenuSelect=(va=(He=sl.safeClone(wa))==null?void 0:He.optionUrl)==null?void 0:va.menuSelect,wa.optionUrl.menuSelect=(cl=(ca=wa==null?void 0:wa.optionUrl)==null?void 0:ca.menuSelect)==null?void 0:cl.map(Le=>{var ja,ul,hr,dr;if(Le!=null&&Le.includes("[")){let Ql=(ul=(ja=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:ja.split(":"))==null?void 0:ul[1];Le=(dr=(hr=sl.safeClone(Aa))==null?void 0:hr.find(nr=>(nr==null?void 0:nr.label)===Ql))==null?void 0:dr.value}return Le})),wa}),h.value=Ze}else h.value=sa;qe=qe==null?void 0:qe.map(Aa=>{var Ze;return(Aa==null?void 0:Aa.key)==="formContent"&&(Aa.contents=(Ze=Aa.contents)==null?void 0:Ze.map(wa=>{var Fa,Za,He,va;return wa.value=((Za=(Fa=h.value)==null?void 0:Fa.find(ca=>(ca==null?void 0:ca.label)===(wa==null?void 0:wa.key)))==null?void 0:Za.value)??(wa==null?void 0:wa.value),wa.type=((va=(He=h.value)==null?void 0:He.find(ca=>(ca==null?void 0:ca.prop)===(wa==null?void 0:wa.key)))==null?void 0:va.type)??(wa==null?void 0:wa.type),wa})),Aa})}ne.value=!1,o("contentChange",{contents:qe,index:r.index});let aa=[],ke=[];if((_e=sl.safeClone((rl=qe==null?void 0:qe.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:rl.contents))==null||_e.forEach(Je=>{var ie;Array.isArray(Je==null?void 0:Je.value)&&((ie=Je==null?void 0:Je.value)!=null&&ie.find(Xe=>{var Aa;return(Aa=Xe==null?void 0:Xe.url)==null?void 0:Aa.includes(".obj")}))&&(ke=Je==null?void 0:Je.value)}),(ke==null?void 0:ke.length)>0){const Je=(Oa=sl.safeClone(ke))==null?void 0:Oa.filter(ie=>{var Xe;return(Xe=ie==null?void 0:ie.url)==null?void 0:Xe.includes(".obj")});Je==null||Je.forEach(ie=>{var Aa,Ze,wa,Fa;const Xe=(Aa=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:Aa.map(Za=>Za==null?void 0:Za.url);aa.push({objUrl:ie==null?void 0:ie.url,mtlUrls:((Ze=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:Ze.length)===1?(Fa=(wa=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:wa[0])==null?void 0:Fa.url:Xe})}),w.setObjUrl(aa)}},Ca=(Y,xe,pe)=>{let qe="";const sa=xe==null?void 0:xe.map($a=>{var Ma;return(Ma=$a==null?void 0:$a.value)==null?void 0:Ma.pageData});return sa==null||sa.forEach($a=>{var Ma;($a==null?void 0:$a.name)===(Y==null?void 0:Y[0])&&((Ma=$a==null?void 0:$a.compData)==null||Ma.forEach(Va=>{var Ue;(Va==null?void 0:Va.key)==="formContent"&&((Ue=Va==null?void 0:Va.contents)==null||Ue.forEach(Ie=>{var aa;(Ie==null?void 0:Ie.prop)===(Y==null?void 0:Y[1])&&(qe=(Ie==null?void 0:Ie.value)===""?oe.judgeContents((aa=sl.safeClone(Ie))==null?void 0:aa.optionUrl,pe):Ie==null?void 0:Ie.value)}))}))}),qe},Ne=(Y,xe,pe,qe)=>{var Va,Ue;let sa="",$a="";(Va=sl.safeClone(xe))==null||Va.forEach((Ie,aa)=>{Ie!=null&&Ie.includes("[")?$a=$a+ee.value+Y[aa]:$a=$a===""?$a+Ie:$a+"/"+Ie});let Ma=(Ue=qe[$a])==null?void 0:Ue.map(Ie=>{var aa;return(aa=Ie==null?void 0:Ie.value)==null?void 0:aa.pageData});return Ma==null||Ma.forEach(Ie=>{var aa;(Ie==null?void 0:Ie.name)===(pe==null?void 0:pe[0])&&((aa=Ie==null?void 0:Ie.compData)==null||aa.forEach(ke=>{var We;(ke==null?void 0:ke.key)==="formContent"&&((We=ke==null?void 0:ke.contents)==null||We.forEach(tl=>{(tl==null?void 0:tl.prop)===(pe==null?void 0:pe[1])&&(sa=tl==null?void 0:tl.value)}))}))}),sa};e.watch(()=>te==null?void 0:te.value,async()=>{await Se()},{immediate:!0});const ye=async Y=>await Fp(Y,"Auto");return e.watch(()=>r.itemData,async()=>{var tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa,Je,ie,Xe,Aa,Ze,wa,Fa,Za,He,va,ca,cl,Le;const Y=(tl=r.itemData)==null?void 0:tl.find(ja=>(ja==null?void 0:ja.key)==="formContent");let xe=(Cl=r.itemData)==null?void 0:Cl.find(ja=>(ja==null?void 0:ja.key)==="backGround");xe&&((El=xe==null?void 0:xe.contents)==null?void 0:El.length)>0&&(s.value=((_l=(Vl=xe==null?void 0:xe.contents)==null?void 0:Vl[0])==null?void 0:_l.url)??"");const pe=(jl=sl.safeClone(r.itemData))==null?void 0:jl.find(ja=>(ja==null?void 0:ja.key)==="formButton"),qe=(Qe=sl.safeClone(r.itemData))==null?void 0:Qe.find(ja=>(ja==null?void 0:ja.key)==="formFlex"),sa=(Xa=sl.safeClone(r.itemData))==null?void 0:Xa.find(ja=>(ja==null?void 0:ja.key)==="formWrap"),$a=(ba=sl.safeClone(r.itemData))==null?void 0:ba.find(ja=>(ja==null?void 0:ja.key)==="enableWrap"),Ma=(ll=sl.safeClone(r.itemData))==null?void 0:ll.find(ja=>(ja==null?void 0:ja.key)==="textSize"),Va=(Ia=sl.safeClone(r.itemData))==null?void 0:Ia.find(ja=>(ja==null?void 0:ja.key)==="textRGBA"),Ue=(il=sl.safeClone(r.itemData))==null?void 0:il.find(ja=>(ja==null?void 0:ja.key)==="backGround"),Ie=(rl=sl.safeClone(r.itemData))==null?void 0:rl.find(ja=>(ja==null?void 0:ja.key)==="backGroundImage");(sa==null?void 0:sa.contents)==="纵向"?C.value=!1:C.value=!0;const aa=Number(Ma==null?void 0:Ma.contents);S.value=Number.isNaN(aa)?void 0:aa,$.value=Va==null?void 0:Va.contents,V.value=Ue==null?void 0:Ue.contents,ae.value=Ie==null?void 0:Ie.contents;const ke=$a==null?void 0:$a.contents;if(ke===void 0?g.value=si.BLOCK:typeof ke=="boolean"?g.value=ke?si.ORDINARY:si.BLOCK:g.value=ke,Z.value=typeof(qe==null?void 0:qe.contents)!="boolean"?!(!(qe!=null&&qe.contents)===""||((_e=qe==null?void 0:qe.contents)==null?void 0:_e.toUpperCase())==="VERTICAL"):qe==null?void 0:qe.contents,((Oa=Y==null?void 0:Y.contents)==null?void 0:Oa.length)>0&&Array.isArray(Y==null?void 0:Y.contents)){let ja=r.allMapContents;const ul=(ie=(Je=sl.safeClone(Y))==null?void 0:Je.contents)==null?void 0:ie.map((Oe,er)=>{var Vr,Kr,an,hn,Jl,vr,Jr,vl,ir,Rl,Er,Hl,mr;let Sr=(Oe==null?void 0:Oe.label)??(Oe==null?void 0:Oe.key)??"";Oe==null||Oe.type;let Mr=(Oe==null?void 0:Oe.options)??[];if((Vr=Oe==null?void 0:Oe.key)!=null&&Vr.includes("$")&&(Sr=(Kr=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Kr[0],((hn=(an=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:an[1])==null?void 0:hn.length)>0)){const[ar,Xr]=(vr=(Jl=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Jl[1])==null?void 0:vr.split(/[()]/);(Jr=oe.FormType.find(sn=>(sn==null?void 0:sn.key)===ar))==null||Jr.value,((vl=Xr==null?void 0:Xr.split(","))==null?void 0:vl.length)>0&&(Mr=(ir=Xr==null?void 0:Xr.split(","))==null?void 0:ir.map(sn=>({label:sn,value:sn})))}let zl=Oe==null?void 0:Oe.options;((Rl=Oe==null?void 0:Oe.optionUrl)==null?void 0:Rl.selectRelateType)==="自定义绑定"&&(zl=(Hl=(Er=Oe==null?void 0:Oe.optionUrl)==null?void 0:Er.defaultSelect)==null?void 0:Hl.map(ar=>({label:ar,value:ar})));let Nr=(Oe==null?void 0:Oe.menuPath)??[],qr=(Oe==null?void 0:Oe.groups)??[],Kl=(Oe==null?void 0:Oe.columns)??[],br=!1,$r=(Oe==null?void 0:Oe.isFormColHidden)??!1,jr="",Pl=Oe!=null&&Oe.value?Oe.value:(zl==null?void 0:zl.length)>0?(mr=zl==null?void 0:zl[0])==null?void 0:mr.value:(Oe==null?void 0:Oe.value)??"",lr=!1,Wr="Input";return((zl==null?void 0:zl.length)>0||(Nr==null?void 0:Nr.length)>0)&&(Wr="Select"),(Array.isArray(jr)&&(jr!=null&&jr.every(ar=>(ar==null?void 0:ar.name)&&(ar==null?void 0:ar.url)))||Array.isArray(Pl)&&(Pl!=null&&Pl.every(ar=>(ar==null?void 0:ar.name)&&(ar==null?void 0:ar.url))))&&(Wr="upload"),Oe!=null&&Oe.isMainUrl&&(Wr="Url"),{label:Sr??"",name:Sr??"t"+er,prop:Sr??sl.safeClone(Oe==null?void 0:Oe.key),type:(Oe==null?void 0:Oe.type)??Wr,value:(Oe==null?void 0:Oe.type)==="Date"&&Pl===""?new Date:Pl,id:(Oe==null?void 0:Oe.id)??er,contents:(zl==null?void 0:zl.length)>0?zl:Mr??[],width:(Oe==null?void 0:Oe.width)??1,isLoginUser:br,config:Oe==null?void 0:Oe.config,optionUrl:(Oe==null?void 0:Oe.optionUrl)??Oe,isFormColHidden:$r,isHideInForm:(Oe==null?void 0:Oe.isHideInForm)??!1,signature:lr,isMain:Oe==null?void 0:Oe.isMain,required:(Oe==null?void 0:Oe.required)??!1,isMainUrl:Oe==null?void 0:Oe.isMainUrl,operable:(Oe==null?void 0:Oe.operable)??!1,disabled:(Oe==null?void 0:Oe.disabled)??!1,isSync:Oe==null?void 0:Oe.isSync,menus:Nr,groups:qr,words:Kl,allSelectionContents:Oe==null?void 0:Oe.allContents,filterContent:Oe==null?void 0:Oe.filterContents,isNoClick:(Oe==null?void 0:Oe.isNoClick)??!1,functionName:Oe==null?void 0:Oe.functionName,functionRelatedWords:Oe==null?void 0:Oe.functionRelatedWords,calculatorFilter:Oe==null?void 0:Oe.calculatorFilter}}),hr=ul==null?void 0:ul.map(Oe=>Oe==null?void 0:Oe.value);let dr="";hr==null||hr.forEach(Oe=>{Oe!==""&&Oe!==void 0&&(dr=dr===""?Oe:dr+"/"+Oe)}),x.setSelectArray(hr),x.setSelectString(dr);let Ql=(Xe=sl.safeClone(ul))==null?void 0:Xe.map(Oe=>(Oe!=null&&Oe.value&&oe.IsJson(Oe==null?void 0:Oe.value)&&Array.isArray(JSON.parse(Oe==null?void 0:Oe.value))&&(Oe.value=JSON.parse(Oe.value)),Oe)),nr={};Ql==null||Ql.forEach(Oe=>{nr[Oe.label]=Oe==null?void 0:Oe.value}),Ql=Ql==null?void 0:Ql.map(Oe=>{var er,Sr,Mr,zl,Nr,qr,Kl,br,$r;if((Oe==null?void 0:Oe.type)==="Select"&&((er=Oe==null?void 0:Oe.allSelectionContents)==null?void 0:er.length)>0&&(Oe.contactValue=nr),(Mr=(Sr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Sr.menuSelect)!=null&&Mr.some(jr=>jr==null?void 0:jr.includes("["))){let jr="";Oe.optionUrl.oldMenuSelect=(Nr=(zl=sl.safeClone(Oe))==null?void 0:zl.optionUrl)==null?void 0:Nr.menuSelect,Oe.optionUrl.menuSelect=(Kl=(qr=Oe==null?void 0:Oe.optionUrl)==null?void 0:qr.menuSelect)==null?void 0:Kl.map(Pl=>{var lr,Wr,Ur,Vr,Kr,an;if(Pl!=null&&Pl.includes("[")){let hn=(Wr=(lr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:lr.split(":"))==null?void 0:Wr[1];jr=Ca((Ur=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Ur.split(":"),ja==null?void 0:ja[ra.value],ja),Pl=((Kr=(Vr=sl.safeClone(Ql))==null?void 0:Vr.find(Jl=>(Jl==null?void 0:Jl.label)===hn))==null?void 0:Kr.value)||Ca((an=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:an.split(":"),ja==null?void 0:ja[ra.value],ja)}return Pl}),jr!==""&&Oe.value===""&&(Oe.value=Ne(Oe.optionUrl.menuSelect,Oe.optionUrl.oldMenuSelect,(br=Oe==null?void 0:Oe.optionUrl)==null?void 0:br.groupSelect,ja),Array.isArray(Oe.value)&&(($r=Oe.value)!=null&&$r.every(Pl=>Pl==null?void 0:Pl.url))&&(Oe.type="UPLOAD"))}return Oe}),h.value=Ql,Me.value=((Aa=h.value)==null?void 0:Aa.every(Oe=>Oe==null?void 0:Oe.disabled))||N.value===ra.value,Ce.value=(Ze=h.value)==null?void 0:Ze.every(Oe=>Oe==null?void 0:Oe.operable),se.value=(wa=h.value)==null?void 0:wa.map(Oe=>Oe==null?void 0:Oe.label);let pr=[],gr=[];if((Fa=sl.safeClone(h.value))==null||Fa.forEach(Oe=>{var er;Array.isArray(Oe==null?void 0:Oe.value)&&((er=Oe==null?void 0:Oe.value)!=null&&er.find(Sr=>{var Mr;return(Mr=Sr==null?void 0:Sr.url)==null?void 0:Mr.includes(".obj")}))&&(gr=Oe==null?void 0:Oe.value)}),(gr==null?void 0:gr.length)>0){const Oe=(Za=sl.safeClone(gr))==null?void 0:Za.filter(er=>{var Sr;return(Sr=er==null?void 0:er.url)==null?void 0:Sr.includes(".obj")});Oe==null||Oe.forEach(er=>{var Mr,zl,Nr,qr;const Sr=(Mr=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:Mr.map(Kl=>Kl==null?void 0:Kl.url);pr.push({objUrl:er==null?void 0:er.url,mtlUrls:((zl=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:zl.length)===1?(qr=(Nr=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:Nr[0])==null?void 0:qr.url:Sr})}),w.setObjUrl(pr)}(He=sl.safeClone(h.value))==null||He.forEach(Oe=>{var er,Sr,Mr,zl,Nr,qr,Kl,br,$r,jr,Pl,lr,Wr;if((Sr=(er=Oe==null?void 0:Oe.value)==null?void 0:er.toString())!=null&&Sr.includes(".stl")||(zl=(Mr=Oe==null?void 0:Oe.value)==null?void 0:Mr.toString())!=null&&zl.includes(".STL")||(qr=(Nr=Oe==null?void 0:Oe.value)==null?void 0:Nr.toString())!=null&&qr.includes(".obj")||(br=(Kl=Oe==null?void 0:Oe.value)==null?void 0:Kl.toString())!=null&&br.includes(".mtl")||(jr=($r=Oe==null?void 0:Oe.value)==null?void 0:$r.toString())!=null&&jr.includes(".urdf")){let Ur={},Vr=[],Kr;Array.isArray(Oe==null?void 0:Oe.value)?Kr=Oe==null?void 0:Oe.value:Kr=(Pl=Oe==null?void 0:Oe.value)==null?void 0:Pl.split(","),Kr==null||Kr.forEach(an=>{an.includes(".mtl")?Vr.push(an):Ur.blob=Ur.blob==="undefined"?an:Ur.blob+","+an}),(Vr==null?void 0:Vr.length)>0&&(Ur.mtlBlobs=Vr),(Wr=(lr=Object.values(Ur))==null?void 0:lr[0])!=null&&Wr.includes("http:")}})}else h.value=[];let We=ce.value;if((We==null?void 0:We.length)>0&&(We=We==null?void 0:We.map(ja=>{var hr,dr,Ql,nr;let ul=(hr=ja==null?void 0:ja.key)==null?void 0:hr.split("/");return(r==null?void 0:r.compName)===(ul==null?void 0:ul[0])&&(dr=h.value)!=null&&dr.find(pr=>(pr==null?void 0:pr.prop)===(ul==null?void 0:ul[1]))&&(ja.value=(nr=(Ql=h.value)==null?void 0:Ql.find(pr=>(pr==null?void 0:pr.prop)===(ul==null?void 0:ul[1])))==null?void 0:nr.value),ja}),J.setTableViewContents(We)),r!=null&&r.formRules)u.value=r==null?void 0:r.formRules;else{let ja={};(va=sl.safeClone(h).value)==null||va.forEach(ul=>{((ul==null?void 0:ul.isMain)===!0||(ul==null?void 0:ul.required)===!0)&&(ja[(ul==null?void 0:ul.prop)??(ul==null?void 0:ul.name)]=[{required:!0,message:`${(ul==null?void 0:ul.label)||(ul==null?void 0:ul.prop)||(ul==null?void 0:ul.name)}不能为空`}])}),u.value=ja}if(((ca=pe==null?void 0:pe.contents)==null?void 0:ca.length)>0){const ja=[];(cl=pe==null?void 0:pe.contents)==null||cl.forEach((ul,hr)=>{(ul==null?void 0:ul.label)!==""&&ja.push({label:(ul==null?void 0:ul.label)??"",id:(ul==null?void 0:ul.id)??hr,type:(ul==null?void 0:ul.type)??"",background:ul==null?void 0:ul.background})}),I.value=ja}else I.value=[];(Le=h.value)!=null&&Le.some(ja=>(ja==null?void 0:ja.functionName)&&(ja==null?void 0:ja.functionName)!=="")&&(h.value=await ye(h.value))},{deep:!0,immediate:!0}),e.watch(()=>N.value,Y=>{Me.value=Y===ra.value},{immediate:!0}),(Y,xe)=>{var Va;const pe=e.resolveComponent("svg-icon"),qe=e.resolveComponent("el-switch"),sa=e.resolveComponent("el-checkbox"),$a=e.resolveComponent("el-popover"),Ma=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",K3,[g.value===e.unref(si).TEXT?(e.openBlock(),e.createBlock(Ic,{key:0,itemData:a.itemData,compName:a.compName,fields:h.value,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Me.value||ua(),"onUpdate:backGroundImage":ze,backgroundUrl:s.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):g.value===e.unref(si).BLOCK?(e.openBlock(),e.createBlock(Nf,{key:1,items:(Va=h.value)==null?void 0:Va.map(Ue=>({label:Ue!=null&&Ue.isHideInForm?"":Ue==null?void 0:Ue.label,value:Ue==null?void 0:Ue.value,width:(Ue==null?void 0:Ue.width)??1,field:Ue})),textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Me.value||ua(),"onUpdate:backGroundImage":ze,backgroundUrl:s.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":g.value===e.unref(si).ORDINARY})},[e.createVNode(sl.ssForm,{rowContents:h.value,formRules:u.value,buttonValue:I.value,isRowFlex:!1,isEnableWrap:!0,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,onOnButtonClick:za,onChange:ha,formDisabled:Me.value||ua(),formLabelsOperable:Ce.value,isButtonRow:C.value,onPreview:ya,onBlurChange:_a,style:e.normalizeStyle({backGroundImage:s.value!==""?`url("${s.value}")`:void 0}),onHandleColEditChange:ma,onHandleColTypeChange:oa,onRouteUrl:X,onClickTrigger:H,"onUpdate:backGroundImage":ze},{operateCol:e.withCtx(({renderColumns:Ue,formDisabled:Ie,formLabelsOperable:aa})=>[e.createVNode($a,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ja},{reference:e.withCtx(()=>[e.createElementVNode("span",G3,[e.createVNode(pe,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Y3,[xe[1]||(xe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(qe,{"model-value":Ie,"active-text":"禁用","inactive-text":"",onChange:Ge,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(qe,{"model-value":aa,"active-text":"编辑所有标签","inactive-text":"",onChange:da},null,8,["model-value"]),xe[2]||(xe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ma,{modelValue:se.value,"onUpdate:modelValue":xe[0]||(xe[0]=ke=>se.value=ke),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:U,onChange:R},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(sa,{value:ke.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)]),_:2},1032,["value"]),e.createVNode($a,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(pe,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var We;return[e.createElementVNode("div",J3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((We=Object.keys(ke))==null?void 0:We.filter(tl=>{var Cl;return(Cl=Be.value)==null?void 0:Cl.find(El=>(El==null?void 0:El.value)===tl)}),tl=>{var Cl,El;return e.openBlock(),e.createElementBlock("div",{key:tl},[e.createVNode(sl._sfc_main$1,{value:ke==null?void 0:ke[tl],"active-text":(El=(Cl=Be.value)==null?void 0:Cl.find(Vl=>(Vl==null?void 0:Vl.value)===tl))==null?void 0:El.label,inactiveText:"",onChange:Vl=>Ve(Vl,tl,ke)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",X3,[e.createVNode(pe,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow","style"])],2)),M.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:3,fileDataList:j.value,onDestroy:La},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{files:m.value,onGetAnimationData:Y.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Es=Zl._export_sfc(Z3,[["__scopeId","data-v-b52f96ee"]]),Ro=e.ref(0),Oc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(r=>(Ro.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ro.value,children:Oc(r==null?void 0:r.children)},r))},Q3=a=>{var n;return(n=A.cloneDeep(a))==null?void 0:n.map(r=>(Ro.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ro.value,children:Oc(r==null?void 0:r.children)},r))},Lc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=A.cloneDeep(a))==null?void 0:n.filter(o=>(o==null?void 0:o.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=Lc(r==null?void 0:r.children,l),r)),a)},Rc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o=l),o)):(a=a==null?void 0:a.map(r=>(r.children=Rc(r==null?void 0:r.children,l),r)),a)},$c=(a,l)=>{var n;return a!=null&&a.find(r=>{var o;return(r==null?void 0:r.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)})?(n=A.cloneDeep(a))==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(o=l==null?void 0:l.contents),o}):(a=a==null?void 0:a.map(r=>(r.children=$c(r==null?void 0:r.children,l),r)),a)},Vc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(l.contents)),o)):(a=a==null?void 0:a.map(r=>(r.children=Vc(r==null?void 0:r.children,l),r)),a)},cr=[{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"}],eh=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ah=[{label:"新增",value:"add"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ah},{key:"background",label:"按钮背景色",type:"Color"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:eh},{key:"textColor",label:"按钮颜色",type:"Color"}],lh={class:"table-header-child"},rh={class:"table-header-child-main"},nh={class:"table-header-child-content"},ih={class:"table-header-child-content-item"},oh={class:"fix-button"},th={key:0},sh={class:"form-content"},ch={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=oe.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h);e.ref(0);const d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{var w;o.value=!0;let x=[];cr==null||cr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},C=E=>{r("fixChange",A.cloneDeep(E))},M=E=>{r("deleteChange",A.cloneDeep(E))},k=E=>{o.value=!0;let x=[];cr==null||cr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},W=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},I=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=cr==null?void 0:cr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="id"+c.value,(w=m.value)==null||w.forEach(S=>{const $=cr==null?void 0:cr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},j=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},L=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,x)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(g,S)=>(e.openBlock(),e.createElementBlock("div",rh,[e.createElementVNode("div",nh,[e.createElementVNode("div",ih,e.toDisplayString(g.label),1),e.createElementVNode("div",oh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>k(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>u(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",th,[e.createVNode(Pc,{tableChildContents:g==null?void 0:g.children,onDeleteChange:M,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",sh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:I},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},uh=Zl._export_sfc(ch,[["__scopeId","data-v-e0fef72d"]]),dh={class:"table-header-child"},ph={class:"table-header-child-main"},fh={class:"table-header-child-content"},hh={class:"table-header-child-content-item"},vh={class:"fix-button"},mh={key:0},yh={class:"form-content"},gh={class:"dialog-footer"},bh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=oe.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h),d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{r("fixChange",A.cloneDeep(E))},C=E=>{var w;o.value=!0;let x=[];cr==null||cr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},M=E=>{o.value=!0;let x=[];cr==null||cr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},k=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},W=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=cr==null?void 0:cr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="idChild"+c.value,(w=m.value)==null||w.forEach(S=>{const $=cr==null?void 0:cr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},I=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,x)=>{const w=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(S,$)=>(e.openBlock(),e.createElementBlock("div",ph,[e.createElementVNode("div",fh,[e.createElementVNode("div",hh,e.toDisplayString(S.label),1),e.createElementVNode("div",vh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>M(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>C(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>j(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",mh,[e.createVNode(uh,{tableChildContents:S==null?void 0:S.children,onDeleteChange:L,onFixChange:u},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:I,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",yh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",gh,[e.createVNode(g,{onClick:I,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(g,{class:"ok-button button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Pc=Zl._export_sfc(bh,[["__scopeId","data-v-ebd68fa1"]]),kh={class:"table-operate-content"},xh={class:"table-operate-item"},wh={class:"operate-title"},_h={class:"operate-content"},Sh={class:"fix-content"},Eh={class:"fix-content-label"},Ch={class:"fix-button"},Dh={key:0},Th={class:"operate-title"},Bh={class:"operate-content"},Nh={class:"fix-content"},Ah={class:"fix-content-label"},zh={class:"fix-button"},Mh={class:"operate-title"},Ih={class:"operate-content"},Oh={class:"fix-content"},Lh={class:"fix-content-label"},Rh={class:"fix-button"},$h={class:"operate-title"},Vh={class:"operate-content"},Ph={class:"fix-content"},Fh={class:"fix-content-label"},jh={class:"fix-button"},Hh={class:"operate-content"},Uh={style:{display:"flex","justify-content":"space-between"}},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={class:"form-content"},Gh={class:"dialog-footer"},Yh={class:"form-content"},Jh={class:"dialog-footer"},Xh={class:"form-content"},Zh={class:"dialog-footer"},Qh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(!1),c=e.ref([]),d=e.ref(!1),m=e.ref([]),b=e.ref(!1),u=e.ref([]),C=e.ref(""),M=e.ref(""),k=e.ref([]),W=e.ref([]),I=e.ref([]),j=e.ref([]),L=e.ref(!1),E=e.ref([]),x=e.ref([]),w=e.ref(0),g=e.ref([]),S=e.ref([]),$=e.ref([]),V=()=>{L.value=!0;let R=[];Vn==null||Vn.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=R,x.value=R},ae=()=>{var H,X,he;h.value=!0;let R=[];(he=(X=(H=oe.FormContent)==null?void 0:H.find(de=>(de==null?void 0:de.key)==="Input"))==null?void 0:X.value)==null||he.forEach(de=>{w.value++,R.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:(de==null?void 0:de.label)==="类型"?"Input":"",id:w.value,contents:de==null?void 0:de.options})}),g.value=R,S.value=R},Z=R=>{R||(g.value=S.value)},me=async R=>{var H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za;if((R==null?void 0:R.类型)!==((X=(H=S.value)==null?void 0:H.find(ha=>(ha==null?void 0:ha.label)==="类型"))==null?void 0:X.value)){let ha=[],Ca=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:de.value)==null?void 0:ma.value)?await((ya=(ze=(_a=oe.FormContent)==null?void 0:_a.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:ze.value)==null?void 0:ya.value):(Ve=(oa=oe.FormContent)==null?void 0:oa.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Ve.value;if(Ca==null||Ca.forEach(Ne=>{w.value++,ha.push({label:Ne==null?void 0:Ne.label,name:(Ne==null?void 0:Ne.name)||(Ne==null?void 0:Ne.label),type:Ne.type,value:Ne!=null&&Ne.属性名?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):(R==null?void 0:R[Ne.label])??"",id:w.value,contents:Ne==null?void 0:Ne.options,prop:(Ne==null?void 0:Ne.prop)||(Ne==null?void 0:Ne.name)||(Ne==null?void 0:Ne.label)})}),R!=null&&R.菜单选项&&((La=R==null?void 0:R.菜单选项)==null?void 0:La.length)>0){const Ne=await oe.menuToContentType(R==null?void 0:R.菜单选项);ha=ha==null?void 0:ha.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=Ne),ye))}S.value=await oe.selectToBase(A.cloneDeep(ha)),g.value=await oe.selectToBase(A.cloneDeep(ha))}else{let ha=A.cloneDeep(g.value);if(ha=ha==null?void 0:ha.map(Ca=>(Ca.value=R==null?void 0:R[Ca.name],Ca)),R!=null&&R.菜单选项&&((za=R==null?void 0:R.菜单选项)==null?void 0:za.length)>0){const Ca=await oe.menuToContentType(R==null?void 0:R.菜单选项);ha=ha==null?void 0:ha.map(Ne=>((Ne==null?void 0:Ne.name)==="组信息选项"&&(Ne.contents=Ca),Ne))}ha=oe.formToOptionsContents(ha),S.value=await oe.selectToBase(A.cloneDeep(ha))}},Ae=async R=>{await me(R),g.value=S.value},F=(R,H)=>{if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.selectRelateType)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.menuSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.groupSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(H==null?void 0:H.value)||H[R.key];if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const X=H[R.key];return ac(X)?X:R.default}return(R==null?void 0:R.label)==="类型"&&H[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!H[R.key]?!1:H[R.key]},ne=async R=>{var he,de,ma,oa,Ve,_a,ze,ya,La;h.value=!0;let H=[];const X=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:de.value)==null?void 0:ma.value)?await((ya=(ze=(_a=oe.FormContent)==null?void 0:_a.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:ze.value)==null?void 0:ya.value):(Ve=(oa=oe.FormContent)==null?void 0:oa.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Ve.value;if(X==null||X.forEach(za=>{w.value++,H.push({label:za==null?void 0:za.label,name:(za==null?void 0:za.name)||(za==null?void 0:za.label),type:za.type,value:(za==null?void 0:za.label)==="属性名"?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):F(za,R),id:w.value,contents:za==null?void 0:za.options})}),R!=null&&R.menuSelect&&((La=R==null?void 0:R.menuSelect)==null?void 0:La.length)>0){const za=await oe.menuToContentType(R==null?void 0:R.menuSelect);H=H==null?void 0:H.map(ha=>((ha==null?void 0:ha.name)==="组信息选项"&&(ha.contents=za),ha))}C.value=R==null?void 0:R.id,g.value=await oe.selectToBase(oe.formToOptionsContents(H)),S.value=await oe.selectToBase(oe.formToOptionsContents(H))},J=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;$.value=(H=A.cloneDeep($.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="tableToForm"&&(he.contents=$.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ce=()=>{h.value=!1,g.value=[],C.value=""},Te=async()=>{var he,de,ma,oa,Ve,_a,ze,ya,La,za;g.value=S.value;let R={};C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value);let H=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(ha=>{var Ca,Ne;return(ha==null?void 0:ha.key)===(((Ne=(Ca=g.value)==null?void 0:Ca.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:Ne.value)??"label")}))==null?void 0:de.value)==null?void 0:ma.value)??((Ve=(oa=oe.FormContent)==null?void 0:oa.find(ha=>{var Ca,Ne;return(ha==null?void 0:ha.key)===(((Ne=(Ca=g.value)==null?void 0:Ca.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:Ne.value)??"label")}))==null?void 0:Ve.value);if((_a=g.value)==null||_a.forEach(ha=>{const Ca=H==null?void 0:H.find(Ne=>(Ne==null?void 0:Ne.label)===(ha==null?void 0:ha.label));Ca&&(R[Ca.key]=ha.value)}),R.name=R.label,(ze=$.value)!=null&&ze.find(ha=>ha.id===R.id))$.value=(ya=$.value)==null?void 0:ya.map(ha=>(ha.id===R.id&&(ha=R),ha));else{let ha=A.cloneDeep($.value);$.value||($.value=[]),ha.push(R),$.value=ha}$.value=$.value.map(({id:ha,...Ca})=>Ca),h.value=!1,C.value="";let X=A.cloneDeep(n.originalItemContents);(La=A.cloneDeep(n.originalItemContents))!=null&&La.find(ha=>(ha==null?void 0:ha.key)==="tableToForm")?X=(za=A.cloneDeep(n.originalItemContents))==null?void 0:za.map(ha=>((ha==null?void 0:ha.key)==="tableToForm"&&(ha.contents=$.value),ha)):X.push({key:"tableToForm",contents:$.value}),r("change",X)},$e=R=>{L.value=!0;let H=[];Vn==null||Vn.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,E.value=H,x.value=H};e.watch(()=>b.value,()=>{var H,X;let R=A.cloneDeep(n.originalItemContents);(H=A.cloneDeep(n.originalItemContents))!=null&&H.find(he=>(he==null?void 0:he.key)==="page")?R=(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="page"&&(he.contents=b.value),he)):R.push({key:"page",contents:b.value}),r("change",R)},{deep:!0});const fe=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;W.value=(H=A.cloneDeep(W.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="extraButton"&&(he.contents=W.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var X,he,de,ma,oa;E.value=x.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=E.value)==null||X.forEach(Ve=>{const _a=Vn==null?void 0:Vn.find(ze=>(ze==null?void 0:ze.label)===(Ve==null?void 0:Ve.label));_a?R[_a.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(R.children=Ve.children)}),(he=W.value)!=null&&he.find(Ve=>Ve.id===R.id))W.value=(de=W.value)==null?void 0:de.map(Ve=>(Ve.id===R.id&&(Ve=R),Ve));else{let Ve=A.cloneDeep(W.value)??[];Ve.push(R),W.value=Ve}L.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(ma=A.cloneDeep(n.originalItemContents))!=null&&ma.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton")?H=(oa=A.cloneDeep(n.originalItemContents))==null?void 0:oa.map(Ve=>((Ve==null?void 0:Ve.key)==="extraButton"&&(Ve.contents=W.value),Ve)):H.push({key:"extraButton",contents:W.value}),r("change",H)},te=R=>{let H=A.cloneDeep(x.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),x.value=H},U=()=>{L.value=!1,E.value=[],C.value=""},Ce=R=>{d.value=!0;let H=[];Pn==null||Pn.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,I.value=H,j.value=H},Me=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;k.value=(H=A.cloneDeep(k.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="rowButton"&&(he.contents=k.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Pe=()=>{s.value=!0;let R=[];cr==null||cr.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=R,u.value=R},ra=()=>{d.value=!0;let R=[];Pn==null||Pn.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),I.value=R,j.value=R},Ta=R=>{let H=A.cloneDeep(j.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),j.value=H},ee=()=>{var X,he,de,ma,oa;I.value=j.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=I.value)==null||X.forEach(Ve=>{const _a=Pn==null?void 0:Pn.find(ze=>(ze==null?void 0:ze.label)===(Ve==null?void 0:Ve.label));_a?R[_a.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(R.children=Ve.children)}),(he=k.value)!=null&&he.find(Ve=>Ve.id===R.id))k.value=(de=k.value)==null?void 0:de.map(Ve=>(Ve.id===R.id&&(Ve=R),Ve));else{let Ve=A.cloneDeep(k.value);Ve.push(R),k.value=Ve}d.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(ma=A.cloneDeep(n.originalItemContents))!=null&&ma.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton")?H=(oa=A.cloneDeep(n.originalItemContents))==null?void 0:oa.map(Ve=>((Ve==null?void 0:Ve.key)==="rowButton"&&(Ve.contents=k.value),Ve)):H.push({key:"rowButton",contents:k.value}),r("change",H)},pa=()=>{d.value=!1,C.value="",j.value=[],I.value=[]},ue=R=>{s.value=!0;let H=[];cr==null||cr.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:w.value,contents:X==null?void 0:X.options})}),m.value=H,M.value=R==null?void 0:R.id,u.value=H},ua=R=>{var H;c.value=Lc(A.cloneDeep(c.value),R==null?void 0:R.id),r("change",(H=A.cloneDeep(n.originalItemContents))==null?void 0:H.map(X=>{var he;return(X==null?void 0:X.key)==="header"&&(X.contents=(he=c.value)!=null&&he.some(de=>de==null?void 0:de.children)?[c.value]:c.value),X}))},Se=R=>{var X,he,de;R.type==="fix"?R.id!==""?c.value=$c(c.value,R):c.value=Rc(c.value,R==null?void 0:R.contents):c.value=Vc(c.value,R),c.value=(X=c.value)!=null&&X.some(ma=>ma==null?void 0:ma.children)?[c.value]:c.value,C.value="";let H=A.cloneDeep(n.originalItemContents);(he=A.cloneDeep(n.originalItemContents))!=null&&he.find(ma=>(ma==null?void 0:ma.key)==="header")?H=(de=A.cloneDeep(n.originalItemContents))==null?void 0:de.map(ma=>((ma==null?void 0:ma.key)==="header"&&(ma.contents=c.value),ma)):H.push({key:"header",contents:c.value}),r("change",H)},se=R=>{var X;s.value=!0;let H=[];cr==null||cr.forEach(he=>{w.value++,H.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:R[he.key],id:w.value,contents:he==null?void 0:he.options})}),R!=null&&R.children&&((X=R==null?void 0:R.children)==null?void 0:X.length)>0&&H.push({children:R==null?void 0:R.children,isFormColHidden:!0}),C.value=R==null?void 0:R.id,M.value="",m.value=H,u.value=H},Be=R=>{let H=A.cloneDeep(u.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),u.value=H},Ge=()=>{s.value=!1,C.value="",M.value="",u.value=[]},da=()=>{var X,he,de,ma,oa,Ve;m.value=u.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=m.value)==null||X.forEach(_a=>{const ze=cr==null?void 0:cr.find(ya=>(ya==null?void 0:ya.label)===(_a==null?void 0:_a.label));ze?R[ze.key]=_a.value:_a!=null&&_a.children&&_a.children.length>0&&(R.children=_a.children)}),(he=c.value)!=null&&he.find(_a=>_a.id===R.id))c.value=(de=c.value)==null?void 0:de.map(_a=>(_a.id===R.id&&(_a=R),_a));else{let _a=A.cloneDeep(c.value)??[];M.value===""?_a.push(R):_a=_a==null?void 0:_a.map(ze=>(ze.id===M.value&&(ze.children||(ze.children=[]),ze.children.push(R)),ze)),c.value=_a}c.value=(ma=c.value)!=null&&ma.some(_a=>_a==null?void 0:_a.children)?[c.value]:c.value,s.value=!1,C.value="",M.value="";let H=A.cloneDeep(n.originalItemContents);(oa=A.cloneDeep(n.originalItemContents))!=null&&oa.find(_a=>(_a==null?void 0:_a.key)==="header")?H=(Ve=A.cloneDeep(n.originalItemContents))==null?void 0:Ve.map(_a=>((_a==null?void 0:_a.key)==="header"&&(_a.contents=c.value),_a)):H.push({key:"header",contents:c.value}),r("change",H)},Ja=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;c.value=(H=A.cloneDeep(c.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>{var de;return(he==null?void 0:he.key)==="header"&&(he.contents=(de=c.value)!=null&&de.some(ma=>ma==null?void 0:ma.children)?[c.value]:c.value),he})),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(o.value=A.cloneDeep(n.originalItemContents),c.value=(H=(R=o.value)==null?void 0:R.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:H.contents,k.value=(he=(X=o.value)==null?void 0:X.find(pe=>(pe==null?void 0:pe.key)==="rowButton"))==null?void 0:he.contents,W.value=(ma=(de=o.value)==null?void 0:de.find(pe=>(pe==null?void 0:pe.key)==="extraButton"))==null?void 0:ma.contents,b.value=(Ve=(oa=o.value)==null?void 0:oa.find(pe=>(pe==null?void 0:pe.key)==="page"))!=null&&Ve.contents?!!((ze=(_a=o.value)==null?void 0:_a.find(pe=>(pe==null?void 0:pe.key)==="page"))!=null&&ze.contents):!1,$.value=(La=(ya=o.value)==null?void 0:ya.find(pe=>(pe==null?void 0:pe.key)==="tableToForm"))==null?void 0:La.contents,c.value=(za=c.value)==null?void 0:za.map((pe,qe)=>(Array.isArray(pe)?pe=Q3(pe):pe={label:(pe==null?void 0:pe.label)??"",prop:(pe==null?void 0:pe.label)==="操作"?"operate":pe==null?void 0:pe.prop,width:pe!=null&&pe.width?parseInt(pe.width):"",fixed:(pe==null?void 0:pe.fixed)??void 0,sortable:(pe==null?void 0:pe.sortable)??!1,align:(pe==null?void 0:pe.align)??"left",showOverflowTooltip:(pe==null?void 0:pe.showOverflowTooltip)??!0,isNotDrag:(pe==null?void 0:pe.isNotDrag)??!1,isEditCol:(pe==null?void 0:pe.isEditCol)??!1,isOperate:(pe==null?void 0:pe.isOperate)??!1,id:(pe==null?void 0:pe.id)??qe,formMenuSelect:(pe==null?void 0:pe.formMenuSelect)??void 0,groupSelect:(pe==null?void 0:pe.groupSelect)??void 0},pe)),c.value=(ha=c.value)!=null&&ha.every(pe=>Array.isArray(pe))?(Ca=c.value)==null?void 0:Ca[0]:c.value,k.value=(Ne=k.value)==null?void 0:Ne.map((pe,qe)=>pe={label:(pe==null?void 0:pe.label)??"",type:(pe==null?void 0:pe.type)??"",textColor:(pe==null?void 0:pe.textColor)??"#000000",id:(pe==null?void 0:pe.id)??qe}),W.value=(ye=W.value)==null?void 0:ye.map((pe,qe)=>pe={label:(pe==null?void 0:pe.label)??"",type:(pe==null?void 0:pe.type)??"",background:(pe==null?void 0:pe.background)??"var(--ssComponent-primary-color)",id:(pe==null?void 0:pe.id)??qe}),$.value)$.value=(xe=$.value)==null?void 0:xe.map(pe=>{w.value++;let qe=pe;return qe.id=w.value,qe});else{let pe=[];const qe=(Y=oe.getColumnChild(A.cloneDeep(c.value)))==null?void 0:Y.filter(sa=>(sa==null?void 0:sa.prop)!=="operate");qe==null||qe.forEach(sa=>{var $a;w.value++,pe.push({label:sa==null?void 0:sa.label,name:(sa==null?void 0:sa.prop)||(sa==null?void 0:sa.label),type:sa!=null&&sa.groupSelect?"Select":"Input",value:"",id:w.value,contents:sa==null?void 0:sa.options,menuSelect:sa==null?void 0:sa.formMenuSelect,groupSelect:($a=sa==null?void 0:sa.groupSelect)==null?void 0:$a.split(":"),selectRelateType:"关联绑定列"})}),$.value=pe}},{deep:!0,immediate:!0}),(R,H)=>{const X=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",kh,[e.createElementVNode("div",xh,[e.createElementVNode("div",wh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(he,{class:"icon-content",onClick:Pe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Sh,[e.createElementVNode("div",Eh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Ch,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>ue(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>se(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Ja(de)},null,8,["onClick"])])]),de!=null&&de.children&&de.children.length>0?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Pc,{tableChildContents:de==null?void 0:de.children,onDeleteChange:ua,onFixChange:Se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Th,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:ra},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Bh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Nh,[e.createElementVNode("div",Ah,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",zh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>Ce(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Me(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Mh,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Oh,[e.createElementVNode("div",Lh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Rh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>$e(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>fe(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",$h,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Ph,[e.createElementVNode("div",Fh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",jh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>ne(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>J(de)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Hh,[e.createElementVNode("div",Uh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(sl._sfc_main$1,{modelValue:b.value,"onUpdate:modelValue":H[0]||(H[0]=de=>b.value=de)},null,8,["modelValue"])])])]),e.createVNode(Br.ssDialog,{visible:s.value,onBeforeDestroy:Ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(he,{onClick:Ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(he,{class:"ok-button button",onClick:da,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:d.value,onBeforeDestroy:pa,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ta},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gh,[e.createVNode(he,{onClick:pa,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(he,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:L.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jh,[e.createVNode(he,{onClick:U,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(he,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:h.value,onBeforeDestroy:ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:me,onChangeVisible:Z,onBlurChange:Ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zh,[e.createVNode(he,{onClick:ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(he,{class:"ok-button button",onClick:Te,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},e4=Zl._export_sfc(Qh,[["__scopeId","data-v-7a6b87b5"]]),a4=A.useModelComp(A.pinia),{pageMapState:l4}=A.storeToRefs(a4),r4=A.useMenuState(A.pinia),{activeMenuPath:n4}=A.storeToRefs(r4),i4=e.ref(24),o4=e.ref(6),t4=e.ref(10),s4=e.ref(70),c4=e.ref(.18),u4=e.ref(45),d4=(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;return{x:((s=(o=a==null?void 0:a.value)==null?void 0:o.tableData)==null?void 0:s.x)||l%2*12,y:((c=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:c.y)||l,w:((m=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:m.w)||i4.value,h:((u=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:u.h)||n,minW:((M=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:M.minW)||o4.value,minH:((W=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:W.minH)||c4.value,maxH:((j=(I=a==null?void 0:a.value)==null?void 0:I.tableData)==null?void 0:j.maxH)||u4.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},p4=(a,l)=>{var r,o,s,h,c,d,m,b;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((h=(s=(o=a==null?void 0:a.compData)==null?void 0:o.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:h.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((b=(m=(d=a==null?void 0:a.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:b.length)/5);return n*2},Fc=(a,l,n)=>{var h,c;const r=(c=(h=l4.value)==null?void 0:h[n4.value])==null?void 0:c.filter(d=>{var m;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="gridLayout"}),o=r==null?void 0:r.find(d=>{var m,b,u;return((u=(b=(m=d==null?void 0:d.value)==null?void 0:m.tableData)==null?void 0:b.component)==null?void 0:u.id)===a.id}),s=p4(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((d,m)=>Fc(d,m))),{...d4(o,l,s,a)}},f4=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=A.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,o)=>Fc(r,o)):[]},h4=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}]}]}}),v4=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),m4=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]);e.watch(()=>n.compType,c=>{var b;const d=h4(n==null?void 0:n.optionItems),m=c?(b=d[c==null?void 0:c.toUpperCase()])==null?void 0:b[n==null?void 0:n.target]:[];o.value=m==null?void 0:m.map(u=>{for(const[C,M]of Object.entries((n==null?void 0:n.comp)||{}))if((u==null?void 0:u.prop)===C)return{...u,value:M};return u})},{immediate:!0});const s=c=>sl.getComponent(c),h=c=>{var d,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?o.value=(d=o.value)==null?void 0:d.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!0}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!0}:b}):o.value=(m=o.value)==null?void 0:m.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!1}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!1}:b}),r("change",{target:n==null?void 0:n.target,styleConfigs:o.value,prop:c==null?void 0:c.prop})};return(c,d)=>{const m=e.resolveComponent("el-col"),b=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(b,{class:"style-row",key:u==null?void 0:u.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u==null?void 0:u.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u.type)),{modelValue:u.value,"onUpdate:modelValue":C=>u.value=C,content:u==null?void 0:u.options,optionUrl:u==null?void 0:u.optionUrl,disabled:u==null?void 0:u.disabled,activeText:u==null?void 0:u.activeText,inactiveText:u==null?void 0:u.inactiveText,onChange:C=>h(u)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),y4=Zl._export_sfc(m4,[["__scopeId","data-v-6c233914"]]),g4=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:l}){const n=a,r=l,o=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),h=j=>j==null?void 0:j.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:h(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),d=e.ref([]),m=e.ref(""),b=(j,L,E)=>{var g;let x=[];(n==null?void 0:n.activeTabName)==="任务配置"?(x=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:j},{label:"按钮名称",value:"按钮名称",children:L}]},{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:o},{prop:"任务关键词",rule:o},{prop:"执行任务",rule:o},{prop:"执行动作",rule:o},{prop:"执行交互",rule:o}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(x=[{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:(g=n==null?void 0:n.relatedData)==null?void 0:g.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:o},{prop:"关联状态",rule:o},{prop:"关联形式",rule:o},{prop:"关联任务集合",rule:o}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...x,...u(j,L,E)]:w=x,w},u=(j,L,E)=>{const x=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return E?x==null?void 0:x.filter(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):x},C=(j,L)=>{var S,$,V,ae,Z,me,Ae,F,ne;const E=((Z=(ae=(V=($=(S=n==null?void 0:n.comp)==null?void 0:S.compData)==null?void 0:$.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:V.contents)==null?void 0:ae.filter(J=>(J==null?void 0:J.label)!=="操作"))==null?void 0:Z.map(J=>({value:J==null?void 0:J.prop,label:J.label})))||[],x=/button/i,w=((ne=(F=(Ae=(me=n==null?void 0:n.comp)==null?void 0:me.compData)==null?void 0:Ae.filter(J=>x.test(J==null?void 0:J.key)))==null?void 0:F.flatMap(J=>J==null?void 0:J.contents))==null?void 0:ne.map(J=>({value:J==null?void 0:J.label,label:J.label})))||[],g=b(E,w,j);d.value=L?v4(g,L):g,j&&(j==null?void 0:j.length)>0&&s.value.push(...j==null?void 0:j.map(J=>({prop:J,rule:o})))};e.onMounted(()=>{C(null,n==null?void 0:n.extendItem)});const M=j=>{const L=j==null?void 0:j[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");C(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,j)}},k=j=>{r("change",{target:n==null?void 0:n.target,extendConfigs:j})},W=(j,L)=>{m.value=L==null?void 0:L.changeProp,M(j)},I=j=>{r("onButtonClick",j)};return(j,L)=>(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:k,onBlurChange:W,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue"]))}}),b4=Zl._export_sfc(g4,[["__scopeId","data-v-7c660c1f"]]),k4={};function x4(a,l){return null}const w4=Zl._export_sfc(k4,[["render",x4]]),_4={class:"form-operate-content"},S4={class:"form-operate-item"},E4={class:"operate-title"},C4={class:"operate-content"},D4={class:"fix-content"},T4={class:"fix-button"},B4={class:"operate-title"},N4={class:"operate-content"},A4={class:"fix-content"},z4={class:"fix-button"},M4={style:{display:"flex","justify-content":"space-between"}},I4={class:"form-content"},O4={class:"dialog-footer"},L4={class:"form-content"},R4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref([]),h=e.ref([]),c=e.ref(!1),d=e.ref([]),m=e.ref([]),b=e.ref(""),u=e.ref(!1),C=e.ref(0),M=e.ref([]),k=e.ref([]),W=(F,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="selectRelateType"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.selectRelateType)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="menuSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.menuSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="groupSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.groupSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[F.key];if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="multiple"){const J=ne[F.key];return ac(J)?J:F.default}return(F==null?void 0:F.label)==="类型"&&ne[F.key]===""?"Input":(F==null?void 0:F.key)==="isFormColHidden"&&!ne[F.key]?!1:ne[F.key]},I=async F=>{var ce,Te,$e,fe,N,te;o.value=!0;let ne=[];const J=await(($e=(Te=(ce=oe.FormContent)==null?void 0:ce.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:Te.value)==null?void 0:$e.value)??((N=(fe=oe.FormContent)==null?void 0:fe.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:N.value);if(J==null||J.forEach(U=>{C.value++,ne.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,prop:U==null?void 0:U.prop,value:W(U,F),id:C.value,contents:U==null?void 0:U.options,width:(F==null?void 0:F.width)??1})}),F!=null&&F.menuSelect&&((te=F==null?void 0:F.menuSelect)==null?void 0:te.length)>0){const U=await oe.menuToContentType(F==null?void 0:F.menuSelect);ne=ne==null?void 0:ne.map(Ce=>((Ce==null?void 0:Ce.name)==="组信息选项"&&(Ce.contents=U),Ce))}b.value=F==null?void 0:F.id,s.value=await oe.selectToBase(oe.formToOptionsContents(ne)),h.value=await oe.selectToBase(oe.formToOptionsContents(ne))},j=F=>{var J;c.value=!0;let ne=[];(J=oe.FormButton)==null||J.forEach(ce=>{C.value++,ne.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:(ce==null?void 0:ce.label)==="类型"&&F[ce.key]===""?"normal":F[ce.key],id:C.value,contents:ce==null?void 0:ce.options})}),M.value=ne,k.value=ne,b.value=F==null?void 0:F.id};e.watch(()=>u.value,()=>{var ne,J;let F=A.cloneDeep(n.originalItemContents);(ne=A.cloneDeep(n.originalItemContents))!=null&&ne.find(ce=>(ce==null?void 0:ce.key)==="enableWrap")?F=(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="enableWrap"&&(ce.contents=!u.value),ce)):F.push({key:"enableWrap",contents:!u.value}),r("change",F)},{deep:!0});const L=()=>{var J,ce,Te,$e,fe;M.value=k.value;let F={};if(b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value),(J=M.value)==null||J.forEach(N=>{var U;const te=(U=oe.FormButton)==null?void 0:U.find(Ce=>(Ce==null?void 0:Ce.label)===(N==null?void 0:N.label));te&&(F[te.key]=N.value)}),(ce=d.value)!=null&&ce.find(N=>N.id===F.id))d.value=(Te=d.value)==null?void 0:Te.map(N=>(N.id===F.id&&(N=F),N));else{let N=A.cloneDeep(d.value);d.value||(d.value=[]),N.push(F),d.value=N}c.value=!1,b.value="";let ne=A.cloneDeep(n.originalItemContents);($e=A.cloneDeep(n.originalItemContents))!=null&&$e.find(N=>(N==null?void 0:N.key)==="formButton")?ne=(fe=A.cloneDeep(n.originalItemContents))==null?void 0:fe.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=d.value),N)):ne.push({key:"formButton",contents:d.value}),r("change",ne)},E=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;m.value=(ne=A.cloneDeep(m.value))==null?void 0:ne.filter(ce=>(ce==null?void 0:ce.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="formContent"&&(ce.contents=m.value),ce))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;d.value=(ne=A.cloneDeep(d.value))==null?void 0:ne.filter(ce=>(ce==null?void 0:ce.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="formButton"&&(ce.contents=d.value),ce))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var ne;c.value=!0;let F=[];(ne=oe.FormButton)==null||ne.forEach(J=>{C.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:(J==null?void 0:J.label)==="类型"?"normal":"",id:C.value,contents:J==null?void 0:J.options})}),M.value=F,k.value=F},g=()=>{var ne,J,ce;o.value=!0;let F=[];(ce=(J=(ne=oe.FormContent)==null?void 0:ne.find(Te=>(Te==null?void 0:Te.key)==="Input"))==null?void 0:J.value)==null||ce.forEach(Te=>{C.value++,F.push({label:Te==null?void 0:Te.label,name:Te==null?void 0:Te.label,type:Te.type,value:(Te==null?void 0:Te.label)==="类型"?"Input":"",id:C.value,contents:Te==null?void 0:Te.options})}),s.value=F,h.value=F},S=F=>{let ne=A.cloneDeep(k.value);ne=ne==null?void 0:ne.map(J=>(J.value=F==null?void 0:F[J.name],J)),k.value=ne},$=F=>{const ne=F.find(Te=>(Te==null?void 0:Te.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const J=F.find(Te=>(Te==null?void 0:Te.name)==="多选"),ce=F.find(Te=>(Te==null?void 0:Te.name)==="初始值");J!=null&&J.value&&No.isString(ce.value)&&(ce.value=[ce.value]),!(J!=null&&J.value)&&!No.isString(ce.value)&&(ce.value="")},V=async F=>{var ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe;if((F==null?void 0:F.类型)!==((J=(ne=h.value)==null?void 0:ne.find(ra=>(ra==null?void 0:ra.label)==="类型"))==null?void 0:J.value)){let ra=[];const Ta=await(($e=(Te=(ce=oe.FormContent)==null?void 0:ce.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:Te.value)==null?void 0:$e.value)?await((Ce=(U=(te=oe.FormContent)==null?void 0:te.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:U.value)==null?void 0:Ce.value):(N=(fe=oe.FormContent)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:N.value;if(Ta==null||Ta.forEach(ee=>{var ue,ua;C.value++;const pa=$u(ee==null?void 0:ee.default)?(F==null?void 0:F[ee.label])??ee.value??"":ee==null?void 0:ee.default;ra.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:pa,prop:ee==null?void 0:ee.prop,id:C.value,contents:ee==null?void 0:ee.options,width:((ua=(ue=h.value)==null?void 0:ue[0])==null?void 0:ua.width)??1})}),F!=null&&F.菜单选项&&((Me=F==null?void 0:F.菜单选项)==null?void 0:Me.length)>0){const ee=await oe.menuToContentType(F==null?void 0:F.菜单选项);ra=ra==null?void 0:ra.map(pa=>((pa==null?void 0:pa.name)==="组信息选项"&&(pa.contents=ee),pa))}$(ra),h.value=await oe.selectToBase(A.cloneDeep(ra)),s.value=await oe.selectToBase(A.cloneDeep(ra))}else{let ra=A.cloneDeep(h.value);if(ra=ra==null?void 0:ra.map(Ta=>(Ta.value=F==null?void 0:F[Ta.name],Ta)),F!=null&&F.菜单选项&&((Pe=F==null?void 0:F.菜单选项)==null?void 0:Pe.length)>0){const Ta=await oe.menuToContentType(F==null?void 0:F.菜单选项);ra=ra==null?void 0:ra.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=Ta),ee))}ra=oe.formToOptionsContents(ra),$(ra),h.value=await oe.selectToBase(A.cloneDeep(ra))}},ae=F=>{F||(s.value=h.value)},Z=async F=>{await V(F),s.value=h.value},me=Al.debounce(async()=>{var ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta;s.value=h.value;let F={};F.width=((Te=(ce=s.value)==null?void 0:ce[0])==null?void 0:Te.width)??1,b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value);let ne=await((N=(fe=($e=oe.FormContent)==null?void 0:$e.find(ee=>{var pa,ue;return(ee==null?void 0:ee.key)===(((ue=(pa=s.value)==null?void 0:pa.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:fe.value)==null?void 0:N.value)??((U=(te=oe.FormContent)==null?void 0:te.find(ee=>{var pa,ue;return(ee==null?void 0:ee.key)===(((ue=(pa=s.value)==null?void 0:pa.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:U.value);if((Ce=s.value)==null||Ce.forEach(ee=>{const pa=ne==null?void 0:ne.find(ue=>(ue==null?void 0:ue.label)===(ee==null?void 0:ee.label));pa&&(F[pa.key]=ee.value)}),F.width=F.width?F.width:1,F.key=F==null?void 0:F.label,F.isFormColHidden=F==null?void 0:F.isFormColHidden,(Me=m.value)!=null&&Me.find(ee=>ee.id===F.id))m.value=(Pe=m.value)==null?void 0:Pe.map(ee=>(ee.id===F.id&&(ee=F),ee));else{let ee=A.cloneDeep(m.value);ee.push(F),m.value=ee}m.value=m.value.map(({id:ee,...pa})=>pa),o.value=!1,b.value="";let J=A.cloneDeep(n.originalItemContents);(ra=A.cloneDeep(n.originalItemContents))!=null&&ra.find(ee=>(ee==null?void 0:ee.key)==="formContent")?J=(Ta=A.cloneDeep(n.originalItemContents))==null?void 0:Ta.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):J.push({key:"formContent",contents:m.value}),r("change",J)},300),Ae=()=>{o.value=!1,c.value=!1,b.value="",h.value=[],k.value=[]};return e.watch(()=>n.originalItemContents,()=>{var ne,J,ce,Te,$e,fe;if(!n.originalItemContents||n.originalItemContents.length===0)return;const F=A.cloneDeep(n.originalItemContents);m.value=((ne=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:ne.contents)??[],d.value=((J=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:J.contents)??[],u.value=(ce=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ce.contents?!((Te=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&Te.contents):!0,m.value=($e=A.cloneDeep(m.value))==null?void 0:$e.map((N,te)=>{var Ce;let U=N;return U.id=(N==null?void 0:N.id)??te,N!=null&&N.label||(N.label=(N==null?void 0:N.key)??(N==null?void 0:N.label)??""),N!=null&&N.type||(N.type=(N==null?void 0:N.type)??""),N.contents=((Ce=N==null?void 0:N.options)==null?void 0:Ce.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,U}),m.value=oe.formToOptionsContents(m.value),d.value=(fe=d.value)==null?void 0:fe.map((N,te)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:te})},{deep:!0,immediate:!0}),(F,ne)=>{const J=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_4,[e.createElementVNode("div",S4,[e.createElementVNode("div",E4,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:g},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",C4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Te,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",D4,[e.createElementVNode("div",null,e.toDisplayString(Te.label),1),e.createElementVNode("div",T4,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>I(Te)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>E(Te)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",B4,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",N4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Te,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",A4,[e.createElementVNode("div",null,e.toDisplayString(Te.label),1),e.createElementVNode("div",z4,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>j(Te)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>x(Te)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",M4,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(sl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":ne[0]||(ne[0]=Te=>u.value=Te)},null,8,["modelValue"])])]),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:V,onChangeVisible:ae,onBlurChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O4,[e.createVNode(ce,{onClick:Ae,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ce,{class:"ok-button button",onClick:e.unref(me),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",L4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ae,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Cs=Zl._export_sfc(R4,[["__scopeId","data-v-20850524"]]),$4={class:"step-module content"},V4={class:"module-data"},P4={class:"step-module layout"},F4={class:"form-content"},j4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=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:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),d=e.ref("create"),m=e.ref({}),b=e.ref([]),u=I=>{var j;m.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=s.value)==null||L.forEach(x=>{x.value=""}),d.value="create",c.visible=!0;break;case"update":(E=s.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),d.value="update",c.visible=!0;break;case"delete":b.value.splice(j,1),d.value="delete";break}},M=I=>{var j,L,E;if((I==null?void 0:I.buttonName)==="确认"){const x=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(x).forEach(w=>{x[w]===""&&delete x[w]}),d.value){case"create":b.value.push({...x,index:((j=b.value)==null?void 0:j.length)+1});break;case"update":b.value=(L=b.value)==null?void 0:L.map(w=>w.index===(x==null?void 0:x.index)?{...w,title:x==null?void 0:x.title,description:x==null?void 0:x.description}:w);break}r("change",(E=k())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},k=()=>({comp:"Step",compData:[{key:"stepList",contents:b.value},{key:"stepConfig",contents:m.value}]}),W=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="stepConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",V4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",P4,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(sl.ssForm,{rowContents:o.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:W,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",F4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),H4=Zl._export_sfc(j4,[["__scopeId","data-v-7dbd17f2"]]),U4={class:"step-module content"},q4={class:"module-data"},W4={class:"step-module layout"},K4={class:"form-content"},G4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref("create"),s=e.ref({}),h=e.ref([]),c=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}]),d=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"}]),b=e.reactive({visible:!1,width:"40%",title:"时间线"}),u=I=>{var j;s.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),o.value="create",b.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),o.value="update",b.visible=!0;break;case"delete":h.value.splice(j,1),o.value="delete";break}},M=I=>{var j,L,E,x;if((I==null?void 0:I.buttonName)==="确认"){const w=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(w).forEach(g=>{w[g]===""&&delete w[g]}),o.value){case"create":(L=h.value)==null||L.push({...w,index:((j=h.value)==null?void 0:j.length)+1});break;case"update":h.value=(E=h.value)==null?void 0:E.map(g=>g.index===(w==null?void 0:w.index)?{...g,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:g);break}r("change",(x=k())==null?void 0:x.compData),b.visible=!1}else b.visible=!1},k=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:h.value},{key:"timeLineConfig",contents:s.value}]}),W=()=>{b.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(s.value=((j=I==null?void 0:I.find(E=>E.key==="timeLineConfig"))==null?void 0:j.contents)??{},h.value=((L=I==null?void 0:I.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",U4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",W4,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(sl.ssForm,{rowContents:c.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:b.visible,title:b.title,onBeforeDestroy:W,width:b.width},{default:e.withCtx(()=>[e.createElementVNode("div",K4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Y4=Zl._export_sfc(G4,[["__scopeId","data-v-39ffc861"]]),J4={};function X4(a,l){return e.openBlock(),e.createElementBlock("div")}const Z4=Zl._export_sfc(J4,[["render",X4]]),Q4={class:"extra-content"},e2={key:0},a2={key:1},l2={class:"dialog-footer"},r2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),o=e.ref(),s=e.ref(),h=l,c=e.ref(!1),d=e.ref({}),m=e.ref({}),b=e.ref();e.watch(()=>[n.itemData],()=>{var x;const E=A.cloneDeep(n.itemData);o.value=(x=A.cloneDeep(E))==null?void 0:x.map(w=>{var g;if(w.key==="extra"){let S=[];(g=w.value)==null||g.forEach($=>{var V;S.push((V=Object.values($))==null?void 0:V[0])}),w.value=S}return w})},{deep:!0,immediate:!0});const u=(E,x,w,g)=>{var $;let S={};(($=E==null?void 0:E[0])==null?void 0:$.contents)==="详情"&&(c.value=!0,S[x]=E,s.value=E==null?void 0:E.filter(V=>(V==null?void 0:V.key)!=="tableContentName"),d.value=S,m.value=w,b.value=g.id)},C=E=>{var V,ae,Z,me;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),w=(me=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:me.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),g=w==null?void 0:w.map((Ae,F)=>{var ne;return F===E.index&&(Ae==null?void 0:Ae.comp)==="Table"&&(Ae.compData=(ne=Ae.compData)==null?void 0:ne.map(J=>{var ce,Te;return(J==null?void 0:J.key)==="tableContents"&&(J.contents=(Te=(ce=E.content)==null?void 0:ce.map($e=>{let fe={};for(let N in $e)N!=="id"&&(fe[N]=$e[N]);return fe}))==null?void 0:Te.map($e=>Object.values($e))),J})),Ae});g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let Ae in S)$[Ae]=g;d.value=$},M=()=>{c.value=!1,d.value={},m.value={},b.value=void 0,r.value++},k=E=>{var V,ae,Z,me;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),w=(me=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:me.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),g=w==null?void 0:w.map((Ae,F)=>(F===E.index&&(Ae.compData=E.contents),Ae));g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let Ae in S)$[Ae]=g;d.value=$},W=()=>{var x,w;let E={};for(let g in m.value)g===((x=Object.keys(d.value))==null?void 0:x[0])?E[g]=(w=Object.values(d.value))==null?void 0:w[0]:E[g]=m.value[g];h("change",{buttonName:"编辑",index:b.value,singleContent:E},"methodData"),c.value=!1,d.value={},m.value={},b.value=void 0},I=()=>{c.value=!1,d.value={},m.value={},b.value=void 0},j=E=>{h("change",E,"methodData")},L=E=>zi(E);return(E,x)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(g==null?void 0:g.key)==="extra"?(e.openBlock(),e.createElementBlock("div",e2)):(e.openBlock(),e.createElementBlock("div",a2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,childItemData:g==null?void 0:g.itemChildData,key:S,index:(g==null?void 0:g.id)??S,onContentClick:u,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,onChange:C,childItemData:g==null?void 0:g.itemChildData,key:S,onContentChange:k,index:(g==null?void 0:g.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",l2,[e.createVNode(w,{class:"cancel-button footer-button",onClick:M,id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},n2=Zl._export_sfc(r2,[["__scopeId","data-v-2d9c5ab2"]]),i2={key:0,class:"method-content"},o2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=oe.useOriginalState(A.pinia),{originalPath:r}=A.storeToRefs(n),o=a,s=e.ref(!1),h=e.ref(),c=oe.useTableComp(A.pinia),{multipleTableConst:d}=A.storeToRefs(c),m=A.useModelComp(A.pinia),b=e.ref(!1),u=A.useMenuState(A.pinia),C=A.useLoginState(A.pinia),{itemData:M,isEdit:k,routeToChildPath:W,tableViewContents:I,lockingPage:j,payloadTypes:L}=A.storeToRefs(m),{activeMenuPath:E,platform:x,childMenu:w}=A.storeToRefs(u),{loginUserInfo:g}=A.storeToRefs(C),S=e.ref(!1),$=async()=>{var fe,N;(fe=l.value)!=null&&fe.find(te=>(te==null?void 0:te.buttonName)==="保存")&&await J((N=l.value)==null?void 0:N.find(te=>(te==null?void 0:te.buttonName)==="保存")),await oe.onSaveBack()};e.watch(()=>M.value,async()=>{k.value==="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{deep:!0});const V=()=>{s.value=!1,h.value=void 0},ae=fe=>fe.map(N=>{const te={};for(const U in N){const Ce=N[U];if(U.includes(d.value)){const Me=U.split(d.value);let Pe=te;Me.forEach((ra,Ta)=>{Ta===Me.length-1?Pe[ra]=Ce:(Pe[ra]||(Pe[ra]={}),Pe=Pe[ra])})}else te[U]=Ce}return te}),Z=async(fe,N,te=[])=>{var Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja;let U=(Ce=A.cloneDeep(N))==null?void 0:Ce.filter(R=>(R==null?void 0:R.comp)!=="methodButton");if(fe!=null&&fe.includes("[")){let R=(ee=(Ta=(ra=(Pe=(Me=A.cloneDeep(fe))==null?void 0:Me.split("["))==null?void 0:Pe[1])==null?void 0:ra.split("]"))==null?void 0:Ta[0])==null?void 0:ee.split(":"),H="";if(R!=null&&R[0]){let X=(pa=U==null?void 0:U.find(he=>(he==null?void 0:he.name)===(R==null?void 0:R[0])))==null?void 0:pa.compData;if(!X){let he=(ue=fe==null?void 0:fe.split("["))==null?void 0:ue[0],de=await oe.getItemData(he,sessionStorage.getItem("systemKey"),"",!1,"","",te);X=(ua=de==null?void 0:de.find(ma=>(ma==null?void 0:ma.name)===(R==null?void 0:R[0])))==null?void 0:ua.compData}X==null||X.forEach(he=>{var de,ma,oa,Ve,_a,ze;if((he==null?void 0:he.key)==="formContent")(de=he==null?void 0:he.contents)==null||de.forEach(ya=>{var La;(ya==null?void 0:ya.key)===(R==null?void 0:R[1])&&(Array.isArray(ya==null?void 0:ya.value)?H=ya==null?void 0:ya.value:H=(La=ya==null?void 0:ya.value)==null?void 0:La.toString())});else if((he==null?void 0:he.key)==="tableContents"){let ya=[],La=(ma=X==null?void 0:X.find(ha=>(ha==null?void 0:ha.key)==="header"))==null?void 0:ma.contents,za=(R==null?void 0:R[1])??"";if(La!=null&&La.every(ha=>Array.isArray(ha))){let ha=oe.getColumnChild((_a=La==null?void 0:La[0])==null?void 0:_a.filter(Ca=>(Ca==null?void 0:Ca.label)!=="操作"));(ze=he.contents)==null||ze.forEach(Ca=>{let Ne={};Ca=Ca==null?void 0:Ca.filter(ye=>!(ye!=null&&ye.id)),ha==null||ha.forEach((ye,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===ye.prop)&&(Ne[ye.prop]=xe)}),ya.push(Ne)}),ya=ae(ya)}else{let ha=(oa=La==null?void 0:La.map(Ca=>Ca==null?void 0:Ca.label))==null?void 0:oa.filter(Ca=>Ca!=="操作");(Ve=he.contents)==null||Ve.forEach(Ca=>{let Ne={};Ca=Ca==null?void 0:Ca.filter(ye=>!(ye!=null&&ye.id)),ha==null||ha.forEach((ye,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===ye)&&(Ne[ye]=xe)}),ya.push(Ne)})}H=ya}})}return H}else if(fe!=null&&fe.includes("/")){let R={};return(Se=A.cloneDeep(U))==null||Se.forEach((H,X)=>{var he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa;if((H==null?void 0:H.comp)==="Table"){let $a=Array.isArray((ma=(de=(he=H==null?void 0:H.compData)==null?void 0:he.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:de.contents)==null?void 0:ma[0])?(ze=(_a=(Ve=(oa=H==null?void 0:H.compData)==null?void 0:oa.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:Ve.contents)==null?void 0:_a[0])==null?void 0:ze.some(Ie=>Ie==null?void 0:Ie.children):[],Ma=(za=(La=(ya=H==null?void 0:H.compData)==null?void 0:ya.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:za.map(Ie=>(Ie!=null&&Ie.find(aa=>aa==null?void 0:aa.id)&&(Ie=Ie.slice(1)),Ie)),Va=(Y=(ye=(Ne=(Ca=(ha=H==null?void 0:H.compData)==null?void 0:ha.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:Ca.contents)==null?void 0:Ne[0])==null?void 0:ye[0])==null?void 0:Y.label,Ue=(pe=(xe=H==null?void 0:H.compData)==null?void 0:xe.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:pe.contents;if($a)($a==null?void 0:$a.length)===0?R[H.name]=R!=null&&R[H.name]?R[H.name]:oe.tableToForm(Ma,Ue):R[Va]=oe.tableToForm(Ma,Ue);else{const Ie=[];Ue=Ue.slice(1,Ue.length-1),Ue==null||Ue.forEach((aa,ke)=>{Ma==null||Ma.forEach(We=>{Ie.push({key:aa.label+We[0],value:We[ke+1]})})}),R["form"+X]=Ie}}else{const $a=(sa=(qe=H.compData)==null?void 0:qe.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:sa.contents;R!=null&&R.form||(R.form=[]);const Ma=[];$a==null||$a.forEach(Va=>{Va.key!==""&&(Va={key:(Va==null?void 0:Va.key)??(Va==null?void 0:Va.label),value:Va==null?void 0:Va.value},Ma.push(Va))}),R.form=[...Ma,...A.cloneDeep(R==null?void 0:R.form)]}}),R}else{if(fe==="createInsofDataApi"){let R=(se=A.cloneDeep(N))==null?void 0:se[0];return R={comp:(Be=A.cloneDeep(R))==null?void 0:Be.comp,compData:(Ge=A.cloneDeep(R))==null?void 0:Ge.compData,name:(da=A.cloneDeep(R))==null?void 0:da.name,isShow:(Ja=A.cloneDeep(R))==null?void 0:Ja.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:R}}}return fe}},me=async(fe,N,te)=>{var Me,Pe,ra;let U=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Ce=U==null?void 0:U.find(Ta=>(Ta==null?void 0:Ta.name)===(te==null?void 0:te[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let Ta={};for(let Be in A.cloneDeep(fe))A.cloneDeep(fe)[Be]!=="loginUser"?Ta[Be]=A.cloneDeep(fe)[Be]:Ta[Be]=((Me=g.value)==null?void 0:Me.account)||((Pe=g.value)==null?void 0:Pe.账号);let ee=[],pa=Ta;Array.isArray(fe)||(pa=[Ta]),pa==null||pa.forEach(Be=>{ee.push({[Be[te[1]]]:Be})});let ue=[],ua=ee==null?void 0:ee.map(Be=>{var Ge;return(Ge=Object.keys(Be))==null?void 0:Ge[0]});U==null||U.forEach(Be=>{var Ge;(Be==null?void 0:Be.name)===(te==null?void 0:te[0])&&((Ge=Be==null?void 0:Be.compData)==null||Ge.forEach(da=>{var Ja;(da==null?void 0:da.key)==="tableContents"&&((Ja=da==null?void 0:da.contents)==null||Ja.forEach(R=>{R!=null&&R.some(H=>ua.includes(H))&&ue.push({[R.find(H=>H.id).id]:R.find(H=>ua.includes(H))})}))}))});let Se=ue==null?void 0:ue.map(Be=>{var Ge;return(Ge=Object.keys(Be))==null?void 0:Ge[0]}),se=[];if(Se==null||Se.forEach(Be=>{var Ja;let Ge=(Ja=ue==null?void 0:ue.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0].toString())===Be.toString()}))==null?void 0:Ja[Be],da=ee==null?void 0:ee.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0])===Ge});se.push({id:parseInt(Be),value:{tableData:da[Ge]}})}),(se==null?void 0:se.length)>0)return se}else if((Ce==null?void 0:Ce.comp)==="Form"){let Ta=A.cloneDeep(Ce);Ta.compData=(ra=Ta.compData)==null?void 0:ra.map(ue=>{var ua;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(ua=ue.contents)==null?void 0:ua.map(Se=>((Se==null?void 0:Se.key)===(te==null?void 0:te[1])&&(Se.value=(fe==null?void 0:fe[Se==null?void 0:Se.prop])||fe),Se))),ue});let ee={};for(let ue in Ta)ue!=="id"&&(ee[ue]=Ta[ue]);let pa=[];if(pa.push({id:Ce==null?void 0:Ce.id,keyType:te==null?void 0:te[1],value:{pageData:ee}}),(pa==null?void 0:pa.length)>0)return pa}}},Ae=async(fe,N,te)=>{var Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se;let U=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Ce=U==null?void 0:U.find(Be=>(Be==null?void 0:Be.name)===(te==null?void 0:te[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let Be={};for(let Ge in A.cloneDeep(fe))A.cloneDeep(fe)[Ge]!=="loginUser"?Be[Ge]=A.cloneDeep(fe)[Ge]:Be[Ge]=((Me=g.value)==null?void 0:Me.account)||((Pe=g.value)==null?void 0:Pe.账号);await Rr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:Ce==null?void 0:Ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}else if((Ce==null?void 0:Ce.comp)==="Form"){let Be=A.cloneDeep(Ce),Ge=Object.keys(fe),da="";(Ta=(ra=A.cloneDeep(Be))==null?void 0:ra.compData)==null||Ta.forEach(de=>{var ma,oa;(de==null?void 0:de.key)==="formContent"&&((oa=(ma=A.cloneDeep(de))==null?void 0:ma.contents)==null||oa.forEach(Ve=>{var _a;Ge.includes(Ve==null?void 0:Ve.key)&&(Ve==null?void 0:Ve.value)===((_a=g.value)==null?void 0:_a.姓名)&&(da=Ve==null?void 0:Ve.key)}))});let Ja=[];(ee=Object.values(fe[da]))==null||ee.forEach(de=>{de!=null&&de.includes("(")&&Ja.push(de)}),Ja=[...new Set(Ja)];const R=Ja==null?void 0:Ja.map(async de=>{var ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe;let ma="";(Ca=(ha=(za=(La=(ya=(ze=A.cloneDeep(de))==null?void 0:ze.split("("))==null?void 0:ya[1])==null?void 0:La.split(")"))==null?void 0:za[0])==null?void 0:ha.split(":"))==null||Ca.forEach(sa=>{ma=ma===""?ma+sa.replaceAll("'",""):ma+"/"+sa.replaceAll("'","")});let oa=[];(qe=(pe=(xe=(Y=(ye=(Ne=A.cloneDeep(de))==null?void 0:Ne.split("<"))==null?void 0:ye[1])==null?void 0:Y.split(">"))==null?void 0:xe[0])==null?void 0:pe.split(":"))==null||qe.forEach(sa=>{oa.push(sa.replaceAll("'",""))});const Ve=await oe.getItemData(ma,sessionStorage.getItem("systemKey"),"");let _a="";return Ve==null||Ve.forEach(sa=>{var $a;sa.name===(oa==null?void 0:oa[0])&&(($a=sa==null?void 0:sa.compData)==null||$a.forEach(Ma=>{var Va;(Ma==null?void 0:Ma.key)==="formContent"&&((Va=Ma.contents)==null||Va.forEach(Ue=>{(Ue==null?void 0:Ue.key)===(oa==null?void 0:oa[1])&&(_a=Ue==null?void 0:Ue.value)}))}))}),{[de]:_a}}),H=await Promise.all(R);Be.compData=(ue=(pa=A.cloneDeep(Be))==null?void 0:pa.compData)==null?void 0:ue.map(de=>{var ma,oa;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(oa=(ma=A.cloneDeep(de))==null?void 0:ma.contents)==null?void 0:oa.map(Ve=>{var _a,ze,ya,La;return(_a=fe[da])!=null&&_a[Ve==null?void 0:Ve.key]&&(fe[da][Ve==null?void 0:Ve.key].includes("(")?Ve.value=(ze=H==null?void 0:H.find(za=>{var ha;return((ha=Object.keys(za))==null?void 0:ha[0])===fe[da][Ve==null?void 0:Ve.key]}))==null?void 0:ze[fe[da][Ve==null?void 0:Ve.key]]:Ve.value=(La=(ya=A.cloneDeep(fe))==null?void 0:ya[da])==null?void 0:La[Ve==null?void 0:Ve.key]),Ve})),de});const X=await Rr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let he="";((ua=X==null?void 0:X.data)==null?void 0:ua.type)==="success"&&((se=(Se=X==null?void 0:X.data)==null?void 0:Se.result)==null||se.forEach(de=>{var ma,oa;((oa=(ma=de==null?void 0:de.value)==null?void 0:ma.pageData)==null?void 0:oa.name)===(te==null?void 0:te[0])&&(he=de.id)}),await Rr.updateInsofDataApi({id:he,value:{pageData:Be}}))}}},F=(fe,N="",te={})=>{for(const[U,Ce]of Object.entries(fe)){const Me=N?`${N}.${U}`:U;Ce!==null&&typeof Ce=="object"&&!Array.isArray(Ce)&&Object.prototype.toString.call(Ce)!=="[object Date]"?F(Ce,Me,te):te[Me]=Ce}return te},ne=async(fe,N,te,U)=>{var Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La;let Ce=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Me=Ce==null?void 0:Ce.find(za=>(za==null?void 0:za.name)===(te==null?void 0:te[0]));if(Me){if(!(te!=null&&te[1])&&(Me==null?void 0:Me.comp)==="Table"){let za={},ha=[],Ca=(ra=(Pe=Me==null?void 0:Me.compData)==null?void 0:Pe.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:ra.contents;Ca!=null&&Ca.every(Y=>Array.isArray(Y))?ha=(ee=oe.getColumnChild((Ta=Ca==null?void 0:Ca[0])==null?void 0:Ta.filter(Y=>(Y==null?void 0:Y.label)!=="操作")))==null?void 0:ee.map(Y=>Y==null?void 0:Y.prop):ha=Ca==null?void 0:Ca.map(Y=>Y==null?void 0:Y.label);for(let Y in A.cloneDeep(fe))if(A.cloneDeep(fe)[Y]!=="loginUser"){let xe=F(A.cloneDeep(fe)[Y]),pe={};for(let qe in xe)if(ha!=null&&ha.find(sa=>sa===qe))pe[qe]=xe[qe];else if(ha!=null&&ha.find(sa=>(sa==null?void 0:sa.toUpperCase())===(qe==null?void 0:qe.toUpperCase()))){let sa=ha==null?void 0:ha.find($a=>($a==null?void 0:$a.toUpperCase())===(qe==null?void 0:qe.toUpperCase()));pe[sa]=xe[qe]}za[Y]=pe}else za[Y]=((pa=g.value)==null?void 0:pa.account)||((ue=g.value)==null?void 0:ue.账号);let Ne=await Rr.getInsofDataApi({keyLikes:{tableId:Me==null?void 0:Me.id}});if(((Se=(ua=Ne==null?void 0:Ne.data)==null?void 0:ua.result)==null?void 0:Se.length)>0){let Y=(Be=(se=Ne==null?void 0:Ne.data)==null?void 0:se.result)==null?void 0:Be.map(xe=>xe==null?void 0:xe.id);(Y==null?void 0:Y.length)>0&&await Rr.batchDeleteInsofDataApi({ids:Y})}let ye=[];if((Ge=Me==null?void 0:Me.compData)!=null&&Ge.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&((R=(Ja=(da=Me==null?void 0:Me.compData)==null?void 0:da.find(Y=>(Y==null?void 0:Y.key)==="pageColumn"))==null?void 0:Ja.contents)!=null&&R.includes("["))){const Y=await Rr.getInsofDataApi({id:Me==null?void 0:Me.tableId});let xe=((de=(he=(X=(H=Y==null?void 0:Y.data)==null?void 0:H.result)==null?void 0:X[0])==null?void 0:he.key)==null?void 0:de.pageKey)??"";(ma=Object.values(za))==null||ma.forEach(pe=>{ye.push({key:{type:"data",pageKey:xe,tableId:Me==null?void 0:Me.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})})}else(oa=Object.values(za))==null||oa.forEach(Y=>{ye.push({key:{type:"data",pageKey:N,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Y}})});(ye==null?void 0:ye.length)>0&&await Rr.batchAddInsofDataApi({dataList:ye})}else if(!(te!=null&&te[1])&&(Me==null?void 0:Me.comp)==="Form"){let za=A.cloneDeep(Me);za.compData=(_a=(Ve=A.cloneDeep(za))==null?void 0:Ve.compData)==null?void 0:_a.map(Ne=>{var ye,Y;return(Ne==null?void 0:Ne.key)==="formContent"&&(Ne.contents=(Y=(ye=A.cloneDeep(Ne))==null?void 0:ye.contents)==null?void 0:Y.map(xe=>{var pe,qe;return(pe=A.cloneDeep(fe))!=null&&pe[xe==null?void 0:xe.key]&&(xe.value=(qe=A.cloneDeep(fe))==null?void 0:qe[xe==null?void 0:xe.key]),xe})),Ne});const ha=await Rr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let Ca="";((ze=ha==null?void 0:ha.data)==null?void 0:ze.type)==="success"&&((La=(ya=ha==null?void 0:ha.data)==null?void 0:ya.result)==null||La.forEach(Ne=>{var ye,Y;((Y=(ye=Ne==null?void 0:Ne.value)==null?void 0:ye.pageData)==null?void 0:Y.name)===(te==null?void 0:te[0])&&(Ca=Ne.id)}),await Rr.updateInsofDataApi({id:Ca,value:{pageData:za}}))}}},J=async fe=>{var N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se;u.setImportLoading(!0);try{if(fe.api){let Be=new WeakMap,Ge=await oe.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be),da="";if(Ge=Ge==null?void 0:Ge.map(oa=>{var Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if((oa==null?void 0:oa.comp)==="Form")oa.compData=(Ve=oa.compData)==null?void 0:Ve.map(pe=>{var qe;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(qe=pe.contents)==null?void 0:qe.map(sa=>{var $a;if((sa==null?void 0:sa.value)===""&&(sa==null?void 0:sa.type)==="Select"){let Ma=oe.judgeContents(($a=A.cloneDeep(sa))==null?void 0:$a.optionUrl,Be);sa.value=sa.value||Ma}return sa})),pe});else if((oa==null?void 0:oa.comp)==="Table"&&(_a=oa.compData)!=null&&_a.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")){let pe=(ya=(ze=oa.compData)==null?void 0:ze.find(Ma=>(Ma==null?void 0:Ma.key)==="pageColumn"))==null?void 0:ya.contents,qe=((za=(La=oa.compData)==null?void 0:La.find(Ma=>(Ma==null?void 0:Ma.key)==="pageGroup"))==null?void 0:za.contents)??"",sa=(Ne=(Ca=(ha=pe==null?void 0:pe.split("["))==null?void 0:ha[1])==null?void 0:Ca.split("]"))==null?void 0:Ne[0];da=((ye=pe==null?void 0:pe.split("["))==null?void 0:ye[0])+((xe=(Y=I.value)==null?void 0:Y.find(Ma=>(Ma==null?void 0:Ma.key)===sa))==null?void 0:xe.value)}return oa}),!(da===""||da==="")){const oa=await oe.getItemData(da,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Ge=Ge==null?void 0:Ge.map(Ve=>{var _a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe;if((Ve==null?void 0:Ve.comp)==="Table"&&(_a=Ve.compData)!=null&&_a.find(sa=>(sa==null?void 0:sa.key)==="pageColumn")){let sa=(ya=(ze=Ve.compData)==null?void 0:ze.find(Ie=>(Ie==null?void 0:Ie.key)==="pageColumn"))==null?void 0:ya.contents,$a=((za=(La=Ve.compData)==null?void 0:La.find(Ie=>(Ie==null?void 0:Ie.key)==="pageGroup"))==null?void 0:za.contents)??"",Ma=(Ne=(Ca=(ha=sa==null?void 0:sa.split("["))==null?void 0:ha[1])==null?void 0:Ca.split("]"))==null?void 0:Ne[0],Va=((ye=sa==null?void 0:sa.split("["))==null?void 0:ye[0])+((xe=(Y=I.value)==null?void 0:Y.find(Ie=>(Ie==null?void 0:Ie.key)===Ma))==null?void 0:xe.value),Ue=(pe=oa==null?void 0:oa.find(Ie=>(Ie==null?void 0:Ie.name)===($a===""?o==null?void 0:o.compName:$a)))==null?void 0:pe.compData;Ve.compData=(qe=Ve.compData)==null?void 0:qe.map(Ie=>{var aa;return(Ie==null?void 0:Ie.key)==="tableContents"&&(Ie.contents=(aa=Ue==null?void 0:Ue.find(ke=>(ke==null?void 0:ke.key)==="tableContents"))==null?void 0:aa.contents),Ie})}return Ve})}let Ja={};if(((te=(N=fe==null?void 0:fe.extraValues)==null?void 0:N.input)==null?void 0:te.length)>0){const oa=(Ce=(U=fe==null?void 0:fe.extraValues)==null?void 0:U.input)==null?void 0:Ce.map(async Ve=>{var _a;ce!=null&&ce.find(ze=>ze===Ve)?Ja=await Z(Ve,Ge):Ja[Object.keys(Ve)[0]]=await Z((_a=Object.values(Ve))==null?void 0:_a[0],Ge,Be)});await Promise.all(oa)}else Ja=await Z("/",Ge);let R=!1;(Pe=(Me=fe==null?void 0:fe.extraValues)==null?void 0:Me.output)==null||Pe.forEach(oa=>{var Ve,_a;(_a=(Ve=Object.values(oa))==null?void 0:Ve[0])!=null&&_a.includes(".doc")&&(R=!0)});let H;if(R){const oa=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await qa.axios.post(fe.api,Ja,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{oa.close()})}else H=await qa.axios.post(fe.api,Ja,{headers:{"Content-Type":"application/json"}});let X=(pa=(ee=(Ta=(ra=A.cloneDeep(fe))==null?void 0:ra.extraValues)==null?void 0:Ta.output)==null?void 0:ee.map(oa=>{var Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a;if(!((_a=(Ve=Object.values(oa))==null?void 0:Ve[0])!=null&&_a.includes(".doc"))){let Ma=(ye=(Ne=(Ca=(ya=A.cloneDeep((ze=Object.values(oa))==null?void 0:ze[0]))==null?void 0:ya.split("["))==null?void 0:Ca[((ha=(za=A.cloneDeep((La=Object.values(oa))==null?void 0:La[0]))==null?void 0:za.split("["))==null?void 0:ha.length)-1])==null?void 0:Ne.split("]"))==null?void 0:ye[0],Va=Ma==null?void 0:Ma.split(":"),Ue=(pe=A.cloneDeep((Y=Object.values(oa))==null?void 0:Y[0]))==null?void 0:pe.substring(0,A.cloneDeep((xe=Object.values(oa))==null?void 0:xe[0]).lastIndexOf("["));if(Ue=(sa=A.cloneDeep(Ue))==null?void 0:sa.slice(0,((qe=A.cloneDeep(Ue))==null?void 0:qe.length)-1),Ue!=null&&Ue.includes("[")){let Ie="";if(($a=oe.contentTransArrayToAll(Ue,"/"))==null||$a.forEach(aa=>{var ke,We,tl,Cl,El,Vl,_l;if(!(aa!=null&&aa.includes("[")))Ie=Ie===""?Ie+aa.replaceAll("/",""):Ie+"/"+aa.replaceAll("/","");else{let jl=A.cloneDeep(aa).slice(1,((ke=A.cloneDeep(aa))==null?void 0:ke.length)-1),Qe=(Vl=(El=(Cl=(tl=(We=A.cloneDeep(jl))==null?void 0:We.split("["))==null?void 0:tl[1])==null?void 0:Cl.split("]"))==null?void 0:El[0])==null?void 0:Vl.split(":"),Xa="",ba=(_l=Ge==null?void 0:Ge.find(ll=>(ll==null?void 0:ll.name)===(Qe==null?void 0:Qe[0])))==null?void 0:_l.compData;ba==null||ba.forEach(ll=>{var Ia;(ll==null?void 0:ll.key)==="formContent"&&((Ia=ll==null?void 0:ll.contents)==null||Ia.forEach(il=>{(il==null?void 0:il.key)===(Qe==null?void 0:Qe[1])&&(Xa=il==null?void 0:il.value)}))}),Ie=Ie===""?Ie+Xa.replaceAll("/",""):Ie+"/"+Xa.replaceAll("/","")}}),Ue=Ie,Ue[(Ue==null?void 0:Ue.length)-1]!=="/")return Ue}}}))==null?void 0:pa.filter(oa=>oa);X=[...new Set(A.cloneDeep(X))];let he=X==null?void 0:X.map(async oa=>{let Ve=await oe.getItemData(oa,sessionStorage.getItem("systemKey"),"",!1,"","",Be);if((Ve==null?void 0:Ve.length)===0)return await oe.getParentContents(oa)});await Promise.all(he);let de=[],ma=(Se=(ua=(ue=A.cloneDeep(fe))==null?void 0:ue.extraValues)==null?void 0:ua.output)==null?void 0:Se.map(async oa=>{var Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa,Je,ie,Xe,Aa,Ze,wa,Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr,Ql,nr,pr,gr,Oe,er,Sr,Mr,zl,Nr,qr,Kl,br,$r,jr,Pl,lr,Wr,Ur,Vr,Kr,an;if((Ne=(Ca=Object.values(oa))==null?void 0:Ca[0])!=null&&Ne.includes(".doc")){var Ve=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),_a=H.headers["content-disposition"],ze=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ya=ze.exec(_a),La=ya==null?void 0:ya[1],za=document.createElement("a"),ha=window.URL.createObjectURL(Ve);h.value=[{name:La,blobUrl:ha}],s.value=!0}else{let hn=(Ma=($a=(sa=(Y=A.cloneDeep((ye=Object.values(oa))==null?void 0:ye[0]))==null?void 0:Y.split("["))==null?void 0:sa[((qe=(pe=A.cloneDeep((xe=Object.values(oa))==null?void 0:xe[0]))==null?void 0:pe.split("["))==null?void 0:qe.length)-1])==null?void 0:$a.split("]"))==null?void 0:Ma[0],Jl=hn==null?void 0:hn.split(":"),vr=(Ie=A.cloneDeep((Va=Object.values(oa))==null?void 0:Va[0]))==null?void 0:Ie.substring(0,A.cloneDeep((Ue=Object.values(oa))==null?void 0:Ue[0]).lastIndexOf("["));if(vr!=null&&vr.includes("[")?vr=(ke=A.cloneDeep(vr))==null?void 0:ke.slice(0,((aa=A.cloneDeep(vr))==null?void 0:aa.length)-1):vr===""&&(vr=E.value),vr=vr.replaceAll("<","[").replaceAll(">","]"),vr!=null&&vr.includes("[")){let vl="";(We=oe.contentTransArrayToAll(vr,"/"))==null||We.forEach((ir,Rl)=>{var Er,Hl,mr,ar,Xr,sn,Cn,Jn,Fn,Dn,In;if(!(ir!=null&&ir.includes("[")))vl=vl===""?vl+ir.replaceAll("/",""):vl+"/"+ir.replaceAll("/","");else{let jn="",vn="";(Er=A.cloneDeep(ir))!=null&&Er.includes("]")?(jn=A.cloneDeep(ir).slice(1,((Hl=A.cloneDeep(ir))==null?void 0:Hl.length)-1),vn=(Cn=(sn=(Xr=(ar=(mr=A.cloneDeep(jn))==null?void 0:mr.split("["))==null?void 0:ar[1])==null?void 0:Xr.split("]"))==null?void 0:sn[0])==null?void 0:Cn.split(":")):(jn=A.cloneDeep(ir).slice(1,(Jn=A.cloneDeep(ir))==null?void 0:Jn.length),vn=(Fn=A.cloneDeep(jn))==null?void 0:Fn.split("/"));let On="",Xn=(Dn=Ge==null?void 0:Ge.find(Gr=>(Gr==null?void 0:Gr.name)===(vn==null?void 0:vn[0])))==null?void 0:Dn.compData;Xn==null||Xn.forEach(Gr=>{var Zn;(Gr==null?void 0:Gr.key)==="formContent"&&((Zn=Gr==null?void 0:Gr.contents)==null||Zn.forEach(wn=>{(wn==null?void 0:wn.key)===(vn==null?void 0:vn[1])&&(On=wn==null?void 0:wn.value)}))}),((In=oe.contentTransArrayToAll(vr,"/"))==null?void 0:In.length)-1!==Rl?vl=vl===""?vl+On.replaceAll("/",""):vl+"/"+On.replaceAll("/",""):vl=vl+r.value+On.replaceAll("/","")}}),(tl=E.value)!=null&&tl.includes(vl)?vr=E.value:vr=vl}let Jr=A.cloneDeep((Cl=Object.keys(oa))==null?void 0:Cl[0]);if(((El=H==null?void 0:H.data)==null?void 0:El.statusCode)===200||((Vl=H==null?void 0:H.data)==null?void 0:Vl.code)===200){if(((jl=(_l=H==null?void 0:H.data)==null?void 0:_l.data)!=null&&jl[Jr]||(Xa=(Qe=H==null?void 0:H.data)==null?void 0:Qe.result)!=null&&Xa[Jr])&&(Jl==null?void 0:Jl.length)===1)return await ne(((ll=(ba=H==null?void 0:H.data)==null?void 0:ba.data)==null?void 0:ll[Jr])||((il=(Ia=H==null?void 0:H.data)==null?void 0:Ia.result)==null?void 0:il[Jr]),A.cloneDeep(vr),Jl,da);if((_e=(rl=H==null?void 0:H.data)==null?void 0:rl.data)!=null&&_e[Jr]||(Je=(Oa=H==null?void 0:H.data)==null?void 0:Oa.result)!=null&&Je[Jr]){let vl=await me(((Xe=(ie=H==null?void 0:H.data)==null?void 0:ie.data)==null?void 0:Xe[Jr])||((Ze=(Aa=H==null?void 0:H.data)==null?void 0:Aa.result)==null?void 0:Ze[Jr]),A.cloneDeep(vr),Jl);return vl&&(de=[...de,...vl]),vl}else{if(!((wa=H==null?void 0:H.data)!=null&&wa.data)){let vl=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be);vl=vl==null?void 0:vl.map(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Jl==null?void 0:Jl[0])&&(Rl.compData=(Er=Rl.compData)==null?void 0:Er.map(Hl=>{var mr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(mr=Hl.contents)==null?void 0:mr.map(ar=>{var Xr,sn;return(ar==null?void 0:ar.key)===(Jl==null?void 0:Jl[1])&&(ar.value=(sn=(Xr=H==null?void 0:H.data)==null?void 0:Xr.result)==null?void 0:sn[Jr==null?void 0:Jr.replaceAll(":","")]),ar})),Hl})),Rl});let ir=[];(Fa=vl==null?void 0:vl.filter(Rl=>(Rl==null?void 0:Rl.comp)==="Form"))==null||Fa.forEach(async Rl=>{let Er={};for(let Hl in Rl)Hl!=="id"&&(Er[Hl]=Rl[Hl]);ir.push({id:Rl==null?void 0:Rl.id,value:{pageData:Er}})}),(ir==null?void 0:ir.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:ir});return}if((Jl==null?void 0:Jl.length)===1){const vl=(va=(He=(Za=H==null?void 0:H.data)==null?void 0:Za.data)==null?void 0:He.path)==null?void 0:va.path;let ir="";(ul=(ja=(Le=(cl=(ca=vl==null?void 0:vl.split("("))==null?void 0:ca[1])==null?void 0:cl.split(")"))==null?void 0:Le[0])==null?void 0:ja.split(":"))==null||ul.forEach(Hl=>{var mr,ar;ir=ir===""?ir+((mr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:mr.trim()):ir+"/"+((ar=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:ar.trim())});let Rl=[(pr=(nr=(Ql=(dr=(hr=vl==null?void 0:vl.split("<"))==null?void 0:hr[1])==null?void 0:dr.split(">"))==null?void 0:Ql[0])==null?void 0:nr.replaceAll("'",""))==null?void 0:pr.trim()],Er;return(er=(Oe=(gr=H==null?void 0:H.data)==null?void 0:gr.data)==null?void 0:Oe.data)!=null&&er[Jl==null?void 0:Jl[0]]?Er=await ne((zl=(Mr=(Sr=H==null?void 0:H.data)==null?void 0:Sr.data)==null?void 0:Mr.data)==null?void 0:zl[Jl==null?void 0:Jl[0]],ir,Jl,da):Er=await Ae((qr=(Nr=H==null?void 0:H.data)==null?void 0:Nr.data)==null?void 0:qr.data,ir,Rl,Be),Er}else{const vl=($r=(br=(Kl=H==null?void 0:H.data)==null?void 0:Kl.data)==null?void 0:br.path)==null?void 0:$r.path;let ir="";return(Ur=(Wr=(lr=(Pl=(jr=vl==null?void 0:vl.split("("))==null?void 0:jr[1])==null?void 0:Pl.split(")"))==null?void 0:lr[0])==null?void 0:Wr.split(":"))==null||Ur.forEach(Er=>{var Hl,mr;ir=ir===""?ir+((Hl=Er==null?void 0:Er.replaceAll("'",""))==null?void 0:Hl.trim()):ir+"/"+((mr=Er==null?void 0:Er.replaceAll("'",""))==null?void 0:mr.trim())}),await me((an=(Kr=(Vr=H==null?void 0:H.data)==null?void 0:Vr.data)==null?void 0:Kr.data)==null?void 0:an[Jl==null?void 0:Jl[0]],ir,Jl)}}}}});if(await Promise.all(ma),(de==null?void 0:de.length)>0){let oa=[];de==null||de.forEach(ze=>{oa!=null&&oa.find(ya=>{var La,za,ha,Ca;return((za=(La=ya==null?void 0:ya.value)==null?void 0:La.pageData)==null?void 0:za.name)===((Ca=(ha=ze==null?void 0:ze.value)==null?void 0:ha.pageData)==null?void 0:Ca.name)})||oa.push(ze)});let Ve=[];oa==null||oa.forEach(ze=>{var za,ha,Ca,Ne;let ya=A.cloneDeep(ze);ya.value.pageData.compData=(za=ya.value.pageData.compData)==null?void 0:za.map(ye=>{var Y;return(ye==null?void 0:ye.key)==="formContent"&&(ye.contents=(Y=ye.contents)==null?void 0:Y.map(xe=>{var qe,sa,$a,Ma;let pe=(qe=A.cloneDeep(de))==null?void 0:qe.find(Va=>(Va==null?void 0:Va.keyType)===(xe==null?void 0:xe.key));if(pe){let Va=(Ma=($a=(sa=pe.value.pageData.compData)==null?void 0:sa.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:$a.contents)==null?void 0:Ma.find(Ue=>(Ue==null?void 0:Ue.key)===(xe==null?void 0:xe.key));xe.value=Va==null?void 0:Va.value}return xe})),ye}),Ve.push({id:ya==null?void 0:ya.id,value:ya==null?void 0:ya.value});let La=[];(Ne=(Ca=(ha=ya==null?void 0:ya.value)==null?void 0:ha.pageData)==null?void 0:Ca.compData)==null||Ne.forEach(ye=>{var Y;(ye==null?void 0:ye.key)==="formContent"&&((Y=ye==null?void 0:ye.contents)==null||Y.forEach(xe=>{var pe,qe,sa,$a,Ma,Va;if((qe=(pe=xe==null?void 0:xe.optionUrl)==null?void 0:pe.menuSelect)!=null&&qe.find(Ue=>Ue==null?void 0:Ue.includes("[")))if(La!=null&&La.find(Ue=>{var Ie,aa,ke;return((Ie=Ue==null?void 0:Ue.key)==null?void 0:Ie.join(","))===((ke=(aa=xe==null?void 0:xe.optionUrl)==null?void 0:aa.menuSelect)==null?void 0:ke.join(","))})){let Ue=(sa=La==null?void 0:La.find(Ie=>{var aa,ke,We;return((aa=Ie==null?void 0:Ie.key)==null?void 0:aa.join(","))===((We=(ke=xe==null?void 0:xe.optionUrl)==null?void 0:ke.menuSelect)==null?void 0:We.join(","))}))==null?void 0:sa.value;Ue.push({key:xe==null?void 0:xe.prop,groups:($a=xe==null?void 0:xe.optionUrl)==null?void 0:$a.groupSelect,value:xe==null?void 0:xe.value}),La=La==null?void 0:La.map(Ie=>{var aa,ke,We;return((aa=Ie==null?void 0:Ie.key)==null?void 0:aa.join(","))===((We=(ke=xe==null?void 0:xe.optionUrl)==null?void 0:ke.menuSelect)==null?void 0:We.join(","))&&(Ie.value=Ue),Ie})}else La.push({key:(Ma=xe==null?void 0:xe.optionUrl)==null?void 0:Ma.menuSelect,value:[{key:xe==null?void 0:xe.prop,groups:(Va=xe==null?void 0:xe.optionUrl)==null?void 0:Va.groupSelect,value:xe==null?void 0:xe.value}]})}))}),(La==null?void 0:La.length)>0&&(La=La==null?void 0:La.map(ye=>{var xe;let Y="";return(xe=ye==null?void 0:ye.key)==null||xe.forEach(pe=>{var qe;if(!(pe!=null&&pe.includes("[")))Y=Y===""?Y+pe:Y+"/"+pe;else{let sa="",$a=(qe=pe==null?void 0:pe.replaceAll("[","").replaceAll("]",""))==null?void 0:qe.split(":");Ge==null||Ge.forEach(Ma=>{var Va;(Ma==null?void 0:Ma.name)===($a==null?void 0:$a[0])&&((Va=Ma==null?void 0:Ma.compData)==null||Va.forEach(Ue=>{var Ie;(Ue==null?void 0:Ue.key)==="formContent"&&((Ie=Ue==null?void 0:Ue.contents)==null||Ie.forEach(aa=>{(aa==null?void 0:aa.prop)===($a==null?void 0:$a[1])&&(sa=aa==null?void 0:aa.value)}))}))}),Y=Y+r.value+sa}}),ye.key=Y,ye})),La==null||La.forEach(ye=>{var qe,sa,$a;let Y=(qe=Be[ye.key])==null?void 0:qe.find(Ma=>{var Va,Ue,Ie,aa,ke,We,tl;return((Ue=(Va=Ma==null?void 0:Ma.value)==null?void 0:Va.pageData)==null?void 0:Ue.name)===((ke=(aa=(Ie=ye==null?void 0:ye.value)==null?void 0:Ie[0])==null?void 0:aa.groups)==null?void 0:ke[0])&&((tl=(We=Ma==null?void 0:Ma.value)==null?void 0:We.pageData)==null?void 0:tl.name)!==void 0}),xe=Y==null?void 0:Y.id,pe=(sa=Y==null?void 0:Y.value)==null?void 0:sa.pageData;pe.compData=($a=pe.compData)==null?void 0:$a.map(Ma=>{var Va;return(Ma==null?void 0:Ma.key)==="formContent"&&(Ma.contents=(Va=Ma.contents)==null?void 0:Va.map(Ue=>{var aa;let Ie=(aa=ye.value)==null?void 0:aa.find(ke=>(ke==null?void 0:ke.key)===(Ue==null?void 0:Ue.prop));return Ie&&(Ue.value=Ie.value),Ue})),Ma}),Ve.push({id:xe,value:{pageData:pe}})})});let _a=(se=A.cloneDeep(de))==null?void 0:se[0];(Ve==null?void 0:Ve.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:Ve})}m.setFreshContent(!0)}u.setImportLoading(!1)}catch{qa.ElMessage.error("方法执行错误,请查看方法!"),u.setImportLoading(!1)}S.value=!0},ce=["createInsofDataApi"],Te=Al.debounce(async fe=>{J(fe)},100),$e=async fe=>{var Pe,ra,Ta;const N=A.cloneDeep(fe);let te,U=new WeakMap;fe!=null&&fe[0].path&&(te=await(N==null?void 0:N.map(async(ee,pa)=>{var Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca;const ua=(Ja=U[ee==null?void 0:ee.path])==null?void 0:Ja.filter(Ne=>{var ye;return((ye=Ne==null?void 0:Ne.key)==null?void 0:ye.type)==="data"});let Se="";const se=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);ua==null||ua.forEach(Ne=>{var ye,Y,xe,pe,qe;((Y=(ye=Ne==null?void 0:Ne.value)==null?void 0:ye.tableData)==null?void 0:Y.算法名称)===((xe=N==null?void 0:N[pa])==null?void 0:xe.method)&&(Se=(qe=(pe=Ne==null?void 0:Ne.value)==null?void 0:pe.tableData)==null?void 0:qe.算法体)});const Be=await oe.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);let Ge="",da=(he=(X=(H=(R=Be==null?void 0:Be[0])==null?void 0:R.compData)==null?void 0:H.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:X.contents)==null?void 0:he.findIndex(Ne=>(Ne==null?void 0:Ne.prop)==="算法体");return(ma=(de=Be==null?void 0:Be[0])==null?void 0:de.compData)==null||ma.forEach(Ne=>{var ye;(Ne==null?void 0:Ne.key)==="tableContents"&&((ye=Ne==null?void 0:Ne.contents)==null||ye.forEach(Y=>{Y!=null&&Y.find(xe=>xe===(ee==null?void 0:ee.method))&&(Ge=Y[da])}))}),{buttonName:((oa=N==null?void 0:N[pa])==null?void 0:oa.method)||((ze=(_a=(Ve=ua==null?void 0:ua[0])==null?void 0:Ve.value)==null?void 0:_a.tableData)==null?void 0:ze.算法名称),api:(Se===""?(za=(La=(ya=ua==null?void 0:ua[0])==null?void 0:ya.value)==null?void 0:La.tableData)==null?void 0:za.算法体:Se)||Ge,content:se==null?void 0:se.filter(Ne=>Ne.comp!=="methodButton"),extraContent:(ha=A.cloneDeep(ee.value))==null?void 0:ha.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(Ca=N==null?void 0:N[pa])==null?void 0:Ca.data}})));const Ce=N==null?void 0:N.map(async ee=>{var Be,Ge,da,Ja,R,H;const pa=(Be=resAll.data.result)==null?void 0:Be.filter(X=>{var he,de,ma;return((he=X==null?void 0:X.key)==null?void 0:he.parentTable)===""&&((de=X==null?void 0:X.key)==null?void 0:de.type)==="method"&&((ma=X==null?void 0:X.key)==null?void 0:ma.methodName)===X.method}),ue=pa==null?void 0:pa[0],ua=(Ge=resAll.data.result)==null?void 0:Ge.filter(X=>{var he,de;return((he=X==null?void 0:X.key)==null?void 0:he.type)==="methodData"&&((de=X==null?void 0:X.key)==null?void 0:de.tableId)===(ue==null?void 0:ue.id)}),Se=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U),se=ua==null?void 0:ua[0];return{buttonName:(da=ue==null?void 0:ue.key)==null?void 0:da.methodKey,api:(R=(Ja=se==null?void 0:se.value)==null?void 0:Ja.tableData)==null?void 0:R[0],content:Se==null?void 0:Se.filter(X=>X.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ee.value))==null?void 0:H.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Me=(Pe=fe==null?void 0:fe[0])!=null&&Pe.path&&((ra=fe==null?void 0:fe[0])==null?void 0:ra.path)!==""?await Promise.all(te):await Promise.all(Ce);l.value=Me==null?void 0:Me.filter(ee=>ee==null?void 0:ee.extraContent),(Ta=l.value)==null||Ta.forEach(ee=>{var pa;ee.api===""&&((pa=ee.content)==null||pa.forEach(ue=>{var ua;ue.comp=="Table"&&m.setExtraContents(oe.methodTableToContent(ue.compData,(ua=ee.extraContent)==null?void 0:ua[0]))}))})};return e.watch(()=>o.itemData,async()=>{k.value=="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{immediate:!0,deep:!0}),(fe,N)=>{var te,U,Ce;return e.unref(k)!=="edit"?(e.openBlock(),e.createElementBlock("div",i2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=l.value)==null?void 0:te.filter(Me=>(Me==null?void 0:Me.buttonName)!=="保存"),Me=>{var Pe;return e.openBlock(),e.createElementBlock("div",null,[Me.api!==""?(e.openBlock(),e.createBlock(e.unref(ts._sfc_main),{key:0,disabled:e.unref(j)===e.unref(E)&&!((Pe=Me==null?void 0:Me.buttonName)!=null&&Pe.includes("预览")),class:"calculator-content",modelValue:Me.buttonName,onClickTrigger:ra=>e.unref(Te)(Me),loading:b.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(W)!==""&&((Ce=e.unref(E))==null?void 0:Ce[((U=e.unref(E))==null?void 0:U.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ts._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:0,fileDataList:h.value,onDestroy:V},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},t2=Zl._export_sfc(o2,[["__scopeId","data-v-063aa9af"]]),s2={};function c2(a,l){return" 567 "}const u2=Zl._export_sfc(s2,[["render",c2]]),d2={class:"module content"},p2={class:"module data"},f2={class:"module layout"},h2={class:"form-content"},v2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=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}]),d=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({}),b=e.ref([]),u=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:b.value},{key:"signConfig",contents:m.value}]}),C=I=>{var j;m.value=A.cloneDeep(I),r("change",(j=u())==null?void 0:j.compData)},M=I=>{var j,L;if((I==null?void 0:I.buttonName)==="确认"){const E=A.cloneDeep(I==null?void 0:I.content);switch(s.value){case"create":b.value.push({...E,index:((j=b.value)==null?void 0:j.length)+1});break}r("change",(L=u())==null?void 0:L.compData),o.visible=!1}else o.visible=!1},k=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),s.value="create",o.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),s.value="update",o.visible=!0;break;case"delete":b.value.splice(j,1),s.value="delete";break}},W=()=>{o.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="signConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",d2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>k("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",p2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>k("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>k("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",f2,[e.createVNode(sl.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:W,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",h2,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),m2=Zl._export_sfc(v2,[["__scopeId","data-v-487e0536"]]),y2=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(0),s=e.computed(()=>{var u,C;return(u=n==null?void 0:n.stepConfig)!=null&&u.allowTrigger?o.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),h=(u,C)=>{o.value=C-1,r("clickStep",u,C)};e.onMounted(()=>{var u;r("clickStep",(u=n==null?void 0:n.stepList)==null?void 0:u[0],0)});const c=u=>sl.getComponent(u),d=()=>{var C;const u=(C=n==null?void 0:n.stepList)==null?void 0:C.find((M,k)=>k+1===s.value);return console.log("findStep",u),u?u==null?void 0:u.children:[]},m=u=>{r("clickTrigger",u)},b=u=>{r("changeTrigger",u)};return(u,C)=>{var W,I,j,L,E;const M=e.resolveComponent("el-step"),k=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{direction:(W=a.stepConfig)==null?void 0:W.direction,active:s.value,"finish-status":"success",simple:(I=a.stepConfig)==null?void 0:I.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(x,w)=>(e.openBlock(),e.createBlock(M,{key:w,class:"step-item",onClick:g=>h(x,w+1)},{title:e.withCtx(()=>[e.renderSlot(u.$slots,"title",{title:x==null?void 0:x.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(u.$slots,"description",{descriptions:x==null?void 0:x.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(x==null?void 0:x.type)),{modelValue:x.value,"onUpdate:modelValue":g=>x.value=g,onClickTrigger:m,onChangeTrigger:b,content:x==null?void 0:x.content},e.createSlots({_:2},[e.renderList(u.$slots,(g,S)=>({name:S,fn:e.withCtx($=>[e.renderSlot(u.$slots,S,e.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),g2=Zl._export_sfc(y2,[["__scopeId","data-v-fdbd6832"]]),b2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,o=e.ref({}),s=e.ref([]),h=(c,d)=>{r("clickStep",c,d)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var u,C,M,k;o.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let d=((u=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="stepName"))==null?void 0:u.contents)??[],m=[];(M=(C=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:C.contents)==null||M.forEach(W=>{m.push({label:W==null?void 0:W.label,prop:W==null?void 0:W.prop,name:W==null?void 0:W.prop,type:"text",disabled:!0})});let b=((k=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)??[];d=d==null?void 0:d.map((W,I)=>{let j=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=b==null?void 0:b[I])==null?void 0:E[L==null?void 0:L.prop]}});return{title:W,description:j}}),s.value=d},{immediate:!0,deep:!0}),(c,d)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(g2,{stepConfig:o.value,stepList:s.value,onClickStep:h},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:b})=>[e.createTextVNode(e.toDisplayString(b),1)]),description:e.withCtx(({descriptions:b})=>[e.createVNode(sl.ssForm,{ref:"formRef",rowContents:b,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),k2=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,h)=>(e.openBlock(),e.createBlock(r,{key:h,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(l.$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})}}}),x2=Zl._export_sfc(k2,[["__scopeId","data-v-4172a886"]]),w2={class:"line-content"},_2={class:"line-time"},S2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,o=>{var s,h;r.value=(s=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:s.contents,n.value=(h=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:h.contents},{immediate:!0}),(o,s)=>(e.openBlock(),e.createBlock(x2,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:h,timestamp:c})=>[e.createElementVNode("span",w2,e.toDisplayString(h),1),e.createElementVNode("span",_2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),E2=Zl._export_sfc(S2,[["__scopeId","data-v-b4d9deed"]]),C2={class:"tabs-content"},D2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const n=a,r=l,o=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const s=C=>{r("change",C)},h=(C,M)=>{r("contentChange",C,M)},c=C=>{r("pageChange",C)},d=C=>{r("rowClick",C)},m=(C,M)=>{r("routeUrl",C,M)},b=C=>{r("clickTrigger",C)},u=(C,M)=>{r("clickMainKey",C,M)};return(C,M)=>{var k,W;return e.openBlock(),e.createElementBlock("div",C2,[(k=o.value)!=null&&k.length?(e.openBlock(),e.createBlock(sl.ssTab,{tabsContents:o.value,key:(W=o.value)==null?void 0:W.length},{pane:e.withCtx(({tab:I,index:j})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(I==null?void 0:I.comp)),{related:I==null?void 0:I.relatedTables,compNames:n==null?void 0:n.compNames,compName:I==null?void 0:I.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:s,index:(I==null?void 0:I.id)??j,config:{showIndex:I==null?void 0:I.showIndex,allowMove:I==null?void 0:I.allowMove,viewport:I==null?void 0:I.viewport,status:I==null?void 0:I.status},onContentChange:h,onPageChange:c,onRowClick:d,onRouteUrl:m,parentTableId:I==null?void 0:I.tableId,allMapContents:a.allMapContents,children:I==null?void 0:I.children,level:1,onClickTrigger:b,onClickMainKey:u},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),T2=Zl._export_sfc(D2,[["__scopeId","data-v-1ea318b4"]]),B2={class:"type-select"},N2=["onClick"],A2={class:"list-icon"},z2={__name:"modelSelect",setup(a){const l=Yn(A.pinia),{itemData:n}=A.storeToRefs(l),r=o=>{const s=A.cloneDeep(n.value);s.push({comp:o.comp,name:o.name,compData:[]}),l.setItemData(s)};return(o,s)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(su),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:d},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",A2,[e.createVNode(h,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,N2)]))),128))])}}},M2=Zl._export_sfc(z2,[["__scopeId","data-v-91799bf8"]]),I2={class:"fill-content"},O2={class:"operate-content"},L2={class:"collapse-title-content"},R2={class:"collapse-title-item"},$2={key:1},V2=["onClick"],P2={class:"icon-content"},F2={key:0,class:"edit-content"},j2=["onClick"],H2={class:"comp-child"},U2={__name:"modelFill",setup(a){const l=Yn(A.pinia),{itemData:n,originalData:r}=A.storeToRefs(l),o=e.ref([]);e.ref([]);const s=e.ref([]),h=e.ref([]),c=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!0),I));h.value=k},d=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!1),I));h.value=k,o.value=A.cloneDeep(n.value)},m=(M,k)=>{var L;let W=(L=A.cloneDeep(h.value))==null?void 0:L.map((E,x)=>(M===x&&(E.content=!1),E));h.value=W;const I=A.cloneDeep(n.value),j=I==null?void 0:I.filter((E,x)=>(x===M&&(E.name=k),E));l.setOriginalData(j),l.setItemData(j)};e.watch(()=>n.value,()=>{var M,k,W;!n.value||((M=n.value)==null?void 0:M.length)===0?o.value=[]:o.value=(k=A.cloneDeep(n.value))==null?void 0:k.filter(I=>(I==null?void 0:I.comp)!=="methodButton"),s.value=o.value,h.value=(W=A.cloneDeep(s.value))==null?void 0:W.map((I,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const b=M=>zi(M),u=(M,k,W)=>{var j,L;if(!M)return;let I=A.cloneDeep(n.value);I=(j=I==null?void 0:I.map((E,x)=>(x===W&&(E.compData=M),E)))==null?void 0:j.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),h.value=(L=A.cloneDeep(I))==null?void 0:L.map((E,x)=>({id:x,content:!1})),l.setOriginalData(I),l.setItemData(I)},C=M=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const k=A.cloneDeep(n.value),W=k==null?void 0:k.filter((I,j)=>j!==M);l.setOriginalData(W),l.setItemData(W),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(M,k)=>{const W=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",I2,[k[1]||(k[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",O2,[e.createVNode(ec.default,{class:"collapse-content",collapseContents:o.value},{title:e.withCtx(({item:I,index:j})=>{var L,E,x,w,g,S,$,V,ae,Z;return[e.createElementVNode("div",L2,[e.createElementVNode("div",R2,[(E=(L=h.value)==null?void 0:L.find(me=>me.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:I.name&&I.name!==""?"8px":"0px"})},e.toDisplayString(I.name),5)),(w=(x=h.value)==null?void 0:x.find(me=>me.id===j))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",$2,[e.createVNode(sl.ssInput,{modelValue:I.name,"onUpdate:modelValue":me=>I.name=me,onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(g=h.value)==null?void 0:g.find(me=>me.id===j))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(me=>c(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Edit",style:{width:"16px",height:"16px"}})],8,V2))]),e.createElementVNode("div",P2,[(V=($=h.value)==null?void 0:$.find(me=>me.id===j))!=null&&V.content?(e.openBlock(),e.createElementBlock("div",F2,[e.createVNode(W,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(me=>d(j),["stop"])},null,8,["onClick"]),e.createVNode(W,{name:"Save",onClick:e.withModifiers(me=>m(j,I.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Z=(ae=h.value)==null?void 0:ae.find(me=>me.id===j))!=null&&Z.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(me=>C(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Delete",style:{width:"16px",height:"16px"}})],8,j2))])])]}),content:e.withCtx(({item:I,index:j})=>{var L,E;return[e.createElementVNode("div",H2,[e.createTextVNode(e.toDisplayString(b(I.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:(E=(L=s.value)==null?void 0:L.find((x,w)=>w===j))==null?void 0:E.compData,onChange:x=>u(x,I,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},q2=Zl._export_sfc(U2,[["__scopeId","data-v-a46a44b9"]]),W2={key:0,class:"show-content"},K2={style:{display:"flex"}},G2={__name:"modelShow",setup(a){const l=Yn(A.pinia),{itemData:n}=A.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var s;!n.value||((s=n.value)==null?void 0:s.length)===0?r.value=[]:r.value=A.cloneDeep(n.value)},{deep:!0,immediate:!0});const o=s=>zi(s);return(s,h)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",W2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",K2,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Y2=Zl._export_sfc(G2,[["__scopeId","data-v-3f3e863e"]]),J2={class:"tabs-header"},X2={class:"tabs-list"},Z2={class:"tab-name"},Q2={class:"tab-actions"},e6=["onClick"],a6=["onClick"],l6=["onClick"],r6={class:"model-operate"},n6={class:"model-select",style:{display:"unset"}},i6={class:"existing-components"},o6={class:"component-list"},t6=["onClick"],s6={class:"component-info"},c6={class:"component-type"},u6={class:"component-name"},d6={class:"model-fill"},p6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(""),c=e.ref({title:""}),d=e.ref(-1),m=e.ref(!1),b=e.ref(-1),u=e.ref(new WeakMap),C=e.ref(null),M=Yn(A.pinia),{itemData:k}=A.storeToRefs(M),W=()=>{h.value="新增标签页",c.value.title="",d.value=-1,s.value=!0},I=fe=>{h.value="修改标签页",c.value.title=o.value[fe].title,d.value=fe,s.value=!0},j=fe=>{const N=x(fe);u.value.delete(N),o.value.splice(fe,1),$e()},L=()=>{if(c.value.title.trim()){if(d.value===-1){const fe={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};o.value.push(fe)}else o.value[d.value].title=c.value.title,o.value[d.value].value=c.value.title,o.value[d.value].label=c.value.title;s.value=!1,$e()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,x=fe=>{const N=o.value[fe];return N.id||(N.id=E()),N.id},w=fe=>{var U;b.value=fe;const N=x(fe);C.value=A.cloneDeep(k.value);let te=u.value.get(N);!te&&((U=o.value[fe].children)==null?void 0:U.length)>0&&(te=V(o.value[fe].children)),te?M.setItemData(A.cloneDeep(te)):M.setItemData([]),m.value=!0},g=e.computed(()=>{const fe=A.useModelComp(A.pinia),N=A.storeToRefs(fe).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(te=>{var U;if(te.comp==="Tabs"&&b.value>=0){const Ce=x(b.value);if((U=te.compData)==null?void 0:U.some(Pe=>{var ra;return Pe.key==="stepList"&&((ra=Pe.contents)==null?void 0:ra.some(Ta=>Ta.id===Ce))}))return!1}return!0})}),S=fe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[fe]||fe,$=fe=>{var N;try{const te=A.cloneDeep(fe);te.id=Date.now()+Math.random(),te.comp==="Tabs"&&((N=te.compData)==null||N.forEach(Ce=>{Ce.key==="stepList"&&Ce.contents&&Ce.contents.forEach(Me=>{Me.id=E()})}));const U=A.cloneDeep(k.value);U.push(te),M.setItemData(U)}catch(te){console.error("添加组件失败:",te)}},V=fe=>fe.map(N=>{var te;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:ae(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:Z(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((te=N.content)==null?void 0:te.originalData)||[]}}}),ae=fe=>{if(!fe)return[];const N=[];return fe.rowContents&&N.push({key:"formContent",contents:fe.rowContents}),fe.buttonValue&&N.push({key:"formButton",contents:fe.buttonValue}),typeof fe.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:fe.isEnableWrap}),N},Z=fe=>[],me=()=>{if(b.value>=0&&b.value<o.value.length){const fe=x(b.value);u.value.set(fe,A.cloneDeep(k.value)),o.value[b.value].children=ne(k.value),console.log("保存后的数据",ne(k.value))}m.value=!1,b.value=-1,C.value=null,$e()},Ae=()=>{C.value&&M.setItemData(A.cloneDeep(C.value)),m.value=!1,b.value=-1,C.value=null},F=()=>{m.value&&Ae()},ne=fe=>{if(!Array.isArray(fe))throw new Error("sourceData must be an array");return fe.map((N,te)=>{if(!N||typeof N!="object")return N;const{comp:U,name:Ce,compData:Me}=N;switch(U){case"Form":return{type:"form",content:J(Me||[]),value:"表单"};case"Table":return{type:"table",content:ce(Me||[]),value:"表格"};default:return{type:"xxx",content:Te(Me||[]),value:""}}})},J=fe=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},te={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return fe.forEach((U,Ce)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${Ce}:`,U);return}const{key:Me,contents:Pe}=U,ra=te[Me];if(!ra){console.warn(`Unknown Form config key: ${Me}`);return}Me==="enableWrap"?N[ra]=!!Pe:N[ra]=Array.isArray(Pe)?Pe:[]}),N},ce=fe=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},te={header:"columns",tableContents:"tableData"};return fe.forEach((U,Ce)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${Ce}:`,U);return}const{key:Me,contents:Pe}=U,ra=te[Me];if(!ra){console.warn(`Unknown Table config key: ${Me}`);return}N[ra]=Array.isArray(Pe)?Pe:[]}),N},Te=fe=>(console.log("Default conversion logic - to be implemented"),{originalData:fe,processed:!1,componentType:"unknown"}),$e=()=>{const fe=[{key:"stepList",contents:o.value}];r("change",fe)};return e.watch(()=>n.itemContents,fe=>{if(fe&&fe.length>0){const N=fe.find(te=>te.key==="stepList");N&&N.contents&&(o.value=N.contents.map(te=>({title:te.title||"",value:te.value||te.title||"",label:te.label||te.title||"",children:te.children||[],id:te.id||E()})))}},{immediate:!0,deep:!0}),(fe,N)=>{const te=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-input"),Ce=e.resolveComponent("el-form-item"),Me=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",J2,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:W},[e.createVNode(te,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",X2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(Pe,ra)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ra},[e.createElementVNode("span",Z2,e.toDisplayString(Pe.title),1),e.createElementVNode("div",Q2,[e.createElementVNode("button",{onClick:Ta=>I(ra)},"修改标题",8,e6),e.createElementVNode("button",{onClick:Ta=>w(ra)},"布局调整",8,a6),e.createElementVNode("button",{onClick:Ta=>j(ra)},"删除",8,l6)])]))),128))]),e.createVNode(Br.ssDialog,{modelValue:s.value,"onUpdate:modelValue":N[2]||(N[2]=Pe=>s.value=Pe),title:h.value,onBeforeDestroy:N[3]||(N[3]=Pe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=Pe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Me,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ce,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=Pe=>c.value.title=Pe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Br.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=Pe=>m.value=Pe),title:"布局调整",fullScreen:"",onBeforeDestroy:F},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ae},"取消"),e.createElementVNode("button",{onClick:me},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",r6,[e.createElementVNode("div",n6,[e.createVNode(M2),e.createElementVNode("div",i6,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,Pe=>(e.openBlock(),e.createElementBlock("div",{key:Pe.id,class:"component-item",onClick:ra=>$(Pe)},[e.createElementVNode("div",s6,[e.createElementVNode("span",c6,e.toDisplayString(S(Pe.comp)),1),e.createElementVNode("span",u6,e.toDisplayString(Pe.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,t6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:fe.innerWidth},[e.createVNode(Y2)])),e.createElementVNode("div",d6,[e.createVNode(q2)])])]),_:1},8,["modelValue"])])}}},f6=Zl._export_sfc(p6,[["__scopeId","data-v-9096ed0d"]]);function h6(){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 v6(a){return{type:"line",...a}}function m6(){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:[]},yAxis:[{type:"value"}],series:[]}}function y6(a){return{type:"bar",barWidth:"60%",...a}}function g6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function b6(a){return{type:"pie",radius:"80%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const k6=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),x6=a=>({type:"scatter",symbolSize:20,...a}),En={Line:{initBaseoptions:h6,initSeries:v6},Bar:{initBaseoptions:m6,initSeries:y6},Pie:{initBaseoptions:g6,initSeries:b6},Scatter:{initBaseoptions:k6,initSeries:x6}},w6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},_6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},S6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(M=>M==null?void 0:M.prop);let b=[];if(m==null||m.forEach(M=>{var k;b.push((k=n==null?void 0:n[0])==null?void 0:k[M])}),!m||!b)return d;const u=[];for(let M=0;M<m.length;M++){const k=m[M],W=b[M];u.push({name:k,value:W})}const C=c({data:u});return d.series.push(C),d},E6=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";let m=[];const b=l==null?void 0:l.map(M=>M==null?void 0:M.prop);if(m=b==null?void 0:b.map(M=>{var W;let k=[];return k.push(M),k.push((W=n==null?void 0:n[0])==null?void 0:W[M]),k}),!m)return d;const C=c({data:m});return d.series.push(C),d},C6=async(a=[])=>{var h,c,d;const l=((h=a==null?void 0:a.find(m=>m.key==="ChartType"))==null?void 0:h.contents)??{},n=((c=a==null?void 0:a.find(m=>m.key==="header"))==null?void 0:c.contents)??[],r=((d=a==null?void 0:a.find(m=>m.key==="tableContents"))==null?void 0:d.contents)??[];let{type:o}=l,s={};return o==="Line"&&(s=await w6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(s=await _6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(s=await S6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(s=await E6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),s},D6=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 l=a,n=e.ref({});e.onMounted(async()=>{const o=l==null?void 0:l.itemData;n.value=await C6(o)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Ou.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),T6=Zl._export_sfc(D6,[["__scopeId","data-v-d4c081e8"]]),B6={class:"chart-module layout"},N6={class:"chart-module content"},A6={class:"chart-module content"},z6={class:"form-content"},M6={class:"dialog-footer"},I6={class:"form-content"},O6={class:"dialog-footer"},L6={class:"form-content"},R6={class:"dialog-footer"},$6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),h=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],c=e.ref({}),d=()=>{var Se;s.value=h(),(Se=s.value)==null||Se.forEach(se=>{var Ge;const Be=se==null?void 0:se.prop;se.value=(Ge=c==null?void 0:c.value)==null?void 0:Ge[Be]}),o.visible=!0},m=Se=>{c.value=Se},b=()=>{var Se;o.visible=!1,r("change",(Se=ue())==null?void 0:Se.compData)},u=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=e.ref([]),M=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),W=()=>{const Se=C.value,se=A.cloneDeep(Se);return se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=k.value)==null?void 0:da[Ge]}),se},I=Se=>{var Be;k.value=Se;const se=W();C.value=se,r("change",(Be=ue())==null?void 0:Be.compData)},j=async()=>{const Se=await oe.getMenusContent(),se=W();se==null||se.forEach(Be=>{(Be==null?void 0:Be.prop)==="menu"&&(Be.contents=Se)}),C.value=se,u.visible=!0,await Pe(k.value.menu),await ee(k.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),x=()=>[{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:[]}],w=e.ref({}),g=()=>{const Se=E.value,se=A.cloneDeep(Se);return se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=w.value)==null?void 0:da[Ge]}),se},S=Se=>{var Be;w.value=Se;const se=g();E.value=se,r("change",(Be=ue())==null?void 0:Be.compData)},$=async()=>{await F();const Se=A.cloneDeep(V.value),se=g();se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=w==null?void 0:w.value)==null?void 0:da[Ge],Ge==="mainKey"&&(Be.contents=Se)}),E.value=se,L.visible=!0},V=e.ref([]),ae=e.ref([]),Z=e.ref({}),me=e.ref({}),Ae=()=>{const{compData:Se}=U.value||{},se=Se==null?void 0:Se.find(X=>{const{key:he}=X;return he==="header"}),Be=(se==null?void 0:se.contents)||[],Ge=Be==null?void 0:Be.filter((X,he)=>{const{label:de}=X;return de!=="操作"}),da=Ge==null?void 0:Ge.findIndex((X,he)=>{const{isMainKey:de}=X;return de});if(da<0)return[];const Ja=Se==null?void 0:Se.find(X=>{const{key:he}=X;return he==="tableContents"}),R=(Ja==null?void 0:Ja.contents)||[];return R==null?void 0:R.map(X=>{const he=X==null?void 0:X[0];let de=da;qa.isObject(he)&&(he!=null&&he.id)&&(de=de+1);const ma=X==null?void 0:X[de];return{label:ma,value:ma}})},F=async()=>{const Se=await Ae();V.value=Se},ne=async Se=>{const se=sessionStorage.getItem("systemKey");return await oe.getItemData(Se,se,"")},J=async Se=>{const se=Se;ae.value=se==null?void 0:se.map(Be=>{const{name:Ge}=Be;return Z.value[Ge]=Be,{label:Ge,value:Ge}})},ce=Se=>{const{comp:se,compData:Be}=me.value||{};if(se==="Table"){let Ge=g();Ge=Ge.filter(da=>{const{prop:Ja}=da;return Ja!=="formItems"}),ra(Ge,Be),E.value=Ge}},Te=async()=>{var Be,Ge;const Se=(Be=w==null?void 0:w.value)==null?void 0:Be.mainKey,se=(Ge=k==null?void 0:k.value)==null?void 0:Ge.menu;if(Se){const Ja=`${se==null?void 0:se.join("/")}^${Se}`,R=await ne(Ja);await J(R);const H=g();H==null||H.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=ae.value)}),E.value=H}};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.mainKey},async(Se,se)=>{Se!=se&&Se&&await Te()});const $e=async Se=>{const se=Z.value[Se];me.value=se,await ce()};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.group},async(Se,se)=>{Se!=se&&Se&&$e(Se)});const fe=async()=>{var se;await Te();const Se=(se=w.value)==null?void 0:se.group;await $e(Se)},N=e.ref([]),te=e.ref({}),U=e.ref({}),Ce=async Se=>{const se=Se==null?void 0:Se.join("/"),Be=sessionStorage.getItem("systemKey");return await oe.getItemData(se,Be,"")},Me=async Se=>{const se=await Ce(Se);N.value=se==null?void 0:se.map(Be=>{const{name:Ge}=Be;return te.value[Ge]=Be,{label:Ge,value:Ge}})},Pe=async(Se,se)=>{await Me(Se);const Be=W();Be==null||Be.forEach(Ge=>{(Ge==null?void 0:Ge.prop)==="group"&&(Ge.contents=N.value)}),C.value=Be};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.menu},async(Se,se)=>{const Be=Se==null?void 0:Se.join("/"),Ge=se==null?void 0:se.join("/");Be!=Ge&&await Pe(Se)});const ra=(Se,se)=>{const Be=se==null?void 0:se.find(R=>{const{key:H}=R;return H==="header"}),Ge=(Be==null?void 0:Be.contents)||[],da=Ge==null?void 0:Ge.filter((R,H)=>{const{label:X}=R;return X!=="操作"}),Ja=da==null?void 0:da.map((R,H)=>{const{label:X}=R;return{label:X,value:H}});Se==null||Se.forEach(R=>{const H=R==null?void 0:R.prop;(H==="nameCol"||H==="valueCol")&&(R.contents=Ja)})},Ta=Se=>{const{comp:se,compData:Be}=U.value||{};if(se==="Table"){k.value.formItems=[];let Ge=W();Ge=Ge.filter(da=>{const{prop:Ja}=da;return Ja!=="formItems"}),ra(Ge,Be),C.value=Ge}},ee=async Se=>{const se=te.value[Se];U.value=se,await Ta()};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.group},async(Se,se)=>{Se!=se&&ee(Se)});const pa=async()=>{var Be,Ge;const Se=(Be=k.value)==null?void 0:Be.menu;await Pe(Se);const se=(Ge=k.value)==null?void 0:Ge.group;await ee(se)},ue=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:k.value},{key:"chartDetailConfig",contents:w.value}]}),ua=()=>{o.visible=!1,u.visible=!1,L.visible=!1};return e.onMounted(async()=>{var se,Be,Ge;C.value=M(),E.value=x();const Se=n==null?void 0:n.itemContents;c.value=((se=Se==null?void 0:Se.find(da=>da.key==="chartBaseConfig"))==null?void 0:se.contents)??{},k.value=((Be=Se==null?void 0:Se.find(da=>da.key==="chartDataConfig"))==null?void 0:Be.contents)??{},await pa(),w.value=((Ge=Se==null?void 0:Se.find(da=>da.key==="chartDetailConfig"))==null?void 0:Ge.contents)??{},await fe()}),(Se,se)=>{const Be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",B6,[se[4]||(se[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[0]||(se[0]=Ge=>d())},{default:e.withCtx(()=>se[3]||(se[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",N6,[se[6]||(se[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[1]||(se[1]=Ge=>j())},{default:e.withCtx(()=>se[5]||(se[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",A6,[se[8]||(se[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[2]||(se[2]=Ge=>$())},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:ua,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Be,{class:"ok-button button",onClick:b,id:"themeButton"},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ua,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[11]||(se[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Be,{class:"ok-button button",onClick:ua,id:"themeButton"},{default:e.withCtx(()=>se[12]||(se[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:ua,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",L6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",R6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[13]||(se[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Be,{class:"ok-button button",onClick:ua,id:"themeButton"},{default:e.withCtx(()=>se[14]||(se[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),V6=Zl._export_sfc($6,[["__scopeId","data-v-fe119645"]]),P6={class:"layout"},F6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const o=e.computed(()=>A.cloneDeep(r==null?void 0:r.itemData)||[]),s=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="baseConfig"});return m==null?void 0:m.contents}),h=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=A.cloneDeep(h.value)||[];const b=m.length;let u=0;const C=[];if(m=m.map(M=>{const k=M.span;return k?(M.span=Number(k),u=u+M.span):C.push(M),M}),u<24){const M=Math.floor((24-u)/b);C.forEach(k=>{k.span=M})}return m}),d=m=>{n("rowClick",m)};return(m,b)=>{var M;const u=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",P6,[e.createVNode(C,{style:e.normalizeStyle({height:(M=s.value)==null?void 0:M.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,W)=>(e.openBlock(),e.createBlock(u,{span:k==null?void 0:k.span},{default:e.withCtx(()=>{var I;return[e.unref(Ai)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(k.comp)),{key:e.unref(Gn),compName:k.name,index:(k==null?void 0:k.id)??W,height:(I=s.value)==null?void 0:I.height,itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,onChange:e.unref(Io),onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),onRowClick:d},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),j6=Zl._export_sfc(F6,[["__scopeId","data-v-ab9a36ed"]]),H6={class:"layout-operate"},U6={class:"layout-module"},q6={class:"collapse-title-item"},W6={class:"collapse-title"},K6={class:"icon-content"},G6=["onClick"],Y6={class:"comp-child"},J6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{W()});const o=e.ref({}),s=e.ref({}),h=e.ref([]),c=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],d=w=>{s.value=w,r("change",x(),!0)},m=e.ref([]),b=e.ref([]),u=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=n==null?void 0:n.itemContents;return A.cloneDeep(w)}),M=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="baseConfig"});return g==null?void 0:g.contents}),k=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="children"});return g==null?void 0:g.contents}),W=()=>{var w;o.value=C.value||{},m.value=(k==null?void 0:k.value)||[],h.value=c(),h.value=(w=h.value)==null?void 0:w.map(g=>{var $;const{prop:S}=g;return g.value=($=M.value)==null?void 0:$[S],g})};e.watch(()=>{var w;return(w=k==null?void 0:k.value)==null?void 0:w.length},()=>{var w;m.value=(k==null?void 0:k.value)||[],b.value=(w=k.value)==null?void 0:w.map(g=>u(g))},{immediate:!0});const I=(w,g)=>{const S=A.cloneDeep(k==null?void 0:k.value);S[g].span=w.span,m.value=S,r("change",x(),!0)},j=w=>zi(w),L=(w,g,S)=>{if(!w)return;const $=A.cloneDeep(k==null?void 0:k.value);$[S]&&($[S].compData=w,m.value=$,r("change",x(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let g=A.cloneDeep(k==null?void 0:k.value);g=g==null?void 0:g.filter((S,$)=>w!==$),m.value=g,r("change",x(),!0),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,g)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",H6,[e.createElementVNode("div",U6,[g[1]||(g[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(sl.ssForm,{rowContents:h.value,isEnableWrap:!0,onChange:g[0]||(g[0]=$=>d($))},null,8,["rowContents"])])]),e.createVNode(ec.default,{class:"collapse-content",collapseContents:k.value},{title:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",q6,[e.createElementVNode("div",W6,e.toDisplayString($.name),1),e.createElementVNode("div",K6,[e.createElementVNode("div",{onClick:e.withModifiers(ae=>E(V),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,G6)])])]),content:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",Y6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:b.value[V],key:V,isEnableWrap:!0,onChange:ae=>I(ae,V)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:ae=>L(ae,$,V)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),X6=Zl._export_sfc(J6,[["__scopeId","data-v-ba05456e"]]),Z6=typeof window<"u";var Ds;Z6&&((Ds=window==null?void 0:window.navigator)!=null&&Ds.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kn(a){return a==null}function jc(){}const Q6=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(Q6)));function e1(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(o=>{o(...n)})}}}function Ts(a,l=16){if(typeof a!="function")return jc;const n=(...s)=>{a(...s)};if(l<=0)return Hc(n);let r=0,o;return function(...s){const h=Date.now(),c=h-r;clearTimeout(o),c>=l?(r=h,n(...s)):o=setTimeout(()=>{r=Date.now(),n(...s)},Math.max(0,l-c))}}function a1(a,l=100){if(typeof a!="function")return jc;const n=(...o)=>{a(...o)};if(l<=0)return Hc(n);let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{n(...o)},l)}}function Hc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...o){return n=o,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Gi=new Set,Uc=new WeakMap;function l1(){Gi.forEach(a=>{a(...Uc.get(a))}),Gi.clear()}function un(a,...l){if(typeof a!="function")return a;Uc.set(a,l),!Gi.has(a)&&(Gi.add(a),Gi.size===1&&Promise.resolve().then(l1))}const qc=Symbol("LAYOUT_KEY"),Wc=Symbol("EMITTER_KEY");function r1(a){let l=0,n;for(let r=0,o=a.length;r<o;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function Tt(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=n1(a[n]);return l}function n1(a){return{...a}}function Kc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function Ci(a,l,n){const r=Yc(a),o=Jc(a),s=Array(a.length);for(let h=0,c=o.length;h<c;h++){let d=o[h];d.static||(d=i1(r,d,l,n),r.push(d)),s[a.findIndex(m=>m.i===d.i)]=d,d.moved=!1}return s}function i1(a,l,n,r){if(n)for(;l.y>0&&!Yi(a,l);)l.y--;else if(r){const s=r[l.i].y;for(;l.y>s&&!Yi(a,l);)l.y--}let o;for(;o=Yi(a,l);)l.y=o.y+o.h;return l}function o1(a,l){const n=Yc(a);for(let r=0,o=a.length;r<o;r++){const s=a[r];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)n.push(s);else for(;Yi(n,s);)s.y++}return a}function Bs(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function Yi(a,l){for(let n=0,r=a.length;n<r;n++)if(Kc(a[n],l))return a[n]}function Gc(a,l){return a.filter(n=>Kc(n,l))}function Yc(a){return a.filter(l=>l.static)}function Bt(a,l,n,r,o=!1,s=!1){if(l.static)return a;const h=l.x,c=l.y,d=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=Jc(a);d&&(m=m.reverse());const b=Gc(m,l);if(s&&b.length)return l.x=h,l.y=c,l.moved=!1,a;for(let u=0,C=b.length;u<C;u++){const M=b[u];M.moved||l.y>M.y&&l.y-M.y>M.h/4||(M.static?a=Ns(a,M,l,o):a=Ns(a,l,M,o))}return a}function Ns(a,l,n,r){if(r){const o={x:n.x,y:n.y,w:n.w,h:n.h};if(o.y=Math.max(l.y-n.h,0),!Yi(a,o))return Bt(a,n,void 0,o.y,!1)}return Bt(a,n,void 0,n.y+1,!1)}function s1(a,l,n,r){const o="translate3d("+l+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function c1(a,l,n,r){const o="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function u1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function d1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function Jc(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function p1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let o=0,s=a.length;o<s;o++){const h=a[o];for(let c=0;c<n.length;c++)if(typeof h[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+o+"]."+n[c]+" must be a number!");if(h.i===void 0||h.i===null)throw new Error("VueGridLayout: "+l+"["+o+"].i cannot be null!");if(typeof h.i!="number"&&typeof h.i!="string")throw new Error("VueGridLayout: "+l+"["+o+"].i must be a string or number!");if(r.indexOf(h.i)>=0)throw new Error("VueGridLayout: "+l+"["+o+"].i must be unique!");if(r.push(h.i),h.static!==void 0&&typeof h.static!="boolean")throw new Error("VueGridLayout: "+l+"["+o+"].static must be a boolean!")}}function f1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,o)=>`${n()}__${r}--${o}`}}function As(a){return h1(a)}function h1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),o=a.clientX+n.scrollLeft-r.left,s=a.clientY+n.scrollTop-r.top;return{x:o,y:s}}function zs(a,l,n,r){return v1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function v1(a){return typeof a=="number"&&!Number.isNaN(a)}function m1(a,l){const n=Zc(a);let r=n[0];for(let o=1,s=n.length;o<s;o++){const h=n[o];l>a[h]&&(r=h)}return r}function Xc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function y1(a,l,n,r,o,s,h){if(l[r])return Tt(l[r]);let c=a;const d=Zc(n),m=d.slice(d.indexOf(r));for(let b=0,u=m.length;b<u;b++){const C=m[b];if(l[C]){c=l[C];break}}return c=Tt(c||[]),Ci(o1(c,{cols:s}),h)}function Zc(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let g1="auto";function b1(){return typeof document<"u"}function Ms(){return b1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):g1}var Wi={exports:{}},k1=Wi.exports,Is;function x1(){return Is||(Is=1,function(a,l){(function(n,r){a.exports=r()})(k1,function(){function n(t,i){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);i&&(y=y.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),f.push.apply(f,y)}return f}function r(t){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?n(Object(f),!0).forEach(function(y){d(t,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(f,y))})}return t}function o(t){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(t)}function s(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function h(t,i){for(var f=0;f<i.length;f++){var y=i[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,W(y.key),y)}}function c(t,i,f){return i&&h(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,i,f){return(i=W(i))in t?Object.defineProperty(t,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[i]=f,t}function m(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&u(t,i)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},b(t)}function u(t,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,y){return f.__proto__=y,f},u(t,i)}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){var i=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 f,y=b(t);if(i){var _=b(this).constructor;f=Reflect.construct(y,arguments,_)}else f=y.apply(this,arguments);return function(O,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(O)}(this,f)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,f){var y=function(O,K){for(;!Object.prototype.hasOwnProperty.call(O,K)&&(O=b(O))!==null;);return O}(t,i);if(y){var _=Object.getOwnPropertyDescriptor(y,i);return _.get?_.get.call(arguments.length<3?t:f):_.value}},k.apply(this,arguments)}function W(t){var i=function(f,y){if(typeof f!="object"||f===null)return f;var _=f[Symbol.toPrimitive];if(_!==void 0){var O=_.call(f,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof i=="symbol"?i:i+""}var I=function(t){return!(!t||!t.Window)&&t instanceof t.Window},j=void 0,L=void 0;function E(t){j=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),L=t}function x(t){return I(t)?t:(t.ownerDocument||t).defaultView||L.window}typeof window<"u"&&window&&E(window);var w=function(t){return!!t&&o(t)==="object"},g=function(t){return typeof t=="function"},S={window:function(t){return t===L||I(t)},docFrag:function(t){return w(t)&&t.nodeType===11},object:w,func:g,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||o(t)!=="object")return!1;var i=x(t)||L;return/object|function/.test(typeof Element>"u"?"undefined":o(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return w(t)&&t.length!==void 0&&g(t.splice)}};function $(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function V(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var y=f.prepared.axis;if(y==="x"||y==="y"){var _=y==="x"?"y":"x";i.page[_]=f.coords.start.page[_],i.client[_]=f.coords.start.client[_],i.delta[_]=0}}}var ae={id:"actions/drag",install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.draggable=ae.draggable,i.map.drag=ae,i.methodDict.drag="draggable",y.actions.drag=ae.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":V,"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.buttons,_=f.options.drag;if(_&&_.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(t){return S.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):S.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:$,move:V,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Z=ae,me={init:function(t){var i=t;me.document=i.document,me.DocumentFragment=i.DocumentFragment||Ae,me.SVGElement=i.SVGElement||Ae,me.SVGSVGElement=i.SVGSVGElement||Ae,me.SVGElementInstance=i.SVGElementInstance||Ae,me.Element=i.Element||Ae,me.HTMLElement=i.HTMLElement||me.Element,me.Event=i.Event,me.Touch=i.Touch||Ae,me.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ae(){}var F=me,ne={init:function(t){var i=F.Element,f=t.navigator||{};ne.supportsTouch="ontouchstart"in t||S.func(t.DocumentTouch)&&F.document instanceof t.DocumentTouch,ne.supportsPointerEvent=f.pointerEnabled!==!1&&!!F.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(f.platform),ne.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ne.isIe9=/MSIE 9/.test(f.userAgent),ne.isOperaMobile=f.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(f.userAgent),ne.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?F.PointerEvent===t.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,ne.wheelEvent=F.document&&"onmousewheel"in F.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},J=ne;function ce(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function Te(t,i){for(;S.element(t);){if(fe(t,i))return t;t=$e(t)}return null}function $e(t){var i=t.parentNode;if(S.docFrag(i)){for(;(i=i.host)&&S.docFrag(i););return i}return i}function fe(t,i){return L!==j&&(i=i.replace(/\/deep\//g," ")),t[J.prefixedMatchesSelector](i)}var N=function(t){return t.parentNode||t.host};function te(t,i){for(var f,y=[],_=t;(f=N(_))&&_!==i&&f!==_.ownerDocument;)y.unshift(_),_=f;return y}function U(t,i,f){for(;S.element(t);){if(fe(t,i))return!0;if((t=$e(t))===f)return fe(t,i)}return!1}function Ce(t){return t.correspondingUseElement||t}function Me(t){var i=t instanceof F.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function Pe(t){var i,f=Me(t);if(!J.isIOS7&&f){var y={x:(i=(i=x(t))||L).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=y.x,f.right+=y.x,f.top+=y.y,f.bottom+=y.y}return f}function ra(t){for(var i=[];t;)i.push(t),t=$e(t);return i}function Ta(t){return!!S.string(t)&&(F.document.querySelector(t),!0)}function ee(t,i){for(var f in i)t[f]=i[f];return t}function pa(t,i,f){return t==="parent"?$e(f):t==="self"?i.getRect(f):Te(f,t)}function ue(t,i,f,y){var _=t;return S.string(_)?_=pa(_,i,f):S.func(_)&&(_=_.apply(void 0,y)),S.element(_)&&(_=Pe(_)),_}function ua(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Se(t){return!t||"x"in t&&"y"in t||((t=ee({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function se(t,i,f){t.left&&(i.left+=f.x),t.right&&(i.right+=f.x),t.top&&(i.top+=f.y),t.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Be(t,i,f){var y=f&&t.options[f];return ua(ue(y&&y.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function Ge(t,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ge){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},S.string(t)&&t.search(" ")!==-1&&(t=da(t)),S.array(t))return t.forEach(function(ge){return Ge(ge,i,f,y)}),y;if(S.object(t)&&(i=t,t=""),S.func(i)&&f(t))y[t]=y[t]||[],y[t].push(i);else if(S.array(i))for(var _=0,O=i;_<O.length;_++){var K=O[_];Ge(t,K,f,y)}else if(S.object(i))for(var Q in i)Ge(da(Q).map(function(ge){return"".concat(t).concat(ge)}),i[Q],f,y);return y}function da(t){return t.trim().split(/ +/)}var Ja=function(t,i){return Math.sqrt(t*t+i*i)},R=["webkit","moz"];function H(t,i){t.__set||(t.__set={});var f=function(_){if(R.some(function(O){return _.indexOf(O)===0}))return 1;typeof t[_]!="function"&&_!=="__set"&&Object.defineProperty(t,_,{get:function(){return _ in t.__set?t.__set[_]:t.__set[_]=i[_]},set:function(O){t.__set[_]=O},configurable:!0})};for(var y in i)f(y);return t}function X(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function he(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function de(t){return t instanceof F.Event||t instanceof F.Touch}function ma(t,i,f){return t=t||"page",(f=f||{}).x=i[t+"X"],f.y=i[t+"Y"],f}function oa(t,i){return i=i||{x:0,y:0},J.isOperaMobile&&de(t)?(ma("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):ma("page",t,i),i}function Ve(t){return S.number(t.pointerId)?t.pointerId:t.identifier}function _a(t,i,f){var y=i.length>1?ya(i):i[0];oa(y,t.page),function(_,O){O=O||{},J.isOperaMobile&&de(_)?ma("screen",_,O):ma("client",_,O)}(y,t.client),t.timeStamp=f}function ze(t){var i=[];return S.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ya(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var y=t[f];for(var _ in i)i[_]+=y[_]}for(var O in i)i[O]/=t.length;return i}function La(t){if(!t.length)return null;var i=ze(t),f=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),_=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:f,y,left:f,top:y,right:_,bottom:O,width:_-f,height:O-y}}function za(t,i){var f=i+"X",y=i+"Y",_=ze(t),O=_[0][f]-_[1][f],K=_[0][y]-_[1][y];return Ja(O,K)}function ha(t,i){var f=i+"X",y=i+"Y",_=ze(t),O=_[1][f]-_[0][f],K=_[1][y]-_[0][y];return 180*Math.atan2(K,O)/Math.PI}function Ca(t){return S.string(t.pointerType)?t.pointerType:S.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof F.Touch?"touch":"mouse"}function Ne(t){var i=S.func(t.composedPath)?t.composedPath():t.path;return[Ce(i?i[0]:t.target),Ce(t.currentTarget)]}var ye=function(){function t(i){s(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return c(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(ye.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Y=function(t,i){for(var f=0;f<i.length;f++){var y=i[f];t.push(y)}return t},xe=function(t){return Y([],t)},pe=function(t,i){for(var f=0;f<t.length;f++)if(i(t[f],f,t))return f;return-1},qe=function(t,i){return t[pe(t,i)]},sa=function(t){m(f,t);var i=M(f);function f(y,_,O){var K;s(this,f),(K=i.call(this,_._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ge=Q.element,Fe=Q.dropzone;return K.type=O,K.target=ge,K.currentTarget=ge,K.dropzone=Fe,K.dragEvent=_,K.relatedTarget=_.target,K.draggable=_.interactable,K.timeStamp=_.timeStamp,K}return c(f,[{key:"reject",value:function(){var y=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=_.activeDrops,K=pe(O,function(ge){var Fe=ge.dropzone,Ee=ge.element;return Fe===y.dropzone&&Ee===y.target});_.activeDrops.splice(K,1);var Q=new f(_,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(ye);function $a(t,i){for(var f=0,y=t.slice();f<y.length;f++){var _=y[f],O=_.dropzone,K=_.element;i.dropzone=O,i.target=K,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function Ma(t,i){for(var f=function(O,K){for(var Q=[],ge=0,Fe=O.interactables.list;ge<Fe.length;ge++){var Ee=Fe[ge];if(Ee.options.drop.enabled){var na=Ee.options.drop.accept;if(!(S.element(na)&&na!==K||S.string(na)&&!fe(K,na)||S.func(na)&&!na({dropzone:Ee,draggableElement:K})))for(var Da=0,Qa=Ee.getAllElements();Da<Qa.length;Da++){var Ka=Qa[Da];Ka!==K&&Q.push({dropzone:Ee,element:Ka,rect:Ee.getRect(Ka)})}}}return Q}(t,i),y=0;y<f.length;y++){var _=f[y];_.rect=_.dropzone.getRect(_.element)}return f}function Va(t,i,f){for(var y=t.dropState,_=t.interactable,O=t.element,K=[],Q=0,ge=y.activeDrops;Q<ge.length;Q++){var Fe=ge[Q],Ee=Fe.dropzone,na=Fe.element,Da=Fe.rect,Qa=Ee.dropCheck(i,f,_,O,na,Da);K.push(Qa?na:null)}var Ka=function(nl){for(var wl,gl,Tl,Ul=[],Bl=0;Bl<nl.length;Bl++){var Ll=nl[Bl],Ol=nl[wl];if(Ll&&Bl!==wl)if(Ol){var rn=N(Ll),or=N(Ol);if(rn!==Ll.ownerDocument)if(or!==Ll.ownerDocument)if(rn!==or){Ul=Ul.length?Ul:te(Ol);var cn=void 0;if(Ol instanceof F.HTMLElement&&Ll instanceof F.SVGElement&&!(Ll instanceof F.SVGSVGElement)){if(Ll===or)continue;cn=Ll.ownerSVGElement}else cn=Ll;for(var bn=te(cn,Ol.ownerDocument),Tn=0;bn[Tn]&&bn[Tn]===Ul[Tn];)Tn++;var bi=[bn[Tn-1],bn[Tn],Ul[Tn]];if(bi[0])for(var ii=bi[0].lastChild;ii;){if(ii===bi[1]){wl=Bl,Ul=bn;break}if(ii===bi[2])break;ii=ii.previousSibling}}else Tl=Ol,(parseInt(x(gl=Ll).getComputedStyle(gl).zIndex,10)||0)>=(parseInt(x(Tl).getComputedStyle(Tl).zIndex,10)||0)&&(wl=Bl);else wl=Bl}else wl=Bl}return wl}(K);return y.activeDrops[Ka]||null}function Ue(t,i,f){var y=t.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(_.activate=new sa(y,f,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),f.type==="dragend"&&(_.deactivate=new sa(y,f,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(_.leave=new sa(y,f,"dragleave"),f.dragLeave=_.leave.target=y.prev.element,f.prevDropzone=_.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(_.enter=new sa(y,f,"dragenter"),f.dragEnter=y.cur.element,f.dropzone=y.cur.dropzone)),f.type==="dragend"&&y.cur.dropzone&&(_.drop=new sa(y,f,"drop"),f.dropzone=y.cur.dropzone,f.relatedTarget=y.cur.element),f.type==="dragmove"&&y.cur.dropzone&&(_.move=new sa(y,f,"dropmove"),f.dropzone=y.cur.dropzone)),_}function Ie(t,i){var f=t.dropState,y=f.activeDrops,_=f.cur,O=f.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&_.dropzone.fire(i.enter),i.move&&_.dropzone.fire(i.move),i.drop&&_.dropzone.fire(i.drop),i.deactivate&&$a(y,i.deactivate),f.prev.dropzone=_.dropzone,f.prev.element=_.element}function aa(t,i){var f=t.interaction,y=t.iEvent,_=t.event;if(y.type==="dragmove"||y.type==="dragend"){var O=f.dropState;i.dynamicDrop&&(O.activeDrops=Ma(i,f.element));var K=y,Q=Va(f,K,_);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=Ue(f,0,K)}}var ke={id:"actions/drop",install:function(t){var i=t.actions,f=t.interactStatic,y=t.Interactable,_=t.defaults;t.usePlugin(Z),y.prototype.dropzone=function(O){return function(K,Q){if(S.object(Q)){if(K.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ge=Ge(Q.listeners),Fe=Object.keys(ge).reduce(function(na,Da){return na[/^(enter|leave)/.test(Da)?"drag".concat(Da):/^(activate|deactivate|move)/.test(Da)?"drop".concat(Da):Da]=ge[Da],na},{}),Ee=K.options.drop.listeners;Ee&&K.off(Ee),K.on(Fe),K.options.drop.listeners=Fe}return S.func(Q.ondrop)&&K.on("drop",Q.ondrop),S.func(Q.ondropactivate)&&K.on("dropactivate",Q.ondropactivate),S.func(Q.ondropdeactivate)&&K.on("dropdeactivate",Q.ondropdeactivate),S.func(Q.ondragenter)&&K.on("dragenter",Q.ondragenter),S.func(Q.ondragleave)&&K.on("dragleave",Q.ondragleave),S.func(Q.ondropmove)&&K.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?K.options.drop.overlap=Q.overlap:S.number(Q.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(K.options.drop.accept=Q.accept),"checker"in Q&&(K.options.drop.checker=Q.checker),K}return S.bool(Q)?(K.options.drop.enabled=Q,K):K.options.drop}(this,O)},y.prototype.dropCheck=function(O,K,Q,ge,Fe,Ee){return function(na,Da,Qa,Ka,nl,wl,gl){var Tl=!1;if(!(gl=gl||na.getRect(wl)))return!!na.options.drop.checker&&na.options.drop.checker(Da,Qa,Tl,na,wl,Ka,nl);var Ul=na.options.drop.overlap;if(Ul==="pointer"){var Bl=Be(Ka,nl,"drag"),Ll=oa(Da);Ll.x+=Bl.x,Ll.y+=Bl.y;var Ol=Ll.x>gl.left&&Ll.x<gl.right,rn=Ll.y>gl.top&&Ll.y<gl.bottom;Tl=Ol&&rn}var or=Ka.getRect(nl);if(or&&Ul==="center"){var cn=or.left+or.width/2,bn=or.top+or.height/2;Tl=cn>=gl.left&&cn<=gl.right&&bn>=gl.top&&bn<=gl.bottom}return or&&S.number(Ul)&&(Tl=Math.max(0,Math.min(gl.right,or.right)-Math.max(gl.left,or.left))*Math.max(0,Math.min(gl.bottom,or.bottom)-Math.max(gl.top,or.top))/(or.width*or.height)>=Ul),na.options.drop.checker&&(Tl=na.options.drop.checker(Da,Qa,Tl,na,wl,Ka,nl)),Tl}(this,O,K,Q,ge,Fe,Ee)},f.dynamicDrop=function(O){return S.bool(O)?(t.dynamicDrop=O,f):t.dynamicDrop},ee(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,_.actions.drop=ke.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var f=t.interaction,y=(t.event,t.iEvent);if(f.prepared.name==="drag"){var _=f.dropState;_.activeDrops=[],_.events={},_.activeDrops=Ma(i,f.element),_.events=Ue(f,0,y),_.events.activate&&($a(_.activeDrops,_.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:y}))}},"interactions:action-move":aa,"interactions:after-action-move":function(t,i){var f=t.interaction,y=t.iEvent;if(f.prepared.name==="drag"){var _=f.dropState;Ie(f,_.events),i.fire("actions/drop:move",{interaction:f,dragEvent:y}),_.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var f=t.interaction,y=t.iEvent;aa(t,i),Ie(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:y})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:Ma,getDrop:Va,getDropEvents:Ue,fireDropEvents:Ie,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},We=ke;function tl(t){var i=t.interaction,f=t.iEvent,y=t.phase;if(i.prepared.name==="gesture"){var _=i.pointers.map(function(Fe){return Fe.pointer}),O=y==="start",K=y==="end",Q=i.interactable.options.deltaSource;if(f.touches=[_[0],_[1]],O)f.distance=za(_,Q),f.box=La(_),f.scale=1,f.ds=0,f.angle=ha(_,Q),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(K||i.pointers.length<2){var ge=i.prevEvent;f.distance=ge.distance,f.box=ge.box,f.scale=ge.scale,f.ds=0,f.angle=ge.angle,f.da=0}else f.distance=za(_,Q),f.box=La(_),f.scale=f.distance/i.gesture.startDistance,f.angle=ha(_,Q),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,S.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var Cl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.gesturable=function(_){return S.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):S.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},i.map.gesture=Cl,i.methodDict.gesture="gesturable",y.actions.gesture=Cl.defaults},listeners:{"interactions:action-start":tl,"interactions:action-move":tl,"interactions:action-end":tl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},El=Cl;function Vl(t,i,f,y,_,O,K){if(!i)return!1;if(i===!0){var Q=S.number(O.width)?O.width:O.right-O.left,ge=S.number(O.height)?O.height:O.bottom-O.top;if(K=Math.min(K,Math.abs((t==="left"||t==="right"?Q:ge)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),ge<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Fe=Q>=0?O.left:O.right;return f.x<Fe+K}if(t==="top"){var Ee=ge>=0?O.top:O.bottom;return f.y<Ee+K}if(t==="right")return f.x>(Q>=0?O.right:O.left)-K;if(t==="bottom")return f.y>(ge>=0?O.bottom:O.top)-K}return!!S.element(y)&&(S.element(i)?i===y:U(y,i,_))}function _l(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var y=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=f.resizeAxes,f.resizeAxes==="x"?y.delta.y=0:f.resizeAxes==="y"&&(y.delta.x=0))}}var jl,Qe,Xa={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,f=t.browser,y=t.Interactable,_=t.defaults;Xa.cursors=function(O){return O.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"}}(f),Xa.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(K,Q,ge){return S.object(Q)?(K.options.resize.enabled=Q.enabled!==!1,K.setPerAction("resize",Q),K.setOnEvents("resize",Q),S.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?K.options.resize.axis=Q.axis:Q.axis===null&&(K.options.resize.axis=ge.defaults.actions.resize.axis),S.bool(Q.preserveAspectRatio)?K.options.resize.preserveAspectRatio=Q.preserveAspectRatio:S.bool(Q.square)&&(K.options.resize.square=Q.square),K):S.bool(Q)?(K.options.resize.enabled=Q,K):K.options.resize}(this,O,t)},i.map.resize=Xa,i.methodDict.resize="resizable",_.actions.resize=Xa.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.rect;y._rects={start:ee({},O),corrected:ee({},O),previous:ee({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=y.prepared.edges,_.rect=y._rects.corrected,_.deltaRect=y._rects.delta}})(t),_l(t)},"interactions:action-move":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.interactable.options.resize.invert,K=O==="reposition"||O==="negate",Q=y.rect,ge=y._rects,Fe=ge.start,Ee=ge.corrected,na=ge.delta,Da=ge.previous;if(ee(Da,Ee),K){if(ee(Ee,Q),O==="reposition"){if(Ee.top>Ee.bottom){var Qa=Ee.top;Ee.top=Ee.bottom,Ee.bottom=Qa}if(Ee.left>Ee.right){var Ka=Ee.left;Ee.left=Ee.right,Ee.right=Ka}}}else Ee.top=Math.min(Q.top,Fe.bottom),Ee.bottom=Math.max(Q.bottom,Fe.top),Ee.left=Math.min(Q.left,Fe.right),Ee.right=Math.max(Q.right,Fe.left);for(var nl in Ee.width=Ee.right-Ee.left,Ee.height=Ee.bottom-Ee.top,Ee)na[nl]=Ee[nl]-Da[nl];_.edges=y.prepared.edges,_.rect=Ee,_.deltaRect=na}})(t),_l(t)},"interactions:action-end":function(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var y=i;y.edges=f.prepared.edges,y.rect=f._rects.corrected,y.deltaRect=f._rects.delta}},"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.element,_=t.rect,O=t.buttons;if(_){var K=ee({},i.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(S.object(Q.edges)){var ge={left:!1,right:!1,top:!1,bottom:!1};for(var Fe in ge)ge[Fe]=Vl(Fe,Q.edges[Fe],K,i._latestPointer.eventTarget,y,_,Q.margin||Xa.defaultMargin);ge.left=ge.left&&!ge.right,ge.top=ge.top&&!ge.bottom,(ge.left||ge.right||ge.top||ge.bottom)&&(t.action={name:"resize",edges:ge})}else{var Ee=Q.axis!=="y"&&K.x>_.right-Xa.defaultMargin,na=Q.axis!=="x"&&K.y>_.bottom-Xa.defaultMargin;(Ee||na)&&(t.action={name:"resize",axes:(Ee?"x":"")+(na?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,f=t.axis,y=t.name,_=Xa.cursors,O=null;if(f)O=_[y+f];else if(i){for(var K="",Q=0,ge=["top","bottom","left","right"];Q<ge.length;Q++){var Fe=ge[Q];i[Fe]&&(K+=Fe)}O=_[K]}return O},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},ba=Xa,ll={id:"actions",install:function(t){t.usePlugin(El),t.usePlugin(ba),t.usePlugin(Z),t.usePlugin(We)}},Ia=0,il={request:function(t){return jl(t)},cancel:function(t){return Qe(t)},init:function(t){if(jl=t.requestAnimationFrame,Qe=t.cancelAnimationFrame,!jl)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var y=i[f];jl=t["".concat(y,"RequestAnimationFrame")],Qe=t["".concat(y,"CancelAnimationFrame")]||t["".concat(y,"CancelRequestAnimationFrame")]}jl=jl&&jl.bind(t),Qe=Qe&&Qe.bind(t),jl||(jl=function(_){var O=Date.now(),K=Math.max(0,16-(O-Ia)),Q=t.setTimeout(function(){_(O+K)},K);return Ia=O+K,Q},Qe=function(_){return clearTimeout(_)})}},rl={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(t){rl.isScrolling=!0,il.cancel(rl.i),t.autoScroll=rl,rl.interaction=t,rl.prevTime=rl.now(),rl.i=il.request(rl.scroll)},stop:function(){rl.isScrolling=!1,rl.interaction&&(rl.interaction.autoScroll=null),il.cancel(rl.i)},scroll:function(){var t=rl.interaction,i=t.interactable,f=t.element,y=t.prepared.name,_=i.options[y].autoScroll,O=_e(_.container,i,f),K=rl.now(),Q=(K-rl.prevTime)/1e3,ge=_.speed*Q;if(ge>=1){var Fe={x:rl.x*ge,y:rl.y*ge};if(Fe.x||Fe.y){var Ee=Oa(O);S.window(O)?O.scrollBy(Fe.x,Fe.y):O&&(O.scrollLeft+=Fe.x,O.scrollTop+=Fe.y);var na=Oa(O),Da={x:na.x-Ee.x,y:na.y-Ee.y};(Da.x||Da.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:Da,interaction:t,container:O})}rl.prevTime=K}rl.isScrolling&&(il.cancel(rl.i),rl.i=il.request(rl.scroll))},check:function(t,i){var f;return(f=t.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var i=t.interaction,f=t.pointer;if(i.interacting()&&rl.check(i.interactable,i.prepared.name))if(i.simulation)rl.x=rl.y=0;else{var y,_,O,K,Q=i.interactable,ge=i.element,Fe=i.prepared.name,Ee=Q.options[Fe].autoScroll,na=_e(Ee.container,Q,ge);if(S.window(na))K=f.clientX<rl.margin,y=f.clientY<rl.margin,_=f.clientX>na.innerWidth-rl.margin,O=f.clientY>na.innerHeight-rl.margin;else{var Da=Me(na);K=f.clientX<Da.left+rl.margin,y=f.clientY<Da.top+rl.margin,_=f.clientX>Da.right-rl.margin,O=f.clientY>Da.bottom-rl.margin}rl.x=_?1:K?-1:0,rl.y=O?1:y?-1:0,rl.isScrolling||(rl.margin=Ee.margin,rl.speed=Ee.speed,rl.start(i))}}};function _e(t,i,f){return(S.string(t)?pa(t,i,f):t)||x(f)}function Oa(t){return S.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Je={id:"auto-scroll",install:function(t){var i=t.defaults,f=t.actions;t.autoScroll=rl,rl.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=rl.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,rl.stop(),rl.interaction&&(rl.interaction=null)},"interactions:stop":rl.stop,"interactions:action-move":function(t){return rl.onInteractionMove(t)}}},ie=Je;function Xe(t,i){var f=!1;return function(){return f||(L.console.warn(i),f=!0),t.apply(this,arguments)}}function Aa(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function Ze(t){return S.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wa(t){return S.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Fa={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(f,y,_,O){var K=function(Q,ge,Fe,Ee,na){var Da=Q.getRect(Ee),Qa=ge.buttons||{0:1,1:4,3:8,4:16}[ge.button],Ka={action:null,interactable:Q,interaction:Fe,element:Ee,rect:Da,buttons:Qa};return na.fire("auto-start:check",Ka),Ka.action}(this,y,_,O,t);return this.options.actionChecker?this.options.actionChecker(f,y,K,this,O,_):K},i.prototype.ignoreFrom=Xe(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=Xe(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=wa,i.prototype.styleCursor=Ze}};function Za(t,i,f,y,_){return i.testIgnoreAllow(i.options[t.name],f,y)&&i.options[t.name].enabled&&cl(i,f,t,_)?t:null}function He(t,i,f,y,_,O,K){for(var Q=0,ge=y.length;Q<ge;Q++){var Fe=y[Q],Ee=_[Q],na=Fe.getAction(i,f,t,Ee);if(na){var Da=Za(na,Fe,Ee,O,K);if(Da)return{action:Da,interactable:Fe,element:Ee}}}return{action:null,interactable:null,element:null}}function va(t,i,f,y,_){var O=[],K=[],Q=y;function ge(Ee){O.push(Ee),K.push(Q)}for(;S.element(Q);){O=[],K=[],_.interactables.forEachMatch(Q,ge);var Fe=He(t,i,f,O,K,y,_);if(Fe.action&&!Fe.interactable.options[Fe.action.name].manualStart)return Fe;Q=$e(Q)}return{action:null,interactable:null,element:null}}function ca(t,i,f){var y=i.action,_=i.interactable,O=i.element;y=y||{name:null},t.interactable=_,t.element=O,Aa(t.prepared,y),t.rect=_&&y.name?_.getRect(O):null,ul(t,f),f.fire("autoStart:prepared",{interaction:t})}function cl(t,i,f,y){var _=t.options,O=_[f.name].max,K=_[f.name].maxPerElement,Q=y.autoStart.maxInteractions,ge=0,Fe=0,Ee=0;if(!(O&&K&&Q))return!1;for(var na=0,Da=y.interactions.list;na<Da.length;na++){var Qa=Da[na],Ka=Qa.prepared.name;if(Qa.interacting()&&(++ge>=Q||Qa.interactable===t&&((Fe+=Ka===f.name?1:0)>=O||Qa.element===i&&(Ee++,Ka===f.name&&Ee>=K))))return!1}return Q>0}function Le(t,i){return S.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function ja(t,i,f){var y=f.autoStart.cursorElement;y&&y!==t&&(y.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,f.autoStart.cursorElement=i?t:null}function ul(t,i){var f=t.interactable,y=t.element,_=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var O="";if(_.name){var K=f.options[_.name].cursorChecker;O=S.func(K)?K(_,f,y,t._interacting):i.actions.map[_.name].getCursor(_)}ja(t.element,O||"",i)}else i.autoStart.cursorElement&&ja(i.autoStart.cursorElement,"",i)}var hr={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,f=t.defaults;t.usePlugin(Fa),f.base.actionChecker=null,f.base.styleCursor=!0,ee(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Le(y,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:cl,cursorElement:null}},listeners:{"interactions:down":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;f.interacting()||ca(f,va(f,y,_,O,i),i)},"interactions:move":function(t,i){(function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||ca(_,va(_,O,K,Q,y),y)})(t,i),function(f,y){var _=f.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){y.fire("autoStart:before-start",f);var O=_.interactable,K=_.prepared.name;K&&O&&(O.options[K].manualStart||!cl(O,_.element,_.prepared,y)?_.stop():(_.start(_.prepared,O,_.element),ul(_,y)))}}(t,i)},"interactions:stop":function(t,i){var f=t.interaction,y=f.interactable;y&&y.options.styleCursor&&ja(f.element,"",i)}},maxInteractions:Le,withinInteractionLimit:cl,validateAction:Za},dr=hr,Ql={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var f=t.interaction,y=t.eventTarget,_=t.dx,O=t.dy;if(f.prepared.name==="drag"){var K=Math.abs(_),Q=Math.abs(O),ge=f.interactable.options.drag,Fe=ge.startAxis,Ee=K>Q?"x":K<Q?"y":"xy";if(f.prepared.axis=ge.lockAxis==="start"?Ee[0]:ge.lockAxis,Ee!=="xy"&&Fe!=="xy"&&Fe!==Ee){f.prepared.name=null;for(var na=y,Da=function(Ka){if(Ka!==f.interactable){var nl=f.interactable.options.drag;if(!nl.manualStart&&Ka.testIgnoreAllow(nl,na,y)){var wl=Ka.getAction(f.downPointer,f.downEvent,f,na);if(wl&&wl.name==="drag"&&function(gl,Tl){if(!Tl)return!1;var Ul=Tl.options.drag.startAxis;return gl==="xy"||Ul==="xy"||Ul===gl}(Ee,Ka)&&dr.validateAction(wl,Ka,na,y,i))return Ka}}};S.element(na);){var Qa=i.interactables.forEachMatch(na,Da);if(Qa){f.prepared.name="drag",f.interactable=Qa,f.element=na;break}na=$e(na)}}}}}};function nr(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var f=t.interactable.options;return f[i].hold||f[i].delay}var pr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(dr),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,f=nr(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(t){var i=t.interaction,f=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;nr(i)>0&&(i.prepared.name=null)}},getHoldDuration:nr},gr=pr,Oe={id:"auto-start",install:function(t){t.usePlugin(dr),t.usePlugin(gr),t.usePlugin(Ql)}},er=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):S.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Sr(t){var i=t.interaction,f=t.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var Mr={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=er,i.prototype.checkAndPreventDefault=function(f){return function(y,_,O){var K=y.options.preventDefault;if(K!=="never")if(K!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=x(O.target).document,ge=_.getDocOptions(Q);if(!ge||!ge.events||ge.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||S.element(O.target)&&fe(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var y=0,_=t.interactions.list;y<_.length;y++){var O=_[y];if(O.element&&(O.element===f.target||ce(O.element,f.target)))return void O.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=Sr,t},{})};function zl(t,i){if(i.phaselessTypes[t])return!0;for(var f in i.map)if(t.indexOf(f)===0&&t.substr(f.length)in i.phases)return!0;return!1}function Nr(t){var i={};for(var f in t){var y=t[f];S.plainObject(y)?i[f]=Nr(y):S.array(y)?i[f]=xe(y):i[f]=y}return i}var qr=function(){function t(i){s(this,t),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=i,this.result=Kl(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(t,[{key:"start",value:function(i,f){var y,_,O=i.phase,K=this.interaction,Q=function(Fe){var Ee=Fe.interactable.options[Fe.prepared.name],na=Ee.modifiers;return na&&na.length?na:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Da){var Qa=Ee[Da];return Qa&&Qa.enabled&&{options:Qa,methods:Qa._methods}}).filter(function(Da){return!!Da})}(K);this.prepareStates(Q),this.startEdges=ee({},K.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=K.rect,_=f,y?{left:_.x-y.left,top:_.y-y.top,right:y.right-_.x,bottom:y.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ge=this.fillArg({phase:O,pageCoords:f,preEnd:!1});return this.result=Kl(),this.startAll(ge),this.result=this.setAll(ge)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,y=this.states;f<y.length;f++){var _=y[f];_.methods.start&&(i.state=_,_.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,y=i.preEnd,_=i.skipModifiers,O=i.rect,K=i.edges;i.coords=ee({},i.pageCoords),i.rect=ee({},O),i.edges=ee({},K);for(var Q=_?this.states.slice(_):this.states,ge=Kl(i.coords,i.rect),Fe=0;Fe<Q.length;Fe++){var Ee,na=Q[Fe],Da=na.options,Qa=ee({},i.coords),Ka=null;(Ee=na.methods)!=null&&Ee.set&&this.shouldDo(Da,y,f)&&(i.state=na,Ka=na.methods.set(i),se(i.edges,i.rect,{x:i.coords.x-Qa.x,y:i.coords.y-Qa.y})),ge.eventProps.push(Ka)}ee(this.edges,i.edges),ge.delta.x=i.coords.x-i.pageCoords.x,ge.delta.y=i.coords.y-i.pageCoords.y,ge.rectDelta.left=i.rect.left-O.left,ge.rectDelta.right=i.rect.right-O.right,ge.rectDelta.top=i.rect.top-O.top,ge.rectDelta.bottom=i.rect.bottom-O.bottom;var nl=this.result.coords,wl=this.result.rect;if(nl&&wl){var gl=ge.rect.left!==wl.left||ge.rect.right!==wl.right||ge.rect.top!==wl.top||ge.rect.bottom!==wl.bottom;ge.changed=gl||nl.x!==ge.coords.x||nl.y!==ge.coords.y}return ge}},{key:"applyToInteraction",value:function(i){var f=this.interaction,y=i.phase,_=f.coords.cur,O=f.coords.start,K=this.result,Q=this.startDelta,ge=K.delta;y==="start"&&ee(this.startDelta,K.delta);for(var Fe=0,Ee=[[O,Q],[_,ge]];Fe<Ee.length;Fe++){var na=Ee[Fe],Da=na[0],Qa=na[1];Da.page.x+=Qa.x,Da.page.y+=Qa.y,Da.client.x+=Qa.x,Da.client.y+=Qa.y}var Ka=this.result.rectDelta,nl=i.rect||f.rect;nl.left+=Ka.left,nl.right+=Ka.right,nl.top+=Ka.top,nl.bottom+=Ka.bottom,nl.width=nl.right-nl.left,nl.height=nl.bottom-nl.top}},{key:"setAndApply",value:function(i){var f=this.interaction,y=i.phase,_=i.preEnd,O=i.skipModifiers,K=this.setAll(this.fillArg({preEnd:_,phase:y,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=K,!K.changed&&(!O||O<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var Q=f.coords.cur.page,ge={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};K.coords.x+=ge.x,K.coords.y+=ge.y,K.delta.x+=ge.x,K.delta.y+=ge.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,y=i.event,_=this.states;if(_&&_.length){for(var O=!1,K=0;K<_.length;K++){var Q=_[K];i.state=Q;var ge=Q.options,Fe=Q.methods,Ee=Fe.beforeEnd&&Fe.beforeEnd(i);if(Ee)return this.endResult=Ee,!1;O=O||!O&&this.shouldDo(ge,!0,i.phase,!0)}O&&f.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(y);for(var _=0,O=this.states;_<O.length;_++){var K=O[_];y.state=K,K.methods.stop&&K.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var y=i[f],_=y.options,O=y.methods,K=y.name;this.states.push({options:_,methods:O,index:f,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,y=f.coords,_=f.rect,O=f.modification;if(O.result){for(var K=O.startDelta,Q=O.result,ge=Q.delta,Fe=Q.rectDelta,Ee=0,na=[[y.start,K],[y.cur,ge]];Ee<na.length;Ee++){var Da=na[Ee],Qa=Da[0],Ka=Da[1];Qa.page.x-=Ka.x,Qa.page.y-=Ka.y,Qa.client.x-=Ka.x,Qa.client.y-=Ka.y}_.left-=Fe.left,_.right-=Fe.right,_.top-=Fe.top,_.bottom-=Fe.bottom}}},{key:"shouldDo",value:function(i,f,y,_){return!(!i||i.enabled===!1||_&&!i.endOnly||i.endOnly&&!f||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Nr(f)}),this.result=Kl(ee({},i.result.coords),ee({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Kl(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function br(t,i){var f=t.defaults,y={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},_=function(O){var K=O||{};for(var Q in K.enabled=K.enabled!==!1,f)Q in K||(K[Q]=f[Q]);var ge={options:K,methods:y,name:i,enable:function(){return K.enabled=!0,ge},disable:function(){return K.enabled=!1,ge}};return ge};return i&&typeof i=="string"&&(_._defaults=f,_._methods=y),_}function $r(t){var i=t.iEvent,f=t.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var jr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new qr(i)},"interactions:before-action-start":function(t){var i=t.interaction,f=t.interaction.modification;f.start(t,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,f=i.modification,y=f.setAndApply(t);return i.edges=f.edges,y},"interactions:before-action-end":function(t){var i=t.interaction,f=i.modification,y=f.beforeEnd(t);return i.edges=f.startEdges,y},"interactions:action-start":$r,"interactions:action-move":$r,"interactions:action-end":$r,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Pl=jr,lr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Wr=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ge,Fe){var Ee;s(this,f),(Ee=i.call(this,y)).relatedTarget=null,Ee.screenX=void 0,Ee.screenY=void 0,Ee.button=void 0,Ee.buttons=void 0,Ee.ctrlKey=void 0,Ee.shiftKey=void 0,Ee.altKey=void 0,Ee.metaKey=void 0,Ee.page=void 0,Ee.client=void 0,Ee.delta=void 0,Ee.rect=void 0,Ee.x0=void 0,Ee.y0=void 0,Ee.t0=void 0,Ee.dt=void 0,Ee.duration=void 0,Ee.clientX0=void 0,Ee.clientY0=void 0,Ee.velocity=void 0,Ee.speed=void 0,Ee.swipe=void 0,Ee.axes=void 0,Ee.preEnd=void 0,Q=Q||y.element;var na=y.interactable,Da=(na&&na.options||lr).deltaSource,Qa=Be(na,Q,O),Ka=K==="start",nl=K==="end",wl=Ka?C(Ee):y.prevEvent,gl=Ka?y.coords.start:nl?{page:wl.page,client:wl.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return Ee.page=ee({},gl.page),Ee.client=ee({},gl.client),Ee.rect=ee({},y.rect),Ee.timeStamp=gl.timeStamp,nl||(Ee.page.x-=Qa.x,Ee.page.y-=Qa.y,Ee.client.x-=Qa.x,Ee.client.y-=Qa.y),Ee.ctrlKey=_.ctrlKey,Ee.altKey=_.altKey,Ee.shiftKey=_.shiftKey,Ee.metaKey=_.metaKey,Ee.button=_.button,Ee.buttons=_.buttons,Ee.target=Q,Ee.currentTarget=Q,Ee.preEnd=ge,Ee.type=Fe||O+(K||""),Ee.interactable=na,Ee.t0=Ka?y.pointers[y.pointers.length-1].downTime:wl.t0,Ee.x0=y.coords.start.page.x-Qa.x,Ee.y0=y.coords.start.page.y-Qa.y,Ee.clientX0=y.coords.start.client.x-Qa.x,Ee.clientY0=y.coords.start.client.y-Qa.y,Ee.delta=Ka||nl?{x:0,y:0}:{x:Ee[Da].x-wl[Da].x,y:Ee[Da].y-wl[Da].y},Ee.dt=y.coords.delta.timeStamp,Ee.duration=Ee.timeStamp-Ee.t0,Ee.velocity=ee({},y.coords.velocity[Da]),Ee.speed=Ja(Ee.velocity.x,Ee.velocity.y),Ee.swipe=nl||K==="inertiastart"?Ee.getSwipe():null,Ee}return c(f,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var O=112.5<=_&&_<247.5,K=202.5<=_&&_<337.5;return{up:K,down:!K&&22.5<=_&&_<157.5,left:O,right:!O&&(292.5<=_||_<67.5),angle:_,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(ye);Object.defineProperties(Wr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Ur=c(function t(i,f,y,_,O){s(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=f,this.event=y,this.downTime=_,this.downTarget=O}),Vr=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),Kr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),an=0,hn=function(){function t(i){var f=this,y=i.pointerType,_=i.scopeFire;s(this,t),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=Xe(function(Ee){this.move(Ee)},"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=an++,this._scopeFire=_,this.pointerType=y;var O=this;this._proxy={};var K=function(Ee){Object.defineProperty(f._proxy,Ee,{get:function(){return O[Ee]}})};for(var Q in Vr)K(Q);var ge=function(Ee){Object.defineProperty(f._proxy,Ee,{value:function(){return O[Ee].apply(O,arguments)}})};for(var Fe in Kr)ge(Fe);this._scopeFire("interactions:new",{interaction:this})}return c(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,y){var _=this.updatePointer(i,f,y,!0),O=this.pointers[_];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:y,pointerIndex:_,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,f,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(Aa(this.prepared,i),this.interactable=f,this.element=y,this.rect=f.getRect(y),this.edges=this.prepared.edges?ee({},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(i,f,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,y,!1);var _,O,K=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&&(_=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ja(_,O)>this.pointerMoveTolerance);var Q,ge,Fe,Ee=this.getPointerIndex(i),na={pointer:i,pointerIndex:Ee,pointerInfo:this.pointers[Ee],event:f,type:"move",eventTarget:y,dx:_,dy:O,duplicate:K,interaction:this};K||(Q=this.coords.velocity,ge=this.coords.delta,Fe=Math.max(ge.timeStamp/1e3,.001),Q.page.x=ge.page.x/Fe,Q.page.y=ge.page.y/Fe,Q.client.x=ge.client.x/Fe,Q.client.y=ge.client.y/Fe,Q.timeStamp=Fe),this._scopeFire("interactions:move",na),K||this.simulation||(this.interacting()&&(na.type=null,this.move(na)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||he(this.coords.delta),(i=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,f,y,_){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,f,y,!1));var K=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:f,eventTarget:y,type:K,curEventTarget:_,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!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(i){var f=Ve(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:pe(this.pointers,function(y){return y.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,y,_){var O,K,Q,ge=Ve(i),Fe=this.getPointerIndex(i),Ee=this.pointers[Fe];return _=_!==!1&&(_||/(down|start)$/i.test(f.type)),Ee?Ee.pointer=i:(Ee=new Ur(ge,i,f,null,null),Fe=this.pointers.length,this.pointers.push(Ee)),_a(this.coords.cur,this.pointers.map(function(na){return na.pointer}),this._now()),O=this.coords.delta,K=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-K.page.x,O.page.y=Q.page.y-K.page.y,O.client.x=Q.client.x-K.client.x,O.client.y=Q.client.y-K.client.y,O.timeStamp=Q.timeStamp-K.timeStamp,_&&(this.pointerIsDown=!0,Ee.downTime=this.coords.cur.timeStamp,Ee.downTarget=y,H(this.downPointer,i),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:y,down:_,pointerInfo:Ee,pointerIndex:Fe,interaction:this}),Fe}},{key:"removePointer",value:function(i,f){var y=this.getPointerIndex(i);if(y!==-1){var _=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:y,pointerInfo:_,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,y){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,y,_){return new Wr(this,i,this.prepared.name,f,this.element,y,_)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,y=i.phase,_=i.preEnd,O=i.type,K=this.rect;if(K&&y==="move"&&(se(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(f,y,_,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Jl(t){vr(t.interaction)}function vr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var i=t.offset.pending;return vl(t.coords.cur,i),vl(t.coords.delta,i),se(t.edges,t.rect,i),i.x=0,i.y=0,!0}function Jr(t){var i=t.x,f=t.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function vl(t,i){var f=t.page,y=t.client,_=i.x,O=i.y;f.x+=_,f.y+=O,y.x+=_,y.y+=O}Kr.offsetBy="";var ir={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Jr},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(vl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Jl,"interactions:before-action-move":Jl,"interactions:before-action-end":function(t){var i=t.interaction;if(vr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Rl=ir,Er=function(){function t(i){s(this,t),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=i}return c(t,[{key:"start",value:function(i){var f=this.interaction,y=Hl(f);if(!y||!y.enabled)return!1;var _=f.coords.velocity.client,O=Ja(_.x,_.y),K=this.modification||(this.modification=new qr(f));if(K.copyFrom(f.modification),this.t0=f._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,y=Hl(this.interaction),_=y.resistance,O=-Math.log(y.endSpeed/this.v0)/_;this.targetOffset={x:(f.x-O)/_,y:(f.y-O)/_},this.te=O,this.lambda_v0=_/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var K=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(Q),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=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 i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=il.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,y,_,O,K,Q,ge=this,Fe=this.interaction,Ee=Hl(Fe).resistance,na=(Fe._now()-this.t0)/1e3;if(na<this.te){var Da,Qa=1-(Math.exp(-Ee*na)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,y=this.targetOffset.x,_=this.targetOffset.y,O=this.modifiedOffset.x,K=this.modifiedOffset.y,Da={x:ar(Q=Qa,i,y,O),y:ar(Q,f,_,K)}):Da={x:this.targetOffset.x*Qa,y:this.targetOffset.y*Qa};var Ka={x:Da.x-this.currentOffset.x,y:Da.y-this.currentOffset.y};this.currentOffset.x+=Ka.x,this.currentOffset.y+=Ka.y,Fe.offsetBy(Ka),Fe.move(),this.onNextFrame(function(){return ge.inertiaTick()})}else Fe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,y=f._now()-this.t0,_=Hl(f).smoothEndDuration;if(y<_){var O={x:Xr(y,0,this.targetOffset.x,_),y:Xr(y,0,this.targetOffset.y,_)},K={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,f.offsetBy(K),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,y=i.event,_=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(f,y,_,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),X(O.coords.prev,O.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,il.cancel(this.timeout)}}]),t}();function Hl(t){var i=t.interactable,f=t.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var mr={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(Rl),t.usePlugin(Pl),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new Er(i)},"interactions:before-action-end":function(t){var i=t.interaction,f=t.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(t){var i=t.interaction,f=t.eventTarget,y=i.inertia;if(y.active)for(var _=f;S.element(_);){if(_===i.element){y.resume(t);break}_=$e(_)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":$r,"interactions:action-inertiastart":$r,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function ar(t,i,f,y){var _=1-t;return _*_*i+2*_*t*f+t*t*y}function Xr(t,i,f,y){return-f*(t/=y)*(t-2)+i}var sn=mr;function Cn(t,i){for(var f=0;f<i.length;f++){var y=i[f];if(t.immediatePropagationStopped)break;y(t)}}var Jn=function(){function t(i){s(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},i||{})}return c(t,[{key:"fire",value:function(i){var f,y=this.global;(f=this.types[i.type])&&Cn(i,f),!i.propagationStopped&&y&&(f=y[i.type])&&Cn(i,f)}},{key:"on",value:function(i,f){var y=Ge(i,f);for(i in y)this.types[i]=Y(this.types[i]||[],y[i])}},{key:"off",value:function(i,f){var y=Ge(i,f);for(i in y){var _=this.types[i];if(_&&_.length)for(var O=0,K=y[i];O<K.length;O++){var Q=K[O],ge=_.indexOf(Q);ge!==-1&&_.splice(ge,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),Fn=function(){function t(i){s(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return c(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Dn(t){return S.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function In(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var jn={id:"events",install:function(t){var i,f=[],y={},_=[],O={add:K,remove:Q,addDelegate:function(Ee,na,Da,Qa,Ka){var nl=Dn(Ka);if(!y[Da]){y[Da]=[];for(var wl=0;wl<_.length;wl++){var gl=_[wl];K(gl,Da,ge),K(gl,Da,Fe,!0)}}var Tl=y[Da],Ul=qe(Tl,function(Bl){return Bl.selector===Ee&&Bl.context===na});Ul||(Ul={selector:Ee,context:na,listeners:[]},Tl.push(Ul)),Ul.listeners.push({func:Qa,options:nl})},removeDelegate:function(Ee,na,Da,Qa,Ka){var nl,wl=Dn(Ka),gl=y[Da],Tl=!1;if(gl)for(nl=gl.length-1;nl>=0;nl--){var Ul=gl[nl];if(Ul.selector===Ee&&Ul.context===na){for(var Bl=Ul.listeners,Ll=Bl.length-1;Ll>=0;Ll--){var Ol=Bl[Ll];if(Ol.func===Qa&&In(Ol.options,wl)){Bl.splice(Ll,1),Bl.length||(gl.splice(nl,1),Q(na,Da,ge),Q(na,Da,Fe,!0)),Tl=!0;break}}if(Tl)break}}},delegateListener:ge,delegateUseCapture:Fe,delegatedEvents:y,documents:_,targets:f,supportsOptions:!1,supportsPassive:!1};function K(Ee,na,Da,Qa){if(Ee.addEventListener){var Ka=Dn(Qa),nl=qe(f,function(wl){return wl.eventTarget===Ee});nl||(nl={eventTarget:Ee,events:{}},f.push(nl)),nl.events[na]||(nl.events[na]=[]),qe(nl.events[na],function(wl){return wl.func===Da&&In(wl.options,Ka)})||(Ee.addEventListener(na,Da,O.supportsOptions?Ka:Ka.capture),nl.events[na].push({func:Da,options:Ka}))}}function Q(Ee,na,Da,Qa){if(Ee.addEventListener&&Ee.removeEventListener){var Ka=pe(f,function(rn){return rn.eventTarget===Ee}),nl=f[Ka];if(nl&&nl.events)if(na!=="all"){var wl=!1,gl=nl.events[na];if(gl){if(Da==="all"){for(var Tl=gl.length-1;Tl>=0;Tl--){var Ul=gl[Tl];Q(Ee,na,Ul.func,Ul.options)}return}for(var Bl=Dn(Qa),Ll=0;Ll<gl.length;Ll++){var Ol=gl[Ll];if(Ol.func===Da&&In(Ol.options,Bl)){Ee.removeEventListener(na,Da,O.supportsOptions?Bl:Bl.capture),gl.splice(Ll,1),gl.length===0&&(delete nl.events[na],wl=!0);break}}}wl&&!Object.keys(nl.events).length&&f.splice(Ka,1)}else for(na in nl.events)nl.events.hasOwnProperty(na)&&Q(Ee,na,"all")}}function ge(Ee,na){for(var Da=Dn(na),Qa=new Fn(Ee),Ka=y[Ee.type],nl=Ne(Ee)[0],wl=nl;S.element(wl);){for(var gl=0;gl<Ka.length;gl++){var Tl=Ka[gl],Ul=Tl.selector,Bl=Tl.context;if(fe(wl,Ul)&&ce(Bl,nl)&&ce(Bl,wl)){var Ll=Tl.listeners;Qa.currentTarget=wl;for(var Ol=0;Ol<Ll.length;Ol++){var rn=Ll[Ol];In(rn.options,Da)&&rn.func(Qa)}}}wl=$e(wl)}}function Fe(Ee){return ge(Ee,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),t.events=O,O}},vn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,f=vn.methodOrder;i<f.length;i++){var y=f[i],_=vn[y](t);if(_)return _}return null},simulationResume:function(t){var i=t.pointerType,f=t.eventType,y=t.eventTarget,_=t.scope;if(!/down|start/i.test(f))return null;for(var O=0,K=_.interactions.list;O<K.length;O++){var Q=K[O],ge=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ge;){if(ge===Q.element)return Q;ge=$e(ge)}}return null},mouseOrPen:function(t){var i,f=t.pointerId,y=t.pointerType,_=t.eventType,O=t.scope;if(y!=="mouse"&&y!=="pen")return null;for(var K=0,Q=O.interactions.list;K<Q.length;K++){var ge=Q[K];if(ge.pointerType===y){if(ge.simulation&&!On(ge,f))continue;if(ge.interacting())return ge;i||(i=ge)}}if(i)return i;for(var Fe=0,Ee=O.interactions.list;Fe<Ee.length;Fe++){var na=Ee[Fe];if(!(na.pointerType!==y||/down/i.test(_)&&na.simulation))return na}return null},hasPointer:function(t){for(var i=t.pointerId,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(On(_,i))return _}return null},idle:function(t){for(var i=t.pointerType,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(_.pointers.length===1){var O=_.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&i===_.pointerType)return _}return null}};function On(t,i){return t.pointers.some(function(f){return f.id===i})}var Xn=vn,Gr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Zn(t,i){return function(f){var y=i.interactions.list,_=Ca(f),O=Ne(f),K=O[0],Q=O[1],ge=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var Fe=0,Ee=f.changedTouches;Fe<Ee.length;Fe++){var na=Ee[Fe],Da={pointer:na,pointerId:Ve(na),pointerType:_,eventType:f.type,eventTarget:K,curEventTarget:Q,scope:i},Qa=wn(Da);ge.push([Da.pointer,Da.eventTarget,Da.curEventTarget,Qa])}}else{var Ka=!1;if(!J.supportsPointerEvent&&/mouse/.test(f.type)){for(var nl=0;nl<y.length&&!Ka;nl++)Ka=y[nl].pointerType!=="mouse"&&y[nl].pointerIsDown;Ka=Ka||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!Ka){var wl={pointer:f,pointerId:Ve(f),pointerType:_,eventType:f.type,curEventTarget:Q,eventTarget:K,scope:i},gl=wn(wl);ge.push([wl.pointer,wl.eventTarget,wl.curEventTarget,gl])}}for(var Tl=0;Tl<ge.length;Tl++){var Ul=ge[Tl],Bl=Ul[0],Ll=Ul[1],Ol=Ul[2];Ul[3][t](Bl,f,Ll,Ol)}}}function wn(t){var i=t.pointerType,f=t.scope,y={interaction:Xn.search(t),searchDetails:t};return f.fire("interactions:find",y),y.interaction||f.interactions.new({pointerType:i})}function Mi(t,i){var f=t.doc,y=t.scope,_=t.options,O=y.interactions.docEvents,K=y.events,Q=K[i];for(var ge in y.browser.isIOS&&!_.events&&(_.events={passive:!1}),K.delegatedEvents)Q(f,ge,K.delegateListener),Q(f,ge,K.delegateUseCapture,!0);for(var Fe=_&&_.events,Ee=0;Ee<O.length;Ee++){var na=O[Ee];Q(f,na.type,na.listener,Fe)}}var jo={id:"core/interactions",install:function(t){for(var i={},f=0;f<Gr.length;f++){var y=Gr[f];i[y]=Zn(y,t)}var _,O=J.pEventTypes;function K(){for(var Q=0,ge=t.interactions.list;Q<ge.length;Q++){var Fe=ge[Q];if(Fe.pointerIsDown&&Fe.pointerType==="touch"&&!Fe._interacting)for(var Ee=function(){var Qa=Da[na];t.documents.some(function(Ka){return ce(Ka.doc,Qa.downTarget)})||Fe.removePointer(Qa.pointer,Qa.event)},na=0,Da=Fe.pointers;na<Da.length;na++)Ee()}}(_=F.PointerEvent?[{type:O.down,listener:K},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:K},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ge=0,Fe=t.interactions.list;ge<Fe.length;ge++)Fe[ge].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){m(Fe,Q);var ge=M(Fe);function Fe(){return s(this,Fe),ge.apply(this,arguments)}return c(Fe,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Ee){t.interactions.pointerMoveTolerance=Ee}},{key:"_now",value:function(){return t.now()}}]),Fe}(hn),t.interactions={list:[],new:function(Q){Q.scopeFire=function(Fe,Ee){return t.fire(Fe,Ee)};var ge=new t.Interaction(Q);return t.interactions.list.push(ge),ge},listeners:i,docEvents:_,pointerMoveTolerance:1},t.usePlugin(Mr)},listeners:{"scope:add-document":function(t){return Mi(t,"add")},"scope:remove-document":function(t){return Mi(t,"remove")},"interactable:unset":function(t,i){for(var f=t.interactable,y=i.interactions.list.length-1;y>=0;y--){var _=i.interactions.list[y];_.interactable===f&&(_.stop(),i.fire("interactions:destroy",{interaction:_}),_.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Mi,doOnInteractions:Zn,methodNames:Gr},Ho=jo,Nn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Nn||{}),Uo=function(){function t(i,f,y,_){s(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Jn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||y,this._win=x(Ta(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=_,this.set(f)}return c(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return S.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),S.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),S.func(f.onend)&&this.on("".concat(i,"end"),f.onend),S.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,y){var _,O=this,K=(_=this._actions.map[i])==null?void 0:_.filterEventType,Q=function(ge){return(K==null||K(ge))&&zl(ge,O._actions)};(S.array(f)||S.object(f))&&this._onOff(Nn.Off,i,f,void 0,Q),(S.array(y)||S.object(y))&&this._onOff(Nn.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,f){var y=this._defaults;for(var _ in f){var O=_,K=this.options[i],Q=f[O];O==="listeners"&&this.updatePerActionListeners(i,K.listeners,Q),S.array(Q)?K[O]=xe(Q):S.plainObject(Q)?(K[O]=ee(K[O]||{},Nr(Q)),S.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(K[O].enabled=Q.enabled!==!1)):S.bool(Q)&&S.object(y.perAction[O])?K[O].enabled=Q:K[O]=Q}}},{key:"getRect",value:function(i){return i=i||(S.element(this.target)?this.target:null),S.string(this.target)&&(i=i||this._context.querySelector(this.target)),Pe(i)}},{key:"rectChecker",value:function(i){var f=this;return S.func(i)?(this.getRect=function(y){var _=ee({},i.apply(f,y));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,f){if(Ta(f)||S.object(f)){for(var y in this.options[i]=f,this._actions.map)this.options[y][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return S.string(i)?Array.from(this._context.querySelectorAll(i)):S.func(i)&&i.getAllElements?i.getAllElements():S.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||ce(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,y){return!this.testIgnore(i.ignoreFrom,f,y)&&this.testAllow(i.allowFrom,f,y)}},{key:"testAllow",value:function(i,f,y){return!i||!!S.element(y)&&(S.string(i)?U(y,i,f):!!S.element(i)&&ce(i,y))}},{key:"testIgnore",value:function(i,f,y){return!(!i||!S.element(y))&&(S.string(i)?U(y,i,f):!!S.element(i)&&ce(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,y,_,O){S.object(f)&&!S.array(f)&&(_=y,y=null);var K=Ge(f,y,O);for(var Q in K){Q==="wheel"&&(Q=J.wheelEvent);for(var ge=0,Fe=K[Q];ge<Fe.length;ge++){var Ee=Fe[ge];zl(Q,this._actions)?this.events[i===Nn.On?"on":"off"](Q,Ee):S.string(this.target)?this._scopeEvents[i===Nn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ee,_):this._scopeEvents[i===Nn.On?"add":"remove"](this.target,Q,Ee,_)}}return this}},{key:"on",value:function(i,f,y){return this._onOff(Nn.On,i,f,y)}},{key:"off",value:function(i,f,y){return this._onOff(Nn.Off,i,f,y)}},{key:"set",value:function(i){var f=this._defaults;for(var y in S.object(i)||(i={}),this.options=Nr(f.base),this._actions.methodDict){var _=y,O=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ee(ee({},f.perAction),f.actions[_])),this[O](i[_])}for(var K in i)K!=="getRect"?S.func(this[K])&&this[K](i[K]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],y=f.length-1;y>=0;y--){var _=f[y],O=_.selector,K=_.context,Q=_.listeners;O===this.target&&K===this._context&&f.splice(y,1);for(var ge=Q.length-1;ge>=0;ge--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ge][0],Q[ge][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),qo=function(){function t(i){var f=this;s(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var _=y.interactable,O=_.target,K=S.string(O)?f.selectorMap[O]:O[f.scope.id],Q=pe(K,function(ge){return ge===_});K.splice(Q,1)}})}return c(t,[{key:"new",value:function(i,f){f=ee(f||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),S.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:f,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,f){var y=f&&f.context||this.scope.document,_=S.string(i),O=_?this.selectorMap[i]:i[this.scope.id];if(O)return qe(O,function(K){return K._context===y&&(_||K.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var y=0,_=this.list;y<_.length;y++){var O=_[y],K=void 0;if((S.string(O.target)?S.element(i)&&fe(i,O.target):i===O.target)&&O.inContext(i)&&(K=f(O)),K!==void 0)return K}}}]),t}(),Wo=function(){function t(){var i=this;s(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=J,this.defaults=Nr(lr),this.Eventable=Jn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var _=function O(K,Q){var ge=y.interactables.getExisting(K,Q);return ge||((ge=y.interactables.new(K,Q)).events.global=O.globalEvents),ge};return _.getPointerAverage=ya,_.getTouchBBox=La,_.getTouchDistance=za,_.getTouchAngle=ha,_.getElementRect=Pe,_.getElementClientRect=Me,_.matchesSelector=fe,_.closest=Te,_.globalEvents={},_.version="1.10.27",_.scope=y,_.use=function(O,K){return this.scope.usePlugin(O,K),this},_.isSet=function(O,K){return!!this.scope.interactables.get(O,K&&K.context)},_.on=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ge=0,Fe=O;ge<Fe.length;ge++){var Ee=Fe[ge];this.on(Ee,K,Q)}return this}if(S.object(O)){for(var na in O)this.on(na,O[na],K);return this}return zl(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(K):this.globalEvents[O]=[K]:this.scope.events.add(this.scope.document,O,K,{options:Q}),this},"The interact.on() method is being deprecated"),_.off=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ge=0,Fe=O;ge<Fe.length;ge++){var Ee=Fe[ge];this.off(Ee,K,Q)}return this}if(S.object(O)){for(var na in O)this.off(na,O[na],K);return this}var Da;return zl(O,this.scope.actions)?O in this.globalEvents&&(Da=this.globalEvents[O].indexOf(K))!==-1&&this.globalEvents[O].splice(Da,1):this.scope.events.remove(this.scope.document,O,K,Q),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return J.supportsTouch},_.supportsPointerEvent=function(){return J.supportsPointerEvent},_.stop=function(){for(var O=0,K=this.scope.interactions.list;O<K.length;O++)K[O].stop();return this},_.pointerMoveTolerance=function(O){return S.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(O,K){this.scope.addDocument(O,K)},_.removeDocument=function(O){this.scope.removeDocument(O)},_}(this),this.InteractEvent=Wr,this.Interactable=void 0,this.interactables=new qo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var f=this;this.Interactable=function(y){m(O,y);var _=M(O);function O(){return s(this,O),_.apply(this,arguments)}return c(O,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(K){return k(b(O.prototype),"set",this).call(this,K),f.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){k(b(O.prototype),"unset",this).call(this);var K=f.interactables.list.indexOf(this);K<0||(f.interactables.list.splice(K,1),f.fire("interactable:unset",{interactable:this}))}}]),O}(Uo)}return c(t,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var y=0,_=this.listenerMaps;y<_.length;y++){var O=_[y].map[i];if(O&&O(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,y){return f.isInitialized=!0,S.window(y)&&E(y),F.init(y),J.init(y),il.init(y),f.window=y,f.document=y.document,f.usePlugin(Ho),f.usePlugin(jn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var y=0,_=this.listenerMaps.length,O=i.before.reduce(function(Q,ge){return Q[ge]=!0,Q[Ii(ge)]=!0,Q},{});y<_;y++){var K=this.listenerMaps[y].id;if(K&&(O[K]||O[Ii(K)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var y=x(i);f=f?ee({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),y=x(i),_=this.documents[f].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:_})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ii(t){return t&&t.replace(/\/.*$/,"")}var eo=new Wo,ln=eo.interactStatic,Ko=typeof globalThis<"u"?globalThis:window;eo.init(Ko);var Go=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var _=y[0],O=y[1];return _ in t||O in t}),f=function(y,_){for(var O=t.range,K=t.limits,Q=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,ge=t.offset,Fe=ge===void 0?{x:0,y:0}:ge,Ee={range:O,grid:t,x:null,y:null},na=0;na<i.length;na++){var Da=i[na],Qa=Da[0],Ka=Da[1],nl=Math.round((y-Fe.x)/t[Qa]),wl=Math.round((_-Fe.y)/t[Ka]);Ee[Qa]=Math.max(Q.left,Math.min(Q.right,nl*t[Qa]+Fe.x)),Ee[Ka]=Math.max(Q.top,Math.min(Q.bottom,wl*t[Ka]+Fe.y))}return Ee};return f.grid=t,f.coordFields=i,f}}),Oi={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=ee(i.snappers||{},Go),i.createSnapGrid=i.snappers.grid}},Yo=Oi,Li={start:function(t){var i=t.state,f=t.rect,y=t.edges,_=t.pageCoords,O=i.options,K=O.ratio,Q=O.enabled,ge=i.options,Fe=ge.equalDelta,Ee=ge.modifiers;K==="preserve"&&(K=f.width/f.height),i.startCoords=ee({},_),i.startRect=ee({},f),i.ratio=K,i.equalDelta=Fe;var na=i.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Da=(na.left?1:-1)*(na.top?1:-1);i.edgeSign={x:Da,y:Da}}else i.edgeSign={x:na.left?-1:1,y:na.top?-1:1};if(Q!==!1&&ee(y,na),Ee!=null&&Ee.length){var Qa=new qr(t.interaction);Qa.copyFrom(t.interaction.modification),Qa.prepareStates(Ee),i.subModification=Qa,Qa.startAll(r({},t))}},set:function(t){var i=t.state,f=t.rect,y=t.coords,_=i.linkedEdges,O=ee({},y),K=i.equalDelta?ao:lo;if(ee(t.edges,_),K(i,i.xIsPrimaryAxis,y,f),!i.subModification)return null;var Q=ee({},f);se(_,Q,{x:y.x-O.x,y:y.y-O.y});var ge=i.subModification.setAll(r(r({},t),{},{rect:Q,edges:_,pageCoords:y,prevCoords:y,prevRect:Q})),Fe=ge.delta;return ge.changed&&(K(i,Math.abs(Fe.x)>Math.abs(Fe.y),ge.coords,ge.rect),ee(y,ge.coords)),ge.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ao(t,i,f){var y=t.startCoords,_=t.edgeSign;i?f.y=y.y+(f.x-y.x)*_.y:f.x=y.x+(f.y-y.y)*_.x}function lo(t,i,f,y){var _=t.startRect,O=t.startCoords,K=t.ratio,Q=t.edgeSign;if(i){var ge=y.width/K;f.y=O.y+(ge-_.height)*Q.y}else{var Fe=y.height*K;f.x=O.x+(Fe-_.width)*Q.x}}var Jo=br(Li,"aspectRatio"),ro=function(){};ro._defaults={};var hi=ro;function gn(t,i,f){return S.func(t)?ue(t,i.interactable,i.element,[f.x,f.y,i]):ue(t,i.interactable,i.element)}var Qn={start:function(t){var i=t.rect,f=t.startOffset,y=t.state,_=t.interaction,O=t.pageCoords,K=y.options,Q=K.elementRect,ge=ee({left:0,top:0,right:0,bottom:0},K.offset||{});if(i&&Q){var Fe=gn(K.restriction,_,O);if(Fe){var Ee=Fe.right-Fe.left-i.width,na=Fe.bottom-Fe.top-i.height;Ee<0&&(ge.left+=Ee,ge.right+=Ee),na<0&&(ge.top+=na,ge.bottom+=na)}ge.left+=f.left-i.width*Q.left,ge.top+=f.top-i.height*Q.top,ge.right+=f.right-i.width*(1-Q.right),ge.bottom+=f.bottom-i.height*(1-Q.bottom)}y.offset=ge},set:function(t){var i=t.coords,f=t.interaction,y=t.state,_=y.options,O=y.offset,K=gn(_.restriction,f,i);if(K){var Q=function(ge){return!ge||"left"in ge&&"top"in ge||((ge=ee({},ge)).left=ge.x||0,ge.top=ge.y||0,ge.right=ge.right||ge.left+ge.width,ge.bottom=ge.bottom||ge.top+ge.height),ge}(K);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ri=br(Qn,"restrict"),no={top:1/0,left:1/0,bottom:-1/0,right:-1/0},io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function oo(t,i){for(var f=0,y=["top","left","bottom","right"];f<y.length;f++){var _=y[f];_ in t||(t[_]=i[_])}return t}var ei={noInner:no,noOuter:io,start:function(t){var i,f=t.interaction,y=t.startOffset,_=t.state,O=_.options;O&&(i=ua(gn(O.offset,f,f.coords.start.page))),i=i||{x:0,y:0},_.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(t){var i=t.coords,f=t.edges,y=t.interaction,_=t.state,O=_.offset,K=_.options;if(f){var Q=ee({},i),ge=gn(K.inner,y,Q)||{},Fe=gn(K.outer,y,Q)||{};oo(ge,no),oo(Fe,io),f.top?i.y=Math.min(Math.max(Fe.top+O.top,Q.y),ge.top+O.top):f.bottom&&(i.y=Math.max(Math.min(Fe.bottom+O.bottom,Q.y),ge.bottom+O.bottom)),f.left?i.x=Math.min(Math.max(Fe.left+O.left,Q.x),ge.left+O.left):f.right&&(i.x=Math.max(Math.min(Fe.right+O.right,Q.x),ge.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},to=br(ei,"restrictEdges"),ai=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Qn.defaults),so=br({start:Qn.start,set:Qn.set,defaults:ai},"restrictRect"),co={width:-1/0,height:-1/0},li={width:1/0,height:1/0},Xo=br({start:function(t){return ei.start(t)},set:function(t){var i=t.interaction,f=t.state,y=t.rect,_=t.edges,O=f.options;if(_){var K=Se(gn(O.min,i,t.coords))||co,Q=Se(gn(O.max,i,t.coords))||li;f.options={endOnly:O.endOnly,inner:ee({},ei.noInner),outer:ee({},ei.noOuter)},_.top?(f.options.inner.top=y.bottom-K.height,f.options.outer.top=y.bottom-Q.height):_.bottom&&(f.options.inner.bottom=y.top+K.height,f.options.outer.bottom=y.top+Q.height),_.left?(f.options.inner.left=y.right-K.width,f.options.outer.left=y.right-Q.width):_.right&&(f.options.inner.right=y.left+K.width,f.options.outer.right=y.left+Q.width),ei.set(t),f.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),vi={start:function(t){var i,f=t.interaction,y=t.interactable,_=t.element,O=t.rect,K=t.state,Q=t.startOffset,ge=K.options,Fe=ge.offsetWithOrigin?function(Da){var Qa=Da.interaction.element,Ka=ua(ue(Da.state.options.origin,null,null,[Qa])),nl=Ka||Be(Da.interactable,Qa,Da.interaction.prepared.name);return nl}(t):{x:0,y:0};if(ge.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ee=ue(ge.offset,y,_,[f]);(i=ua(Ee)||{x:0,y:0}).x+=Fe.x,i.y+=Fe.y}var na=ge.relativePoints;K.offsets=O&&na&&na.length?na.map(function(Da,Qa){return{index:Qa,relativePoint:Da,x:Q.left-O.width*Da.x+i.x,y:Q.top-O.height*Da.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,f=t.coords,y=t.state,_=y.options,O=y.offsets,K=Be(i.interactable,i.element,i.prepared.name),Q=ee({},f),ge=[];_.offsetWithOrigin||(Q.x-=K.x,Q.y-=K.y);for(var Fe=0,Ee=O;Fe<Ee.length;Fe++)for(var na=Ee[Fe],Da=Q.x-na.x,Qa=Q.y-na.y,Ka=0,nl=_.targets.length;Ka<nl;Ka++){var wl=_.targets[Ka],gl=void 0;(gl=S.func(wl)?wl(Da,Qa,i._proxy,na,Ka):wl)&&ge.push({x:(S.number(gl.x)?gl.x:Da)+na.x,y:(S.number(gl.y)?gl.y:Qa)+na.y,range:S.number(gl.range)?gl.range:_.range,source:wl,index:Ka,offset:na})}for(var Tl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ul=0;Ul<ge.length;Ul++){var Bl=ge[Ul],Ll=Bl.range,Ol=Bl.x-Q.x,rn=Bl.y-Q.y,or=Ja(Ol,rn),cn=or<=Ll;Ll===1/0&&Tl.inRange&&Tl.range!==1/0&&(cn=!1),Tl.target&&!(cn?Tl.inRange&&Ll!==1/0?or/Ll<Tl.distance/Tl.range:Ll===1/0&&Tl.range!==1/0||or<Tl.distance:!Tl.inRange&&or<Tl.distance)||(Tl.target=Bl,Tl.distance=or,Tl.range=Ll,Tl.inRange=cn,Tl.delta.x=Ol,Tl.delta.y=rn)}return Tl.inRange&&(f.x=Tl.target.x,f.y=Tl.target.y),y.closest=Tl,Tl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},ri=br(vi,"snap"),mi={start:function(t){var i=t.state,f=t.edges,y=i.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],vi.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,f=t.state,y=t.coords,_=f.options,O=f.offsets,K={x:y.x-O[0].x,y:y.y-O[0].y};f.options=ee({},_),f.options.targets=[];for(var Q=0,ge=_.targets||[];Q<ge.length;Q++){var Fe=ge[Q],Ee=void 0;if(Ee=S.func(Fe)?Fe(K.x,K.y,i):Fe){for(var na=0,Da=f.targetFields;na<Da.length;na++){var Qa=Da[na],Ka=Qa[0],nl=Qa[1];if(Ka in Ee||nl in Ee){Ee.x=Ee[Ka],Ee.y=Ee[nl];break}}f.options.targets.push(Ee)}}var wl=vi.set(t);return f.options=_,wl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Zo=br(mi,"snapSize"),$i={aspectRatio:Jo,restrictEdges:to,restrict:Ri,restrictRect:so,restrictSize:Xo,snapEdges:br({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],mi.start(t)):null},set:mi.set,defaults:ee(Nr(mi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:ri,snapSize:Zo,spring:hi,avoid:hi,transform:hi,rubberband:hi},Qo={id:"modifiers",install:function(t){var i=t.interactStatic;for(var f in t.usePlugin(Pl),t.usePlugin(Yo),i.modifiers=$i,$i){var y=$i[f],_=y._defaults,O=y._methods;_._methods=O,t.defaults.perAction[f]=_}}},et=Qo,uo=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ge){var Fe;if(s(this,f),H(C(Fe=i.call(this,Q)),O),O!==_&&H(C(Fe),_),Fe.timeStamp=ge,Fe.originalEvent=O,Fe.type=y,Fe.pointerId=Ve(_),Fe.pointerType=Ca(_),Fe.target=K,Fe.currentTarget=null,y==="tap"){var Ee=Q.getPointerIndex(_);Fe.dt=Fe.timeStamp-Q.pointers[Ee].downTime;var na=Fe.timeStamp-Q.tapTime;Fe.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===Fe.target&&na<500}else y==="doubletap"&&(Fe.dt=_.timeStamp-Q.tapTime,Fe.double=!0);return Fe}return c(f,[{key:"_subtractOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX-=_,this.pageY-=O,this.clientX-=_,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX+=_,this.pageY+=O,this.clientX+=_,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(ye),ni={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=ni,t.defaults.actions.pointerEvents=ni.defaults,ee(t.actions.phaselessTypes,ni.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,f=t.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Pi(t),An({interaction:f,pointer:y,event:_,eventTarget:O,type:"move"},i))},"interactions:down":function(t,i){(function(f,y){for(var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget,ge=f.pointerIndex,Fe=_.pointers[ge].hold,Ee=ra(Q),na={interaction:_,pointer:O,event:K,eventTarget:Q,type:"hold",targets:[],path:Ee,node:null},Da=0;Da<Ee.length;Da++){var Qa=Ee[Da];na.node=Qa,y.fire("pointerEvents:collect-targets",na)}if(na.targets.length){for(var Ka=1/0,nl=0,wl=na.targets;nl<wl.length;nl++){var gl=wl[nl].eventable.options.holdDuration;gl<Ka&&(Ka=gl)}Fe.duration=Ka,Fe.timeout=setTimeout(function(){An({interaction:_,eventTarget:Q,pointer:O,event:K,type:"hold"},y)},Ka)}})(t,i),An(t,i)},"interactions:up":function(t,i){Pi(t),An(t,i),function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerWasMoved||An({interaction:_,eventTarget:Q,pointer:O,event:K,type:"tap"},y)}(t,i)},"interactions:cancel":function(t,i){Pi(t),An(t,i)}},PointerEvent:uo,fire:An,collectEventTargets:Vi,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 An(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=t.targets,ge=Q===void 0?Vi(t,i):Q,Fe=new uo(K,y,_,O,f,i.now());i.fire("pointerEvents:new",{pointerEvent:Fe});for(var Ee={interaction:f,pointer:y,event:_,eventTarget:O,targets:ge,type:K,pointerEvent:Fe},na=0;na<ge.length;na++){var Da=ge[na];for(var Qa in Da.props||{})Fe[Qa]=Da.props[Qa];var Ka=Be(Da.eventable,Da.node);if(Fe._subtractOrigin(Ka),Fe.eventable=Da.eventable,Fe.currentTarget=Da.node,Da.eventable.fire(Fe),Fe._addOrigin(Ka),Fe.immediatePropagationStopped||Fe.propagationStopped&&na+1<ge.length&&ge[na+1].node!==Fe.currentTarget)break}if(i.fire("pointerEvents:fired",Ee),K==="tap"){var nl=Fe.double?An({interaction:f,pointer:y,event:_,eventTarget:O,type:"doubletap"},i):Fe;f.prevTap=nl,f.tapTime=nl.timeStamp}return Fe}function Vi(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=f.getPointerIndex(y),ge=f.pointers[Q];if(K==="tap"&&(f.pointerWasMoved||!ge||ge.downTarget!==O))return[];for(var Fe=ra(O),Ee={interaction:f,pointer:y,event:_,eventTarget:O,type:K,path:Fe,targets:[],node:null},na=0;na<Fe.length;na++){var Da=Fe[na];Ee.node=Da,i.fire("pointerEvents:collect-targets",Ee)}return K==="hold"&&(Ee.targets=Ee.targets.filter(function(Qa){var Ka,nl;return Qa.eventable.options.holdDuration===((Ka=f.pointers[Q])==null||(nl=Ka.hold)==null?void 0:nl.duration)})),Ee.targets}function Pi(t){var i=t.interaction,f=t.pointerIndex,y=i.pointers[f].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var at=Object.freeze({__proto__:null,default:ni});function lt(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var rt={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(ni);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=lt,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var f=t.interaction,y=t.pointerEvent,_=t.eventTarget,O=t.targets;if(y.type==="hold"&&O.length){var K=O[0].eventable.options.holdRepeatInterval;K<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:_,type:"hold",pointer:y,event:y},i)},K))}}})},yi=rt,nt={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,_){var O=f.call(this,y,_);return O===this&&(this.events.options[y]=_),O}},listeners:{"pointerEvents:collect-targets":function(t,i){var f=t.targets,y=t.node,_=t.type,O=t.eventTarget;i.interactables.forEachMatch(y,function(K){var Q=K.events,ge=Q.options;Q.types[_]&&Q.types[_].length&&K.testIgnoreAllow(ge,y,O)&&f.push({node:y,eventable:Q,props:{interactable:K}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(t,i){var f=t.interactable,y=t.options;ee(f.events.options,i.pointerEvents.defaults),ee(f.events.options,y.pointerEvents||{})}}},it=nt,ot={id:"pointer-events",install:function(t){t.usePlugin(at),t.usePlugin(yi),t.usePlugin(it)}},tt=ot,po={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(y,_,O){for(var K=y.getAllElements(),Q=O.window.Promise,ge=Q?[]:null,Fe=function(){var na=K[Ee],Da=y.getRect(na);if(!Da)return 1;var Qa,Ka=qe(O.interactions.list,function(gl){return gl.interacting()&&gl.interactable===y&&gl.element===na&&gl.prepared.name===_.name});if(Ka)Ka.move(),ge&&(Qa=Ka._reflowPromise||new Q(function(gl){Ka._reflowResolve=gl}));else{var nl=Se(Da),wl=function(gl){return{coords:gl,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:nl.x,y:nl.y},client:{x:nl.x,y:nl.y},timeStamp:O.now()});Qa=function(gl,Tl,Ul,Bl,Ll){var Ol=gl.interactions.new({pointerType:"reflow"}),rn={interaction:Ol,event:Ll,pointer:Ll,eventTarget:Ul,phase:"reflow"};Ol.interactable=Tl,Ol.element=Ul,Ol.prevEvent=Ll,Ol.updatePointer(Ll,Ll,Ul,!0),he(Ol.coords.delta),Aa(Ol.prepared,Bl),Ol._doPhase(rn);var or=gl.window,cn=or.Promise,bn=cn?new cn(function(Tn){Ol._reflowResolve=Tn}):void 0;return Ol._reflowPromise=bn,Ol.start(Bl,Tl,Ul),Ol._interacting?(Ol.move(rn),Ol.end(Ll)):(Ol.stop(),Ol._reflowResolve()),Ol.removePointer(Ll,Ll),bn}(O,y,na,_,wl)}ge&&ge.push(Qa)},Ee=0;Ee<K.length&&!Fe();Ee++);return ge&&Q.all(ge).then(function(){return y})}(this,f,t)}},listeners:{"interactions:stop":function(t,i){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(y,_){y.splice(y.indexOf(_),1)}(i.interactions.list,f))}}},gi=po;if(ln.use(Mr),ln.use(Rl),ln.use(tt),ln.use(sn),ln.use(et),ln.use(Oe),ln.use(ll),ln.use(ie),ln.use(gi),ln.default=ln,o(a)==="object"&&a)try{a.exports=ln}catch{}return ln.default=ln,ln})}(Wi,Wi.exports)),Wi.exports}var w1=x1();const Os=A.getDefaultExportFromCjs(w1),$o=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:l,emit:n}){const r=a,o=n,s=e.inject(qc),h=e.inject(Wc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),d=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,b=!1,u=NaN,C=NaN,M=NaN,k=NaN,W=-1,I=-1,j=-1,L=-1,E=r.x,x=r.y,w=r.w,g=r.h;const S=e.ref(),$=e.reactive({i:e.toRef(r,"i"),state:d,wrapper:S,calcXY:ue});function V(de){Ge(de)}function ae(){da()}function Z(de){kn(r.isDraggable)&&(d.draggable=de)}function me(de){kn(r.isResizable)&&(d.resizable=de)}function Ae(de){kn(r.isBounded)&&(d.bounded=de)}function F(de){d.transformScale=de}function ne(de){d.rowHeight=de}function J(de){d.maxRows=de}function ce(){d.rtl=Ms()==="rtl",da()}function Te(de){d.cols=Math.floor(de)}s.increaseItem($),e.onBeforeMount(()=>{d.rtl=Ms()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?d.cols=Xc(s.lastBreakpoint,s.cols):d.cols=s.colNum,d.rowHeight=s.rowHeight,d.containerWidth=s.width!==null?s.width:100,d.margin=s.margin!==void 0?s.margin.map(Number):[10,10],d.maxRows=s.maxRows,kn(r.isDraggable)?d.draggable=s.isDraggable:d.draggable=r.isDraggable,kn(r.isResizable)?d.resizable=s.isResizable:d.resizable=r.isResizable,kn(r.isBounded)?d.bounded=s.isBounded:d.bounded=r.isBounded,d.transformScale=s.transformScale,d.useCssTransforms=s.useCssTransforms,d.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=r.x,x=r.y,g=r.h,w=r.w,un(Pe)}),h.on("updateWidth",V),h.on("compact",ae),h.on("setDraggable",Z),h.on("setResizable",me),h.on("setBounded",Ae),h.on("setTransformScale",F),h.on("setRowHeight",ne),h.on("setMaxRows",J),h.on("directionchange",ce),h.on("setColNum",Te)}),e.onBeforeUnmount(()=>{h.off("updateWidth",V),h.off("compact",ae),h.off("setDraggable",Z),h.off("setResizable",me),h.off("setBounded",Ae),h.off("setTransformScale",F),h.off("setRowHeight",ne),h.off("setMaxRows",J),h.off("directionchange",ce),h.off("setColNum",Te),c.value&&(c.value.unset(),c.value=null),s.decreaseItem($)}),l({state:d,wrapper:S});const $e=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,fe=e.computed(()=>d.resizable&&!r.static),N=e.computed(()=>s.isMirrored?!d.rtl:d.rtl),te=e.computed(()=>(d.draggable||d.resizable)&&!r.static),U=f1("item"),Ce=e.computed(()=>({[U.b()]:!0,[U.bm("resizable")]:fe.value,[U.bm("static")]:r.static,[U.bm("resizing")]:d.isResizing,[U.bm("dragging")]:d.isDragging,[U.bm("transform")]:d.useCssTransforms,[U.bm("rtl")]:N.value,[U.bm("no-touch")]:$e&&te.value})),Me=e.computed(()=>[U.be("resizer"),N.value&&U.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,de=>{d.draggable=de}),e.watch(()=>r.static,()=>{un(H),un(he)}),e.watch(()=>d.draggable,()=>{un(H)}),e.watch(()=>r.isResizable,de=>{d.resizable=de}),e.watch(()=>r.isBounded,de=>{d.bounded=de}),e.watch(()=>d.resizable,()=>{un(he)}),e.watch(()=>d.rowHeight,()=>{un(Pe),un(ra)}),e.watch([()=>d.cols,()=>d.containerWidth],()=>{un(he),un(Pe),un(ra)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{un(he)}),e.watch(N,()=>{un(he),un(Pe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const de=s.margin;!de||de[0]===d.margin[0]&&de[1]===d.margin[1]||(d.margin=de.map(Number),un(Pe),un(ra))});function Pe(){r.x+r.w>d.cols?(E=0,w=r.w>d.cols?d.cols:r.w):(E=r.x,w=r.w);const de=pa(E,x,w,g);d.isDragging&&(de.top=d.dragging.top,N.value?de.right=d.dragging.left:de.left=d.dragging.left),d.isResizing&&(de.width=d.resizing.width,de.height=d.resizing.height);let ma;d.useCssTransforms?N.value?ma=c1(de.top,de.right,de.width,de.height):ma=s1(de.top,de.left,de.width,de.height):N.value?ma=d1(de.top,de.right,de.width,de.height):ma=u1(de.top,de.left,de.width,de.height),d.style=ma}function ra(){const de={};for(const ma of["width","height"]){const oa=d.style[ma].match(/^(\d+)px$/);if(!oa)return;de[ma]=oa[1]}o("container-resized",r.i,r.h,r.w,de.height,de.width)}function Ta(de){if(r.static)return;const ma=de.type;if(ma==="resizestart"&&d.isResizing||ma!=="resizestart"&&!d.isResizing)return;const oa=As(de);if(kn(oa))return;const{x:Ve,y:_a}=oa,ze={width:0,height:0};let ya;switch(ma){case"resizestart":{he(),W=w,I=g,ya=pa(E,x,w,g),ze.width=ya.width,ze.height=ya.height,d.resizing=ze,d.isResizing=!0;break}case"resizemove":{!de.edges.right&&!de.edges.left&&(M=Ve),!de.edges.top&&!de.edges.bottom&&(k=_a);const La=zs(M,k,Ve,_a);N.value?ze.width=d.resizing.width-La.deltaX/d.transformScale:ze.width=d.resizing.width+La.deltaX/d.transformScale,ze.height=d.resizing.height+La.deltaY/d.transformScale,d.resizing=ze;break}case"resizeend":{ya=pa(E,x,w,g),ze.width=ya.width,ze.height=ya.height,d.resizing={width:-1,height:-1},d.isResizing=!1;break}}ya=Be(ze.height,ze.width),ya.w<r.minW&&(ya.w=r.minW),ya.w>r.maxW&&(ya.w=r.maxW),ya.h<r.minH&&(ya.h=r.minH),ya.h>r.maxH&&(ya.h=r.maxH),ya.h<1&&(ya.h=1),ya.w<1&&(ya.w=1),M=Ve,k=_a,(w!==ya.w||g!==ya.h)&&o("resize",r.i,ya.h,ya.w,ze.height,ze.width),de.type==="resizeend"&&(W!==w||I!==g)&&o("resized",r.i,ya.h,ya.w,ze.height,ze.width),h.emit("resizeEvent",de.type,r.i,E,x,ya.h,ya.w)}function ee(de){if(r.static||d.isResizing)return;const ma=de.type;if(ma==="dragstart"&&d.isDragging||ma!=="dragstart"&&!d.isDragging)return;const oa=As(de);if(kn(oa))return;const{x:Ve,y:_a}=oa,ze=de.target;if(!ze.offsetParent)return;const ya={top:0,left:0};switch(ma){case"dragstart":{j=E,L=x;const za=ze.offsetParent.getBoundingClientRect(),ha=ze.getBoundingClientRect(),Ca=ha.left/d.transformScale,Ne=za.left/d.transformScale,ye=ha.right/d.transformScale,Y=za.right/d.transformScale,xe=ha.top/d.transformScale,pe=za.top/d.transformScale;N.value?ya.left=(ye-Y)*-1:ya.left=Ca-Ne,ya.top=xe-pe,d.dragging=ya,d.isDragging=!0;break}case"dragmove":{const za=zs(u,C,Ve,_a);if(N.value?ya.left=d.dragging.left-za.deltaX/d.transformScale:ya.left=d.dragging.left+za.deltaX/d.transformScale,ya.top=d.dragging.top+za.deltaY/d.transformScale,d.bounded){const ha=ze.offsetParent.clientHeight-Se(r.h,d.rowHeight,d.margin[1]);ya.top=se(ya.top,0,ha);const Ca=ua(),Ne=d.containerWidth-Se(r.w,Ca,d.margin[0]);ya.left=se(ya.left,0,Ne)}d.dragging=ya;break}case"dragend":{const za=ze.offsetParent.getBoundingClientRect(),ha=ze.getBoundingClientRect(),Ca=ha.left/d.transformScale,Ne=za.left/d.transformScale,ye=ha.right/d.transformScale,Y=za.right/d.transformScale,xe=ha.top/d.transformScale,pe=za.top/d.transformScale;N.value?ya.left=(ye-Y)*-1:ya.left=Ca-Ne,ya.top=xe-pe,d.dragging={top:-1,left:-1},d.isDragging=!1;break}}let La;N.value,La=ue(ya.top,ya.left),u=Ve,C=_a,(E!==La.x||x!==La.y)&&o("move",r.i,La.x,La.y),de.type==="dragend"&&(j!==E||L!==x)&&o("moved",r.i,La.x,La.y),h.emit("dragEvent",de.type,r.i,La.x,La.y,g,w)}function pa(de,ma,oa,Ve){const _a=ua();let ze;return N.value?ze={right:Math.round(_a*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*ma+(ma+1)*d.margin[1]),width:oa===1/0?oa:Math.round(_a*oa+Math.max(0,oa-1)*d.margin[0]),height:Ve===1/0?Ve:Math.round(d.rowHeight*Ve+Math.max(0,Ve-1)*d.margin[1])}:ze={left:Math.round(_a*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*ma+(ma+1)*d.margin[1]),width:oa===1/0?oa:Math.round(_a*oa+Math.max(0,oa-1)*d.margin[0]),height:Ve===1/0?Ve:Math.round(d.rowHeight*Ve+Math.max(0,Ve-1)*d.margin[1])},ze}function ue(de,ma){const oa=ua();let Ve=Math.round((ma-d.margin[0])/(oa+d.margin[0])),_a=Math.round((de-d.margin[1])/(d.rowHeight+d.margin[1]));return Ve=Math.max(Math.min(Ve,d.cols-w),0),_a=Math.max(Math.min(_a,d.maxRows-g),0),{x:Ve,y:_a}}function ua(){return(d.containerWidth-d.margin[0]*(d.cols+1))/d.cols}function Se(de,ma,oa){return Number.isFinite(de)?Math.round(ma*de+Math.max(0,de-1)*oa):de}function se(de,ma,oa){return Math.max(Math.min(de,oa),ma)}function Be(de,ma,oa=!1){const Ve=ua();let _a=Math.round((ma+d.margin[0])/(Ve+d.margin[0])),ze=0;return oa?ze=Math.ceil((de+d.margin[1])/(d.rowHeight+d.margin[1])):ze=Math.round((de+d.margin[1])/(d.rowHeight+d.margin[1])),_a=Math.max(Math.min(_a,d.cols-E),0),ze=Math.max(Math.min(ze,d.maxRows-x),0),{w:_a,h:ze}}function Ge(de,ma){d.containerWidth=de}function da(){Pe()}function Ja(){!c.value&&S.value&&(c.value=Os(S.value),d.useStyleCursor||c.value.styleCursor(!1))}const R=Ts(ee);function H(){if(Ja(),!!c.value)if(d.draggable&&!r.static){const de={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(de),m||(m=!0,c.value.on("dragstart dragmove dragend",ma=>{ma.type==="dragmove"?R(ma):ee(ma)}))}else c.value.draggable({enabled:!1})}const X=Ts(Ta);function he(){if(Ja(),!!c.value)if(d.resizable&&!r.static){const de=pa(0,0,r.maxW,r.maxH),ma=pa(0,0,r.minW,r.minH),oa={edges:{left:N.value?`.${Me.value[0]}`:!1,right:N.value?!1:`.${Me.value[0]}`,bottom:`.${Me.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:ma.height*d.transformScale,width:ma.width*d.transformScale},max:{height:de.height*d.transformScale,width:de.width*d.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(oa.modifiers=[Os.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(oa),b||(b=!0,c.value.on("resizestart resizemove resizeend",Ve=>{Ve.type==="resizemove"?X(Ve):Ta(Ve)}))}else c.value.resizable({enabled:!1})}return(de,ma)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(Ce.value),style:e.normalizeStyle(d.style)},[e.renderSlot(de.$slots,"default"),fe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Me.value)},null,2)):e.createCommentVNode("",!0)],6))}}),fi=typeof window<"u";var Ls;fi&&(Ls=window==null?void 0:window.navigator)!=null&&Ls.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Rs(a){return a!=null}function $s(){}const _1=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(_1)));const S1=fi&&("ontouchstart"in window||C1()>0),E1=S1?"pointerdown":"click";function C1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function D1(a,l,n=window.Event){const{type:r,bubbles:o=!1,cancelable:s=!1,...h}=l;if(!Rs(r)||r==="")return!1;let c;return Rs(n)?c=new n(r,{bubbles:o,cancelable:s}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,o,s)),Object.assign(c,h),a.dispatchEvent(c)}const T1="clickoutside",B1=new Set;fi&&document.addEventListener(E1,a=>{const l=a.target,n=a.composedPath&&a.composedPath();B1.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&D1(r,{type:T1})})},!0);const N1=[["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 Do;if(fi){for(const a of N1)if(a[1]in document){Do=a;break}}e.computed(()=>!1);const A1=new Set,z1=new WeakMap;if(fi&&Do){const a=Do[2],l=Do[4];document.addEventListener(l,()=>{if(A1.forEach(n=>{n.value=!1}),document[a]){const n=z1.get(document[a]);n&&(n.value=!0)}},!1)}const Qc=new Map;Qc.set("x",0);Qc.set("y",0);var di=[],M1=function(){return di.some(function(a){return a.activeTargets.length>0})},I1=function(){return di.some(function(a){return a.skippedTargets.length>0})},Vs="ResizeObserver loop completed with undelivered notifications.",O1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Vs}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Vs),window.dispatchEvent(a)},Qi;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Qi||(Qi={}));var pi=function(a){return Object.freeze(a)},L1=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,pi(this)}return a}(),eu=function(){function a(l,n,r,o){return this.x=l,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,pi(this)}return a.prototype.toJSON=function(){var l=this,n=l.x,r=l.y,o=l.top,s=l.right,h=l.bottom,c=l.left,d=l.width,m=l.height;return{x:n,y:r,top:o,right:s,bottom:h,left:c,width:d,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Mt=function(a){return a instanceof SVGElement&&"getBBox"in a},au=function(a){if(Mt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var o=a,s=o.offsetWidth,h=o.offsetHeight;return!(s||h||a.getClientRects().length)},Ps=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},R1=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},Ji=typeof window<"u"?window:{},_o=new WeakMap,Fs=/auto|scroll/,$1=/^tb|vertical/,V1=/msie|trident/i.test(Ji.navigator&&Ji.navigator.userAgent),Mn=function(a){return parseFloat(a||"0")},Bi=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new L1((n?l:a)||0,(n?a:l)||0)},js=pi({devicePixelContentBoxSize:Bi(),borderBoxSize:Bi(),contentBoxSize:Bi(),contentRect:new eu(0,0,0,0)}),lu=function(a,l){if(l===void 0&&(l=!1),_o.has(a)&&!l)return _o.get(a);if(au(a))return _o.set(a,js),js;var n=getComputedStyle(a),r=Mt(a)&&a.ownerSVGElement&&a.getBBox(),o=!V1&&n.boxSizing==="border-box",s=$1.test(n.writingMode||""),h=!r&&Fs.test(n.overflowY||""),c=!r&&Fs.test(n.overflowX||""),d=r?0:Mn(n.paddingTop),m=r?0:Mn(n.paddingRight),b=r?0:Mn(n.paddingBottom),u=r?0:Mn(n.paddingLeft),C=r?0:Mn(n.borderTopWidth),M=r?0:Mn(n.borderRightWidth),k=r?0:Mn(n.borderBottomWidth),W=r?0:Mn(n.borderLeftWidth),I=u+m,j=d+b,L=W+M,E=C+k,x=c?a.offsetHeight-E-a.clientHeight:0,w=h?a.offsetWidth-L-a.clientWidth:0,g=o?I+L:0,S=o?j+E:0,$=r?r.width:Mn(n.width)-g-w,V=r?r.height:Mn(n.height)-S-x,ae=$+I+w+L,Z=V+j+x+E,me=pi({devicePixelContentBoxSize:Bi(Math.round($*devicePixelRatio),Math.round(V*devicePixelRatio),s),borderBoxSize:Bi(ae,Z,s),contentBoxSize:Bi($,V,s),contentRect:new eu(u,d,$,V)});return _o.set(a,me),me},ru=function(a,l,n){var r=lu(a,n),o=r.borderBoxSize,s=r.contentBoxSize,h=r.devicePixelContentBoxSize;switch(l){case Qi.DEVICE_PIXEL_CONTENT_BOX:return h;case Qi.BORDER_BOX:return o;default:return s}},P1=function(){function a(l){var n=lu(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=pi([n.borderBoxSize]),this.contentBoxSize=pi([n.contentBoxSize]),this.devicePixelContentBoxSize=pi([n.devicePixelContentBoxSize])}return a}(),nu=function(a){if(au(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},F1=function(){var a=1/0,l=[];di.forEach(function(s){if(s.activeTargets.length!==0){var h=[];s.activeTargets.forEach(function(c){var d=new P1(c.target),m=nu(c.target);h.push(d),c.lastReportedSize=ru(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,h,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var o=r[n];o()}return a},Hs=function(a){di.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(nu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},j1=function(){var a=0;for(Hs(a);M1();)a=F1(),Hs(a);return I1()&&O1(),a>0},mt,iu=[],H1=function(){return iu.splice(0).forEach(function(a){return a()})},U1=function(a){if(!mt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return H1()}).observe(n,r),mt=function(){n.textContent="".concat(l?l--:l++)}}iu.push(a),mt()},q1=function(a){U1(function(){requestAnimationFrame(a)})},To=0,W1=function(){return!!To},K1=250,G1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Us=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qs=function(a){return a===void 0&&(a=0),Date.now()+a},yt=!1,Y1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=K1),!yt){yt=!0;var r=qs(l);q1(function(){var o=!1;try{o=j1()}finally{if(yt=!1,l=r-qs(),!W1())return;o?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,G1)};document.body?n():Ji.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Us.forEach(function(n){return Ji.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Us.forEach(function(n){return Ji.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Nt=new Y1,Ws=function(a){!To&&a>0&&Nt.start(),To+=a,!To&&Nt.stop()},J1=function(a){return!Mt(a)&&!R1(a)&&getComputedStyle(a).display==="inline"},X1=function(){function a(l,n){this.target=l,this.observedBox=n||Qi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=ru(this.target,this.observedBox,!0);return J1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),Z1=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),So=new WeakMap,Ks=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},Eo=function(){function a(){}return a.connect=function(l,n){var r=new Z1(l,n);So.set(l,r)},a.observe=function(l,n,r){var o=So.get(l),s=o.observationTargets.length===0;Ks(o.observationTargets,n)<0&&(s&&di.push(o),o.observationTargets.push(new X1(n,r&&r.box)),Ws(1),Nt.schedule())},a.unobserve=function(l,n){var r=So.get(l),o=Ks(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&di.splice(di.indexOf(r),1),r.observationTargets.splice(o,1),Ws(-1))},a.disconnect=function(l){var n=this,r=So.get(l);r.observationTargets.slice().forEach(function(o){return n.unobserve(l,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),Q1=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Eo.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Eo.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Eo.unobserve(this,l)},a.prototype.disconnect=function(){Eo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Vo=new WeakMap;function ev(a){var l;for(let n=0,r=a.length;n<r;++n){const o=a[n],s=Vo.get(o.target);if(typeof s=="function"){const{inlineSize:h,blockSize:c}=((l=o.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:d,offsetHeight:m}=o.target;s(Object.assign(o,{offsetWidth:d,offsetHeight:m,width:h??d,height:c??m}))}}}const ou=new(fi&&window.ResizeObserver||Q1)(ev);function Gs(a,l){Vo.set(a,l),ou.observe(a)}function Ys(a){Vo.has(a)&&(ou.unobserve(a),Vo.delete(a))}function av(a={}){let l=$s;const n=e.watch(()=>e.unref(a.target),o=>{l(),!(!o||typeof a.onResize!="function")&&(Gs(o,a.onResize),l=()=>{Ys(o),l=$s})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Gs,unobserveResize:Ys,unobserve:r}}const lv=e.ref(!1);e.computed(()=>lv.value);const Js="__theme_style__",gt="__theme_observer__",Xs=e.reactive(new Map),Zs=new Map;e.watch(Xs,()=>{if(!fi)return;Zs.clear();const a=document.head.querySelector(`#${Js}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${gt} { width: 1px }`,r=1;for(const[o,[s,h]]of Xs.entries())n+=` html.${s} .${gt}, .${h} .${gt} { width: ${++r}px }`,Zs.set(r,o);l.textContent=n,l.id=Js,document.head.appendChild(l)});const tu=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:l,emit:n}){const r=a,o=n,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}),h=new Map,c=e.ref(r.layout),d=e.ref(),{observeResize:m,unobserveResize:b}=av(),u=e1();u.on("resizeEvent",C),u.on("dragEvent",M),e.onBeforeMount(()=>{o("layout-before-mount",c.value)}),e.onMounted(()=>{o("layout-mounted",c.value),e.nextTick(()=>{p1(c.value),s.originalLayout=c.value,e.nextTick(()=>{V(),d.value&&m(d.value,a1(E,16)),Ci(c.value,r.verticalCompact),o("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{u.clearAll(),d.value&&b(d.value)});function C(Z,me,Ae,F,ne,J){S(Z,me,Ae,F,ne,J)}function M(Z,me,Ae,F,ne,J){g(Z,me,Ae,F,ne,J)}e.watch(()=>s.width,(Z,me)=>{e.nextTick(()=>{u.emit("updateWidth",Z),me===-1&&e.nextTick(()=>{o("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,j()}),e.watch(()=>r.colNum,Z=>{u.emit("setColNum",Z)}),e.watch(()=>r.rowHeight,Z=>{u.emit("setRowHeight",Z)}),e.watch(()=>r.isDraggable,Z=>{u.emit("setDraggable",Z)}),e.watch(()=>r.isResizable,Z=>{u.emit("setResizable",Z)}),e.watch(()=>r.isBounded,Z=>{u.emit("setBounded",Z)}),e.watch(()=>r.transformScale,Z=>{u.emit("setTransformScale",Z)}),e.watch(()=>r.responsive,Z=>{Z||(o("update:layout",s.originalLayout),u.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Z=>{u.emit("setMaxRows",Z)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(qc,e.reactive({...e.toRefs(r),...e.toRefs(s),increaseItem:k,decreaseItem:W})),e.provide(Wc,u),l({state:s,getItem:I,resizeEvent:S,dragEvent:g,layoutUpdate:j});function k(Z){h.set(Z.i,Z)}function W(Z){h.delete(Z.i)}function I(Z){return h.get(Z)}function j(){if(!kn(c.value)&&!kn(s.originalLayout)){if(c.value.length!==s.originalLayout.length){const Z=ae(c.value,s.originalLayout);if(Z.length>0)if(c.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Z);else{const me=new Set(Z.map(Ae=>Ae.i));s.originalLayout=s.originalLayout.filter(Ae=>!me.has(Ae.i))}s.lastLayoutLength=c.value.length,V()}Ci(c.value,r.verticalCompact),u.emit("updateWidth",s.width),L(),o("layout-updated",c.value)}}function L(){s.mergedStyle={height:x()}}function E(){d.value&&(s.width=d.value.offsetWidth),u.emit("resizeEvent")}function x(){if(!r.autoSize)return;const Z=parseFloat(r.margin[1]);return r1(c.value)*(r.rowHeight+Z)+Z+"px"}let w;function g(Z,me,Ae,F,ne,J){let ce=Bs(c.value,me);kn(ce)&&(ce={h:0,w:0,x:0,y:0,i:""}),Z==="dragstart"&&!r.verticalCompact&&(w=c.value.reduce((Te,{i:$e,x:fe,y:N})=>({...Te,[$e]:{x:fe,y:N}}),{})),Z==="dragmove"||Z==="dragstart"?(s.placeholder.i=me,s.placeholder.x=ce.x,s.placeholder.y=ce.y,s.placeholder.w=J,s.placeholder.h=ne,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),c.value=Bt(c.value,ce,Ae,F,!0,r.preventCollision),r.restoreOnDrag?(ce.static=!0,Ci(c.value,r.verticalCompact,w),ce.static=!1):Ci(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="dragend"&&(w=void 0,o("layout-updated",c.value))}function S(Z,me,Ae,F,ne,J){let ce=Bs(c.value,me);kn(ce)&&(ce={h:0,w:0,x:0,y:0,i:""});let Te;if(r.preventCollision){const $e=Gc(c.value,{...ce,w:J,h:ne}).filter(fe=>fe.i!==ce.i);if(Te=$e.length>0,Te){let fe=1/0,N=1/0;$e.forEach(te=>{te.x>ce.x&&(fe=Math.min(fe,te.x)),te.y>ce.y&&(N=Math.min(N,te.y))}),Number.isFinite(fe)&&(ce.w=fe-ce.x),Number.isFinite(N)&&(ce.h=N-ce.y)}}Te||(ce.w=J,ce.h=ne),Z==="resizestart"||Z==="resizemove"?(s.placeholder.i=me,s.placeholder.x=Ae,s.placeholder.y=F,s.placeholder.w=ce.w,s.placeholder.h=ce.h,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):Z&&e.nextTick(()=>{s.isDragging=!1}),r.responsive&&$(),Ci(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="resizeend"&&o("layout-updated",c.value)}function $(){const Z=m1(r.breakpoints,s.width);if(Z===s.lastBreakpoint)return;const me=Xc(Z,r.cols);!kn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=Tt(c.value));const Ae=y1(s.originalLayout,s.layouts,r.breakpoints,Z,s.lastBreakpoint,me,r.verticalCompact);s.layouts[Z]=Ae,s.lastBreakpoint!==Z&&o("breakpoint-changed",Z,Ae),c.value=Ae,o("update:layout",Ae),s.lastBreakpoint=Z,u.emit("setColNum",me)}function V(){s.layouts=Object.assign({},r.responsiveLayouts)}function ae(Z,me){const Ae=new Set(me.map(ce=>ce.i)),F=new Set(Z.map(ce=>ce.i)),ne=Z.filter(ce=>!Ae.has(ce.i)),J=me.filter(ce=>!F.has(ce.i));return ne.concat(J)}return(Z,me)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:d,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Z.$slots.default?e.renderSlot(Z.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,Ae=>(e.openBlock(),e.createBlock($o,e.mergeProps({key:Ae.i,ref_for:!0},Ae),{default:e.withCtx(()=>[e.renderSlot(Z.$slots,"item",{item:Ae})]),_:2},1040))),128)),e.withDirectives(e.createVNode($o,{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(l){console.error("vite-plugin-css-injected-by-js",l)}})();const rv={key:0,class:"item-view-group"},nv={key:0,class:"item-view-group"},iv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=A.useModelComp(A.pinia),{isEdit:r}=A.storeToRefs(n),o=Yn(A.pinia),s=l,h=a,c=e.ref(""),d=e.computed(()=>h==null?void 0:h.children),m=e.computed(()=>{var L,E,x,w;return((L=h==null?void 0:h.children)==null?void 0:L.length)>0&&((E=h==null?void 0:h.children)!=null&&E.every(g=>g==null?void 0:g.layout))?(w=(x=h==null?void 0:h.children)==null?void 0:x[0])==null?void 0:w.layout:"vertical"}),b=L=>{c.value=L,s("radioChange",L)},u=e.computed(()=>{var L,E;return((E=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),C=e.ref((h==null?void 0:h.level)+1),M=e.computed(()=>{if(!(h!=null&&h.children)||!Array.isArray(h.children)||h.children.length<2)return!1;const L=h.children.some(x=>(x==null?void 0:x.name)==="测量系统配置表"&&(x==null?void 0:x.comp)==="ParentItem"),E=h.children.some(x=>(x==null?void 0:x.name)==="测量系统传递表"&&(x==null?void 0:x.comp)==="ParentItem");return L&&E}),k=e.computed(()=>{var E,x,w,g,S,$;let L=(E=h==null?void 0:h.children)==null?void 0:E.filter(V=>V==null?void 0:V.choice);if(o.setSelectTab((x=L==null?void 0:L[0])==null?void 0:x.choiceName),(c==null?void 0:c.value)!=="")return(w=h==null?void 0:h.children)==null?void 0:w.filter(V=>!(V!=null&&V.choiceName)||(V==null?void 0:V.choiceName)===(c==null?void 0:c.value));{let V=(S=(g=h==null?void 0:h.children)==null?void 0:g.find(ae=>ae==null?void 0:ae.choice))==null?void 0:S.choiceName;return($=h==null?void 0:h.children)==null?void 0:$.filter(ae=>!(ae!=null&&ae.choiceName)||(ae==null?void 0:ae.choiceName)===V)}}),W=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(x=>{const w=typeof x=="string"?x:JSON.stringify(x);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>h==null?void 0:h.children,()=>{M.value},{deep:!0});const I=L=>{s("rowClick",L)},j=(L,E)=>{s("routeUrl",L,E)};return(L,E)=>u.value?(e.openBlock(),e.createBlock(e.unref(tu),{key:0,layout:d.value,"onUpdate:layout":E[0]||(E[0]=x=>d.value=x),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(x,w)=>(e.openBlock(),e.createBlock(e.unref($o),{key:x.i,x:x.x,y:x.y,"min-h":x.minH,"max-h":x.maxH,"min-w":x.minW,w:x.w,h:x.h,i:x.i},{default:e.withCtx(()=>{var g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[(($=(S=x==null?void 0:x.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((V=x==null?void 0:x.component)!=null&&V.name)?(e.openBlock(),e.createElementBlock("div",rv,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((ae=x==null?void 0:x.component)==null?void 0:ae.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)((Z=x==null?void 0:x.component)==null?void 0:Z.comp)),{pageLayout:m.value,config:{showIndex:(me=e.unref(ur)[w])==null?void 0:me.showIndex,allowMove:(Ae=e.unref(ur)[w])==null?void 0:Ae.allowMove,viewport:(F=e.unref(ur)[w])==null?void 0:F.viewport,status:(ne=e.unref(ur)[w])==null?void 0:ne.status},related:x==null?void 0:x.relatedTables,compName:x==null?void 0:x.component.name,compNames:e.unref(Dc),itemData:(J=x==null?void 0:x.component)==null?void 0:J.compData,childItemData:(ce=x==null?void 0:x.component)==null?void 0:ce.itemChildData,key:e.unref(Gn),cacheNewData:e.unref(Cc),onChange:e.unref(Io),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),parentTableId:(Te=x==null?void 0:x.component)==null?void 0:Te.tableId,allMapContents:e.unref(Et),children:($e=x==null?void 0:x.component)==null?void 0:$e.children,level:C.value,onRowClick:I,onRouteUrl:j,onClickTrigger:e.unref(Tc),onClickMainKey:e.unref(Bc),onRadioChange:b},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(k.value,(x,w)=>{var g,S;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(x==null?void 0:x.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(w)===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[((S=x==null?void 0:x.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&x.name?(e.openBlock(),e.createElementBlock("div",nv,[W(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(x.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(x.comp)),{compName:x.name,groupNames:x==null?void 0:x.nameContents,config:{showIndex:x==null?void 0:x.showIndex,allowMove:x==null?void 0:x.allowMove,viewport:x==null?void 0:x.viewport,status:x==null?void 0:x.status},itemData:x==null?void 0:x.compData,related:x==null?void 0:x.relatedTables,childItemData:x==null?void 0:x.itemChildData,key:e.unref(Gn),onChange:e.unref(Io),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),parentTableId:x==null?void 0:x.tableId,allMapContents:e.unref(Et),children:x==null?void 0:x.children,level:C.value,onRowClick:I,onRouteUrl:j,onRadioChange:b},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),ov=Zl._export_sfc(iv,[["__scopeId","data-v-bafbdd45"]]),tv={class:"radio-group-container"},sv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(),s=Yn(A.pinia),{selectTab:h}=A.storeToRefs(s);e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=h.value},{immediate:!0,deep:!0});const c=d=>{o.value=d,r("radioChange",o.value)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",tv,[e.createVNode(sl.ssRadio,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=b=>o.value=b),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),cv=Zl._export_sfc(sv,[["__scopeId","data-v-ed48c2f8"]]),su=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"}]),uv={TABLE:Mc,FORM:Es,STATICFORM:Ic,TABLEOPERATE:e4,TABLESTYLE:y4,TABLEEXTEND:b4,TABLEINTERACTION:w4,FORMOPERATE:Cs,FOLD:Z4,CALCULATOR:n2,METHODBUTTON:t2,AVATARUPLOAD:os.ssAvatar,SIGNATURE:os.ssSignature,FORMTOP:Es,STEP:b2,STEPOPERATE:H4,TIMELINE:E2,TIMELINEOPERATE:Y4,FORMTOPOPERATE:Cs,SIGNATUREOPERATE:m2,AVATARUPLOADOPERATE:u2,TABS:T2,TABSOPERATE:f6,CHART:T6,CHARTOPERATE:V6,LAYOUT:j6,LAYOUTOPERATE:X6,PARENTITEM:ov,RADIO:cv};function zi(a){return uv[a==null?void 0:a.toUpperCase()]||null}exports.De=tu;exports.activeStepInfo=Di;exports.addContents=Xi;exports.addVisibleDialog=zt;exports.affixItems=B0;exports.allMapContents=Et;exports.analyzeMenu=ic;exports.cacheNewData=Cc;exports.clickMainKey=Bc;exports.clickSavePage=T0;exports.clickStep=Ac;exports.clickTrigger=Tc;exports.compId=Gn;exports.compNames=Dc;exports.compShow=Ai;exports.existLayouts=R0;exports.fixChangeValue=Po;exports.generateLayouts=f4;exports.getComponent=zi;exports.getComponents=Zi;exports.getPageConstruct=Xd;exports.getPageData=en;exports.getSliceContLength=H0;exports.gridRowHeight=s4;exports.gridRowHeightHmPg=t4;exports.isStepLayout=zc;exports.onBack=C0;exports.onButtonChange=M0;exports.onChange=Io;exports.onClick=D0;exports.onClickStep=$0;exports.onContentChange=Oo;exports.onExtendTaskEnd=L0;exports.onOk=I0;exports.onPageBack=P0;exports.onPageChange=Lo;exports.onSelectFixContent=E0;exports.renderShowItems=Sc;exports.showItems=ur;exports.sliceTableLength=Ec;exports.slotContent=su;exports.ssTable=Mc;exports.st=$o;exports.stepItems=U0;exports.tabChange=V0;exports.toolBar=O0;exports.useFormComp=At;exports.useModelLoader=Df;exports.verifyButton=F0;
|
|
25
|
+
${xr}`,duration:5e3,showClose:!0})}else qa.ElMessage.success("导出成功")}else qa.ElMessage.error(((el=$l==null?void 0:$l.data)==null?void 0:el.message)||"导出失败")}catch(Sa){console.error("导出paraform失败:",Sa),qa.ElMessage.error("导出失败:"+((Sa==null?void 0:Sa.message)||"未知错误"))}finally{Ea.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((xa=Hl.value)==null?void 0:xa.length)===0)return qa.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((al=ze.value)==null?void 0:al.length)===0)return qa.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Pa=(ve=F.value)==null?void 0:ve.map(Re=>Re==null?void 0:Re.prop))==null?void 0:Pa.filter(Re=>Re!=="操作")],Sa=p==="导出全部"?ze.value:Hl.value;const B=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Sa=Sa==null?void 0:Sa.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ta])=>!B.includes(ta)))),Ea=["序号",...Ea],Sa=Sa==null?void 0:Sa.map((Re,ta)=>({序号:ta+1,...Re}));let G=(u==null?void 0:u.compName)||"表格信息";Wo(Sa,G,Ea,G)}else if(p==="OCR识别")ba.value=!0,Ia.value=[],Oa.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0;else if(p==="迁移")f.selectRow=v,f.show=!0;else if(p==="生成方法"){let Ea=await e0(v),Sa;v!==""?Sa=[v]:Sa=A.cloneDeep(ze.value),Sa=Sa==null?void 0:Sa.map(G=>(G.输出值=Ea,G));const B={fixContent:Sa,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};Ae("change",B)}else if(((ga=T==null?void 0:T.extra)==null?void 0:ga.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=A.cloneDeep(ze.value);const B={fixContent:await xt(Ea,F==null?void 0:F.value,"Manual",ze.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};Ae("change",B)}}},uu=async(p,v)=>{var T,z,P,D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve;try{let Pa,ga;const Ea=(T=de.value[Se.value+S])==null?void 0:T.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="structureMethod"}),Sa=(z=de.value[Se.value+S])==null?void 0:z.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="structure"}),B=Ea==null?void 0:Ea.find(Ba=>{var ol,Wa;return((Wa=(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.pageData)==null?void 0:Wa.method)==="保存"});if(!B)return;const G=(le=(re=de.value[(D=(P=B==null?void 0:B.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Ba=>{var ol;return((ol=Ba==null?void 0:Ba.key)==null?void 0:ol.type)==="data"}))==null?void 0:le.find(Ba=>{var ol,Wa,fl,hl;return((Wa=(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.tableData)==null?void 0:Wa.算法名称)===((hl=(fl=B==null?void 0:B.value)==null?void 0:fl.pageData)==null?void 0:hl.method)});if(!G)return;const Re={buttonName:(be=(q=B==null?void 0:B.value)==null?void 0:q.pageData)==null?void 0:be.method,api:(Ke=(De=G==null?void 0:G.value)==null?void 0:De.tableData)==null?void 0:Ke.算法体,content:Sa==null?void 0:Sa.map(Ba=>{var ol;return(ol=Ba==null?void 0:Ba.value)==null?void 0:ol.pageData}),extraContent:[],extraValues:(ea=(je=B==null?void 0:B.value)==null?void 0:je.pageData)==null?void 0:ea.data,methodName:(Na=(ka=B==null?void 0:B.value)==null?void 0:ka.pageData)==null?void 0:Na.path};if(!p)return;const ta={...p,compData:(Ra=p==null?void 0:p.compData)==null?void 0:Ra.map(Ba=>{var ol;return(Ba==null?void 0:Ba.key)==="formContent"?{...Ba,contents:(ol=Ba==null?void 0:Ba.contents)==null?void 0:ol.map(Wa=>(Wa==null?void 0:Wa.prop)===v?{...Wa,value:""}:Wa)}:Ba})},we={key:{pageKey:Se.value+S,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ta}},fa=await qa.axios.post(Re.api,we,{headers:{"Content-Type":"application/json"}});return((la=fa==null?void 0:fa.data)==null?void 0:la.code)===200&&(Pa=(xa=(el=fa==null?void 0:fa.data)==null?void 0:el.result)==null?void 0:xa.latestReportCode,ga=(ve=(al=fa==null?void 0:fa.data)==null?void 0:al.result)==null?void 0:ve.status),{newMainKeyValue:Pa,newStatus:ga}}catch(Pa){throw qa.ElMessage.error(Pa),new Error(Pa)}},Ot=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const du=async(p,v,T)=>{var q,be;let z=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const le=A.cloneDeep(Se).value+S+z;if(le){Ot.value="",D=(q=de.value[le])==null?void 0:q.filter(je=>{var ea;return((ea=je==null?void 0:je.key)==null?void 0:ea.type)==="structure"});const De=D==null?void 0:D.find(je=>{var ea,ka,Na;return((Na=(ka=(ea=je==null?void 0:je.value)==null?void 0:ea.pageData)==null?void 0:ka.comp)==null?void 0:Na.toUpperCase())==="FORM"});re={...(be=De==null?void 0:De.value)==null?void 0:be.pageData,id:De==null?void 0:De.id};const Ke=await uu(re,v==null?void 0:v.prop);if(Ot.value=Ke==null?void 0:Ke.newStatus,Ke!=null&&Ke.newMainKeyValue)return Ke==null?void 0:Ke.newMainKeyValue}if(ze.value.some(De=>(De==null?void 0:De[v==null?void 0:v.prop])===z)){const De=z;for(;ze.value.some(Ke=>(Ke==null?void 0:Ke[v==null?void 0:v.prop])===`${De}(${P})`);)P++;z=`${De}(${P})`}return z},pu=async(p,v,T)=>{var D,re,le,q;let z,P;if(await du(T==null?void 0:T.data,T==null?void 0:T.firstCol),z=A.cloneDeep(Se).value+S,P=A.cloneDeep(z)+`loading${((D=vl.value)==null?void 0:D.account)||((re=vl.value)==null?void 0:re.账号)}`,v){const be=(q=(le=de.value[P])==null?void 0:le.filter(De=>{var Ke;return((Ke=De==null?void 0:De.key)==null?void 0:Ke.parentTable)===""}))==null?void 0:q.map(De=>{var Ke;return{id:De==null?void 0:De.id,...(Ke=De==null?void 0:De.value)==null?void 0:Ke.pageData}});(be==null?void 0:be.length)>0||await oe.loadingConstruct(z,P,null,null,null),da.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)}else da.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)},fu=()=>{$e.value=!1,Ue.value=[],fe.value=!1},Fi=p=>{var D,re,le,q,be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa;const v=[];Te.value=A.cloneDeep(F.value),(re=oe.getColumnChild((D=A.cloneDeep(F.value))==null?void 0:D.filter(B=>(B==null?void 0:B.label)!=="操作")))==null||re.forEach((B,G)=>{var Re,ta,we;B!=null&&B.formType&&((Re=B==null?void 0:B.formType)==null?void 0:Re.toUpperCase())==="SELECT"||B!=null&&B.menuId?v.push({label:(ta=B==null?void 0:B.prop)!=null&&ta.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",name:(B==null?void 0:B.prop)??"t"+G,prop:B==null?void 0:B.prop,type:"Select",value:(p==null?void 0:p[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??G,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,multipleLimit:B==null?void 0:B.multipleLimit,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,relatedValueId:B==null?void 0:B.relatedValueId,disabled:B==null?void 0:B.disabled,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,allSelectionContents:(B==null?void 0:B.allSelectionContents)??[],filterContent:B==null?void 0:B.filterContent,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly}):v.push({label:(we=B==null?void 0:B.prop)!=null&&we.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",prop:B==null?void 0:B.prop,name:(B==null?void 0:B.prop)??"t"+G,type:!(B!=null&&B.formType)||(B==null?void 0:B.formType)===""?"Input":B==null?void 0:B.formType,value:(B==null?void 0:B.formType)==="Upload"?(p==null?void 0:p[B==null?void 0:B.prop])??"{}":(p==null?void 0:p[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??G,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly})}),p===""||!p||(za.value=(p==null?void 0:p.id)??"");let T=oe.getColumnChild((le=A.cloneDeep(F.value))==null?void 0:le.filter(B=>(B==null?void 0:B.label)!=="操作"));$a.value&&((q=$a.value)==null?void 0:q.length)>0&&($a.value=(be=A.cloneDeep($a).value)==null?void 0:be.map(B=>{var Re;let G=(B==null?void 0:B.prop)||((Re=T==null?void 0:T.find(ta=>(ta==null?void 0:ta.label)===(B==null?void 0:B.label)))==null?void 0:Re.prop);return G&&(B.value=p[G]),B})),ke.value=$a.value&&((De=$a.value)==null?void 0:De.length)>0?oe.getTableFormToForm($a.value):v,ke.value=((Ke=ke.value)==null?void 0:Ke.map(B=>({...B,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled})))??ke.value;let z=[],P=((ka=(ea=(je=u.itemData)==null?void 0:je.filter(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:ea[0])==null?void 0:ka.contents)??"";if(P=oe.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(z=P.flat()),(z==null?void 0:z.length)>0){let B=z==null?void 0:z.filter(fa=>fa==null?void 0:fa.includes("@Type"));if(B=B==null?void 0:B[(B==null?void 0:B.length)-1],(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){let fa=(Ra=(Na=B==null?void 0:B.replace("=",w))==null?void 0:Na.split(w))==null?void 0:Ra[1];((la=fa==null?void 0:fa.trim())==null?void 0:la.toUpperCase())==="MANUAL"&&(u==null||u.index,ke.value=(el=ke.value)==null?void 0:el.map((Ba,ol)=>Ba))}let G=(xa=ke.value)==null?void 0:xa.filter(fa=>fa==null?void 0:fa.mainKey),Re;G==null||G.forEach(fa=>{var ol;if(Re!==void 0)return;let Ba=fa==null?void 0:fa.menus;((ol=G==null?void 0:G.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:ol.length)>1&&(Re=Ba,fa==null||fa.groups)});let ta=[],we=new Map;if(G==null||G.forEach(fa=>{var Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl;if((Ba=fa==null?void 0:fa.prop)!=null&&Ba.includes(".")){let Nl=[];we.get(((Wa=(ol=fa==null?void 0:fa.prop)==null?void 0:ol.split("."))==null?void 0:Wa[0])+(fa!=null&&fa.isMainPath?0:1)+((fl=fa==null?void 0:fa.groups)==null?void 0:fl[0]))&&(Nl=we.get(((Fl=(hl=fa==null?void 0:fa.prop)==null?void 0:hl.split("."))==null?void 0:Fl[0])+(fa!=null&&fa.isMainPath?0:1)+((Ua=fa==null?void 0:fa.groups)==null?void 0:Ua[0]))),Nl.push(fa),we.set(((Ha=(bl=fa==null?void 0:fa.prop)==null?void 0:bl.split("."))==null?void 0:Ha[0])+(fa!=null&&fa.isMainPath?0:1)+((dl=fa==null?void 0:fa.groups)==null?void 0:dl[0]),Nl)}else{let Nl=[];we.get("normal"+(fa!=null&&fa.isMainPath?0:1)+((Ga=fa==null?void 0:fa.groups)==null?void 0:Ga[0]))&&(Nl=we.get("normal"+(fa!=null&&fa.isMainPath?0:1)+((pl=fa==null?void 0:fa.groups)==null?void 0:pl[0]))),Nl.push(fa),we.set("normal"+(fa!=null&&fa.isMainPath?0:1)+((Dl=fa==null?void 0:fa.groups)==null?void 0:Dl[0]),Nl)}}),ta=Array.from(we.values()),(ta==null?void 0:ta.length)>0)for(let fa in ta){let Ba=ta==null?void 0:ta[fa];if((Ba==null?void 0:Ba.length)!==1){if((Ba==null?void 0:Ba.length)>1){let ol=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.prop),Wa=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.label),fl=Ba==null?void 0:Ba.map(dl=>dl==null?void 0:dl.value),hl=(al=A.cloneDeep(Ba))==null?void 0:al[0],Fl=(ve=ke.value)==null?void 0:ve.findIndex(dl=>(dl==null?void 0:dl.prop)===(hl==null?void 0:hl.prop)),Ua=(Pa=ke.value)==null?void 0:Pa.slice(0,Fl),bl=(Ea=ke.value)==null?void 0:Ea.slice(Fl,(ga=ke.value)==null?void 0:ga.length);hl.label=Wa==null?void 0:Wa.join("·"),hl.value=fl==null?void 0:fl.join(" "),hl.value.trim()===""&&(hl.value=""),hl.prop=ol==null?void 0:ol.join("·");let Ha=Ba==null?void 0:Ba.map(dl=>{var Ga;return(Ga=dl==null?void 0:dl.words)==null?void 0:Ga.join(".")});hl.relatedWords=Ha,hl.usingType="parent",bl.unshift(hl),ke.value=[...Ua,...bl],ke.value=(Sa=ke.value)==null?void 0:Sa.map(dl=>(ol!=null&&ol.find(Ga=>Ga===(dl==null?void 0:dl.prop))&&(dl.isFormColHidden=!0,dl.relatedWords=Ha),dl))}}}}},hu=()=>{var v;const p=(v=o.value)==null?void 0:v.$el;p&&Al.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var re;const{oldIndex:z,newIndex:P}=T;if(z===P)return;const D=gn.value.splice(z,1)[0];gn.value.splice(P,0,D),F.value=(re=F.value)==null?void 0:re.slice().sort((le,q)=>{if(le.label==="操作")return 1;if(q.label==="操作")return-1;const be=gn.value.findIndex(Ke=>Ke.label===le.label),De=gn.value.findIndex(Ke=>Ke.label===q.label);return be-De})}})};e.onMounted(()=>{sa.value=window.innerWidth-240*2,window.addEventListener("keydown",ao)});const vu=()=>{e.nextTick(()=>{hu()})},mu=()=>{c.value=!0},ct=(p,v)=>{var z;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let T;return p.children=(z=p.children)==null?void 0:z.map(P=>{var D,re;if((P==null?void 0:P.id)===za.value){let le={};for(let q in P){let be=(D=v==null?void 0:v.find(De=>(De==null?void 0:De.prop)===q))==null?void 0:D.label;be?le[q]=(re=lr.value)==null?void 0:re[be]:le[q]=P[q]??""}P=Object.assign(le,lr.value),T=P}else{let le=ct(P,v);P=le==null?void 0:le.contents,T=le==null?void 0:le.currentSelectContents}return P}),{contents:p,currentSelectContents:T}},Lt=(p,v)=>{let T,z;return p!=null&&p.find(P=>(P==null?void 0:P.id)===za.value)?T=p==null?void 0:p.map(P=>{var D,re,le;if((P==null?void 0:P.id)===za.value){let q={};for(let De in P){let Ke=(D=v==null?void 0:v.find(je=>(je==null?void 0:je.prop)===De))==null?void 0:D.label;Ke?q[De]=((re=lr.value)==null?void 0:re[Ke])??"":q[De]=P[De]??""}let be=lr.value;for(let De in q)(le=lr.value)!=null&&le[De]||(be[De]=(q==null?void 0:q[De])??"");P=be,z=P}return P}):T=p==null?void 0:p.map(P=>{var D,re,le,q;if((P==null?void 0:P.id)===za.value){let be={};for(let De in P){let Ke=(D=v==null?void 0:v.find(je=>(je==null?void 0:je.prop)===De))==null?void 0:D.label;Ke?be[De]=(re=lr.value)==null?void 0:re[Ke]:be[De]=P[De]??""}P=Object.assign(be,lr.value),z=P}else P=(le=ct(P,v))==null?void 0:le.contents,z=(q=ct(P,v))==null?void 0:q.currentSelectContents;return P}),{newContents:T,currentSelectContents:z}},Rt=(p,v,T)=>{var z,P;return p[v==null?void 0:v.prop]=T,typeof p.id=="number"&&(p.id=(z=p.id)==null?void 0:z.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(Rt)),p},$t=p=>{var T;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((T=p.children)==null||T.forEach(z=>{v.push(...$t(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const P={...z};return delete P.children,P}):[]},fo=["Pacific6000数据采集装置.通道号","通道号"],ji=p=>{if(!p)return"";const v=fo.map(T=>p==null?void 0:p[T]).find(T=>T!=null&&String(T).trim()!=="");return v==null?"":String(v).trim()},ut=async(p,v=void 0)=>{if(!p)return!1;try{const T=ea=>{var ka,Na,Ra;return ea?typeof(ea==null?void 0:ea.value)=="string"?ea.value:((Ra=(Na=(ka=ea==null?void 0:ea._custom)==null?void 0:ka.value)==null?void 0:Na.value)==null?void 0:Ra.value)||"":""},z=Array.isArray(Jl.value)?Jl.value:[],P=T(z.find(ea=>(ea==null?void 0:ea.condition)==="child")),D=(Se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,le=await en(re||Se.value,!1),q=String(oa.value||"").trim(),be=ea=>String(ea||"").trim(),De=(ea,ka=[],Na="")=>{if(!Array.isArray(ea))return ka;for(const Ra of ea){const la=be((Ra==null?void 0:Ra.choiceName)||(Ra==null?void 0:Ra.name0)||Na);(Ra==null?void 0:Ra.comp)==="Table"&&(!q||la===q)&&ka.push(Ra),Array.isArray(Ra==null?void 0:Ra.children)&&De(Ra.children,ka,la),Array.isArray(Ra==null?void 0:Ra.tab)&&De(Ra.tab,ka,la),Array.isArray(Ra==null?void 0:Ra.choice)&&De(Ra.choice,ka,la)}return ka},Ke=De(le||[]),je=String((u==null?void 0:u.compName)||"");return Ke.some(ea=>{var Na,Ra;const ka=((Ra=(Na=ea==null?void 0:ea.compData)==null?void 0:Na.find(la=>(la==null?void 0:la.key)==="tableContents"))==null?void 0:Ra.contents)||[];return!Array.isArray(ka)||ka.length===0?!1:ka.some(la=>{if(String((ea==null?void 0:ea.name)||"")===je&&(la==null?void 0:la.id)===v)return!1;const xa=ji(la);return!!xa&&xa===p})})}catch{return(ze.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const P=ji(z);return!!P&&P===p})}},Hi=async(p=!0,v,T)=>{var be,De,Ke,je,ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl;if(lr.value){const Ha=(De=oe.getColumnChild((be=A.cloneDeep(F.value))==null?void 0:be.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")))==null?void 0:De.filter(Ga=>(Ga==null?void 0:Ga.required)===!0);for(let Ga=0;Ga<((Ha==null?void 0:Ha.length)??0);Ga++){const pl=Ha[Ga],Dl=pl==null?void 0:pl.prop,Nl=(pl==null?void 0:pl.label)??Dl,Tr=(Ke=lr.value)==null?void 0:Ke[Dl];if(Tr===""||Tr===null||Tr===void 0||Array.isArray(Tr)&&Tr.length===0){qa.ElMessage.error(`${Nl}不能为空`);return}}const dl=ji(lr.value);if(dl&&await ut(dl,za.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=oe.getColumnChild((je=A.cloneDeep(F.value))==null?void 0:je.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")),P,D=A.cloneDeep(ze.value);if(!lr.value){Y.value=!1;return}if(za.value===""){Ca.value++;let Ha;Ha={id:Ca.value.toString()};try{Ha.sort=ri(0,ze.value||[])}catch{}Ha!=null&&Ha.children&&(Ha={...Ha,children:(ea=Ha.children)==null?void 0:ea.map(Ga=>Rt(Ga,v,T))});const dl=Object.assign(lr.value,Ha);D.unshift(dl),P=dl}else D=(ka=Lt(D,z))==null?void 0:ka.newContents,P=(Na=Lt(D,z))==null?void 0:Na.currentSelectContents;const re=(Ra=u.itemData)==null?void 0:Ra.filter(Ha=>(Ha==null?void 0:Ha.key)==="childTree")[0];if(((la=re==null?void 0:re.contents)==null?void 0:la.length)>0){ye.value="编辑";const Ha=[];D==null||D.forEach((pl,Dl)=>{var Tr;let Nl={};if(Array.isArray(pl)){let $l=[];pl==null||pl.filter(xl=>!(xl!=null&&xl.id)).forEach((xl,Il)=>{var Xl,Ml,Yl,tr,Wl,kr,on;if((Ml=(Xl=Pl.value)==null?void 0:Xl[Il])!=null&&Ml.prop&&!Array.isArray(xl)){let xr={};xr[Pl.value[Il].column]=xl,R!=null&&R.value&&((Yl=R==null?void 0:R.value)==null?void 0:Yl.length)>0&&((tr=R==null?void 0:R.value)!=null&&tr.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(xr)))&&($l=(Wl=R==null?void 0:R.value)==null?void 0:Wl.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(xr))),$l&&$l.length>0?Nl[Pl.value[Il].prop]=$l!=null&&$l.find(fr=>{var yr;return((yr=Object.keys(fr))==null?void 0:yr[0])===Pl.value[Il].column})?(kr=$l==null?void 0:$l.find(fr=>{var yr;return((yr=Object.keys(fr))==null?void 0:yr[0])===Pl.value[Il].column}))==null?void 0:kr[Pl.value[Il].column]:xl:Nl[Pl.value[Il].prop]=xl}else Array.isArray(xl)&&((on=Pl.value[Il])!=null&&on.prop?Nl[Pl.value[Il].prop]=xl:Nl.children=wt(xl,Pl.value))})}else Nl=pl;if(Array.isArray(pl)&&pl.some($l=>$l==null?void 0:$l.id)){const $l=(Tr=pl==null?void 0:pl.find(xl=>xl.id))==null?void 0:Tr.id;Ha.push(Object.assign(Nl,{id:co($l)}))}else Nl.id?Ha.push(Nl):Ha.push(Object.assign(Nl,{id:Dl.toString()}))});const dl=(ze.value||[]).map(pl=>String(pl==null?void 0:pl.id)),Ga=vi(Ha,dl);ze.value=jt(Ga,re,F.value)}Pt(ze.value),Ur.value=ze.value;const le=$f(Ur.value,hn.value,D);let q=[];if(H.value?(q=(el=A.cloneDeep(H).value.singleContent)==null?void 0:el.filter(Ha=>(Ha==null?void 0:Ha.id)!==(P==null?void 0:P.id)),q.push(P)):q=[P],Rl.value){const Ha={content:le,singleContent:((xa=re==null?void 0:re.contents)==null?void 0:xa.length)>0?q==null?void 0:q.flatMap($t):q,index:u==null?void 0:u.index,buttonName:"编辑",column:F.value,parentTableId:u==null?void 0:u.parentTableId};da.setCacheUpdatingData(Ha)}if((al=F.value)==null||al.forEach(Ha=>{(Ha==null?void 0:Ha.formType)==="Upload"&&(P[Ha.prop]=P[Ha.prop]===""?"{}":typeof P[Ha.prop]!="string"?JSON.stringify(P[Ha.prop]):P[Ha.prop])}),p){(Ea=(ga=(Pa=(ve=u.itemData)==null?void 0:ve.find(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType"))==null?void 0:Pa.value)==null?void 0:ga.find(Ga=>(Ga==null?void 0:Ga.value)==="onConditionContents"))==null||Ea.content;let Ha=(Sa=u.itemData)==null?void 0:Sa.filter(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType");Ha=Array.from(new Map(Ha.filter(Boolean).map((Ga,pl)=>[Ga.value,{...Ga,_idx:pl}])).values()).sort((Ga,pl)=>Ga._idx-pl._idx).map(({_idx:Ga,...pl})=>pl),Ha=(B=Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==null?void 0:B.value;const dl={fixContent:[P],buttonName:ye.value,relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};da.setTableLoading(u==null?void 0:u.index),Y.value=!1,lr.value=void 0,Ae("change",dl)}if((ta=(Re=(G=ke.value)==null?void 0:G[0])==null?void 0:Re.optionUrl)!=null&&ta.menuId){Y.value=!1;let Ha=(we=u.itemData)==null?void 0:we.filter(dl=>(dl==null?void 0:dl.key)==="filterAllType");if((Ha==null?void 0:Ha.length)>0){let dl=Ha==null?void 0:Ha.map(Dl=>Dl==null?void 0:Dl.value),Ga=(ol=(Ba=(fa=dl.flat().find(Dl=>{var Nl;return(Nl=Dl==null?void 0:Dl.content)==null?void 0:Nl.includes("@Num")}))==null?void 0:fa.content)==null?void 0:Ba.split(":"))==null?void 0:ol[1];((hl=(fl=(Wa=dl.flat().find(Dl=>{var Nl;return(Nl=Dl==null?void 0:Dl.content)==null?void 0:Nl.includes("@Type:")}))==null?void 0:Wa.content)==null?void 0:fl.split(":"))==null?void 0:hl[1])!=="Manual"&&(Ga=parseInt(Ga),ze.value=(bl=ze.value)==null?void 0:bl.slice(((Fl=ze.value)==null?void 0:Fl.length)-Ga,(Ua=ze.value)==null?void 0:Ua.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",ao),F.value=[],ze.value=[],Te.value=[],Ta.value=[],$a.value=[],Ma.value=[],Ue.value=[],Ie.value=[],ke.value=[],Hl.value=[],o.value=null,Fn.value=""});const ho=async(p,v,T)=>{var ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa;mr.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const z=A.cloneDeep(u.itemData),P=((ea=z==null?void 0:z.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:ea.contents)??[];let D=P==null?void 0:P.find((B,G)=>{var Re,ta,we;return(B==null?void 0:B.prop)===mr.value||(B==null?void 0:B.label)===mr.value||(G==null?void 0:G.toString())===((we=(ta=(Re=mr.value)==null?void 0:Re.split("a"))==null?void 0:ta[1])==null?void 0:we.toString())});const re=oe.getColumnChild((ka=A.cloneDeep(F.value))==null?void 0:ka.filter(B=>(B==null?void 0:B.label)!=="操作"));if(D||(D=re==null?void 0:re.find(B=>(B==null?void 0:B.prop)===mr.value||(B==null?void 0:B.label)===mr.value)),D&&!((Na=D==null?void 0:D.menus)!=null&&Na.length)&&!((Ra=D==null?void 0:D.groups)!=null&&Ra.length)&&!((la=D==null?void 0:D.words)!=null&&la.length)){const B=(el=ke.value)==null?void 0:el.find(G=>(G==null?void 0:G.prop)===mr.value);B&&(D={...D,menus:(B==null?void 0:B.menus)??(D==null?void 0:D.menus),groups:(B==null?void 0:B.groups)??(D==null?void 0:D.groups),words:(B==null?void 0:B.words)??(D==null?void 0:D.words),bindMenus:(B==null?void 0:B.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(B==null?void 0:B.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(B==null?void 0:B.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(B==null?void 0:B.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((xa=ke==null?void 0:ke.value)==null||xa.forEach(B=>{var G,Re,ta,we,fa;(B==null?void 0:B.prop)===(D==null?void 0:D.prop)&&(B!=null&&B.endChildMenu)&&((G=D==null?void 0:D.prop)!=null&&G.includes(".")&&((ta=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ta[0])!==((fa=(we=B==null?void 0:B.prop)==null?void 0:we.split("."))==null?void 0:fa[0])?D.endChildMenu=B==null?void 0:B.value:D.endChildMenu=B==null?void 0:B.endChildMenu)})),!D)return;const le=mr.value,q=(al=ze.value)==null?void 0:al.findIndex(B=>(B==null?void 0:B.id)===(v==null?void 0:v.id));q!==-1&&le&&(ze.value[q]={...ze.value[q],[le]:p});const be=B=>{Array.isArray(B)&&B.forEach(G=>{Array.isArray(G==null?void 0:G.allSelectionContents)&&G.allSelectionContents.length>0&&(G.contactValue=ze.value[q]??v),Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&be(G.children)})};be(F.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let De=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ke=B=>{Array.isArray(B)&&B.forEach(G=>{var ta,we;if(((G==null?void 0:G.type)==="Select"||(G==null?void 0:G.formType)&&G.formType.toUpperCase()==="SELECT"||(G==null?void 0:G.columnType)&&G.columnType.toUpperCase()==="SELECT")&&Array.isArray(G==null?void 0:G.menus)&&G.menus.length>0&&G.menus[G.menus.length-1]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const fa=(ta=G==null?void 0:G.prop)!=null&&ta.includes(".")?G.prop.split(".")[0]:null,Ba=(we=D==null?void 0:D.prop)!=null&&we.includes(".")?D.prop.split(".")[0]:null;(!fa||!Ba||fa===Ba)&&(G.endChildMenu=De)}Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&Ke(G.children)})};if(Ke(F.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let B=D!=null&&D.relatedContents&&((ve=D==null?void 0:D.relatedContents)==null?void 0:ve.length)>0?(Pa=D==null?void 0:D.relatedContents)==null?void 0:Pa.find(G=>{var Re,ta,we,fa;return(G==null?void 0:G[(fa=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:fa[((we=(ta=D==null?void 0:D.prop)==null?void 0:ta.split("."))==null?void 0:we.length)-1]])===(D==null?void 0:D.value)}):await hs(D);if(B){const G={...v};re==null||re.forEach(Re=>{var ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl;(Re==null?void 0:Re.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((ta=D==null?void 0:D.relatedContents)==null?void 0:ta.length)>0?(we=Re==null?void 0:Re.prop)!=null&&we.includes(".")&&((Ba=(fa=Re==null?void 0:Re.prop)==null?void 0:fa.split("."))==null?void 0:Ba[0])===((Wa=(ol=D==null?void 0:D.prop)==null?void 0:ol.split("."))==null?void 0:Wa[0])?G[Re.prop]=B[(Ua=(fl=Re==null?void 0:Re.prop)==null?void 0:fl.split("."))==null?void 0:Ua[((Fl=(hl=Re==null?void 0:Re.prop)==null?void 0:hl.split("."))==null?void 0:Fl.length)-1]]??G[Re.prop]:G[Re.prop]=(B==null?void 0:B[Re.prop])??G[Re.prop]:oe.same((D==null?void 0:D.menus)??[],(Re==null?void 0:Re.menus)??[])&&oe.same((D==null?void 0:D.groups)??[],(Re==null?void 0:Re.groups)??[])&&!oe.same((D==null?void 0:D.words)??[],(Re==null?void 0:Re.words)??[])?(bl=Re==null?void 0:Re.prop)!=null&&bl.includes(".")&&((dl=(Ha=Re==null?void 0:Re.prop)==null?void 0:Ha.split("."))==null?void 0:dl[0])!==((pl=(Ga=D==null?void 0:D.prop)==null?void 0:Ga.split("."))==null?void 0:pl[0])||(G[Re.prop]=(B==null?void 0:B[(Dl=Re==null?void 0:Re.words)==null?void 0:Dl.join(".")])??(B==null?void 0:B[Re.prop])??G[Re.prop]):(!(Re!=null&&Re.isMainPath)&&oe.same((D==null?void 0:D.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),G[Re.prop]=(B==null?void 0:B[Re.prop])??G[Re.prop]))}),ze.value=(ga=A.cloneDeep(ze.value))==null?void 0:ga.map(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id)?{...G,id:Re==null?void 0:Re.id}:Re)}}if((Ea=D==null?void 0:D.optionUrl)!=null&&Ea.menuSelect){let B="";re==null||re.forEach(ta=>{var we,fa,Ba,ol,Wa;B===""&&((Ba=(fa=(we=ta==null?void 0:ta.optionUrl)==null?void 0:we.groupSelect)==null?void 0:fa[1])!=null&&Ba.includes("["))&&(B=(Wa=(ol=ta==null?void 0:ta.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:Wa[1])});let G=await _t(D),Re;if(G==null||G.forEach(ta=>{var we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl;B===((fa=(we=D==null?void 0:D.optionUrl)==null?void 0:we.groupSelect)==null?void 0:fa[1])&&((Wa=(ol=(Ba=D==null?void 0:D.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ol[1])!=null&&Wa.includes("["))&&((bl=A.cloneDeep(ta))==null?void 0:bl[(Ua=(Fl=(hl=(fl=D==null?void 0:D.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])==null?void 0:Fl.replaceAll("[",""))==null?void 0:Ua.replaceAll("]","")])===(D==null?void 0:D.value)&&(Re=ta)}),Re){const ta={...v};re==null||re.forEach(we=>{var fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl;(Re!=null&&Re[we==null?void 0:we.label]||Re!=null&&Re[(Wa=(ol=(Ba=(fa=we==null?void 0:we.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:Ba[1])==null?void 0:ol.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])&&((Fl=(hl=(fl=we==null?void 0:we.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])!=null&&Fl.includes("["))&&(ta[we.prop]=(Re==null?void 0:Re[we==null?void 0:we.label])||(Re==null?void 0:Re[(dl=(Ha=(bl=(Ua=we==null?void 0:we.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:bl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:dl.replaceAll("]","")]))}),ze.value=(Sa=A.cloneDeep(ze.value))==null?void 0:Sa.map(we=>(we==null?void 0:we.id)===(v==null?void 0:v.id)?{...ta,id:we==null?void 0:we.id}:we)}}},yu=async p=>{var ea,ka,Na,Ra,la,el,xa,al,ve,Pa,ga,Ea,Sa,B;if(!p)return;const v=A.cloneDeep(lr.value||{});lr.value=p;const T=ji(v),z=ji(lr.value);if(z&&z!==T&&await ut(z,za.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),fo.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(lr.value||{},Re)||Object.prototype.hasOwnProperty.call(v||{},Re)){const ta=(v==null?void 0:v[Re])??"";lr.value[Re]=ta,p[Re]=ta}}),ke.value=(ke.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!fo.includes(Re.prop))return Re;const ta=(v==null?void 0:v[Re.prop])??"";return{...Re,value:ta,selectValue:ta===""?[]:[ta]}});return}let P=A.cloneDeep(u.itemData);P==null||P.map(G=>{var Re,ta,we,fa;return(G==null?void 0:G.key)==="header"&&(Array.isArray((Re=G.contents)==null?void 0:Re[0])?G.contents=(we=oe.getColumnChild((ta=G.contents)==null?void 0:ta[0]))==null?void 0:we.map((Ba,ol)=>{var Wa,fl,hl,Fl,Ua,bl;return((hl=(fl=(Wa=ke.value)==null?void 0:Wa.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Fl=Object.values(p))==null?void 0:Fl[ol])?Ba.value=[(Ua=Object.values(p))==null?void 0:Ua[ol]]:Ba.value=(bl=Object.values(p))==null?void 0:bl[ol],Ba}):G.contents=(fa=G.contents)==null?void 0:fa.map((Ba,ol)=>{var Wa,fl,hl,Fl,Ua,bl;return((hl=(fl=(Wa=ke.value)==null?void 0:Wa.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Fl=Object.values(p))==null?void 0:Fl[ol])?Ba.value=[(Ua=Object.values(p))==null?void 0:Ua[ol]]:Ba.value=(bl=Object.values(p))==null?void 0:bl[ol],Ba})),G});let D=ke.value,re=(ea=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:ea.contents;if(mr.value||(D=D==null?void 0:D.map(G=>{var Re;return G.value=G.value??((Re=re==null?void 0:re.find((ta,we)=>(ta==null?void 0:ta.prop)===(G==null?void 0:G.name)))==null?void 0:Re.value),G})),!ar.value)return;let le=A.cloneDeep(mr.value);(ka=mr.value)!=null&&ka.includes("·")&&(mr.value=(Ra=(Na=mr.value)==null?void 0:Na.split("·"))==null?void 0:Ra[0]);let q=(el=(la=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:la.contents)==null?void 0:el.find((G,Re)=>(G==null?void 0:G.prop)===mr.value);(xa=ke==null?void 0:ke.value)==null||xa.forEach(G=>{var Re,ta,we,fa,Ba,ol,Wa,fl,hl;(G==null?void 0:G.prop)===(q==null?void 0:q.prop)&&(G!=null&&G.endChildMenu)&&((Re=q==null?void 0:q.prop)!=null&&Re.includes(".")&&((we=(ta=q==null?void 0:q.prop)==null?void 0:ta.split("."))==null?void 0:we[0])!==((Ba=(fa=G==null?void 0:G.prop)==null?void 0:fa.split("."))==null?void 0:Ba[0])?q.endChildMenu=(Wa=(ol=G==null?void 0:G.value)==null?void 0:ol.split(" "))==null?void 0:Wa[0]:q.endChildMenu=(hl=(fl=G==null?void 0:G.endChildMenu)==null?void 0:fl.split(" "))==null?void 0:hl[0])});let be=q!=null&&q.isMainPath&&(q!=null&&q.mainKey)?q==null?void 0:q.value:"",De=D,Ke=J.value;if(Ke!=null&&Ke.find(G=>(q==null?void 0:q.prop)===(G==null?void 0:G.key))&&(Ke=Ke==null?void 0:Ke.filter(G=>(q==null?void 0:q.prop)!==(G==null?void 0:G.key))),Ke!=null&&Ke.find(G=>le===(G==null?void 0:G.key))&&(Ke=Ke==null?void 0:Ke.filter(G=>le!==(G==null?void 0:G.key))),(q==null?void 0:q.formType)==="Select"?De=De==null?void 0:De.map(G=>{var Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl;return(G==null?void 0:G.type)==="Select"&&(((Re=G==null?void 0:G.allSelectionContents)==null?void 0:Re.length)>0&&(G.contactValue=p),((q==null?void 0:q.prop)===(G==null?void 0:G.prop)||le===(G==null?void 0:G.prop))&&q&&(Array.isArray(q.value)&&((ta=q.value)==null?void 0:ta.length)>0&&((we=q.value)!=null&&we.every(Dl=>typeof Dl=="string"))?(Ke.push({key:G==null?void 0:G.prop,value:[(Ba=q.value)==null?void 0:Ba[((fa=q.value)==null?void 0:fa.length)-1]]}),G.selectValue=(ol=Ke==null?void 0:Ke.find(Dl=>(Dl==null?void 0:Dl.key)===(G==null?void 0:G.prop)))==null?void 0:ol.value):Array.isArray(q.value)&&((Wa=q.value)==null?void 0:Wa.length)===0?(Ke=[],G.selectValue=[],p[G==null?void 0:G.prop]=""):Array.isArray(G.value)&&Ke.push({key:G==null?void 0:G.prop,value:[(fl=G.value)==null?void 0:fl[(G==null?void 0:G.length)-1]]})),((Fl=G==null?void 0:G.menus)==null?void 0:Fl[((hl=G==null?void 0:G.menus)==null?void 0:hl.length)-1])===""&&(q!=null&&q.isMainPath)&&(q!=null&&q.mainKey)&&((Ua=G==null?void 0:G.prop)!=null&&Ua.includes(".")&&((Ha=(bl=G==null?void 0:G.prop)==null?void 0:bl.split("."))==null?void 0:Ha[0])!==((Ga=(dl=q==null?void 0:q.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])||(G.endChildMenu=(pl=be==null?void 0:be.split(" "))==null?void 0:pl[0]))),G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G}):(q==null?void 0:q.formType)!=="Input"&&(De=De==null?void 0:De.map(G=>(G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G))),J.value=Ke,De!=null&&De.some(G=>(G==null?void 0:G.functionName)&&(G==null?void 0:G.functionName)!=="")){let G=await xt([p],F==null?void 0:F.value,"Auto",ze.value),Re=[];(al=De==null?void 0:De.filter(we=>(we==null?void 0:we.functionName)&&(we==null?void 0:we.functionName)!==""))==null||al.forEach(we=>{var fa;((fa=we==null?void 0:we.functionRelatedWords)==null?void 0:fa.length)>0&&(Re=[...Re,...we==null?void 0:we.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(we=>(we==null?void 0:we[0])!=="@");let ta=[];for(let we in G==null?void 0:G[0])Re!=null&&Re.find(fa=>we===fa||(we==null?void 0:we.includes("."+fa)))&&ta.push(((ve=G==null?void 0:G[0])==null?void 0:ve[we])!=="");(G==null?void 0:G.length)>0&&ta.every(we=>we)&&(De=De==null?void 0:De.map(we=>{var fa;return we.value=((fa=G==null?void 0:G[0])==null?void 0:fa[we==null?void 0:we.prop])??we.value,we})),lr.value=G==null?void 0:G[0]}if(ke.value=De,q=Object.assign({},q??{},{relatedWords:(ga=(Pa=ke==null?void 0:ke.value)==null?void 0:Pa.find(G=>(G==null?void 0:G.prop)===(q==null?void 0:q.prop)))==null?void 0:ga.relatedWords}),(q==null?void 0:q.mainKey)&&(q!=null&&q.value)&&(q==null?void 0:q.value)!==""){let G=q!=null&&q.relatedContents&&((Ea=q==null?void 0:q.relatedContents)==null?void 0:Ea.length)>0?(Sa=q==null?void 0:q.relatedContents)==null?void 0:Sa.find(Re=>{var ta,we,fa,Ba;return(Re==null?void 0:Re[(Ba=(ta=q==null?void 0:q.prop)==null?void 0:ta.split("."))==null?void 0:Ba[((fa=(we=q==null?void 0:q.prop)==null?void 0:we.split("."))==null?void 0:fa.length)-1]])===(q==null?void 0:q.value)}):await hs(q);if(G&&JSON.stringify(G)!=="{}"){let Re=De;Re=Re==null?void 0:Re.map(we=>{var fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl,Nl,Tr,$l,xl,Il,Xl,Ml;if((q==null?void 0:q.prop)===(we==null?void 0:we.prop))we.value=(G==null?void 0:G[(fa=we==null?void 0:we.words)==null?void 0:fa.join(".")])??(G==null?void 0:G[we==null?void 0:we.prop])??G[(fl=(Ba=we==null?void 0:we.prop)==null?void 0:Ba.split("."))==null?void 0:fl[((Wa=(ol=we==null?void 0:we.prop)==null?void 0:ol.split("."))==null?void 0:Wa.length)-1]];else if(q!=null&&q.relatedContents&&((hl=q==null?void 0:q.relatedContents)==null?void 0:hl.length)>0)we.value=(Fl=we==null?void 0:we.prop)!=null&&Fl.includes(".")&&((bl=(Ua=we==null?void 0:we.prop)==null?void 0:Ua.split("."))==null?void 0:bl[0])===((dl=(Ha=q==null?void 0:q.prop)==null?void 0:Ha.split("."))==null?void 0:dl[0])?G[(Nl=(Ga=we==null?void 0:we.prop)==null?void 0:Ga.split("."))==null?void 0:Nl[((Dl=(pl=we==null?void 0:we.prop)==null?void 0:pl.split("."))==null?void 0:Dl.length)-1]]:(G==null?void 0:G[we==null?void 0:we.prop])??(we==null?void 0:we.value);else if(oe.same((q==null?void 0:q.menus)??[],(we==null?void 0:we.menus)??[])&&oe.same((q==null?void 0:q.groups)??[],(we==null?void 0:we.groups)??[])&&!oe.same((q==null?void 0:q.words)??[],(we==null?void 0:we.words)??[]))if((Tr=we==null?void 0:we.prop)!=null&&Tr.includes(".")&&((xl=($l=we==null?void 0:we.prop)==null?void 0:$l.split("."))==null?void 0:xl[0])!==((Xl=(Il=q==null?void 0:q.prop)==null?void 0:Il.split("."))==null?void 0:Xl[0])){let Yl=Object.keys(G);Yl=Yl==null?void 0:Yl.find(tr=>{var Wl;return tr==null?void 0:tr.includes("."+((Wl=we==null?void 0:we.words)==null?void 0:Wl.join(".")))}),we.value=(G==null?void 0:G[Yl])??(G==null?void 0:G[we==null?void 0:we.prop])??we.value}else{let Yl=Object.keys(G);Yl=Yl==null?void 0:Yl.find(tr=>{var Wl;return tr==null?void 0:tr.includes("."+((Wl=we==null?void 0:we.words)==null?void 0:Wl.join(".")))}),we.value=(G==null?void 0:G[(Ml=we==null?void 0:we.words)==null?void 0:Ml.join(".")])??(G==null?void 0:G[Yl])??(G==null?void 0:G[we==null?void 0:we.prop])??we.value}else!(we!=null&&we.isMainPath)&&oe.same((q==null?void 0:q.bindMenus)??[],(we==null?void 0:we.bindMenus)??[]),we.value=(G==null?void 0:G[we==null?void 0:we.prop])??we.value;return we}),ke.value=Re;let ta={};(B=ke.value)==null||B.forEach(we=>{ta[we.prop]=we==null?void 0:we.value}),lr.value=ta}}ar.value=!0,I.value=!1},gu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",bu=p=>{var D,re;const v=(re=(D=$a.value)==null?void 0:D.find(le=>(le==null?void 0:le.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,T=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;ze.value.forEach(le=>{const q=le==null?void 0:le[T];v&&No.isString(q)&&(le[T]=[q]),!v&&!No.isString(q)&&(le[T]="")})},Vt=(p,v)=>{var T;return v==null||v.forEach(z=>{p[z==null?void 0:z.prop]=z==null?void 0:z.value}),p.children&&((T=p.children)==null?void 0:T.length)>0&&(p.children=p.children.map(z=>Vt(z,v))),p},dt=p=>{var T,z,P,D,re,le;Fi("");const v=(T=ke.value)==null?void 0:T.reduce((q,be)=>(q[be.name]=be.value,q),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){lr.value=v,za.value="",Ca.value=(P=ze.value)==null?void 0:P.length,Ie.value=(D=aa.value)==null?void 0:D.filter(be=>(be==null?void 0:be.label)!=="新增");const q=(le=(re=Te.value)==null?void 0:re.filter(be=>(be==null?void 0:be.label)!=="操作"))==null?void 0:le.map(be=>{var Ke,je,ea;const De=(je=(Ke=$a.value)==null?void 0:Ke.find(ka=>(ka==null?void 0:ka.label)===(be==null?void 0:be.label)))==null?void 0:je.multiple;return bu(be),{...be,contents:(be==null?void 0:be.options)??[],optionUrl:be!=null&&be.formMenuSelect&&((ea=be==null?void 0:be.formMenuSelect)==null?void 0:ea.length)>0?{groupSelect:be==null?void 0:be.groupSelect,menuSelect:be==null?void 0:be.formMenuSelect,selectRelateType:"",type:be==null?void 0:be.formType,multiple:De}:null}});F.value=q==null?void 0:q.map(be=>Vt(be,[{prop:"type",value:"edit"},{prop:"columnType",value:gu(be==null?void 0:be.formType)||(be==null?void 0:be.columnType)}])),p==="createClick"&&(ye.value="新增",Hi(!0))}},ki={START:"开始时间",END:"结束时间",HOURS:"工时"},ku=(p,v)=>Number(A.dayjs(v).diff(A.dayjs(p),"day",!0).toFixed(1)),Pt=p=>{var D;const v=u.itemData,T=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,z=new Map;return T==null||T.forEach((re,le)=>{const{label:q}=re;z.set(q,le)}),!z.has(ki.START)||!z.has(ki.END)||!z.has(ki.HOURS)?p:p==null?void 0:p.map(re=>{const le=re==null?void 0:re[ki.START],q=re==null?void 0:re[ki.END],be=ku(le,q);return le&&q&&(re[ki.HOURS]=`${be}天`),re})},Ft=(p,v,T=0)=>{if(T>((v==null?void 0:v.length)??""))return p;const z=v==null?void 0:v[T],P=new Map;for(const re of p){const le=re[z];P.has(le)||P.set(le,[]),P.get(le)&&P.get(le).push(re)}const D=[];for(const[re,le]of P){const[q,...be]=le,De={...q};T+1===((v==null?void 0:v.length)??"")?De.children=le==null?void 0:le.map(Ke=>(Ke.level=A.cloneDeep(T)+1,Ke)).filter((Ke,je)=>je!==0):be.length>0&&(De.children=Ft(be,v,T+1)),De.level=T,D.push(De)}return D},jt=(p,v,T)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let z=[];return z=Ft(p,v==null?void 0:v.contents,0),z},Ht=async(p,v)=>{var la,el,xa,al,ve,Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl,Ga,pl,Dl,Nl,Tr,$l,xl,Il,Xl,Ml,Yl,tr,Wl,kr,on,xr,fr,yr,qt,Wt,Kt,Gt,Yt;const T=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="header");p==null||p.filter(ia=>(ia==null?void 0:ia.key)==="tableIndexColumn")[0];const z=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="childTree")[0];let P=!0;if((xa=(el=(la=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:la.value)==null?void 0:el.find(ia=>(ia==null?void 0:ia.value)==="onPamButtonContents"))!=null&&xa.content){let ia=(Pa=(ve=(al=p==null?void 0:p.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:al.value)==null?void 0:ve.find(Sl=>(Sl==null?void 0:Sl.value)==="onPamButtonContents"))==null?void 0:Pa.content;ia=(ga=ia==null?void 0:ia.split(":"))==null?void 0:ga[1],ia=(Ea=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Ea.split(","),P=!!(ia!=null&&ia.find(Sl=>Sl==="操作"))}const D=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="page"),re=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="rowButton"),le=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="extraButton"),q=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableContents"),be=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="bottomButton");let De=[];const Ke=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableIndex");$a.value=(B=(Sa=p==null?void 0:p.filter(ia=>(ia==null?void 0:ia.key)==="tableToForm"))==null?void 0:Sa[0])==null?void 0:B.contents,Ne.value=(D==null?void 0:D.contents)??!0;let je=[];vr.value===""?je=T==null?void 0:T[0]:je=(T==null?void 0:T.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+vr.value+")"))??(T==null?void 0:T.find(ia=>!(ia!=null&&ia.selectLabel)));let ea=[];vr.value===""?ea=Ke==null?void 0:Ke[0]:ea=(Ke==null?void 0:Ke.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+vr.value+")"))??(Ke==null?void 0:Ke.find(ia=>!(ia!=null&&ia.selectLabel)));let ka=[],Na=[];if(((G=je==null?void 0:je.contents)==null?void 0:G.length)>0){let ia=[],Sl=je==null?void 0:je.contents;if(Array.isArray(Sl==null?void 0:Sl[0])&&((Re=Sl==null?void 0:Sl[0])!=null&&Re.every(Ya=>!(Ya!=null&&Ya.children)))&&(Sl=Sl==null?void 0:Sl[0]),Sl.some(Ya=>Array.isArray(Ya)&&(Ya==null?void 0:Ya.find(Ye=>Ye.children))))ia=(ta=oe.getGradeColumns(Sl,P))==null?void 0:ta[0],ia!=null&&ia.find(Ya=>(Ya==null?void 0:Ya.label)==="操作")||ia.push({label:"操作",prop:"operate",type:"operate"});else{let Ya=Sl.some(Ye=>Array.isArray(Ye))?Sl==null?void 0:Sl[0]:Sl;Ya!=null&&Ya.find(Ye=>(Ye==null?void 0:Ye.label)==="操作")||Ya.push({label:"操作",prop:"operate",type:"operate"}),Ya==null||Ya.forEach((Ye,rr)=>{var Fr,Yr,Ir,oi,xi,wi,Cr,Bn,Un,_i,mn,qn,Jt,Xt,Zt,Qt,es,as,ls,rs,ns;if((Yr=(Fr=Se.value)==null?void 0:Fr.split("/"))==null||Yr.forEach(sr=>{var wr,zn,is;sr!==""&&((is=(zn=(wr=sr==null?void 0:sr.split(S+"updateLoading"))==null?void 0:wr[0])==null?void 0:zn.split(S+"loading"))==null||is[0])}),Ye!=null&&Ye.methodContent){let sr=(xi=(oi=(Ir=Ye==null?void 0:Ye.methodContent)==null?void 0:Ir.replace("@","%%#"))==null?void 0:oi.split("%%#"))==null?void 0:xi[1];if(sr=sr==null?void 0:sr.slice(0,(sr==null?void 0:sr.length)-1),sr=oe.contentTransArrayToAllNoExtra(sr??"",","),(wi=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("@Button")))!=null&&wi.includes("Prop")&&((Cr=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("Type")))!=null&&Cr.includes("Manual"))){let wr=(Un=(Bn=sr==null?void 0:sr.find(zn=>zn==null?void 0:zn.includes("@Button")))==null?void 0:Bn.split(":"))==null?void 0:Un[1];wr=((qn=(mn=(_i=wr==null?void 0:wr.replaceAll("[",""))==null?void 0:_i.replaceAll("]",""))==null?void 0:mn.split(","))==null?void 0:qn[1])??"算法执行",ka.push(wr)}else if((Jt=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("@Button")))!=null&&Jt.includes("Row")&&((Xt=sr==null?void 0:sr.find(wr=>wr==null?void 0:wr.includes("Type")))!=null&&Xt.includes("Manual"))){let wr=(Qt=(Zt=sr==null?void 0:sr.find(zn=>zn==null?void 0:zn.includes("@Button")))==null?void 0:Zt.split(":"))==null?void 0:Qt[1];wr=((ls=(as=(es=wr==null?void 0:wr.replaceAll("[",""))==null?void 0:es.replaceAll("]",""))==null?void 0:as.split(","))==null?void 0:ls[1])??"算法执行",Na.push(wr)}}(rs=$a.value)==null||rs.find(sr=>(sr==null?void 0:sr.prop)===(Ye==null?void 0:Ye.prop));let Qr=((ns=Ye==null?void 0:Ye.filter)==null?void 0:ns.includes("@EditRead=Read"))??!1;ia.push({label:(Ye==null?void 0:Ye.label)==="操作"?P?"操作":"":(Ye==null?void 0:Ye.label)??"",prop:(Ye==null?void 0:Ye.label)==="操作"?"operate":(Ye==null?void 0:Ye.prop)??"a"+rr,width:Ye!=null&&Ye.width?parseInt(Ye.width):"",fixed:(Ye==null?void 0:Ye.fixed)??void 0,sortable:(Ye==null?void 0:Ye.sortable)??!1,filterable:(Ye==null?void 0:Ye.filterable)??!1,operable:(Ye==null?void 0:Ye.operable)??!1,showSummary:(Ye==null?void 0:Ye.showSummary)??!1,align:(Ye==null?void 0:Ye.align)??"left",showOverflowTooltip:(Ye==null?void 0:Ye.showOverflowTooltip)??!0,isNotDrag:(Ye==null?void 0:Ye.isNotDrag)??!1,isEditCol:(Ye==null?void 0:Ye.isEditCol)??!1,isOperate:(Ye==null?void 0:Ye.isOperate)??!1,id:(Ye==null?void 0:Ye.id)??rr,type:(Ye==null?void 0:Ye.label)==="操作"?"operate":void 0,formType:(Ye==null?void 0:Ye.formType)??(Ye!=null&&Ye.groupSelect?"Select":""),disabled:Ye==null?void 0:Ye.disabled,options:(Ye==null?void 0:Ye.options)??[],value:(Ye==null?void 0:Ye.value)??"",isExistChild:(Ye==null?void 0:Ye.isExistChild)??!1,mainKey:(Ye==null?void 0:Ye.mainKey)??rr===0,allSelectionContents:(Ye==null?void 0:Ye.allContents)??[],filterContent:Ye==null?void 0:Ye.filterContents,menus:Ye==null?void 0:Ye.menus,groups:Ye==null?void 0:Ye.groups,words:Ye==null?void 0:Ye.words,filter:Ye==null?void 0:Ye.filter,bindMenus:Ye==null?void 0:Ye.bindMenus,fatherPath:Ye==null?void 0:Ye.fatherPath,isMainPath:Ye==null?void 0:Ye.isMainPath,required:(Ye==null?void 0:Ye.required)??!1,relatedContents:Ye==null?void 0:Ye.relatedContents,functionName:Ye==null?void 0:Ye.functionName,functionRelatedWords:Ye==null?void 0:Ye.functionRelatedWords,calculatorFilter:Ye==null?void 0:Ye.calculatorFilter,relatedPages:Ye==null?void 0:Ye.relatedPages,multiple:(Ye==null?void 0:Ye.multiple)??!1,multipleLimit:Ye==null?void 0:Ye.multipleLimit,isReadonly:Qr})})}j.value=(we=be==null?void 0:be[0])==null?void 0:we.contents;const Zr=oe.getNewColumnChild(ia);De=oe.getColumnChild(Zr);const Hn=Ya=>Array.isArray(Ya)?Ya.map(Ye=>(Array.isArray(Ye==null?void 0:Ye.children)&&Ye.children.length>0?(Ye.sortable=!1,Hn(Ye.children)):(Ye==null?void 0:Ye.prop)==="operate"||(Ye==null?void 0:Ye.label)==="操作"||(Ye==null?void 0:Ye.type)==="operate"||(Ye.sortable=!1),Ye)):Ya;Hn(Zr),await no(Zr),t0(ne.value,Zr),F.value=Zr,Ta.value=Zr,n.value=(fa=F.value)==null?void 0:fa.map(Ya=>Ya==null?void 0:Ya.label);let Ar=(ol=(Ba=oe.getAllLeafNodes(F.value))==null?void 0:Ba.filter(Ya=>(Ya==null?void 0:Ya.type)!=="operate"))==null?void 0:ol.map((Ya,Ye)=>({prop:(Ya==null?void 0:Ya.prop)??"a"+Ye,column:Ya.label}));Pl.value=Ar;let Or=[];vr.value===""?Or=q==null?void 0:q[0]:Or=(q==null?void 0:q.find(Ya=>(Ya==null?void 0:Ya.selectLabel)==="("+vr.value+")"))??(q==null?void 0:q.find(Ya=>!(Ya!=null&&Ya.selectLabel)));let zr=Array.isArray((Wa=Or==null?void 0:Or.contents)==null?void 0:Wa[0])&&((fl=Or==null?void 0:Or.contents)!=null&&fl[0].every(Ya=>Array.isArray(Ya)))?(hl=Or==null?void 0:Or.contents)==null?void 0:hl[0]:Or==null?void 0:Or.contents;ea!=null&&ea.contents&&((Fl=ea==null?void 0:ea.contents)==null?void 0:Fl.length)!==0&&(zr=(Ua=A.cloneDeep(zr))==null?void 0:Ua.map((Ya,Ye)=>{if(!Array.isArray(Ya)){let rr={};for(let Qr in Ya)Qr!=="id"&&Qr!=="index"&&(rr[Qr]=Ya[Qr]);Ya=Object.values(rr)}return Ya}));const vo=!!((bl=F.value)!=null&&bl.find(Ya=>Ya.prop==="index"));zr=vc(zr,ea==null?void 0:ea.contents,vo);const Ln=[];zr==null||zr.forEach((Ya,Ye)=>{var Qr;let rr={};if(Array.isArray(Ya)){let Fr=[];Ya==null||Ya.filter(Yr=>!(Yr!=null&&Yr.id)).forEach((Yr,Ir)=>{var oi,xi,wi,Cr,Bn,Un;if((oi=Ar==null?void 0:Ar[Ir])!=null&&oi.prop&&!Array.isArray(Yr)){let _i={};_i[Ar[Ir].column]=Yr,R!=null&&R.value&&((xi=R==null?void 0:R.value)==null?void 0:xi.length)>0&&((wi=R==null?void 0:R.value)!=null&&wi.find(mn=>JSON.stringify(mn==null?void 0:mn[0])===JSON.stringify(_i)))&&(Fr=(Cr=R==null?void 0:R.value)==null?void 0:Cr.find(mn=>JSON.stringify(mn==null?void 0:mn[0])===JSON.stringify(_i))),Fr&&Fr.length>0?rr[Ar[Ir].prop]=Fr!=null&&Fr.find(mn=>{var qn;return((qn=Object.keys(mn))==null?void 0:qn[0])===Ar[Ir].column})?(Bn=Fr==null?void 0:Fr.find(mn=>{var qn;return((qn=Object.keys(mn))==null?void 0:qn[0])===Ar[Ir].column}))==null?void 0:Bn[Ar[Ir].column]:Yr:rr[Ar[Ir].prop]=Yr}else Array.isArray(Yr)&&((Un=Ar[Ir])!=null&&Un.prop?rr[Ar[Ir].prop]=Yr:rr.children=wt(Yr,Ar))})}else rr=Ya;if(Array.isArray(Ya)&&Ya.some(Fr=>Fr==null?void 0:Fr.id)){const Fr=(Qr=Ya==null?void 0:Ya.find(Yr=>Yr.id))==null?void 0:Qr.id;Ln.push(Object.assign(rr,{id:co(Fr)}))}else rr.id?Ln.push(rr):Ln.push(Object.assign(rr,{id:Ye.toString()}))});try{const Ya=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ye=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),rr=Ya==null?void 0:Ya.tableId,Qr=Ya==null?void 0:Ya.compIndex;if(rr&&Array.isArray(Ye)&&Ye.length>0&&String(rr)===String(u==null?void 0:u.parentTableId)&&String(Qr)===String(u==null?void 0:u.index)){const Fr=new Set(Ln.map(Ir=>String(Ir==null?void 0:Ir.id))),Yr=Ye.filter(Ir=>!Fr.has(String(Ir)));if(Yr.length>0){const Ir=Ya==null?void 0:Ya.pageKey,oi=Ir!=null&&Ir.startsWith("/")?Ir.substring(1):Ir;((v==null?void 0:v[Ir])||(v==null?void 0:v[oi])||[]).filter(Cr=>{var Bn,Un;return((Bn=Cr==null?void 0:Cr.key)==null?void 0:Bn.type)==="data"&&String((Un=Cr==null?void 0:Cr.key)==null?void 0:Un.tableId)===String(rr)&&Yr.includes(Cr==null?void 0:Cr.id)}).forEach(Cr=>{var Bn;Fr.has(String(Cr==null?void 0:Cr.id))||(Ln.push({id:Cr==null?void 0:Cr.id,...((Bn=Cr==null?void 0:Cr.value)==null?void 0:Bn.tableData)||{}}),Fr.add(String(Cr==null?void 0:Cr.id)))})}}}catch{}let Rn=null;try{const Ya=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ye=JSON.parse(sessionStorage.getItem(Ya)||"null");Array.isArray(Ye)&&Ye.length>0&&(Rn=new Set(Ye.map(rr=>String(rr))))}catch{}const Ui=Array.from(((Ha=La.value)==null?void 0:Ha.values())||[]).filter(Ya=>!(!(Ya!=null&&Ya._isOCRRow&&(Ya==null?void 0:Ya._ocrTableId)===(u==null?void 0:u.index))||Rn&&Rn.has(String(Ya==null?void 0:Ya.id)))),mo=(ze.value||[]).map(Ya=>String(Ya==null?void 0:Ya.id)),ql=vi(Ln,mo);if(ze.value=jt(ql,z,F.value),ya.value=ql,(dl=ya.value)==null||dl.forEach(Ya=>{var Ye;(Ye=La.value)==null||Ye.set(Ya.id,Ya)}),Rn&&Rn.size>0)try{const Ya=new Set(Array.from(Rn.values()));ze.value=(ze.value||[]).filter(Ye=>!Ya.has(String(Ye==null?void 0:Ye.id))),ya.value=(ya.value||[]).filter(Ye=>!Ya.has(String(Ye==null?void 0:Ye.id))),Ya.forEach(Ye=>{var rr,Qr;try{(Qr=(rr=La.value)==null?void 0:rr.delete)==null||Qr.call(rr,Ye)}catch{}})}catch{}const Pr=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),pt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(Pr&&Array.isArray(pt)&&pt.length>0&&String(Pr==null?void 0:Pr.compIndex)===String(u==null?void 0:u.index)){const Ya=new Set((ya.value||[]).map(Ye=>String(Ye==null?void 0:Ye.id)));pt.filter(Ye=>!Ya.has(String(Ye)))}if(Ui.length>0){const Ya=new Set((ze.value||[]).map(rr=>rr==null?void 0:rr.id)),Ye=Ui.filter(rr=>!Ya.has(rr.id));Ye.length>0&&(ze.value=[...ze.value||[],...Ye],ya.value=[...ya.value||[],...Ye],Ye.forEach(rr=>{var Qr;return(Qr=La.value)==null?void 0:Qr.set(rr.id,rr)}))}}else F.value=[],Te.value=[],ze.value=[],ya.value=[],La.value=new Map;if(Na=[...new Set(Na)],Na=Na==null?void 0:Na.map(ia=>({label:ia,type:"methodButton"})),((Ga=re==null?void 0:re.contents)==null?void 0:Ga.length)>0?Ma.value=re==null?void 0:re.contents:Ma.value=[],Ma.value=[...Ma.value,...Na],ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(ia=>({label:ia,type:"methodButton"})),((pl=le==null?void 0:le.contents)==null?void 0:pl.length)>0)if((Tr=(Nl=(Dl=p==null?void 0:p.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:Dl.value)==null?void 0:Nl.find(ia=>(ia==null?void 0:ia.value)==="onButtonContents"))!=null&&Tr.content){let ia=(Il=(xl=($l=p==null?void 0:p.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:$l.value)==null?void 0:xl.find(Sl=>(Sl==null?void 0:Sl.value)==="onButtonContents"))==null?void 0:Il.content;if(ia=(Xl=ia==null?void 0:ia.split(":"))==null?void 0:Xl[1],ia=(Ml=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Ml.split(","),Ie.value=(Yl=le==null?void 0:le.contents)==null?void 0:Yl.filter(Sl=>ia==null?void 0:ia.find(Zr=>Zr===(Sl==null?void 0:Sl.label))),aa.value=(tr=le==null?void 0:le.contents)==null?void 0:tr.filter(Sl=>ia==null?void 0:ia.find(Zr=>Zr===(Sl==null?void 0:Sl.label))),(Wl=le==null?void 0:le.contents)!=null&&Wl.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别")&&!((kr=Ie.value)!=null&&kr.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别"))){const Sl=(on=le==null?void 0:le.contents)==null?void 0:on.find(Zr=>(Zr==null?void 0:Zr.label)==="OCR识别");Ie.value=[...Ie.value,Sl],aa.value=[...aa.value,Sl]}W.value=!!(ia!=null&&ia.find(Sl=>Sl==="搜索")),V.value=!!(ia!=null&&ia.find(Sl=>Sl==="块状显示"))}else Ie.value=le==null?void 0:le.contents,aa.value=le==null?void 0:le.contents;else Ie.value=[],aa.value=[];if(Ie.value=[...Ie.value,...ka],aa.value=[...aa.value,...ka],typeof Se.value=="string"&&Se.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((xr=Ie.value)!=null&&xr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(Ie.value=[...Ie.value||[],{label:"OCR识别"}]),(fr=aa.value)!=null&&fr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(aa.value=[...aa.value||[],{label:"OCR识别"}])):(Ie.value=(Ie.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别"),aa.value=(aa.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别")),(yr=Ie.value)!=null&&yr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(Ie.value=[...Ie.value||[],{label:"切换视图"}]),(qt=aa.value)!=null&&qt.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(aa.value=[...aa.value||[],{label:"切换视图"}]),De!=null&&De.some(ia=>{var Sl;return(ia==null?void 0:ia.calculatorFilter)&&((Sl=ia==null?void 0:ia.calculatorFilter)==null?void 0:Sl.includes("@Button"))})){let ia=(Wt=De==null?void 0:De.filter(Ar=>{var Or;return(Ar==null?void 0:Ar.calculatorFilter)&&((Or=Ar==null?void 0:Ar.calculatorFilter)==null?void 0:Or.includes("@Button"))}))==null?void 0:Wt.map(Ar=>Ar==null?void 0:Ar.calculatorFilter),Sl=[],Zr=[],Hn=[];ia==null||ia.forEach(Ar=>{var vo,Ln,Rn,Ui,mo;let Or=(vo=oe.analyzeSplitToContent(Ar,","))==null?void 0:vo.map(ql=>((ql==null?void 0:ql[(ql==null?void 0:ql.length)-1])===","&&(ql=ql==null?void 0:ql.slice(0,(ql==null?void 0:ql.length)-1)),ql)),zr=Or==null?void 0:Or.find(ql=>ql==null?void 0:ql.includes("@Button"));if(Or!=null&&Or.find(ql=>ql==null?void 0:ql.includes("Manual"))){zr=(Rn=(Ln=zr==null?void 0:zr.replace("=","$R"))==null?void 0:Ln.split("$R"))==null?void 0:Rn[1],zr=zr==null?void 0:zr.slice(1,(zr==null?void 0:zr.length)-1);let ql=(Ui=oe.analyzeSplitToContent(zr,","))==null?void 0:Ui.map(Pr=>((Pr==null?void 0:Pr[(Pr==null?void 0:Pr.length)-1])===","&&(Pr=Pr==null?void 0:Pr.slice(0,(Pr==null?void 0:Pr.length)-1)),Pr));ql=ql==null?void 0:ql[0],ql=ql==null?void 0:ql.slice(1,(ql==null?void 0:ql.length)-1),ql=(mo=ql==null?void 0:ql.split(","))==null?void 0:mo.map(Pr=>({label:Pr,prop:Pr})),zr!=null&&zr.includes("Up")?Sl=[...Sl,...ql??[]]:zr!=null&&zr.includes("Line")?Zr=[...Zr,...ql??[]]:Hn=[...Hn,...ql??[]]}}),Ie.value=[...Sl,...Ie.value??[]],Ma.value=[...Zr,...Ma.value??[]],Hn.value=[...Hn,...Hn.value??[]]}Ca.value=((Kt=ze==null?void 0:ze.value)==null?void 0:Kt.length)??0,Pt(ze.value),Ur.value=ze.value,Rl.value&&(F.value=(Yt=(Gt=Te.value)==null?void 0:Gt.filter(ia=>(ia==null?void 0:ia.label)!=="操作"))==null?void 0:Yt.map(ia=>{var Sl;return{...ia,type:"edit",optionUrl:ia!=null&&ia.formMenuSelect&&((Sl=ia==null?void 0:ia.formMenuSelect)==null?void 0:Sl.length)>0?{groupSelect:ia==null?void 0:ia.groupSelect,menuSelect:ia==null?void 0:ia.formMenuSelect,selectRelateType:"",type:ia==null?void 0:ia.formType}:null}}),dt())};e.watch(()=>[u.itemData,vr.value,an.value,hn.value,R==null?void 0:R.value],async()=>{var p,v,T,z,P,D;if((p=u==null?void 0:u.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=X.value)!=null&&v.find(re=>{var le,q;return(re==null?void 0:re.key)===((q=(le=u==null?void 0:u.itemData)==null?void 0:le.find(be=>(be==null?void 0:be.key)==="columnPath"))==null?void 0:q.contents)}))){let re=X.value,le={key:(z=(T=u==null?void 0:u.itemData)==null?void 0:T.find(q=>(q==null?void 0:q.key)==="columnPath"))==null?void 0:z.contents,value:(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(q=>(q==null?void 0:q.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(q=>((q==null?void 0:q.key)===(le==null?void 0:le.key)&&(q.value=le.value),q)):re.push(le),da.setTableViewContents(re)}await Ht(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.operatingForm,p=>{p!=null&&p.form&&(Fi(p==null?void 0:p.form),ye.value=p==null?void 0:p.dialogTitle,Va.value=!0,Y.value=!0)},{immediate:!0,deep:!0});const xu=()=>{var p;(p=k.value)!=null&&p.includes("read")&&(Rl.value=!Rl.value)},wu=()=>{Er.value=!Er.value};e.watch(()=>{var p;return(p=u==null?void 0:u.config)==null?void 0:p.viewport},p=>{var v;k.value=p,(p==null?void 0:p.length)===0?Rl.value=!1:(p!=null&&p.includes("read")||(Rl.value=!0),p!=null&&p.includes("edit")||(Rl.value=!1)),M.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Rl.value},{immediate:!0}),e.watch(()=>Rl.value,p=>{var v;p?(dt("viewChange"),da.setCacheUpdatingData(null)):(Ie.value=aa.value,F.value=Ta.value,H.value&&(da.setTableLoading(u==null?void 0:u.index),Ae("change",H.value))),M.value=p||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),Hl.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=wn.value)==null?void 0:p.length},p=>{p===0&&(me.currentPage=1)}),e.watch(()=>u==null?void 0:u.compNames,p=>{f.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const _u=(p,v)=>{var T;dt("createClick"),v===me.pageSize&&(me.currentPage=Math.ceil(((T=ze.value)==null?void 0:T.length)/me.pageSize))},Su=async(p,v,T)=>{var P,D,re,le,q;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&fo.includes(z)&&T!==void 0&&T!==null&&String(T).trim()!==""){const be=String(T).trim();if(await ut(be,p==null?void 0:p.id)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ke=(P=ze.value)==null?void 0:P.findIndex(ea=>(ea==null?void 0:ea.id)===(p==null?void 0:p.id)),je=Ke!==-1?(re=(D=ze.value)==null?void 0:D[Ke])==null?void 0:re[z]:void 0;z&&(p[z]=je??"");return}}if(Rl.value){const be=p==null?void 0:p.id;be!=null&&(h.value.has(be)||h.value.set(be,A.cloneDeep(p)),s.value.add(be));const De=(le=ze.value)==null?void 0:le.findIndex(Ke=>(Ke==null?void 0:Ke.id)===(p==null?void 0:p.id));De!==-1&&z&&(ze.value[De]={...ze.value[De],[z]:T}),ho(T,p,v);return}ho(T,p,v),lr.value=A.cloneDeep(p),za.value=p==null?void 0:p.id,Ca.value=(q=ze.value)==null?void 0:q.length,ye.value=p!=null&&p._isTemp?"新增":"编辑",Hi(!1)},Eu=async()=>{var p,v;try{const T=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const P=z.split("_")[1];P&&(T.push(`content_${P}`),T.push(`struct_${P}`))}})),T.length===0&&(u!=null&&u.itemData)){const z=(v=(p=u.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;z&&(T.push(`content_${z}`),T.push(`struct_${z}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},Cu=async(p,v,T)=>{var D,re;if(!T||typeof T!="string"||T.trim()===""){const le=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${p==null?void 0:p.id}:${le}`;d.value.delete(q),b.value.set(q,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${z}`;b.value.set(P,!0);try{const le=await Eu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const q=parseInt((D=vl.value)==null?void 0:D.plat_id);if(!q){console.warn("platId 无效,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const be=await A.getAllTables({platId:q,tableNames:le??[]}),De=((re=be==null?void 0:be.data)==null?void 0:re.result)||[],Ke=[],je=[];for(let ea=0;ea<De.length;ea+=2)ea+1<De.length&&je.push([De[ea],De[ea+1]]);je.forEach(([ea,ka])=>{var al;if(!Array.isArray(ea)||ea.length===0||!Array.isArray(ka)||ka.length===0)return;const Na=ka[0];let Ra=((al=Na==null?void 0:Na.结构)==null?void 0:al.contents)??[];if(!Array.isArray(Ra)||Ra.length===0)return;let la=A.cloneDeep(Ra);if(Array.isArray(la==null?void 0:la[0])&&(la=oe.getColumnChild(la[0])),!Array.isArray(la)||la.length===0||!la.some(ve=>(ve==null?void 0:ve.prop)===z))return;[...ea].sort((ve,Pa)=>{const ga=Number((ve==null?void 0:ve.update_time)??0);return Number((Pa==null?void 0:Pa.update_time)??0)-ga}).slice(0,20).forEach(ve=>{const Pa=ve[z];if(Pa!=null){const ga=String(Pa);ga.toLowerCase().includes(T.toLowerCase())&&Ke.findIndex(Sa=>{var B;return ve.id&&((B=Sa.rowData)==null?void 0:B.id)===ve.id?!0:Sa.label===ga})===-1&&Ke.push({label:ga,rowData:A.cloneDeep(ve),sourceTable:(Na==null?void 0:Na.source_table)||""})}})}),d.value.set(P,Ke)}catch(le){console.error("全局搜索建议失败:",le),d.value.delete(P)}finally{b.value.set(P,!1)}},Du=(p,v,T)=>{if(!Rl.value)return;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${z}`;if(m.has(D)&&clearTimeout(m.get(D)),!T||T.trim()===""){d.value.delete(D),b.value.set(D,!1);return}const re=setTimeout(()=>{Cu(p,{prop:z,property:z},T),m.delete(D)},300);m.set(D,re)};function Tu(p,v){const T=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return d.value.get(T)||[]}const Bu=(p,v,T)=>{var be;if(!T||!T.rowData)return;const z=T.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(oe.getAllLeafNodes(F.value)||[]).filter(De=>(De==null?void 0:De.type)!=="operate"&&(De==null?void 0:De.label)!=="操作"&&(De==null?void 0:De.prop)!=="operate").forEach(De=>{const Ke=De==null?void 0:De.prop;Ke&&z[Ke]!==void 0&&(p[Ke]=z[Ke])}),(be=ze.value)==null||be.findIndex(De=>(De==null?void 0:De.id)===P),P!=null&&(h.value.has(P)||h.value.set(P,A.cloneDeep(p)),s.value.add(P));const q=`${P}:${D}`;d.value.delete(q),b.value.set(q,!1),ho(p[D],p,v)},nn=p=>{var q,be,De,Ke,je,ea,ka,Na,Ra,la,el;const{row:v,column:T,item:z,slotData:P}=p;let D=v!=null&&v[T==null?void 0:T.prop]||(v==null?void 0:v[T==null?void 0:T.prop])===0?((be=(q=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:q[0])==null?void 0:be.contents)??((v==null?void 0:v[T==null?void 0:T.prop])===0?"0":v==null?void 0:v[T==null?void 0:T.prop]):((Ke=(De=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:De[0])==null?void 0:Ke.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ea=(je=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:je[0])==null?void 0:ea.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((Ra=(Na=v==null?void 0:v[(ka=z==null?void 0:z.child)==null?void 0:ka.prop])==null?void 0:Na[0])==null?void 0:Ra.contents)??(v==null?void 0:v[(la=z==null?void 0:z.child)==null?void 0:la.prop]),le=Array.isArray(D)&&!(D!=null&&D.every(xa=>typeof xa=="string"||typeof xa=="number"))?"查看":D;if(le=Array.isArray(le)?le.join(","):le,(T==null?void 0:T.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const xa=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=xa.isValid()?xa.format("YYYYMMDD"):le??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((el=T==null?void 0:T.relatedPages)==null?void 0:el.length)>0&&(le="详情页"),le},Nu=p=>{var be,De,Ke,je,ea,ka,Na,Ra,la,el;const{row:v,column:T,item:z,slotData:P}=p;let D=v!=null&&v[T==null?void 0:T.prop]?((De=(be=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:be[0])==null?void 0:De.contents)??(v==null?void 0:v[T==null?void 0:T.prop]):((je=(Ke=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ke[0])==null?void 0:je.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ka=(ea=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:ea[0])==null?void 0:ka.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((la=(Ra=v==null?void 0:v[(Na=z==null?void 0:z.child)==null?void 0:Na.prop])==null?void 0:Ra[0])==null?void 0:la.contents)??(v==null?void 0:v[(el=z==null?void 0:z.child)==null?void 0:el.prop]);const le=Array.isArray(D)&&!(D!=null&&D.every(xa=>typeof xa=="string"||typeof xa=="number")),q=Array.isArray(D)&&(D==null?void 0:D.find(xa=>xa==null?void 0:xa.url));return le&&q},Au=p=>{var P,D,re,le;if(!(p!=null&&p.column))return!1;const v=Se.value==="试验任务/任务管理",T=(u==null?void 0:u.compName)==="任务列表",z=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((le=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:le.includes("@TextBackRGBA"));return v&&T&&z},zu=(p,v)=>p.find(T=>Object.values(T).some(z=>z===v));return e.watch(()=>Be.value,async p=>{if(p){ue.setContentLoading(!0),await e.nextTick();const v=zu(ze.value,p==null?void 0:p.data);if(!v)return ue.setContentLoading(!1);await Vi(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),ue.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(T=>{var z,P,D,re,le;if(换,String(T==null?void 0:T.compId)===String(u==null?void 0:u.index)&&(T!=null&&T.resId)&&((z=T==null?void 0:T.data)!=null&&z.id)){const q=(P=T==null?void 0:T.data)==null?void 0:P.id,be=T==null?void 0:T.resId;if(ze.value=(D=ze.value)==null?void 0:D.map(De=>{if((De==null?void 0:De.id)===q){const Ke={...De,id:be};return delete Ke._isOCRRow,delete Ke._ocrTableId,Ke}return De}),(le=(re=La.value)==null?void 0:re.has)!=null&&le.call(re,q)){const Ke={...La.value.get(q)||{},id:be};delete Ke._isOCRRow,delete Ke._ocrTableId,La.value.delete(q),La.value.set(be,Ke)}Xa(u==null?void 0:u.index,q,be)}}):String(p==null?void 0:p.compId)===String(u==null?void 0:u.index)&&(ze.value=(v=ze.value)==null?void 0:v.map(T=>{var z;if((T==null?void 0:T.id)===((z=p==null?void 0:p.data)==null?void 0:z.id)){const P={...T,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return T})))},{immediate:!0,deep:!0}),(p,v)=>{var la,el,xa,al;const T=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),le=e.resolveComponent("el-radio-group"),q=e.resolveComponent("el-checkbox-group"),be=e.resolveComponent("el-button"),De=e.resolveComponent("el-icon"),Ke=e.resolveComponent("el-progress"),je=e.resolveComponent("el-alert"),ea=e.resolveComponent("el-table-column"),ka=e.resolveComponent("el-table"),Na=e.resolveComponent("el-upload"),Ra=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",W0,[Xr.value?(e.openBlock(),e.createBlock(sl.ssTable,{id:"excel-table",pageObj:me,showIndex:M.value,isTree:(la=a.compItem)==null?void 0:la.isTree,summaryInfo:Z,columns:F.value,defaultSort:ce,isCardViewport:Er.value,checkedColumns:n.value,key:Vr.value+F.value,tableData:wn.value,isEditViewport:Rl.value,isShowPagination:Ne.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:An,extraButton:Ie.value,rowButton:Ma.value,cacheExtraButtons:aa.value,isClearSelection:((el=Hl.value)==null?void 0:el.length)===0,onDoCurrentChange:Mi,onDoSizeChange:jo,onSortChange:Ho,onContentClick:Vi,onRowClick:at,onSelectChange:Jo,onCellChange:Su,onCellInput:Du,onSelectSuggest:Bu,onChange:ho,onPreview:to,onSubmitEditingTable:lo,onHandleColEditChange:eo,onHandleColTypeChange:ln,onClickButton:st,onAddNewRow:Ko,bottomButton:j.value,allowRowAddOrDelete:ni.value},e.createSlots({headerButton:e.withCtx(ve=>{var Pa,ga,Ea,Sa;return[a.showHeader?(e.openBlock(),e.createBlock(_f,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ma)===e.unref(Se),filterValues:et.value,selectNums:(Pa=Hl.value)==null?void 0:Pa.length,dataNums:(ga=ze.value)==null?void 0:ga.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ve.buttons,menuFilter:(Sa=(Ea=a.compItem)==null?void 0:Ea.component)==null?void 0:Sa.menuFilter,onButtonClick:v[1]||(v[1]=(B,G,Re)=>st(B,G,{extra:Re})),columns:F.value,onFilter:uo,onGetImportData:qo,level:a.level,filterShow:W.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ve,Pa,ga,Ea;return[((ve=ze.value)==null?void 0:ve.length)>0&&a.allowOperate&&V.value?(e.openBlock(),e.createElementBlock("div",Y0,[(Pa=k.value)!=null&&Pa.includes("read")&&((ga=k.value)!=null&&ga.includes("edit"))&&((Ea=Ma.value)!=null&&Ea.some(Sa=>(Sa==null?void 0:Sa.label)==="编辑"))&&!Er.value&&e.unref(ma)!==e.unref(Se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:xu},[e.createVNode(T,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ve,index:Pa})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ga=>_u(ve,Pa)},[e.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,J0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:vu,onBeforeEnter:mu},{reference:e.withCtx(()=>[e.createElementVNode("span",X0,[e.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",Z0,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":$.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ve=>io(ve))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(q,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ve=>n.value=ve),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gn.value,ve=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ve.label},[e.createVNode(D,{value:ve.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ve.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ve.label),9,Q0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Pa;return[e.createElementVNode("div",e3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Pa=Object.keys(ve))==null?void 0:Pa.filter(ga=>{var Ea;return(Ea=E.value)==null?void 0:Ea.find(Sa=>(Sa==null?void 0:Sa.value)===ga)}),ga=>{var Ea,Sa;return e.openBlock(),e.createElementBlock("div",{key:ga},[L[ga]=="radio"?(e.openBlock(),e.createElementBlock("div",a3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(le,{"model-value":ve==null?void 0:ve[ga],onChange:B=>Qn(B,ga,ve)},{default:e.withCtx(()=>{var B,G;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=(B=E.value)==null?void 0:B.find(Re=>(Re==null?void 0:Re.value)===ga))==null?void 0:G.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),L[ga]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ve==null?void 0:ve[ga],"active-text":(Sa=(Ea=E.value)==null?void 0:Ea.find(B=>(B==null?void 0:B.value)===ga))==null?void 0:Sa.label,onChange:B=>Qn(B,ga,ve)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",l3,[e.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ve=>{var Pa,ga,Ea,Sa,B,G,Re,ta,we,fa,Ba,ol,Wa,fl,hl,Fl,Ua,bl,Ha,dl;return[((Pa=ve==null?void 0:ve.column)==null?void 0:Pa.label)==="证书附件"||((ga=ve==null?void 0:ve.column)==null?void 0:ga.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",r3,[e.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ga=>bi(ve),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Nu(ve)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",n3,e.toDisplayString(nn(ve)),1)]),default:e.withCtx(()=>{var Ga,pl;return[e.createElementVNode("div",i3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((pl=ve==null?void 0:ve.row)==null?void 0:pl[(Ga=ve==null?void 0:ve.column)==null?void 0:Ga.prop],Dl=>(e.openBlock(),e.createElementBlock("div",o3,[e.createElementVNode("div",{class:"prop-url",title:ai(Dl),onClick:Nl=>mi(Dl)},e.toDisplayString(ai(Dl)),9,t3),e.createElementVNode("div",{class:"prop-download",onClick:Nl=>Zo(Dl)}," 下载 ",8,s3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Au(ve)?(e.openBlock(),e.createBlock(ju,{key:0,value:nn(ve),columnContent:ve==null?void 0:ve.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(nn(ve))&&((Sa=(Ea=nn(ve))==null?void 0:Ea.toString())!=null&&Sa.includes(".txt")||(G=(B=nn(ve))==null?void 0:B.toString())!=null&&G.includes(".cpt")||(ta=(Re=nn(ve))==null?void 0:Re.toString())!=null&&ta.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(nn(ve))&&((fa=(we=nn(ve))==null?void 0:we.toString())!=null&&fa.includes(".txt")||(ol=(Ba=nn(ve))==null?void 0:Ba.toString())!=null&&ol.includes(".cpt")||(fl=(Wa=nn(ve))==null?void 0:Wa.toString())!=null&&fl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(nn(ve))&&((Fl=(hl=nn(ve))==null?void 0:hl.toString())!=null&&Fl.includes(".txt")||(bl=(Ua=nn(ve))==null?void 0:Ua.toString())!=null&&bl.includes(".cpt")||(dl=(Ha=nn(ve))==null?void 0:Ha.toString())!=null&&dl.includes(".cyd"))?"pointer":"",marginLeft:(ve==null?void 0:ve.colIndex)===0?`${((ve==null?void 0:ve.level)??0)*20}px`:0}),onClick:Ga=>{var pl;return Xn(nn(ve),((pl=ve==null?void 0:ve.column)==null?void 0:pl.relatedPages)??[])}},e.toDisplayString(nn(ve)===0?"0":nn(ve)),13,c3))],64))]}),_:2},[((xa=Ma.value)==null?void 0:xa.length)>0?{name:"actions",fn:e.withCtx(({item:ve,fIndex:Pa})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",K0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($i(Ma.value,ve),(ga,Ea)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:e.withModifiers(Sa=>st(ga==null?void 0:ga.label,ve,{extra:ga}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ga==null?void 0:ga.textColor}),class:"extra-button-label"},e.toDisplayString(ga==null?void 0:ga.label),5)],8,G0))),128))])]),_:2},1024)]),key:"0"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection","bottomButton","allowRowAddOrDelete"])):e.createCommentVNode("",!0),Rl.value?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(be,{id:"themeBorderButton",onClick:Yo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:Oi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:ye.value,visible:Y.value,width:ir.value,onBeforeDestroy:oo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",d3,[e.createVNode(sl.ssForm,{ref_key:"formRef",ref:xe,rowContents:ke.value,showOperator:!1,onChange:yu,isEnableWrap:!1,onFixChangeValue:Qo,onClickTrigger:ei,isEdit:ha.value,onBlurChange:ro,onCreate:hi,onTagChange:On},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Va.value?(e.openBlock(),e.createElementBlock("div",p3,[e.createVNode(be,{onClick:v[4]||(v[4]=ve=>Y.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(be,{class:"ok-button",onClick:v[5]||(v[5]=ve=>Hi(!0)),id:"themeButton"},{default:e.withCtx(()=>v[25]||(v[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:ye.value,visible:qe.value,width:sa.value,onBeforeDestroy:v[7]||(v[7]=ve=>qe.value=!1)},{default:e.withCtx(()=>[e.createVNode(Of)]),footer:e.withCtx(()=>[e.createElementVNode("div",f3,[e.createVNode(be,{onClick:v[6]||(v[6]=ve=>qe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(be,{class:"ok-button",onClick:lt,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ee.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:2,fileDataList:pa.value,onDestroy:Pi},null,8,["fileDataList"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:3,visible:$e.value,onBeforeDestroy:fu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{files:Ue.value,threeData:N.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:"OCR扫描录入",visible:ba.value,"close-on-click-modal":!1,onBeforeDestroy:Tl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[v[38]||(v[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",h3,[e.createElementVNode("div",v3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===1}])},v[28]||(v[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===2}])},v[29]||(v[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Oa.value===3}])},v[30]||(v[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Oa.value===1?(e.openBlock(),e.createElementBlock("div",m3,[e.createVNode(be,{onClick:t,class:"ocr-action-btn",disabled:ll.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(be,{onClick:cn,class:"ocr-action-btn",disabled:ll.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Oa.value===1?(e.openBlock(),e.createElementBlock("div",y3,[e.createElementVNode("div",g3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ia.value,(ve,Pa)=>{var ga;return e.openBlock(),e.createElementBlock("div",{key:Pa,class:"ocr-file-item"},[e.createElementVNode("div",b3,[ve.raw&&((ga=ve.raw.type)!=null&&ga.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Ul(ve),alt:"预览",class:"thumbnail-image"},null,8,k3)):(e.openBlock(),e.createElementBlock("div",x3,[e.createVNode(De,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Bl(ve)==="uploading",processing:Bl(ve)==="processing",completed:Bl(ve)==="completed"||Bl(ve)==="uploaded",failed:Bl(ve)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",w3,[v[35]||(v[35]=e.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),e.createElementVNode("circle",{class:e.normalizeClass(["progress-ring-fill",{completed:Bl(ve)==="completed"||Bl(ve)==="uploaded",uploading:Bl(ve)==="uploading",processing:Bl(ve)==="processing",failed:Bl(ve)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Bl(ve)==="failed"?"#f56c6c":Bl(ve)==="completed"||Bl(ve)==="uploaded"?"#67c23a":"#409eff","stroke-width":Bl(ve)==="completed"||Bl(ve)==="uploaded"||Bl(ve)==="failed"?3:2,"stroke-dasharray":rn(ve),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,_3)])),Bl(ve)==="completed"||Bl(ve)==="uploaded"?(e.openBlock(),e.createElementBlock("div",S3,[e.createVNode(De,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1})])):e.createCommentVNode("",!0),Bl(ve)==="failed"?(e.openBlock(),e.createElementBlock("div",E3,[e.createVNode(De,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>cu(Pa)},[e.createVNode(De,null,{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})],8,C3)]),e.createElementVNode("div",D3,e.toDisplayString(ve.name||"文件名123"),1)])}),128))]),Ia.value.length>0?(e.openBlock(),e.createElementBlock("div",T3,[e.createVNode(be,{onClick:na,class:"ocr-start-recognize-btn",disabled:ll.value||Ia.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Oa.value===1?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(Ke,{percentage:Xe.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Oa.value===2?(e.openBlock(),e.createElementBlock("div",N3,[e.createElementVNode("div",A3,[e.createVNode(je,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",z3,[e.createVNode(ka,{data:Ze.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(ea,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wa.value,ve=>(e.openBlock(),e.createBlock(ea,{key:ve.prop,prop:ve.prop,"min-width":ve.minWidth||230,"class-name":ve.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",M3,[e.createElementVNode("span",null,e.toDisplayString(ve.label),1)])]),default:e.withCtx(({row:Pa,$index:ga})=>{var Ea,Sa,B;return[ve.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:wl(Pa[ve.prop]),fontWeight:500})},e.toDisplayString(nl(Pa[ve.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[cl.value!==ga?(e.openBlock(),e.createElementBlock("span",I3,e.toDisplayString(Pa[ve.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Za(ve.prop)),{key:1,modelValue:Pa[ve.prop],"onUpdate:modelValue":G=>Pa[ve.prop]=G,size:"small",placeholder:"请输入"+ve.label,content:((Ea=Fa(ve.prop))==null?void 0:Ea.contents)??((Sa=Fa(ve.prop))==null?void 0:Sa.options)??[],optionUrl:(B=Fa(ve.prop))==null?void 0:B.optionUrl,onChange:G=>Ka(ga,ve.prop,G),onFocus:G=>Le.value=ve.prop,onBlur:v[8]||(v[8]=G=>Le.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(ea,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ve})=>[cl.value===ve?(e.openBlock(),e.createBlock(De,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Pa=>gl(ve),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Pa=>gl(ve),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Oa.value===3?(e.openBlock(),e.createElementBlock("div",O3,[e.createVNode(De,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Na,{ref:"ocrUploadRef","file-list":Ia.value,"onUpdate:fileList":v[9]||(v[9]=ve=>Ia.value=ve),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":Fe,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Oa.value!==3?(e.openBlock(),e.createElementBlock("div",L3,[e.createVNode(be,{onClick:bn,class:"ocr-start-recognize-btn",disabled:Oa.value===1||ll.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(be,{onClick:Tn,class:"ocr-start-recognize-btn",disabled:ll.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Qf,{visible:gi.value,onConfirm:i,onCancel:v[10]||(v[10]=ve=>gi.value=!1)},null,8,["visible"]),e.createVNode(_d,{visible:rl.value,"onUpdate:visible":v[11]||(v[11]=ve=>rl.value=ve),versions:_e.value},null,8,["visible","versions"]),e.createVNode(cd,{visible:ja.value,"onUpdate:visible":v[12]||(v[12]=ve=>ja.value=ve),images:ul.value,"default-image-name":hr.value,"field-meta":cl.value!==null?((al=Ze.value[cl.value])==null?void 0:al.__ocrFieldMeta)||{}:{},"focused-field-name":Le.value,onClose:v[13]||(v[13]=ve=>ja.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Ld,{visible:dr.value,"onUpdate:visible":v[14]||(v[14]=ve=>dr.value=ve),candidates:Ql.value,"name-prop":Sr.value,"mfr-prop":Mr.value,columns:F.value,onSubmit:br,onPreviewFile:ii},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Hd,{visible:Aa.value,"onUpdate:visible":v[15]||(v[15]=ve=>Aa.value=ve),ocrPreviewData:Ze.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ve=>Ze.value=ve),ocrSelectedFields:ca.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ve=>ca.value=ve),ocrPreviewColumns:wa.value,onConfirm:Qa,onFieldChange:v[18]||(v[18]=({rowIndex:ve,prop:Pa,value:ga})=>Ka(ve,Pa,ga))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Br.ssDialog,{title:f.title,visible:f.show,width:f.width,onBeforeDestroy:Q},{default:e.withCtx(()=>[e.createElementVNode("div",R3,[e.createVNode(sl.ssForm,{rowContents:f==null?void 0:f.contents,formRules:f==null?void 0:f.formRules,showOperator:!1,buttonValue:f.buttonValue,isEdit:ha.value,isStartJustify:!1,onOnButtonClick:ge},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:"",visible:y.show,width:y.width,alignCenter:!0,onBeforeDestroy:_},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",$3,e.toDisplayString(y.title),1),e.createVNode(Ra,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",V3,[e.createVNode(Ra,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Fn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",P3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y==null?void 0:y.buttonValue,ve=>(e.openBlock(),e.createBlock(be,{key:ve==null?void 0:ve.label,style:e.normalizeStyle({background:ve==null?void 0:ve.background,color:ve==null?void 0:ve.color}),onClick:Pa=>K(ve==null?void 0:ve.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ve==null?void 0:ve.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(Sf,{columns:y==null?void 0:y.columns,tableData:y==null?void 0:y.tableData},{content:e.withCtx(({row:ve,item:Pa,slotData:ga,scope:Ea,column:Sa,columnProp:B,$index:G})=>[e.createTextVNode(e.toDisplayString((ve==null?void 0:ve[Sa==null?void 0:Sa.prop])||(ve==null?void 0:ve[Sa==null?void 0:Sa.label])||(ve==null?void 0:ve[Sa==null?void 0:Sa.property])||(ga==null?void 0:ga[Sa==null?void 0:Sa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Mc=Zl._export_sfc(j3,[["__scopeId","data-v-e84b518d"]]),H3={key:1,class:"static-form-body"},U3=["onClick"],q3={key:1},W3=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=w=>{switch(w){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var $;const w=($=n.itemData)==null?void 0:$.find(V=>(V==null?void 0:V.key)==="formContent"),g=(w==null?void 0:w.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(V=>(V==null?void 0:V.label)||(V==null?void 0:V.isHideInForm)).map(V=>{let ae=V==null?void 0:V.value;Array.isArray(ae)&&(ae=ae.map(F=>F==null?"":typeof F=="object"?F.label??F.value??F.name??JSON.stringify(F):String(F)).filter(Boolean).join(",")),ae!=null&&typeof ae=="object"&&(ae=ae.label??ae.value??ae.name??JSON.stringify(ae));const Z=V.isHideInForm?"":V.label??"",me=ae==null||ae===""?"-":String(ae),Ae=Z==="使用状态";return{label:Z,value:me,isStatus:Ae,tagType:Ae?o(me):"",width:V.width??1,field:V}})}),h=e.ref(null),c=e.ref(null),d=e.computed(()=>{const w=Number(n==null?void 0:n.textSize),g=oe.rgbaToColor(n==null?void 0:n.textColor),S={},$={},V={},ae={};return!Number.isNaN(w)&&w&&(S.fontSize=`${w}px`,$.fontSize=`${w+1}px`,V.fontSize=`${w}px`,ae.fontSize=`${w}px`),g&&($.color=g,V.color=g,ae.color=g),{item:S,label:$,value:V,empty:ae}}),m=e.ref(""),b=e.ref(""),u=e.ref(!1),C=async w=>{if(w){b.value&&(URL.revokeObjectURL(b.value),b.value="");try{const g=await A.platformDownloadFile({url:w}),S=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});b.value=URL.createObjectURL(S)}catch{b.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,w=>{w&&(m.value=w)},{immediate:!0}),e.watch(m,w=>{C(w)},{immediate:!0});const M=()=>{var w;(w=c.value)==null||w.click()},k=async w=>{var $,V,ae;const g=w.target,S=($=g==null?void 0:g.files)==null?void 0:$[0];if(!S){g.value="";return}u.value=!0;try{const Z=new FormData;Z.append("file",S);const me=await A.platformUploadFile(Z),Ae=(ae=(V=me==null?void 0:me.data)==null?void 0:V.result)==null?void 0:ae.url;Ae?(m.value=Ae,r("update:backGroundImage",Ae),C(Ae),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{u.value=!1,g.value=""}},W=e.computed(()=>{var w;return b.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(w=n==null?void 0:n.backgroundUrl)==null?void 0:w.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),I=w=>sl.getComponent(w),j=w=>{if(!w)return;const g=w.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},L=(w,g,S)=>{n.disabled||(h.value=g,e.nextTick(()=>{j(S.currentTarget)}))},E=()=>{h.value=null},x=w=>{const g=w!=null&&w.width&&w.width>0?w.width:1,$=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(w,g)=>{const S=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(W.value),onClick:g[2]||(g[2]=$=>(n==null?void 0:n.backGround)==="Yes"&&M())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers($=>M(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:k},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:sl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",H3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,($,V)=>{var ae,Z,me,Ae,F,ne,J,ce,Te;return e.openBlock(),e.createElementBlock("div",{key:V,class:"static-form-item",style:e.normalizeStyle({...x($),...d.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[$.label&&!((ae=$==null?void 0:$.field)!=null&&ae.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(d.value.label)},e.toDisplayString($.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(d.value.value),onClick:$e=>{var fe;return(fe=$.field)!=null&&fe.isNoClick?null:L($,V,$e)}},[h.value===V&&$.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(((Z=$.field)==null?void 0:Z.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":$e=>$.field.value=$e,isEdit:!0,disabled:(me=$.field)==null?void 0:me.disabled,content:((Ae=$.field)==null?void 0:Ae.contents)??[],optionUrl:$.field,originalValue:(F=$.field)==null?void 0:F.value,config:(ne=$.field)==null?void 0:ne.config,configModel:((J=$.field)==null?void 0:J.prop)??((ce=$.field)==null?void 0:ce.name),selectedTagList:((Te=$.field)==null?void 0:Te.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$.isStatus?(e.openBlock(),e.createBlock(S,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",q3,e.toDisplayString($.value??"-"),1))],64))],12,U3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(d.value.empty)}," 暂无数据 ",4))],4)}}}),Ic=Zl._export_sfc(W3,[["__scopeId","data-v-5937a104"]]),K3={class:"form-content"},G3={title:"选择标签"},Y3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},J3={class:"col-operate-wrap"},X3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Z3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const n=()=>{c.value=!1,d.value=!1,m.value=[]},r=a;e.computed(()=>{var pe;const Y=(pe=ra.value)==null?void 0:pe.split("/");return(Y==null?void 0:Y.some(qe=>(qe==null?void 0:qe.includes("updateLoading"))||(qe==null?void 0:qe.includes("loading"))))?!1:$e.value==="view"});const o=l,s=e.ref(""),h=e.ref([]),c=e.ref(!1),d=e.ref(!1),m=e.ref([]),{getFileExtension:b}=Bo.useThreeSystem(),u=e.ref(),C=e.ref(!1),M=e.ref(!1),k=A.useUnit(A.pinia),{chooseTitle:W}=A.storeToRefs(k),I=e.ref([]),j=e.ref(),L=e.ref(!1),E=e.ref([]),x=hc(A.pinia),w=At(A.pinia),g=e.ref(!1),S=e.ref(),$=e.ref(),V=e.ref(),ae=e.ref(),Z=e.ref(),me=A.useLoginState(A.pinia),{loginUserInfo:Ae}=A.storeToRefs(me),F=e.ref(),ne=e.ref(!0),J=A.useModelComp(A.pinia),{tableViewContents:ce,itemData:Te,isEdit:$e,routeToChildPath:fe,lockingPage:N,homepageBackgroundTableId:te}=A.storeToRefs(J),U=e.ref(null),Ce=e.ref(!1),Me=e.ref(!1),Pe=A.useMenuState(),{activeMenuPath:ra}=A.storeToRefs(Pe),Ta=oe.useOriginalState(A.pinia),{originalPath:ee}=A.storeToRefs(Ta),{compType:pa,hasEditable:ue}=Qs.useRole(),ua=()=>!ue(r.config,{type:pa.FORM});e.computed(()=>ra.value==="设备管理/试验设备"&&r.compName==="设备概要");const Se=async()=>{var pe,qe,sa;const Y=te==null?void 0:te.value,xe=(pe=Ae==null?void 0:Ae.value)==null?void 0:pe.plat_id;if(!(!Y||!xe))try{const $a=await A.getAllTables({platId:parseInt(xe),tableNames:[`content_${Y}`,`struct_${Y}`],user_unique_id:"0"}),Ma=((sa=(qe=$a==null?void 0:$a.data)==null?void 0:qe.result)==null?void 0:sa[0])??[],Va=String((r==null?void 0:r.index)??""),Ue=Ma==null?void 0:Ma.find(Ie=>String(Ie==null?void 0:Ie.relatedForm_id)===Va);Ue!=null&&Ue.backgroundImg_url&&(ae.value=Ue.backgroundImg_url)}catch($a){console.error("获取首页背景图片表数据失败:",$a)}},se=e.ref([]),Be=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ge=async Y=>{Me.value=Y,await de("disabled",null,Y,!0)},da=async Y=>{await de("operable",null,Y,!0)};e.watch(()=>ra.value,async()=>{h.value=[],m.value=[]},{deep:!0,immediate:!0});const Ja=()=>{e.nextTick(()=>{he()})},R=Y=>{var xe;h.value=(xe=h.value)==null?void 0:xe.map(pe=>({...pe,isFormColHidden:!(Y!=null&&Y.includes(pe.label))}))};e.onUnmounted(()=>{U.value=null});const H=Y=>{o("clickTrigger",Y)},X=async Y=>{var xe,pe,qe,sa,$a,Ma;if(Y===""){let Va="";(xe=h.value)==null||xe.forEach(ke=>{ke!=null&&ke.isMain&&(Va=ke==null?void 0:ke.value)});let Ue=await oe.getItemData(fe.value,sessionStorage.getItem("systemKey"),"");Va=((Ma=($a=(sa=(qe=(pe=Ue==null?void 0:Ue[0])==null?void 0:pe.compData)==null?void 0:qe.find(ke=>(ke==null?void 0:ke.key)==="mainRouters"))==null?void 0:sa.contents)==null?void 0:$a[0])==null?void 0:Ma.routerContent)+ee.value+Va;let aa=await oe.getItemData(Va,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=aa==null?void 0:aa.filter(ke=>(ke==null?void 0:ke.comp)!=="methodButton"),o("routeUrl",E.value)}},he=()=>{var xe;const Y=(xe=U.value)==null?void 0:xe.$el;Y&&Al.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:pe=>{const{oldIndex:qe,newIndex:sa}=pe;if(qe===sa)return;const $a=h.value.splice(qe,1)[0];h.value.splice(sa,0,$a)}})},de=async(Y,xe,pe,qe=!1)=>{try{J.setRefreshCurStructure(!1)}catch{qa.ElMessage.error("编辑处理失败")}},ma=async(Y,xe)=>{await de()},oa=async(Y,xe)=>{Y&&await de()},Ve=async(Y,xe,pe)=>{await de(xe,pe,Y,!1)},_a=(Y,xe)=>{F.value===xe?ne.value=!1:ne.value=!0,F.value=xe==null?void 0:xe.changeProp},ze=async Y=>{var Ma;ae.value=Y;const xe=r.itemData,pe=xe==null?void 0:xe.find(Va=>(Va==null?void 0:Va.key)==="backGroundImage");pe?pe.contents=Y:xe==null||xe.push({key:"backGroundImage",contents:Y}),o("change",{key:"backGroundImage",contents:Y});const qe=te==null?void 0:te.value,sa=r==null?void 0:r.index,$a=(Ma=Ae==null?void 0:Ae.value)==null?void 0:Ma.plat_id;if(!(!qe||!$a||!sa||!Y))try{await A.pageBatchAddApi({platId:parseInt($a),changeContents:[{tableName:`content_${qe}`,tableContents:[{backgroundImg_url:Y,relatedForm_id:String(sa)}]}],user_unique_id:"0"})}catch(Va){console.error("保存背景图片记录失败:",Va),qa.ElMessage.error("背景图片记录保存失败")}},ya=async Y=>{var pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl;let xe=[];if((pe=Y==null?void 0:Y.toString())!=null&&pe.includes(".urdf")){if(Y.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:Y,extension:b(Y)}],d.value=!0,c.value=!0;return}if((qe=Y==null?void 0:Y.toString())!=null&&qe.includes(".stl")||(sa=Y==null?void 0:Y.toString())!=null&&sa.includes(".STL")||($a=Y==null?void 0:Y.toString())!=null&&$a.includes(".obj")||(Ma=Y==null?void 0:Y.toString())!=null&&Ma.includes(".mtl")){const jl=((Va=Y==null?void 0:Y.toString())==null?void 0:Va.split(",")).map(Qe=>({url:Qe,extension:b(Qe)}));m.value=jl,d.value=!1,c.value=!0;return}if((Ue=Y==null?void 0:Y.toString())!=null&&Ue.includes(".stl")||(Ie=Y==null?void 0:Y.toString())!=null&&Ie.includes(".STL")||(aa=Y==null?void 0:Y.toString())!=null&&aa.includes(".obj")||(ke=Y==null?void 0:Y.toString())!=null&&ke.includes(".mtl")){let _l,jl=[],Qe={};if(Array.isArray(Y)?_l=Y:_l=Y==null?void 0:Y.split(","),_l==null||_l.forEach(Xa=>{Xa.includes(".mtl")?jl.push(Xa):Qe.blob=Qe.blob?Qe.blob+","+Xa:Xa}),(jl==null?void 0:jl.length)>0&&(Qe.mtlBlobs=jl),(tl=(We=Object.values(Qe))==null?void 0:We[0])!=null&&tl.includes("http:"))xe.push(Qe);else{const Xa=new Blob([Qe.blob],{type:"application/octet-stream;charset=UTF-8"});let ba=URL.createObjectURL(Xa),ll="";(Cl=Y==null?void 0:Y.split("/"))==null||Cl.forEach((Ia,il)=>{var rl;il===((rl=Y==null?void 0:Y.split("/"))==null?void 0:rl.length)-1&&(ll=Ia)}),(El=Qe.blob)!=null&&El.includes(".stl")&&(ll=(ll==null?void 0:ll.replaceAll(">",""))+".urdf"),j.value=[{name:ll,blobUrl:ba}],M.value=!0}}else{const _l=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),jl=await qa.axios.get(Y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{_l.close()}),Qe=new Blob([jl.data],{type:"application/octet-stream;charset=UTF-8"});let Xa=URL.createObjectURL(Qe),ba="";(Vl=Y==null?void 0:Y.split("/"))==null||Vl.forEach((ll,Ia)=>{var il;Ia===((il=Y==null?void 0:Y.split("/"))==null?void 0:il.length)-1&&(ba=ll)}),j.value=[{name:ba,blobUrl:Xa}],M.value=!0}(xe==null?void 0:xe.length)>0&&w.setBlobUrls(xe)},La=()=>{M.value=!1},za=Y=>{var $a,Ma,Va,Ue;const xe=(Ma=($a=sl.safeClone(r.itemData))==null?void 0:$a.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Ma.contents,pe=sl.safeClone(Y.content);let qe={};pe&&((Va=Object.values(pe))==null?void 0:Va.length)>0&&((Ue=Object.values(pe))==null||Ue.forEach((Ie,aa)=>{qe[xe[aa].key]=Ie}));const sa={content:qe,index:r==null?void 0:r.index,buttonName:Y==null?void 0:Y.buttonName};o("change",sa)};e.computed(()=>"http://222.92.178.198:62001");const ha=async Y=>{var We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa;if(!Y)return;(tl=(We=r==null?void 0:r.itemData)==null?void 0:We.find(Je=>(Je==null?void 0:Je.key)==="parentFormPath"))==null||tl.contents;let xe=ce.value;(xe==null?void 0:xe.length)>0&&(xe=xe==null?void 0:xe.map(Je=>{var Xe,Aa,Ze,wa;let ie=(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.split("/");return(r==null?void 0:r.compName)===(ie==null?void 0:ie[0])&&(Aa=h.value)!=null&&Aa.find(Fa=>(Fa==null?void 0:Fa.prop)===(ie==null?void 0:ie[1]))&&(Je.value=(wa=(Ze=h.value)==null?void 0:Ze.find(Fa=>(Fa==null?void 0:Fa.prop)===(ie==null?void 0:ie[1])))==null?void 0:wa.value),Je}),J.setTableViewContents(xe));const pe=sl.safeClone(r.itemData);let qe=pe==null?void 0:pe.map(Je=>{var ie;return(Je==null?void 0:Je.key)==="formContent"&&((ie=Je.contents)==null||ie.map((Xe,Aa)=>{var Ze,wa,Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr,Ql,nr,pr,gr,Oe,er,Sr,Mr;return Xe.type=(wa=(Ze=h.value)==null?void 0:Ze.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:wa.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((He=(Za=(Fa=Xe==null?void 0:Xe.key)==null?void 0:Fa.split("$"))==null?void 0:Za[1])==null?void 0:He.length)>0?(Le=(cl=Vu((ca=(va=Xe==null?void 0:Xe.key)==null?void 0:va.split("$"))==null?void 0:ca[1]))==null?void 0:cl.split(","))==null?void 0:Le.map(zl=>({label:zl,value:zl})):[],(ja=Xe==null?void 0:Xe.key)!=null&&ja.includes("$")&&(Xe.key=(hr=(ul=Xe==null?void 0:Xe.key)==null?void 0:ul.split("$"))==null?void 0:hr[0]),Xe.signature=(Ql=(dr=h.value)==null?void 0:dr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Ql.signature,Xe.isLoginUser=(pr=(nr=h.value)==null?void 0:nr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:pr.isLoginUser,Xe.value=(gr=Object.values(Y))==null?void 0:gr[Aa],Xe.isFormColHidden=(er=(Oe=h.value)==null?void 0:Oe.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:er.isFormColHidden,Xe.isHideInForm=(Mr=(Sr=h.value)==null?void 0:Sr.find(zl=>(zl==null?void 0:zl.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Mr.isHideInForm,Xe})),Je}),sa=h.value,$a=(El=(Cl=sl.safeClone(qe))==null?void 0:Cl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:El.contents;if(sa=sa==null?void 0:sa.map(Je=>{var ie,Xe;return(Je==null?void 0:Je.type)==="Select"&&((ie=Je==null?void 0:Je.allSelectionContents)==null?void 0:ie.length)>0&&(Je.contactValue=Y),Je.value=(Xe=$a==null?void 0:$a.find((Aa,Ze)=>((Aa==null?void 0:Aa.id)??Ze)===(Je==null?void 0:Je.id)))==null?void 0:Xe.value,Je}),!ne.value){o("contentChange",{contents:qe,index:r.index});return}let Ma="",Va=(jl=(_l=(Vl=sl.safeClone(qe))==null?void 0:Vl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:_l.contents)==null?void 0:jl.find((Je,ie)=>{var Xe,Aa,Ze;return(Je==null?void 0:Je.label)===F.value||ie.toString()===((Ze=(Aa=(Xe=F.value)==null?void 0:Xe.split("t"))==null?void 0:Aa[1])==null?void 0:Ze.toString())}),Ue=(Qe=Va==null?void 0:Va.optionUrl)==null?void 0:Qe.menuSelect,Ie=!0;if((ll=(ba=(Xa=sl.safeClone(qe))==null?void 0:Xa.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:ba.contents)==null||ll.forEach(Je=>{var ie,Xe,Aa,Ze,wa,Fa;Ie&&((Aa=(Xe=(ie=Je==null?void 0:Je.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Xe[1])!=null&&Aa.includes("["))&&(Ma=(wa=(Ze=Je==null?void 0:Je.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:wa[1],JSON.stringify(Ue)===JSON.stringify((Fa=Je==null?void 0:Je.optionUrl)==null?void 0:Fa.menuSelect)&&(Ie=!1))}),(Ia=Va==null?void 0:Va.optionUrl)!=null&&Ia.menuSelect&&ne.value){let Je=await _t(Va),ie,Xe=(il=Va==null?void 0:Va.optionUrl)==null?void 0:il.menuSelect;if(Je==null||Je.forEach(Aa=>{var Ze,wa,Fa,Za,He,va,ca,cl,Le,ja;Ma===((wa=(Ze=Va==null?void 0:Va.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:wa[1])&&((He=(Za=(Fa=Va==null?void 0:Va.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:Za[1])!=null&&He.includes("["))&&((ja=sl.safeClone(Aa))==null?void 0:ja[(Le=(cl=(ca=(va=Va==null?void 0:Va.optionUrl)==null?void 0:va.groupSelect)==null?void 0:ca[1])==null?void 0:cl.replaceAll("[",""))==null?void 0:Le.replaceAll("]","")])===(Va==null?void 0:Va.value)&&(ie=Aa)}),ie){let Aa=sl.safeClone(sa);Aa=Aa==null?void 0:Aa.map(wa=>{var Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr;return(ie!=null&&ie[wa==null?void 0:wa.label]||ie!=null&&ie[(va=(He=(Za=(Fa=wa==null?void 0:wa.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:Za[1])==null?void 0:He.replaceAll("[",""))==null?void 0:va.replaceAll("]","")])&&((Le=(cl=(ca=wa==null?void 0:wa.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:cl[1])!=null&&Le.includes("["))&&Xe!=null&&Xe.every(Ql=>{var nr,pr;return(pr=(nr=wa==null?void 0:wa.optionUrl)==null?void 0:nr.menuSelect)==null?void 0:pr.includes(Ql)})&&(wa.value=(ie==null?void 0:ie[wa==null?void 0:wa.label])||(ie==null?void 0:ie[(dr=(hr=(ul=(ja=wa==null?void 0:wa.optionUrl)==null?void 0:ja.groupSelect)==null?void 0:ul[1])==null?void 0:hr.replaceAll("[",""))==null?void 0:dr.replaceAll("]","")]),Array.isArray(wa.value)&&wa.value.every(Ql=>(Ql==null?void 0:Ql.url)&&(Ql==null?void 0:Ql.name))&&(wa.type="Upload")),wa}),Aa=Aa==null?void 0:Aa.map(wa=>{var Fa,Za,He;return(Fa=wa==null?void 0:wa.optionUrl)!=null&&Fa.oldMenuSelect&&(wa.optionUrl.menuSelect=(He=(Za=sl.safeClone(wa))==null?void 0:Za.optionUrl)==null?void 0:He.oldMenuSelect),wa}),h.value=sl.safeClone(Aa);let Ze=sl.safeClone(Aa);Ze=Ze==null?void 0:Ze.map(wa=>{var Fa,Za,He,va,ca,cl;return(Za=(Fa=wa==null?void 0:wa.optionUrl)==null?void 0:Fa.menuSelect)!=null&&Za.some(Le=>Le==null?void 0:Le.includes("["))&&(wa.optionUrl.oldMenuSelect=(va=(He=sl.safeClone(wa))==null?void 0:He.optionUrl)==null?void 0:va.menuSelect,wa.optionUrl.menuSelect=(cl=(ca=wa==null?void 0:wa.optionUrl)==null?void 0:ca.menuSelect)==null?void 0:cl.map(Le=>{var ja,ul,hr,dr;if(Le!=null&&Le.includes("[")){let Ql=(ul=(ja=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:ja.split(":"))==null?void 0:ul[1];Le=(dr=(hr=sl.safeClone(Aa))==null?void 0:hr.find(nr=>(nr==null?void 0:nr.label)===Ql))==null?void 0:dr.value}return Le})),wa}),h.value=Ze}else h.value=sa;qe=qe==null?void 0:qe.map(Aa=>{var Ze;return(Aa==null?void 0:Aa.key)==="formContent"&&(Aa.contents=(Ze=Aa.contents)==null?void 0:Ze.map(wa=>{var Fa,Za,He,va;return wa.value=((Za=(Fa=h.value)==null?void 0:Fa.find(ca=>(ca==null?void 0:ca.label)===(wa==null?void 0:wa.key)))==null?void 0:Za.value)??(wa==null?void 0:wa.value),wa.type=((va=(He=h.value)==null?void 0:He.find(ca=>(ca==null?void 0:ca.prop)===(wa==null?void 0:wa.key)))==null?void 0:va.type)??(wa==null?void 0:wa.type),wa})),Aa})}ne.value=!1,o("contentChange",{contents:qe,index:r.index});let aa=[],ke=[];if((_e=sl.safeClone((rl=qe==null?void 0:qe.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:rl.contents))==null||_e.forEach(Je=>{var ie;Array.isArray(Je==null?void 0:Je.value)&&((ie=Je==null?void 0:Je.value)!=null&&ie.find(Xe=>{var Aa;return(Aa=Xe==null?void 0:Xe.url)==null?void 0:Aa.includes(".obj")}))&&(ke=Je==null?void 0:Je.value)}),(ke==null?void 0:ke.length)>0){const Je=(Oa=sl.safeClone(ke))==null?void 0:Oa.filter(ie=>{var Xe;return(Xe=ie==null?void 0:ie.url)==null?void 0:Xe.includes(".obj")});Je==null||Je.forEach(ie=>{var Aa,Ze,wa,Fa;const Xe=(Aa=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:Aa.map(Za=>Za==null?void 0:Za.url);aa.push({objUrl:ie==null?void 0:ie.url,mtlUrls:((Ze=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:Ze.length)===1?(Fa=(wa=ke==null?void 0:ke.filter(Za=>{var He;return(Za==null?void 0:Za.name)===(ie==null?void 0:ie.name)&&((He=Za==null?void 0:Za.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:wa[0])==null?void 0:Fa.url:Xe})}),w.setObjUrl(aa)}},Ca=(Y,xe,pe)=>{let qe="";const sa=xe==null?void 0:xe.map($a=>{var Ma;return(Ma=$a==null?void 0:$a.value)==null?void 0:Ma.pageData});return sa==null||sa.forEach($a=>{var Ma;($a==null?void 0:$a.name)===(Y==null?void 0:Y[0])&&((Ma=$a==null?void 0:$a.compData)==null||Ma.forEach(Va=>{var Ue;(Va==null?void 0:Va.key)==="formContent"&&((Ue=Va==null?void 0:Va.contents)==null||Ue.forEach(Ie=>{var aa;(Ie==null?void 0:Ie.prop)===(Y==null?void 0:Y[1])&&(qe=(Ie==null?void 0:Ie.value)===""?oe.judgeContents((aa=sl.safeClone(Ie))==null?void 0:aa.optionUrl,pe):Ie==null?void 0:Ie.value)}))}))}),qe},Ne=(Y,xe,pe,qe)=>{var Va,Ue;let sa="",$a="";(Va=sl.safeClone(xe))==null||Va.forEach((Ie,aa)=>{Ie!=null&&Ie.includes("[")?$a=$a+ee.value+Y[aa]:$a=$a===""?$a+Ie:$a+"/"+Ie});let Ma=(Ue=qe[$a])==null?void 0:Ue.map(Ie=>{var aa;return(aa=Ie==null?void 0:Ie.value)==null?void 0:aa.pageData});return Ma==null||Ma.forEach(Ie=>{var aa;(Ie==null?void 0:Ie.name)===(pe==null?void 0:pe[0])&&((aa=Ie==null?void 0:Ie.compData)==null||aa.forEach(ke=>{var We;(ke==null?void 0:ke.key)==="formContent"&&((We=ke==null?void 0:ke.contents)==null||We.forEach(tl=>{(tl==null?void 0:tl.prop)===(pe==null?void 0:pe[1])&&(sa=tl==null?void 0:tl.value)}))}))}),sa};e.watch(()=>te==null?void 0:te.value,async()=>{await Se()},{immediate:!0});const ye=async Y=>await Fp(Y,"Auto");return e.watch(()=>r.itemData,async()=>{var tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa,Je,ie,Xe,Aa,Ze,wa,Fa,Za,He,va,ca,cl,Le;const Y=(tl=r.itemData)==null?void 0:tl.find(ja=>(ja==null?void 0:ja.key)==="formContent");let xe=(Cl=r.itemData)==null?void 0:Cl.find(ja=>(ja==null?void 0:ja.key)==="backGround");xe&&((El=xe==null?void 0:xe.contents)==null?void 0:El.length)>0&&(s.value=((_l=(Vl=xe==null?void 0:xe.contents)==null?void 0:Vl[0])==null?void 0:_l.url)??"");const pe=(jl=sl.safeClone(r.itemData))==null?void 0:jl.find(ja=>(ja==null?void 0:ja.key)==="formButton"),qe=(Qe=sl.safeClone(r.itemData))==null?void 0:Qe.find(ja=>(ja==null?void 0:ja.key)==="formFlex"),sa=(Xa=sl.safeClone(r.itemData))==null?void 0:Xa.find(ja=>(ja==null?void 0:ja.key)==="formWrap"),$a=(ba=sl.safeClone(r.itemData))==null?void 0:ba.find(ja=>(ja==null?void 0:ja.key)==="enableWrap"),Ma=(ll=sl.safeClone(r.itemData))==null?void 0:ll.find(ja=>(ja==null?void 0:ja.key)==="textSize"),Va=(Ia=sl.safeClone(r.itemData))==null?void 0:Ia.find(ja=>(ja==null?void 0:ja.key)==="textRGBA"),Ue=(il=sl.safeClone(r.itemData))==null?void 0:il.find(ja=>(ja==null?void 0:ja.key)==="backGround"),Ie=(rl=sl.safeClone(r.itemData))==null?void 0:rl.find(ja=>(ja==null?void 0:ja.key)==="backGroundImage");(sa==null?void 0:sa.contents)==="纵向"?C.value=!1:C.value=!0;const aa=Number(Ma==null?void 0:Ma.contents);S.value=Number.isNaN(aa)?void 0:aa,$.value=Va==null?void 0:Va.contents,V.value=Ue==null?void 0:Ue.contents,ae.value=Ie==null?void 0:Ie.contents;const ke=$a==null?void 0:$a.contents;if(ke===void 0?g.value=si.BLOCK:typeof ke=="boolean"?g.value=ke?si.ORDINARY:si.BLOCK:g.value=ke,Z.value=typeof(qe==null?void 0:qe.contents)!="boolean"?!(!(qe!=null&&qe.contents)===""||((_e=qe==null?void 0:qe.contents)==null?void 0:_e.toUpperCase())==="VERTICAL"):qe==null?void 0:qe.contents,((Oa=Y==null?void 0:Y.contents)==null?void 0:Oa.length)>0&&Array.isArray(Y==null?void 0:Y.contents)){let ja=r.allMapContents;const ul=(ie=(Je=sl.safeClone(Y))==null?void 0:Je.contents)==null?void 0:ie.map((Oe,er)=>{var Vr,Kr,an,hn,Jl,vr,Jr,vl,ir,Rl,Er,Hl,mr;let Sr=(Oe==null?void 0:Oe.label)??(Oe==null?void 0:Oe.key)??"";Oe==null||Oe.type;let Mr=(Oe==null?void 0:Oe.options)??[];if((Vr=Oe==null?void 0:Oe.key)!=null&&Vr.includes("$")&&(Sr=(Kr=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Kr[0],((hn=(an=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:an[1])==null?void 0:hn.length)>0)){const[ar,Xr]=(vr=(Jl=sl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Jl[1])==null?void 0:vr.split(/[()]/);(Jr=oe.FormType.find(sn=>(sn==null?void 0:sn.key)===ar))==null||Jr.value,((vl=Xr==null?void 0:Xr.split(","))==null?void 0:vl.length)>0&&(Mr=(ir=Xr==null?void 0:Xr.split(","))==null?void 0:ir.map(sn=>({label:sn,value:sn})))}let zl=Oe==null?void 0:Oe.options;((Rl=Oe==null?void 0:Oe.optionUrl)==null?void 0:Rl.selectRelateType)==="自定义绑定"&&(zl=(Hl=(Er=Oe==null?void 0:Oe.optionUrl)==null?void 0:Er.defaultSelect)==null?void 0:Hl.map(ar=>({label:ar,value:ar})));let Nr=(Oe==null?void 0:Oe.menuPath)??[],qr=(Oe==null?void 0:Oe.groups)??[],Kl=(Oe==null?void 0:Oe.columns)??[],br=!1,$r=(Oe==null?void 0:Oe.isFormColHidden)??!1,jr="",Pl=Oe!=null&&Oe.value?Oe.value:(zl==null?void 0:zl.length)>0?(mr=zl==null?void 0:zl[0])==null?void 0:mr.value:(Oe==null?void 0:Oe.value)??"",lr=!1,Wr="Input";return((zl==null?void 0:zl.length)>0||(Nr==null?void 0:Nr.length)>0)&&(Wr="Select"),(Array.isArray(jr)&&(jr!=null&&jr.every(ar=>(ar==null?void 0:ar.name)&&(ar==null?void 0:ar.url)))||Array.isArray(Pl)&&(Pl!=null&&Pl.every(ar=>(ar==null?void 0:ar.name)&&(ar==null?void 0:ar.url))))&&(Wr="upload"),Oe!=null&&Oe.isMainUrl&&(Wr="Url"),{label:Sr??"",name:Sr??"t"+er,prop:Sr??sl.safeClone(Oe==null?void 0:Oe.key),type:(Oe==null?void 0:Oe.type)??Wr,value:(Oe==null?void 0:Oe.type)==="Date"&&Pl===""?new Date:Pl,id:(Oe==null?void 0:Oe.id)??er,contents:(zl==null?void 0:zl.length)>0?zl:Mr??[],width:(Oe==null?void 0:Oe.width)??1,isLoginUser:br,config:Oe==null?void 0:Oe.config,optionUrl:(Oe==null?void 0:Oe.optionUrl)??Oe,isFormColHidden:$r,isHideInForm:(Oe==null?void 0:Oe.isHideInForm)??!1,signature:lr,isMain:Oe==null?void 0:Oe.isMain,required:(Oe==null?void 0:Oe.required)??!1,isMainUrl:Oe==null?void 0:Oe.isMainUrl,operable:(Oe==null?void 0:Oe.operable)??!1,disabled:(Oe==null?void 0:Oe.disabled)??!1,isSync:Oe==null?void 0:Oe.isSync,menus:Nr,groups:qr,words:Kl,allSelectionContents:Oe==null?void 0:Oe.allContents,filterContent:Oe==null?void 0:Oe.filterContents,isNoClick:(Oe==null?void 0:Oe.isNoClick)??!1,functionName:Oe==null?void 0:Oe.functionName,functionRelatedWords:Oe==null?void 0:Oe.functionRelatedWords,calculatorFilter:Oe==null?void 0:Oe.calculatorFilter}}),hr=ul==null?void 0:ul.map(Oe=>Oe==null?void 0:Oe.value);let dr="";hr==null||hr.forEach(Oe=>{Oe!==""&&Oe!==void 0&&(dr=dr===""?Oe:dr+"/"+Oe)}),x.setSelectArray(hr),x.setSelectString(dr);let Ql=(Xe=sl.safeClone(ul))==null?void 0:Xe.map(Oe=>(Oe!=null&&Oe.value&&oe.IsJson(Oe==null?void 0:Oe.value)&&Array.isArray(JSON.parse(Oe==null?void 0:Oe.value))&&(Oe.value=JSON.parse(Oe.value)),Oe)),nr={};Ql==null||Ql.forEach(Oe=>{nr[Oe.label]=Oe==null?void 0:Oe.value}),Ql=Ql==null?void 0:Ql.map(Oe=>{var er,Sr,Mr,zl,Nr,qr,Kl,br,$r;if((Oe==null?void 0:Oe.type)==="Select"&&((er=Oe==null?void 0:Oe.allSelectionContents)==null?void 0:er.length)>0&&(Oe.contactValue=nr),(Mr=(Sr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Sr.menuSelect)!=null&&Mr.some(jr=>jr==null?void 0:jr.includes("["))){let jr="";Oe.optionUrl.oldMenuSelect=(Nr=(zl=sl.safeClone(Oe))==null?void 0:zl.optionUrl)==null?void 0:Nr.menuSelect,Oe.optionUrl.menuSelect=(Kl=(qr=Oe==null?void 0:Oe.optionUrl)==null?void 0:qr.menuSelect)==null?void 0:Kl.map(Pl=>{var lr,Wr,Ur,Vr,Kr,an;if(Pl!=null&&Pl.includes("[")){let hn=(Wr=(lr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:lr.split(":"))==null?void 0:Wr[1];jr=Ca((Ur=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Ur.split(":"),ja==null?void 0:ja[ra.value],ja),Pl=((Kr=(Vr=sl.safeClone(Ql))==null?void 0:Vr.find(Jl=>(Jl==null?void 0:Jl.label)===hn))==null?void 0:Kr.value)||Ca((an=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:an.split(":"),ja==null?void 0:ja[ra.value],ja)}return Pl}),jr!==""&&Oe.value===""&&(Oe.value=Ne(Oe.optionUrl.menuSelect,Oe.optionUrl.oldMenuSelect,(br=Oe==null?void 0:Oe.optionUrl)==null?void 0:br.groupSelect,ja),Array.isArray(Oe.value)&&(($r=Oe.value)!=null&&$r.every(Pl=>Pl==null?void 0:Pl.url))&&(Oe.type="UPLOAD"))}return Oe}),h.value=Ql,Me.value=((Aa=h.value)==null?void 0:Aa.every(Oe=>Oe==null?void 0:Oe.disabled))||N.value===ra.value,Ce.value=(Ze=h.value)==null?void 0:Ze.every(Oe=>Oe==null?void 0:Oe.operable),se.value=(wa=h.value)==null?void 0:wa.map(Oe=>Oe==null?void 0:Oe.label);let pr=[],gr=[];if((Fa=sl.safeClone(h.value))==null||Fa.forEach(Oe=>{var er;Array.isArray(Oe==null?void 0:Oe.value)&&((er=Oe==null?void 0:Oe.value)!=null&&er.find(Sr=>{var Mr;return(Mr=Sr==null?void 0:Sr.url)==null?void 0:Mr.includes(".obj")}))&&(gr=Oe==null?void 0:Oe.value)}),(gr==null?void 0:gr.length)>0){const Oe=(Za=sl.safeClone(gr))==null?void 0:Za.filter(er=>{var Sr;return(Sr=er==null?void 0:er.url)==null?void 0:Sr.includes(".obj")});Oe==null||Oe.forEach(er=>{var Mr,zl,Nr,qr;const Sr=(Mr=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:Mr.map(Kl=>Kl==null?void 0:Kl.url);pr.push({objUrl:er==null?void 0:er.url,mtlUrls:((zl=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:zl.length)===1?(qr=(Nr=gr==null?void 0:gr.filter(Kl=>{var br;return(Kl==null?void 0:Kl.name)===(er==null?void 0:er.name)&&((br=Kl==null?void 0:Kl.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:Nr[0])==null?void 0:qr.url:Sr})}),w.setObjUrl(pr)}(He=sl.safeClone(h.value))==null||He.forEach(Oe=>{var er,Sr,Mr,zl,Nr,qr,Kl,br,$r,jr,Pl,lr,Wr;if((Sr=(er=Oe==null?void 0:Oe.value)==null?void 0:er.toString())!=null&&Sr.includes(".stl")||(zl=(Mr=Oe==null?void 0:Oe.value)==null?void 0:Mr.toString())!=null&&zl.includes(".STL")||(qr=(Nr=Oe==null?void 0:Oe.value)==null?void 0:Nr.toString())!=null&&qr.includes(".obj")||(br=(Kl=Oe==null?void 0:Oe.value)==null?void 0:Kl.toString())!=null&&br.includes(".mtl")||(jr=($r=Oe==null?void 0:Oe.value)==null?void 0:$r.toString())!=null&&jr.includes(".urdf")){let Ur={},Vr=[],Kr;Array.isArray(Oe==null?void 0:Oe.value)?Kr=Oe==null?void 0:Oe.value:Kr=(Pl=Oe==null?void 0:Oe.value)==null?void 0:Pl.split(","),Kr==null||Kr.forEach(an=>{an.includes(".mtl")?Vr.push(an):Ur.blob=Ur.blob==="undefined"?an:Ur.blob+","+an}),(Vr==null?void 0:Vr.length)>0&&(Ur.mtlBlobs=Vr),(Wr=(lr=Object.values(Ur))==null?void 0:lr[0])!=null&&Wr.includes("http:")}})}else h.value=[];let We=ce.value;if((We==null?void 0:We.length)>0&&(We=We==null?void 0:We.map(ja=>{var hr,dr,Ql,nr;let ul=(hr=ja==null?void 0:ja.key)==null?void 0:hr.split("/");return(r==null?void 0:r.compName)===(ul==null?void 0:ul[0])&&(dr=h.value)!=null&&dr.find(pr=>(pr==null?void 0:pr.prop)===(ul==null?void 0:ul[1]))&&(ja.value=(nr=(Ql=h.value)==null?void 0:Ql.find(pr=>(pr==null?void 0:pr.prop)===(ul==null?void 0:ul[1])))==null?void 0:nr.value),ja}),J.setTableViewContents(We)),r!=null&&r.formRules)u.value=r==null?void 0:r.formRules;else{let ja={};(va=sl.safeClone(h).value)==null||va.forEach(ul=>{((ul==null?void 0:ul.isMain)===!0||(ul==null?void 0:ul.required)===!0)&&(ja[(ul==null?void 0:ul.prop)??(ul==null?void 0:ul.name)]=[{required:!0,message:`${(ul==null?void 0:ul.label)||(ul==null?void 0:ul.prop)||(ul==null?void 0:ul.name)}不能为空`}])}),u.value=ja}if(((ca=pe==null?void 0:pe.contents)==null?void 0:ca.length)>0){const ja=[];(cl=pe==null?void 0:pe.contents)==null||cl.forEach((ul,hr)=>{(ul==null?void 0:ul.label)!==""&&ja.push({label:(ul==null?void 0:ul.label)??"",id:(ul==null?void 0:ul.id)??hr,type:(ul==null?void 0:ul.type)??"",background:ul==null?void 0:ul.background})}),I.value=ja}else I.value=[];(Le=h.value)!=null&&Le.some(ja=>(ja==null?void 0:ja.functionName)&&(ja==null?void 0:ja.functionName)!=="")&&(h.value=await ye(h.value))},{deep:!0,immediate:!0}),e.watch(()=>N.value,Y=>{Me.value=Y===ra.value},{immediate:!0}),(Y,xe)=>{var Va;const pe=e.resolveComponent("svg-icon"),qe=e.resolveComponent("el-switch"),sa=e.resolveComponent("el-checkbox"),$a=e.resolveComponent("el-popover"),Ma=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",K3,[g.value===e.unref(si).TEXT?(e.openBlock(),e.createBlock(Ic,{key:0,itemData:a.itemData,compName:a.compName,fields:h.value,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Me.value||ua(),"onUpdate:backGroundImage":ze,backgroundUrl:s.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):g.value===e.unref(si).BLOCK?(e.openBlock(),e.createBlock(Nf,{key:1,items:(Va=h.value)==null?void 0:Va.map(Ue=>({label:Ue!=null&&Ue.isHideInForm?"":Ue==null?void 0:Ue.label,value:Ue==null?void 0:Ue.value,width:(Ue==null?void 0:Ue.width)??1,field:Ue})),textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Me.value||ua(),"onUpdate:backGroundImage":ze,backgroundUrl:s.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":g.value===e.unref(si).ORDINARY})},[e.createVNode(sl.ssForm,{rowContents:h.value,formRules:u.value,buttonValue:I.value,isRowFlex:!1,isEnableWrap:!0,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,onOnButtonClick:za,onChange:ha,formDisabled:Me.value||ua(),formLabelsOperable:Ce.value,isButtonRow:C.value,onPreview:ya,onBlurChange:_a,style:e.normalizeStyle({backGroundImage:s.value!==""?`url("${s.value}")`:void 0}),onHandleColEditChange:ma,onHandleColTypeChange:oa,onRouteUrl:X,onClickTrigger:H,"onUpdate:backGroundImage":ze},{operateCol:e.withCtx(({renderColumns:Ue,formDisabled:Ie,formLabelsOperable:aa})=>[e.createVNode($a,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ja},{reference:e.withCtx(()=>[e.createElementVNode("span",G3,[e.createVNode(pe,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Y3,[xe[1]||(xe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(qe,{"model-value":Ie,"active-text":"禁用","inactive-text":"",onChange:Ge,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(qe,{"model-value":aa,"active-text":"编辑所有标签","inactive-text":"",onChange:da},null,8,["model-value"]),xe[2]||(xe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ma,{modelValue:se.value,"onUpdate:modelValue":xe[0]||(xe[0]=ke=>se.value=ke),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:U,onChange:R},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(sa,{value:ke.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)]),_:2},1032,["value"]),e.createVNode($a,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(pe,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var We;return[e.createElementVNode("div",J3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((We=Object.keys(ke))==null?void 0:We.filter(tl=>{var Cl;return(Cl=Be.value)==null?void 0:Cl.find(El=>(El==null?void 0:El.value)===tl)}),tl=>{var Cl,El;return e.openBlock(),e.createElementBlock("div",{key:tl},[e.createVNode(sl._sfc_main$1,{value:ke==null?void 0:ke[tl],"active-text":(El=(Cl=Be.value)==null?void 0:Cl.find(Vl=>(Vl==null?void 0:Vl.value)===tl))==null?void 0:El.label,inactiveText:"",onChange:Vl=>Ve(Vl,tl,ke)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",X3,[e.createVNode(pe,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow","style"])],2)),M.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:3,fileDataList:j.value,onDestroy:La},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{files:m.value,onGetAnimationData:Y.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Es=Zl._export_sfc(Z3,[["__scopeId","data-v-b52f96ee"]]),Ro=e.ref(0),Oc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(r=>(Ro.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ro.value,children:Oc(r==null?void 0:r.children)},r))},Q3=a=>{var n;return(n=A.cloneDeep(a))==null?void 0:n.map(r=>(Ro.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ro.value,children:Oc(r==null?void 0:r.children)},r))},Lc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=A.cloneDeep(a))==null?void 0:n.filter(o=>(o==null?void 0:o.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=Lc(r==null?void 0:r.children,l),r)),a)},Rc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o=l),o)):(a=a==null?void 0:a.map(r=>(r.children=Rc(r==null?void 0:r.children,l),r)),a)},$c=(a,l)=>{var n;return a!=null&&a.find(r=>{var o;return(r==null?void 0:r.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)})?(n=A.cloneDeep(a))==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(o=l==null?void 0:l.contents),o}):(a=a==null?void 0:a.map(r=>(r.children=$c(r==null?void 0:r.children,l),r)),a)},Vc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(l.contents)),o)):(a=a==null?void 0:a.map(r=>(r.children=Vc(r==null?void 0:r.children,l),r)),a)},cr=[{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"}],eh=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ah=[{label:"新增",value:"add"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ah},{key:"background",label:"按钮背景色",type:"Color"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:eh},{key:"textColor",label:"按钮颜色",type:"Color"}],lh={class:"table-header-child"},rh={class:"table-header-child-main"},nh={class:"table-header-child-content"},ih={class:"table-header-child-content-item"},oh={class:"fix-button"},th={key:0},sh={class:"form-content"},ch={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=oe.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h);e.ref(0);const d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{var w;o.value=!0;let x=[];cr==null||cr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},C=E=>{r("fixChange",A.cloneDeep(E))},M=E=>{r("deleteChange",A.cloneDeep(E))},k=E=>{o.value=!0;let x=[];cr==null||cr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},W=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},I=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=cr==null?void 0:cr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="id"+c.value,(w=m.value)==null||w.forEach(S=>{const $=cr==null?void 0:cr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},j=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},L=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,x)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(g,S)=>(e.openBlock(),e.createElementBlock("div",rh,[e.createElementVNode("div",nh,[e.createElementVNode("div",ih,e.toDisplayString(g.label),1),e.createElementVNode("div",oh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>k(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>u(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",th,[e.createVNode(Pc,{tableChildContents:g==null?void 0:g.children,onDeleteChange:M,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",sh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:I},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},uh=Zl._export_sfc(ch,[["__scopeId","data-v-e0fef72d"]]),dh={class:"table-header-child"},ph={class:"table-header-child-main"},fh={class:"table-header-child-content"},hh={class:"table-header-child-content-item"},vh={class:"fix-button"},mh={key:0},yh={class:"form-content"},gh={class:"dialog-footer"},bh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=oe.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h),d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{r("fixChange",A.cloneDeep(E))},C=E=>{var w;o.value=!0;let x=[];cr==null||cr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},M=E=>{o.value=!0;let x=[];cr==null||cr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},k=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},W=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=cr==null?void 0:cr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="idChild"+c.value,(w=m.value)==null||w.forEach(S=>{const $=cr==null?void 0:cr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},I=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,x)=>{const w=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(S,$)=>(e.openBlock(),e.createElementBlock("div",ph,[e.createElementVNode("div",fh,[e.createElementVNode("div",hh,e.toDisplayString(S.label),1),e.createElementVNode("div",vh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>M(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>C(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>j(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",mh,[e.createVNode(uh,{tableChildContents:S==null?void 0:S.children,onDeleteChange:L,onFixChange:u},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:I,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",yh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",gh,[e.createVNode(g,{onClick:I,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(g,{class:"ok-button button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Pc=Zl._export_sfc(bh,[["__scopeId","data-v-ebd68fa1"]]),kh={class:"table-operate-content"},xh={class:"table-operate-item"},wh={class:"operate-title"},_h={class:"operate-content"},Sh={class:"fix-content"},Eh={class:"fix-content-label"},Ch={class:"fix-button"},Dh={key:0},Th={class:"operate-title"},Bh={class:"operate-content"},Nh={class:"fix-content"},Ah={class:"fix-content-label"},zh={class:"fix-button"},Mh={class:"operate-title"},Ih={class:"operate-content"},Oh={class:"fix-content"},Lh={class:"fix-content-label"},Rh={class:"fix-button"},$h={class:"operate-title"},Vh={class:"operate-content"},Ph={class:"fix-content"},Fh={class:"fix-content-label"},jh={class:"fix-button"},Hh={class:"operate-content"},Uh={style:{display:"flex","justify-content":"space-between"}},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={class:"form-content"},Gh={class:"dialog-footer"},Yh={class:"form-content"},Jh={class:"dialog-footer"},Xh={class:"form-content"},Zh={class:"dialog-footer"},Qh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(!1),c=e.ref([]),d=e.ref(!1),m=e.ref([]),b=e.ref(!1),u=e.ref([]),C=e.ref(""),M=e.ref(""),k=e.ref([]),W=e.ref([]),I=e.ref([]),j=e.ref([]),L=e.ref(!1),E=e.ref([]),x=e.ref([]),w=e.ref(0),g=e.ref([]),S=e.ref([]),$=e.ref([]),V=()=>{L.value=!0;let R=[];Vn==null||Vn.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=R,x.value=R},ae=()=>{var H,X,he;h.value=!0;let R=[];(he=(X=(H=oe.FormContent)==null?void 0:H.find(de=>(de==null?void 0:de.key)==="Input"))==null?void 0:X.value)==null||he.forEach(de=>{w.value++,R.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:(de==null?void 0:de.label)==="类型"?"Input":"",id:w.value,contents:de==null?void 0:de.options})}),g.value=R,S.value=R},Z=R=>{R||(g.value=S.value)},me=async R=>{var H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za;if((R==null?void 0:R.类型)!==((X=(H=S.value)==null?void 0:H.find(ha=>(ha==null?void 0:ha.label)==="类型"))==null?void 0:X.value)){let ha=[],Ca=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:de.value)==null?void 0:ma.value)?await((ya=(ze=(_a=oe.FormContent)==null?void 0:_a.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:ze.value)==null?void 0:ya.value):(Ve=(oa=oe.FormContent)==null?void 0:oa.find(Ne=>(Ne==null?void 0:Ne.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Ve.value;if(Ca==null||Ca.forEach(Ne=>{w.value++,ha.push({label:Ne==null?void 0:Ne.label,name:(Ne==null?void 0:Ne.name)||(Ne==null?void 0:Ne.label),type:Ne.type,value:Ne!=null&&Ne.属性名?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):(R==null?void 0:R[Ne.label])??"",id:w.value,contents:Ne==null?void 0:Ne.options,prop:(Ne==null?void 0:Ne.prop)||(Ne==null?void 0:Ne.name)||(Ne==null?void 0:Ne.label)})}),R!=null&&R.菜单选项&&((La=R==null?void 0:R.菜单选项)==null?void 0:La.length)>0){const Ne=await oe.menuToContentType(R==null?void 0:R.菜单选项);ha=ha==null?void 0:ha.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=Ne),ye))}S.value=await oe.selectToBase(A.cloneDeep(ha)),g.value=await oe.selectToBase(A.cloneDeep(ha))}else{let ha=A.cloneDeep(g.value);if(ha=ha==null?void 0:ha.map(Ca=>(Ca.value=R==null?void 0:R[Ca.name],Ca)),R!=null&&R.菜单选项&&((za=R==null?void 0:R.菜单选项)==null?void 0:za.length)>0){const Ca=await oe.menuToContentType(R==null?void 0:R.菜单选项);ha=ha==null?void 0:ha.map(Ne=>((Ne==null?void 0:Ne.name)==="组信息选项"&&(Ne.contents=Ca),Ne))}ha=oe.formToOptionsContents(ha),S.value=await oe.selectToBase(A.cloneDeep(ha))}},Ae=async R=>{await me(R),g.value=S.value},F=(R,H)=>{if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.selectRelateType)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.menuSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.groupSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(H==null?void 0:H.value)||H[R.key];if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const X=H[R.key];return ac(X)?X:R.default}return(R==null?void 0:R.label)==="类型"&&H[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!H[R.key]?!1:H[R.key]},ne=async R=>{var he,de,ma,oa,Ve,_a,ze,ya,La;h.value=!0;let H=[];const X=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:de.value)==null?void 0:ma.value)?await((ya=(ze=(_a=oe.FormContent)==null?void 0:_a.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:ze.value)==null?void 0:ya.value):(Ve=(oa=oe.FormContent)==null?void 0:oa.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Ve.value;if(X==null||X.forEach(za=>{w.value++,H.push({label:za==null?void 0:za.label,name:(za==null?void 0:za.name)||(za==null?void 0:za.label),type:za.type,value:(za==null?void 0:za.label)==="属性名"?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):F(za,R),id:w.value,contents:za==null?void 0:za.options})}),R!=null&&R.menuSelect&&((La=R==null?void 0:R.menuSelect)==null?void 0:La.length)>0){const za=await oe.menuToContentType(R==null?void 0:R.menuSelect);H=H==null?void 0:H.map(ha=>((ha==null?void 0:ha.name)==="组信息选项"&&(ha.contents=za),ha))}C.value=R==null?void 0:R.id,g.value=await oe.selectToBase(oe.formToOptionsContents(H)),S.value=await oe.selectToBase(oe.formToOptionsContents(H))},J=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;$.value=(H=A.cloneDeep($.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="tableToForm"&&(he.contents=$.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ce=()=>{h.value=!1,g.value=[],C.value=""},Te=async()=>{var he,de,ma,oa,Ve,_a,ze,ya,La,za;g.value=S.value;let R={};C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value);let H=await((ma=(de=(he=oe.FormContent)==null?void 0:he.find(ha=>{var Ca,Ne;return(ha==null?void 0:ha.key)===(((Ne=(Ca=g.value)==null?void 0:Ca.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:Ne.value)??"label")}))==null?void 0:de.value)==null?void 0:ma.value)??((Ve=(oa=oe.FormContent)==null?void 0:oa.find(ha=>{var Ca,Ne;return(ha==null?void 0:ha.key)===(((Ne=(Ca=g.value)==null?void 0:Ca.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:Ne.value)??"label")}))==null?void 0:Ve.value);if((_a=g.value)==null||_a.forEach(ha=>{const Ca=H==null?void 0:H.find(Ne=>(Ne==null?void 0:Ne.label)===(ha==null?void 0:ha.label));Ca&&(R[Ca.key]=ha.value)}),R.name=R.label,(ze=$.value)!=null&&ze.find(ha=>ha.id===R.id))$.value=(ya=$.value)==null?void 0:ya.map(ha=>(ha.id===R.id&&(ha=R),ha));else{let ha=A.cloneDeep($.value);$.value||($.value=[]),ha.push(R),$.value=ha}$.value=$.value.map(({id:ha,...Ca})=>Ca),h.value=!1,C.value="";let X=A.cloneDeep(n.originalItemContents);(La=A.cloneDeep(n.originalItemContents))!=null&&La.find(ha=>(ha==null?void 0:ha.key)==="tableToForm")?X=(za=A.cloneDeep(n.originalItemContents))==null?void 0:za.map(ha=>((ha==null?void 0:ha.key)==="tableToForm"&&(ha.contents=$.value),ha)):X.push({key:"tableToForm",contents:$.value}),r("change",X)},$e=R=>{L.value=!0;let H=[];Vn==null||Vn.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,E.value=H,x.value=H};e.watch(()=>b.value,()=>{var H,X;let R=A.cloneDeep(n.originalItemContents);(H=A.cloneDeep(n.originalItemContents))!=null&&H.find(he=>(he==null?void 0:he.key)==="page")?R=(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="page"&&(he.contents=b.value),he)):R.push({key:"page",contents:b.value}),r("change",R)},{deep:!0});const fe=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;W.value=(H=A.cloneDeep(W.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="extraButton"&&(he.contents=W.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var X,he,de,ma,oa;E.value=x.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=E.value)==null||X.forEach(Ve=>{const _a=Vn==null?void 0:Vn.find(ze=>(ze==null?void 0:ze.label)===(Ve==null?void 0:Ve.label));_a?R[_a.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(R.children=Ve.children)}),(he=W.value)!=null&&he.find(Ve=>Ve.id===R.id))W.value=(de=W.value)==null?void 0:de.map(Ve=>(Ve.id===R.id&&(Ve=R),Ve));else{let Ve=A.cloneDeep(W.value)??[];Ve.push(R),W.value=Ve}L.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(ma=A.cloneDeep(n.originalItemContents))!=null&&ma.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton")?H=(oa=A.cloneDeep(n.originalItemContents))==null?void 0:oa.map(Ve=>((Ve==null?void 0:Ve.key)==="extraButton"&&(Ve.contents=W.value),Ve)):H.push({key:"extraButton",contents:W.value}),r("change",H)},te=R=>{let H=A.cloneDeep(x.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),x.value=H},U=()=>{L.value=!1,E.value=[],C.value=""},Ce=R=>{d.value=!0;let H=[];Pn==null||Pn.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,I.value=H,j.value=H},Me=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;k.value=(H=A.cloneDeep(k.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>((he==null?void 0:he.key)==="rowButton"&&(he.contents=k.value),he))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Pe=()=>{s.value=!0;let R=[];cr==null||cr.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=R,u.value=R},ra=()=>{d.value=!0;let R=[];Pn==null||Pn.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),I.value=R,j.value=R},Ta=R=>{let H=A.cloneDeep(j.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),j.value=H},ee=()=>{var X,he,de,ma,oa;I.value=j.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=I.value)==null||X.forEach(Ve=>{const _a=Pn==null?void 0:Pn.find(ze=>(ze==null?void 0:ze.label)===(Ve==null?void 0:Ve.label));_a?R[_a.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(R.children=Ve.children)}),(he=k.value)!=null&&he.find(Ve=>Ve.id===R.id))k.value=(de=k.value)==null?void 0:de.map(Ve=>(Ve.id===R.id&&(Ve=R),Ve));else{let Ve=A.cloneDeep(k.value);Ve.push(R),k.value=Ve}d.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(ma=A.cloneDeep(n.originalItemContents))!=null&&ma.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton")?H=(oa=A.cloneDeep(n.originalItemContents))==null?void 0:oa.map(Ve=>((Ve==null?void 0:Ve.key)==="rowButton"&&(Ve.contents=k.value),Ve)):H.push({key:"rowButton",contents:k.value}),r("change",H)},pa=()=>{d.value=!1,C.value="",j.value=[],I.value=[]},ue=R=>{s.value=!0;let H=[];cr==null||cr.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:w.value,contents:X==null?void 0:X.options})}),m.value=H,M.value=R==null?void 0:R.id,u.value=H},ua=R=>{var H;c.value=Lc(A.cloneDeep(c.value),R==null?void 0:R.id),r("change",(H=A.cloneDeep(n.originalItemContents))==null?void 0:H.map(X=>{var he;return(X==null?void 0:X.key)==="header"&&(X.contents=(he=c.value)!=null&&he.some(de=>de==null?void 0:de.children)?[c.value]:c.value),X}))},Se=R=>{var X,he,de;R.type==="fix"?R.id!==""?c.value=$c(c.value,R):c.value=Rc(c.value,R==null?void 0:R.contents):c.value=Vc(c.value,R),c.value=(X=c.value)!=null&&X.some(ma=>ma==null?void 0:ma.children)?[c.value]:c.value,C.value="";let H=A.cloneDeep(n.originalItemContents);(he=A.cloneDeep(n.originalItemContents))!=null&&he.find(ma=>(ma==null?void 0:ma.key)==="header")?H=(de=A.cloneDeep(n.originalItemContents))==null?void 0:de.map(ma=>((ma==null?void 0:ma.key)==="header"&&(ma.contents=c.value),ma)):H.push({key:"header",contents:c.value}),r("change",H)},se=R=>{var X;s.value=!0;let H=[];cr==null||cr.forEach(he=>{w.value++,H.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:R[he.key],id:w.value,contents:he==null?void 0:he.options})}),R!=null&&R.children&&((X=R==null?void 0:R.children)==null?void 0:X.length)>0&&H.push({children:R==null?void 0:R.children,isFormColHidden:!0}),C.value=R==null?void 0:R.id,M.value="",m.value=H,u.value=H},Be=R=>{let H=A.cloneDeep(u.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),u.value=H},Ge=()=>{s.value=!1,C.value="",M.value="",u.value=[]},da=()=>{var X,he,de,ma,oa,Ve;m.value=u.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=m.value)==null||X.forEach(_a=>{const ze=cr==null?void 0:cr.find(ya=>(ya==null?void 0:ya.label)===(_a==null?void 0:_a.label));ze?R[ze.key]=_a.value:_a!=null&&_a.children&&_a.children.length>0&&(R.children=_a.children)}),(he=c.value)!=null&&he.find(_a=>_a.id===R.id))c.value=(de=c.value)==null?void 0:de.map(_a=>(_a.id===R.id&&(_a=R),_a));else{let _a=A.cloneDeep(c.value)??[];M.value===""?_a.push(R):_a=_a==null?void 0:_a.map(ze=>(ze.id===M.value&&(ze.children||(ze.children=[]),ze.children.push(R)),ze)),c.value=_a}c.value=(ma=c.value)!=null&&ma.some(_a=>_a==null?void 0:_a.children)?[c.value]:c.value,s.value=!1,C.value="",M.value="";let H=A.cloneDeep(n.originalItemContents);(oa=A.cloneDeep(n.originalItemContents))!=null&&oa.find(_a=>(_a==null?void 0:_a.key)==="header")?H=(Ve=A.cloneDeep(n.originalItemContents))==null?void 0:Ve.map(_a=>((_a==null?void 0:_a.key)==="header"&&(_a.contents=c.value),_a)):H.push({key:"header",contents:c.value}),r("change",H)},Ja=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;c.value=(H=A.cloneDeep(c.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(he=>{var de;return(he==null?void 0:he.key)==="header"&&(he.contents=(de=c.value)!=null&&de.some(ma=>ma==null?void 0:ma.children)?[c.value]:c.value),he})),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(o.value=A.cloneDeep(n.originalItemContents),c.value=(H=(R=o.value)==null?void 0:R.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:H.contents,k.value=(he=(X=o.value)==null?void 0:X.find(pe=>(pe==null?void 0:pe.key)==="rowButton"))==null?void 0:he.contents,W.value=(ma=(de=o.value)==null?void 0:de.find(pe=>(pe==null?void 0:pe.key)==="extraButton"))==null?void 0:ma.contents,b.value=(Ve=(oa=o.value)==null?void 0:oa.find(pe=>(pe==null?void 0:pe.key)==="page"))!=null&&Ve.contents?!!((ze=(_a=o.value)==null?void 0:_a.find(pe=>(pe==null?void 0:pe.key)==="page"))!=null&&ze.contents):!1,$.value=(La=(ya=o.value)==null?void 0:ya.find(pe=>(pe==null?void 0:pe.key)==="tableToForm"))==null?void 0:La.contents,c.value=(za=c.value)==null?void 0:za.map((pe,qe)=>(Array.isArray(pe)?pe=Q3(pe):pe={label:(pe==null?void 0:pe.label)??"",prop:(pe==null?void 0:pe.label)==="操作"?"operate":pe==null?void 0:pe.prop,width:pe!=null&&pe.width?parseInt(pe.width):"",fixed:(pe==null?void 0:pe.fixed)??void 0,sortable:(pe==null?void 0:pe.sortable)??!1,align:(pe==null?void 0:pe.align)??"left",showOverflowTooltip:(pe==null?void 0:pe.showOverflowTooltip)??!0,isNotDrag:(pe==null?void 0:pe.isNotDrag)??!1,isEditCol:(pe==null?void 0:pe.isEditCol)??!1,isOperate:(pe==null?void 0:pe.isOperate)??!1,id:(pe==null?void 0:pe.id)??qe,formMenuSelect:(pe==null?void 0:pe.formMenuSelect)??void 0,groupSelect:(pe==null?void 0:pe.groupSelect)??void 0},pe)),c.value=(ha=c.value)!=null&&ha.every(pe=>Array.isArray(pe))?(Ca=c.value)==null?void 0:Ca[0]:c.value,k.value=(Ne=k.value)==null?void 0:Ne.map((pe,qe)=>pe={label:(pe==null?void 0:pe.label)??"",type:(pe==null?void 0:pe.type)??"",textColor:(pe==null?void 0:pe.textColor)??"#000000",id:(pe==null?void 0:pe.id)??qe}),W.value=(ye=W.value)==null?void 0:ye.map((pe,qe)=>pe={label:(pe==null?void 0:pe.label)??"",type:(pe==null?void 0:pe.type)??"",background:(pe==null?void 0:pe.background)??"var(--ssComponent-primary-color)",id:(pe==null?void 0:pe.id)??qe}),$.value)$.value=(xe=$.value)==null?void 0:xe.map(pe=>{w.value++;let qe=pe;return qe.id=w.value,qe});else{let pe=[];const qe=(Y=oe.getColumnChild(A.cloneDeep(c.value)))==null?void 0:Y.filter(sa=>(sa==null?void 0:sa.prop)!=="operate");qe==null||qe.forEach(sa=>{var $a;w.value++,pe.push({label:sa==null?void 0:sa.label,name:(sa==null?void 0:sa.prop)||(sa==null?void 0:sa.label),type:sa!=null&&sa.groupSelect?"Select":"Input",value:"",id:w.value,contents:sa==null?void 0:sa.options,menuSelect:sa==null?void 0:sa.formMenuSelect,groupSelect:($a=sa==null?void 0:sa.groupSelect)==null?void 0:$a.split(":"),selectRelateType:"关联绑定列"})}),$.value=pe}},{deep:!0,immediate:!0}),(R,H)=>{const X=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",kh,[e.createElementVNode("div",xh,[e.createElementVNode("div",wh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(he,{class:"icon-content",onClick:Pe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Sh,[e.createElementVNode("div",Eh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Ch,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>ue(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>se(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Ja(de)},null,8,["onClick"])])]),de!=null&&de.children&&de.children.length>0?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Pc,{tableChildContents:de==null?void 0:de.children,onDeleteChange:ua,onFixChange:Se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Th,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:ra},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Bh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Nh,[e.createElementVNode("div",Ah,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",zh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>Ce(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Me(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Mh,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Oh,[e.createElementVNode("div",Lh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Rh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>$e(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>fe(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",$h,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(de,ma)=>(e.openBlock(),e.createElementBlock("div",{key:ma},[e.createElementVNode("div",Ph,[e.createElementVNode("div",Fh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",jh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>ne(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>J(de)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Hh,[e.createElementVNode("div",Uh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(sl._sfc_main$1,{modelValue:b.value,"onUpdate:modelValue":H[0]||(H[0]=de=>b.value=de)},null,8,["modelValue"])])])]),e.createVNode(Br.ssDialog,{visible:s.value,onBeforeDestroy:Ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(he,{onClick:Ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(he,{class:"ok-button button",onClick:da,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:d.value,onBeforeDestroy:pa,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ta},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gh,[e.createVNode(he,{onClick:pa,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(he,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:L.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jh,[e.createVNode(he,{onClick:U,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(he,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:h.value,onBeforeDestroy:ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xh,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:me,onChangeVisible:Z,onBlurChange:Ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zh,[e.createVNode(he,{onClick:ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(he,{class:"ok-button button",onClick:Te,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},e4=Zl._export_sfc(Qh,[["__scopeId","data-v-7a6b87b5"]]),a4=A.useModelComp(A.pinia),{pageMapState:l4}=A.storeToRefs(a4),r4=A.useMenuState(A.pinia),{activeMenuPath:n4}=A.storeToRefs(r4),i4=e.ref(24),o4=e.ref(6),t4=e.ref(10),s4=e.ref(70),c4=e.ref(.18),u4=e.ref(45),d4=(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;return{x:((s=(o=a==null?void 0:a.value)==null?void 0:o.tableData)==null?void 0:s.x)||l%2*12,y:((c=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:c.y)||l,w:((m=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:m.w)||i4.value,h:((u=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:u.h)||n,minW:((M=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:M.minW)||o4.value,minH:((W=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:W.minH)||c4.value,maxH:((j=(I=a==null?void 0:a.value)==null?void 0:I.tableData)==null?void 0:j.maxH)||u4.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},p4=(a,l)=>{var r,o,s,h,c,d,m,b;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((h=(s=(o=a==null?void 0:a.compData)==null?void 0:o.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:h.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((b=(m=(d=a==null?void 0:a.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:b.length)/5);return n*2},Fc=(a,l,n)=>{var h,c;const r=(c=(h=l4.value)==null?void 0:h[n4.value])==null?void 0:c.filter(d=>{var m;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="gridLayout"}),o=r==null?void 0:r.find(d=>{var m,b,u;return((u=(b=(m=d==null?void 0:d.value)==null?void 0:m.tableData)==null?void 0:b.component)==null?void 0:u.id)===a.id}),s=p4(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((d,m)=>Fc(d,m))),{...d4(o,l,s,a)}},f4=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=A.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,o)=>Fc(r,o)):[]},h4=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}]}]}}),v4=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),m4=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]);e.watch(()=>n.compType,c=>{var b;const d=h4(n==null?void 0:n.optionItems),m=c?(b=d[c==null?void 0:c.toUpperCase()])==null?void 0:b[n==null?void 0:n.target]:[];o.value=m==null?void 0:m.map(u=>{for(const[C,M]of Object.entries((n==null?void 0:n.comp)||{}))if((u==null?void 0:u.prop)===C)return{...u,value:M};return u})},{immediate:!0});const s=c=>sl.getComponent(c),h=c=>{var d,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?o.value=(d=o.value)==null?void 0:d.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!0}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!0}:b}):o.value=(m=o.value)==null?void 0:m.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!1}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!1}:b}),r("change",{target:n==null?void 0:n.target,styleConfigs:o.value,prop:c==null?void 0:c.prop})};return(c,d)=>{const m=e.resolveComponent("el-col"),b=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(b,{class:"style-row",key:u==null?void 0:u.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u==null?void 0:u.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u.type)),{modelValue:u.value,"onUpdate:modelValue":C=>u.value=C,content:u==null?void 0:u.options,optionUrl:u==null?void 0:u.optionUrl,disabled:u==null?void 0:u.disabled,activeText:u==null?void 0:u.activeText,inactiveText:u==null?void 0:u.inactiveText,onChange:C=>h(u)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),y4=Zl._export_sfc(m4,[["__scopeId","data-v-6c233914"]]),g4=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:l}){const n=a,r=l,o=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),h=j=>j==null?void 0:j.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:h(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),d=e.ref([]),m=e.ref(""),b=(j,L,E)=>{var g;let x=[];(n==null?void 0:n.activeTabName)==="任务配置"?(x=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:j},{label:"按钮名称",value:"按钮名称",children:L}]},{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:o},{prop:"任务关键词",rule:o},{prop:"执行任务",rule:o},{prop:"执行动作",rule:o},{prop:"执行交互",rule:o}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(x=[{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:(g=n==null?void 0:n.relatedData)==null?void 0:g.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:o},{prop:"关联状态",rule:o},{prop:"关联形式",rule:o},{prop:"关联任务集合",rule:o}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...x,...u(j,L,E)]:w=x,w},u=(j,L,E)=>{const x=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return E?x==null?void 0:x.filter(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):x},C=(j,L)=>{var S,$,V,ae,Z,me,Ae,F,ne;const E=((Z=(ae=(V=($=(S=n==null?void 0:n.comp)==null?void 0:S.compData)==null?void 0:$.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:V.contents)==null?void 0:ae.filter(J=>(J==null?void 0:J.label)!=="操作"))==null?void 0:Z.map(J=>({value:J==null?void 0:J.prop,label:J.label})))||[],x=/button/i,w=((ne=(F=(Ae=(me=n==null?void 0:n.comp)==null?void 0:me.compData)==null?void 0:Ae.filter(J=>x.test(J==null?void 0:J.key)))==null?void 0:F.flatMap(J=>J==null?void 0:J.contents))==null?void 0:ne.map(J=>({value:J==null?void 0:J.label,label:J.label})))||[],g=b(E,w,j);d.value=L?v4(g,L):g,j&&(j==null?void 0:j.length)>0&&s.value.push(...j==null?void 0:j.map(J=>({prop:J,rule:o})))};e.onMounted(()=>{C(null,n==null?void 0:n.extendItem)});const M=j=>{const L=j==null?void 0:j[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");C(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,j)}},k=j=>{r("change",{target:n==null?void 0:n.target,extendConfigs:j})},W=(j,L)=>{m.value=L==null?void 0:L.changeProp,M(j)},I=j=>{r("onButtonClick",j)};return(j,L)=>(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:k,onBlurChange:W,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue"]))}}),b4=Zl._export_sfc(g4,[["__scopeId","data-v-7c660c1f"]]),k4={};function x4(a,l){return null}const w4=Zl._export_sfc(k4,[["render",x4]]),_4={class:"form-operate-content"},S4={class:"form-operate-item"},E4={class:"operate-title"},C4={class:"operate-content"},D4={class:"fix-content"},T4={class:"fix-button"},B4={class:"operate-title"},N4={class:"operate-content"},A4={class:"fix-content"},z4={class:"fix-button"},M4={style:{display:"flex","justify-content":"space-between"}},I4={class:"form-content"},O4={class:"dialog-footer"},L4={class:"form-content"},R4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref([]),h=e.ref([]),c=e.ref(!1),d=e.ref([]),m=e.ref([]),b=e.ref(""),u=e.ref(!1),C=e.ref(0),M=e.ref([]),k=e.ref([]),W=(F,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="selectRelateType"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.selectRelateType)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="menuSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.menuSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="groupSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.groupSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[F.key];if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="multiple"){const J=ne[F.key];return ac(J)?J:F.default}return(F==null?void 0:F.label)==="类型"&&ne[F.key]===""?"Input":(F==null?void 0:F.key)==="isFormColHidden"&&!ne[F.key]?!1:ne[F.key]},I=async F=>{var ce,Te,$e,fe,N,te;o.value=!0;let ne=[];const J=await(($e=(Te=(ce=oe.FormContent)==null?void 0:ce.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:Te.value)==null?void 0:$e.value)??((N=(fe=oe.FormContent)==null?void 0:fe.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:N.value);if(J==null||J.forEach(U=>{C.value++,ne.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,prop:U==null?void 0:U.prop,value:W(U,F),id:C.value,contents:U==null?void 0:U.options,width:(F==null?void 0:F.width)??1})}),F!=null&&F.menuSelect&&((te=F==null?void 0:F.menuSelect)==null?void 0:te.length)>0){const U=await oe.menuToContentType(F==null?void 0:F.menuSelect);ne=ne==null?void 0:ne.map(Ce=>((Ce==null?void 0:Ce.name)==="组信息选项"&&(Ce.contents=U),Ce))}b.value=F==null?void 0:F.id,s.value=await oe.selectToBase(oe.formToOptionsContents(ne)),h.value=await oe.selectToBase(oe.formToOptionsContents(ne))},j=F=>{var J;c.value=!0;let ne=[];(J=oe.FormButton)==null||J.forEach(ce=>{C.value++,ne.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:(ce==null?void 0:ce.label)==="类型"&&F[ce.key]===""?"normal":F[ce.key],id:C.value,contents:ce==null?void 0:ce.options})}),M.value=ne,k.value=ne,b.value=F==null?void 0:F.id};e.watch(()=>u.value,()=>{var ne,J;let F=A.cloneDeep(n.originalItemContents);(ne=A.cloneDeep(n.originalItemContents))!=null&&ne.find(ce=>(ce==null?void 0:ce.key)==="enableWrap")?F=(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="enableWrap"&&(ce.contents=!u.value),ce)):F.push({key:"enableWrap",contents:!u.value}),r("change",F)},{deep:!0});const L=()=>{var J,ce,Te,$e,fe;M.value=k.value;let F={};if(b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value),(J=M.value)==null||J.forEach(N=>{var U;const te=(U=oe.FormButton)==null?void 0:U.find(Ce=>(Ce==null?void 0:Ce.label)===(N==null?void 0:N.label));te&&(F[te.key]=N.value)}),(ce=d.value)!=null&&ce.find(N=>N.id===F.id))d.value=(Te=d.value)==null?void 0:Te.map(N=>(N.id===F.id&&(N=F),N));else{let N=A.cloneDeep(d.value);d.value||(d.value=[]),N.push(F),d.value=N}c.value=!1,b.value="";let ne=A.cloneDeep(n.originalItemContents);($e=A.cloneDeep(n.originalItemContents))!=null&&$e.find(N=>(N==null?void 0:N.key)==="formButton")?ne=(fe=A.cloneDeep(n.originalItemContents))==null?void 0:fe.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=d.value),N)):ne.push({key:"formButton",contents:d.value}),r("change",ne)},E=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;m.value=(ne=A.cloneDeep(m.value))==null?void 0:ne.filter(ce=>(ce==null?void 0:ce.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="formContent"&&(ce.contents=m.value),ce))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;d.value=(ne=A.cloneDeep(d.value))==null?void 0:ne.filter(ce=>(ce==null?void 0:ce.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(ce=>((ce==null?void 0:ce.key)==="formButton"&&(ce.contents=d.value),ce))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var ne;c.value=!0;let F=[];(ne=oe.FormButton)==null||ne.forEach(J=>{C.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:(J==null?void 0:J.label)==="类型"?"normal":"",id:C.value,contents:J==null?void 0:J.options})}),M.value=F,k.value=F},g=()=>{var ne,J,ce;o.value=!0;let F=[];(ce=(J=(ne=oe.FormContent)==null?void 0:ne.find(Te=>(Te==null?void 0:Te.key)==="Input"))==null?void 0:J.value)==null||ce.forEach(Te=>{C.value++,F.push({label:Te==null?void 0:Te.label,name:Te==null?void 0:Te.label,type:Te.type,value:(Te==null?void 0:Te.label)==="类型"?"Input":"",id:C.value,contents:Te==null?void 0:Te.options})}),s.value=F,h.value=F},S=F=>{let ne=A.cloneDeep(k.value);ne=ne==null?void 0:ne.map(J=>(J.value=F==null?void 0:F[J.name],J)),k.value=ne},$=F=>{const ne=F.find(Te=>(Te==null?void 0:Te.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const J=F.find(Te=>(Te==null?void 0:Te.name)==="多选"),ce=F.find(Te=>(Te==null?void 0:Te.name)==="初始值");J!=null&&J.value&&No.isString(ce.value)&&(ce.value=[ce.value]),!(J!=null&&J.value)&&!No.isString(ce.value)&&(ce.value="")},V=async F=>{var ne,J,ce,Te,$e,fe,N,te,U,Ce,Me,Pe;if((F==null?void 0:F.类型)!==((J=(ne=h.value)==null?void 0:ne.find(ra=>(ra==null?void 0:ra.label)==="类型"))==null?void 0:J.value)){let ra=[];const Ta=await(($e=(Te=(ce=oe.FormContent)==null?void 0:ce.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:Te.value)==null?void 0:$e.value)?await((Ce=(U=(te=oe.FormContent)==null?void 0:te.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:U.value)==null?void 0:Ce.value):(N=(fe=oe.FormContent)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:N.value;if(Ta==null||Ta.forEach(ee=>{var ue,ua;C.value++;const pa=$u(ee==null?void 0:ee.default)?(F==null?void 0:F[ee.label])??ee.value??"":ee==null?void 0:ee.default;ra.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:pa,prop:ee==null?void 0:ee.prop,id:C.value,contents:ee==null?void 0:ee.options,width:((ua=(ue=h.value)==null?void 0:ue[0])==null?void 0:ua.width)??1})}),F!=null&&F.菜单选项&&((Me=F==null?void 0:F.菜单选项)==null?void 0:Me.length)>0){const ee=await oe.menuToContentType(F==null?void 0:F.菜单选项);ra=ra==null?void 0:ra.map(pa=>((pa==null?void 0:pa.name)==="组信息选项"&&(pa.contents=ee),pa))}$(ra),h.value=await oe.selectToBase(A.cloneDeep(ra)),s.value=await oe.selectToBase(A.cloneDeep(ra))}else{let ra=A.cloneDeep(h.value);if(ra=ra==null?void 0:ra.map(Ta=>(Ta.value=F==null?void 0:F[Ta.name],Ta)),F!=null&&F.菜单选项&&((Pe=F==null?void 0:F.菜单选项)==null?void 0:Pe.length)>0){const Ta=await oe.menuToContentType(F==null?void 0:F.菜单选项);ra=ra==null?void 0:ra.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=Ta),ee))}ra=oe.formToOptionsContents(ra),$(ra),h.value=await oe.selectToBase(A.cloneDeep(ra))}},ae=F=>{F||(s.value=h.value)},Z=async F=>{await V(F),s.value=h.value},me=Al.debounce(async()=>{var ce,Te,$e,fe,N,te,U,Ce,Me,Pe,ra,Ta;s.value=h.value;let F={};F.width=((Te=(ce=s.value)==null?void 0:ce[0])==null?void 0:Te.width)??1,b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value);let ne=await((N=(fe=($e=oe.FormContent)==null?void 0:$e.find(ee=>{var pa,ue;return(ee==null?void 0:ee.key)===(((ue=(pa=s.value)==null?void 0:pa.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:fe.value)==null?void 0:N.value)??((U=(te=oe.FormContent)==null?void 0:te.find(ee=>{var pa,ue;return(ee==null?void 0:ee.key)===(((ue=(pa=s.value)==null?void 0:pa.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:U.value);if((Ce=s.value)==null||Ce.forEach(ee=>{const pa=ne==null?void 0:ne.find(ue=>(ue==null?void 0:ue.label)===(ee==null?void 0:ee.label));pa&&(F[pa.key]=ee.value)}),F.width=F.width?F.width:1,F.key=F==null?void 0:F.label,F.isFormColHidden=F==null?void 0:F.isFormColHidden,(Me=m.value)!=null&&Me.find(ee=>ee.id===F.id))m.value=(Pe=m.value)==null?void 0:Pe.map(ee=>(ee.id===F.id&&(ee=F),ee));else{let ee=A.cloneDeep(m.value);ee.push(F),m.value=ee}m.value=m.value.map(({id:ee,...pa})=>pa),o.value=!1,b.value="";let J=A.cloneDeep(n.originalItemContents);(ra=A.cloneDeep(n.originalItemContents))!=null&&ra.find(ee=>(ee==null?void 0:ee.key)==="formContent")?J=(Ta=A.cloneDeep(n.originalItemContents))==null?void 0:Ta.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):J.push({key:"formContent",contents:m.value}),r("change",J)},300),Ae=()=>{o.value=!1,c.value=!1,b.value="",h.value=[],k.value=[]};return e.watch(()=>n.originalItemContents,()=>{var ne,J,ce,Te,$e,fe;if(!n.originalItemContents||n.originalItemContents.length===0)return;const F=A.cloneDeep(n.originalItemContents);m.value=((ne=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:ne.contents)??[],d.value=((J=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:J.contents)??[],u.value=(ce=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ce.contents?!((Te=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&Te.contents):!0,m.value=($e=A.cloneDeep(m.value))==null?void 0:$e.map((N,te)=>{var Ce;let U=N;return U.id=(N==null?void 0:N.id)??te,N!=null&&N.label||(N.label=(N==null?void 0:N.key)??(N==null?void 0:N.label)??""),N!=null&&N.type||(N.type=(N==null?void 0:N.type)??""),N.contents=((Ce=N==null?void 0:N.options)==null?void 0:Ce.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,U}),m.value=oe.formToOptionsContents(m.value),d.value=(fe=d.value)==null?void 0:fe.map((N,te)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:te})},{deep:!0,immediate:!0}),(F,ne)=>{const J=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_4,[e.createElementVNode("div",S4,[e.createElementVNode("div",E4,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:g},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",C4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Te,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",D4,[e.createElementVNode("div",null,e.toDisplayString(Te.label),1),e.createElementVNode("div",T4,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>I(Te)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>E(Te)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",B4,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",N4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Te,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",A4,[e.createElementVNode("div",null,e.toDisplayString(Te.label),1),e.createElementVNode("div",z4,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>j(Te)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>x(Te)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",M4,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(sl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":ne[0]||(ne[0]=Te=>u.value=Te)},null,8,["modelValue"])])]),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:V,onChangeVisible:ae,onBlurChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O4,[e.createVNode(ce,{onClick:Ae,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ce,{class:"ok-button button",onClick:e.unref(me),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",L4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ae,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Cs=Zl._export_sfc(R4,[["__scopeId","data-v-20850524"]]),$4={class:"step-module content"},V4={class:"module-data"},P4={class:"step-module layout"},F4={class:"form-content"},j4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=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:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),d=e.ref("create"),m=e.ref({}),b=e.ref([]),u=I=>{var j;m.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=s.value)==null||L.forEach(x=>{x.value=""}),d.value="create",c.visible=!0;break;case"update":(E=s.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),d.value="update",c.visible=!0;break;case"delete":b.value.splice(j,1),d.value="delete";break}},M=I=>{var j,L,E;if((I==null?void 0:I.buttonName)==="确认"){const x=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(x).forEach(w=>{x[w]===""&&delete x[w]}),d.value){case"create":b.value.push({...x,index:((j=b.value)==null?void 0:j.length)+1});break;case"update":b.value=(L=b.value)==null?void 0:L.map(w=>w.index===(x==null?void 0:x.index)?{...w,title:x==null?void 0:x.title,description:x==null?void 0:x.description}:w);break}r("change",(E=k())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},k=()=>({comp:"Step",compData:[{key:"stepList",contents:b.value},{key:"stepConfig",contents:m.value}]}),W=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="stepConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",V4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",P4,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(sl.ssForm,{rowContents:o.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:W,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",F4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),H4=Zl._export_sfc(j4,[["__scopeId","data-v-7dbd17f2"]]),U4={class:"step-module content"},q4={class:"module-data"},W4={class:"step-module layout"},K4={class:"form-content"},G4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref("create"),s=e.ref({}),h=e.ref([]),c=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}]),d=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"}]),b=e.reactive({visible:!1,width:"40%",title:"时间线"}),u=I=>{var j;s.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),o.value="create",b.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),o.value="update",b.visible=!0;break;case"delete":h.value.splice(j,1),o.value="delete";break}},M=I=>{var j,L,E,x;if((I==null?void 0:I.buttonName)==="确认"){const w=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(w).forEach(g=>{w[g]===""&&delete w[g]}),o.value){case"create":(L=h.value)==null||L.push({...w,index:((j=h.value)==null?void 0:j.length)+1});break;case"update":h.value=(E=h.value)==null?void 0:E.map(g=>g.index===(w==null?void 0:w.index)?{...g,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:g);break}r("change",(x=k())==null?void 0:x.compData),b.visible=!1}else b.visible=!1},k=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:h.value},{key:"timeLineConfig",contents:s.value}]}),W=()=>{b.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(s.value=((j=I==null?void 0:I.find(E=>E.key==="timeLineConfig"))==null?void 0:j.contents)??{},h.value=((L=I==null?void 0:I.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",U4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",W4,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(sl.ssForm,{rowContents:c.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:b.visible,title:b.title,onBeforeDestroy:W,width:b.width},{default:e.withCtx(()=>[e.createElementVNode("div",K4,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Y4=Zl._export_sfc(G4,[["__scopeId","data-v-39ffc861"]]),J4={};function X4(a,l){return e.openBlock(),e.createElementBlock("div")}const Z4=Zl._export_sfc(J4,[["render",X4]]),Q4={class:"extra-content"},e2={key:0},a2={key:1},l2={class:"dialog-footer"},r2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),o=e.ref(),s=e.ref(),h=l,c=e.ref(!1),d=e.ref({}),m=e.ref({}),b=e.ref();e.watch(()=>[n.itemData],()=>{var x;const E=A.cloneDeep(n.itemData);o.value=(x=A.cloneDeep(E))==null?void 0:x.map(w=>{var g;if(w.key==="extra"){let S=[];(g=w.value)==null||g.forEach($=>{var V;S.push((V=Object.values($))==null?void 0:V[0])}),w.value=S}return w})},{deep:!0,immediate:!0});const u=(E,x,w,g)=>{var $;let S={};(($=E==null?void 0:E[0])==null?void 0:$.contents)==="详情"&&(c.value=!0,S[x]=E,s.value=E==null?void 0:E.filter(V=>(V==null?void 0:V.key)!=="tableContentName"),d.value=S,m.value=w,b.value=g.id)},C=E=>{var V,ae,Z,me;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),w=(me=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:me.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),g=w==null?void 0:w.map((Ae,F)=>{var ne;return F===E.index&&(Ae==null?void 0:Ae.comp)==="Table"&&(Ae.compData=(ne=Ae.compData)==null?void 0:ne.map(J=>{var ce,Te;return(J==null?void 0:J.key)==="tableContents"&&(J.contents=(Te=(ce=E.content)==null?void 0:ce.map($e=>{let fe={};for(let N in $e)N!=="id"&&(fe[N]=$e[N]);return fe}))==null?void 0:Te.map($e=>Object.values($e))),J})),Ae});g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let Ae in S)$[Ae]=g;d.value=$},M=()=>{c.value=!1,d.value={},m.value={},b.value=void 0,r.value++},k=E=>{var V,ae,Z,me;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),w=(me=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:me.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),g=w==null?void 0:w.map((Ae,F)=>(F===E.index&&(Ae.compData=E.contents),Ae));g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let Ae in S)$[Ae]=g;d.value=$},W=()=>{var x,w;let E={};for(let g in m.value)g===((x=Object.keys(d.value))==null?void 0:x[0])?E[g]=(w=Object.values(d.value))==null?void 0:w[0]:E[g]=m.value[g];h("change",{buttonName:"编辑",index:b.value,singleContent:E},"methodData"),c.value=!1,d.value={},m.value={},b.value=void 0},I=()=>{c.value=!1,d.value={},m.value={},b.value=void 0},j=E=>{h("change",E,"methodData")},L=E=>zi(E);return(E,x)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(g==null?void 0:g.key)==="extra"?(e.openBlock(),e.createElementBlock("div",e2)):(e.openBlock(),e.createElementBlock("div",a2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,childItemData:g==null?void 0:g.itemChildData,key:S,index:(g==null?void 0:g.id)??S,onContentClick:u,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,onChange:C,childItemData:g==null?void 0:g.itemChildData,key:S,onContentChange:k,index:(g==null?void 0:g.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",l2,[e.createVNode(w,{class:"cancel-button footer-button",onClick:M,id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},n2=Zl._export_sfc(r2,[["__scopeId","data-v-2d9c5ab2"]]),i2={key:0,class:"method-content"},o2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=oe.useOriginalState(A.pinia),{originalPath:r}=A.storeToRefs(n),o=a,s=e.ref(!1),h=e.ref(),c=oe.useTableComp(A.pinia),{multipleTableConst:d}=A.storeToRefs(c),m=A.useModelComp(A.pinia),b=e.ref(!1),u=A.useMenuState(A.pinia),C=A.useLoginState(A.pinia),{itemData:M,isEdit:k,routeToChildPath:W,tableViewContents:I,lockingPage:j,payloadTypes:L}=A.storeToRefs(m),{activeMenuPath:E,platform:x,childMenu:w}=A.storeToRefs(u),{loginUserInfo:g}=A.storeToRefs(C),S=e.ref(!1),$=async()=>{var fe,N;(fe=l.value)!=null&&fe.find(te=>(te==null?void 0:te.buttonName)==="保存")&&await J((N=l.value)==null?void 0:N.find(te=>(te==null?void 0:te.buttonName)==="保存")),await oe.onSaveBack()};e.watch(()=>M.value,async()=>{k.value==="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{deep:!0});const V=()=>{s.value=!1,h.value=void 0},ae=fe=>fe.map(N=>{const te={};for(const U in N){const Ce=N[U];if(U.includes(d.value)){const Me=U.split(d.value);let Pe=te;Me.forEach((ra,Ta)=>{Ta===Me.length-1?Pe[ra]=Ce:(Pe[ra]||(Pe[ra]={}),Pe=Pe[ra])})}else te[U]=Ce}return te}),Z=async(fe,N,te=[])=>{var Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja;let U=(Ce=A.cloneDeep(N))==null?void 0:Ce.filter(R=>(R==null?void 0:R.comp)!=="methodButton");if(fe!=null&&fe.includes("[")){let R=(ee=(Ta=(ra=(Pe=(Me=A.cloneDeep(fe))==null?void 0:Me.split("["))==null?void 0:Pe[1])==null?void 0:ra.split("]"))==null?void 0:Ta[0])==null?void 0:ee.split(":"),H="";if(R!=null&&R[0]){let X=(pa=U==null?void 0:U.find(he=>(he==null?void 0:he.name)===(R==null?void 0:R[0])))==null?void 0:pa.compData;if(!X){let he=(ue=fe==null?void 0:fe.split("["))==null?void 0:ue[0],de=await oe.getItemData(he,sessionStorage.getItem("systemKey"),"",!1,"","",te);X=(ua=de==null?void 0:de.find(ma=>(ma==null?void 0:ma.name)===(R==null?void 0:R[0])))==null?void 0:ua.compData}X==null||X.forEach(he=>{var de,ma,oa,Ve,_a,ze;if((he==null?void 0:he.key)==="formContent")(de=he==null?void 0:he.contents)==null||de.forEach(ya=>{var La;(ya==null?void 0:ya.key)===(R==null?void 0:R[1])&&(Array.isArray(ya==null?void 0:ya.value)?H=ya==null?void 0:ya.value:H=(La=ya==null?void 0:ya.value)==null?void 0:La.toString())});else if((he==null?void 0:he.key)==="tableContents"){let ya=[],La=(ma=X==null?void 0:X.find(ha=>(ha==null?void 0:ha.key)==="header"))==null?void 0:ma.contents,za=(R==null?void 0:R[1])??"";if(La!=null&&La.every(ha=>Array.isArray(ha))){let ha=oe.getColumnChild((_a=La==null?void 0:La[0])==null?void 0:_a.filter(Ca=>(Ca==null?void 0:Ca.label)!=="操作"));(ze=he.contents)==null||ze.forEach(Ca=>{let Ne={};Ca=Ca==null?void 0:Ca.filter(ye=>!(ye!=null&&ye.id)),ha==null||ha.forEach((ye,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===ye.prop)&&(Ne[ye.prop]=xe)}),ya.push(Ne)}),ya=ae(ya)}else{let ha=(oa=La==null?void 0:La.map(Ca=>Ca==null?void 0:Ca.label))==null?void 0:oa.filter(Ca=>Ca!=="操作");(Ve=he.contents)==null||Ve.forEach(Ca=>{let Ne={};Ca=Ca==null?void 0:Ca.filter(ye=>!(ye!=null&&ye.id)),ha==null||ha.forEach((ye,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===ye)&&(Ne[ye]=xe)}),ya.push(Ne)})}H=ya}})}return H}else if(fe!=null&&fe.includes("/")){let R={};return(Se=A.cloneDeep(U))==null||Se.forEach((H,X)=>{var he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa;if((H==null?void 0:H.comp)==="Table"){let $a=Array.isArray((ma=(de=(he=H==null?void 0:H.compData)==null?void 0:he.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:de.contents)==null?void 0:ma[0])?(ze=(_a=(Ve=(oa=H==null?void 0:H.compData)==null?void 0:oa.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:Ve.contents)==null?void 0:_a[0])==null?void 0:ze.some(Ie=>Ie==null?void 0:Ie.children):[],Ma=(za=(La=(ya=H==null?void 0:H.compData)==null?void 0:ya.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:za.map(Ie=>(Ie!=null&&Ie.find(aa=>aa==null?void 0:aa.id)&&(Ie=Ie.slice(1)),Ie)),Va=(Y=(ye=(Ne=(Ca=(ha=H==null?void 0:H.compData)==null?void 0:ha.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:Ca.contents)==null?void 0:Ne[0])==null?void 0:ye[0])==null?void 0:Y.label,Ue=(pe=(xe=H==null?void 0:H.compData)==null?void 0:xe.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:pe.contents;if($a)($a==null?void 0:$a.length)===0?R[H.name]=R!=null&&R[H.name]?R[H.name]:oe.tableToForm(Ma,Ue):R[Va]=oe.tableToForm(Ma,Ue);else{const Ie=[];Ue=Ue.slice(1,Ue.length-1),Ue==null||Ue.forEach((aa,ke)=>{Ma==null||Ma.forEach(We=>{Ie.push({key:aa.label+We[0],value:We[ke+1]})})}),R["form"+X]=Ie}}else{const $a=(sa=(qe=H.compData)==null?void 0:qe.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:sa.contents;R!=null&&R.form||(R.form=[]);const Ma=[];$a==null||$a.forEach(Va=>{Va.key!==""&&(Va={key:(Va==null?void 0:Va.key)??(Va==null?void 0:Va.label),value:Va==null?void 0:Va.value},Ma.push(Va))}),R.form=[...Ma,...A.cloneDeep(R==null?void 0:R.form)]}}),R}else{if(fe==="createInsofDataApi"){let R=(se=A.cloneDeep(N))==null?void 0:se[0];return R={comp:(Be=A.cloneDeep(R))==null?void 0:Be.comp,compData:(Ge=A.cloneDeep(R))==null?void 0:Ge.compData,name:(da=A.cloneDeep(R))==null?void 0:da.name,isShow:(Ja=A.cloneDeep(R))==null?void 0:Ja.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:R}}}return fe}},me=async(fe,N,te)=>{var Me,Pe,ra;let U=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Ce=U==null?void 0:U.find(Ta=>(Ta==null?void 0:Ta.name)===(te==null?void 0:te[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let Ta={};for(let Be in A.cloneDeep(fe))A.cloneDeep(fe)[Be]!=="loginUser"?Ta[Be]=A.cloneDeep(fe)[Be]:Ta[Be]=((Me=g.value)==null?void 0:Me.account)||((Pe=g.value)==null?void 0:Pe.账号);let ee=[],pa=Ta;Array.isArray(fe)||(pa=[Ta]),pa==null||pa.forEach(Be=>{ee.push({[Be[te[1]]]:Be})});let ue=[],ua=ee==null?void 0:ee.map(Be=>{var Ge;return(Ge=Object.keys(Be))==null?void 0:Ge[0]});U==null||U.forEach(Be=>{var Ge;(Be==null?void 0:Be.name)===(te==null?void 0:te[0])&&((Ge=Be==null?void 0:Be.compData)==null||Ge.forEach(da=>{var Ja;(da==null?void 0:da.key)==="tableContents"&&((Ja=da==null?void 0:da.contents)==null||Ja.forEach(R=>{R!=null&&R.some(H=>ua.includes(H))&&ue.push({[R.find(H=>H.id).id]:R.find(H=>ua.includes(H))})}))}))});let Se=ue==null?void 0:ue.map(Be=>{var Ge;return(Ge=Object.keys(Be))==null?void 0:Ge[0]}),se=[];if(Se==null||Se.forEach(Be=>{var Ja;let Ge=(Ja=ue==null?void 0:ue.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0].toString())===Be.toString()}))==null?void 0:Ja[Be],da=ee==null?void 0:ee.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0])===Ge});se.push({id:parseInt(Be),value:{tableData:da[Ge]}})}),(se==null?void 0:se.length)>0)return se}else if((Ce==null?void 0:Ce.comp)==="Form"){let Ta=A.cloneDeep(Ce);Ta.compData=(ra=Ta.compData)==null?void 0:ra.map(ue=>{var ua;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(ua=ue.contents)==null?void 0:ua.map(Se=>((Se==null?void 0:Se.key)===(te==null?void 0:te[1])&&(Se.value=(fe==null?void 0:fe[Se==null?void 0:Se.prop])||fe),Se))),ue});let ee={};for(let ue in Ta)ue!=="id"&&(ee[ue]=Ta[ue]);let pa=[];if(pa.push({id:Ce==null?void 0:Ce.id,keyType:te==null?void 0:te[1],value:{pageData:ee}}),(pa==null?void 0:pa.length)>0)return pa}}},Ae=async(fe,N,te)=>{var Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se;let U=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Ce=U==null?void 0:U.find(Be=>(Be==null?void 0:Be.name)===(te==null?void 0:te[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let Be={};for(let Ge in A.cloneDeep(fe))A.cloneDeep(fe)[Ge]!=="loginUser"?Be[Ge]=A.cloneDeep(fe)[Ge]:Be[Ge]=((Me=g.value)==null?void 0:Me.account)||((Pe=g.value)==null?void 0:Pe.账号);await Rr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:Ce==null?void 0:Ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}else if((Ce==null?void 0:Ce.comp)==="Form"){let Be=A.cloneDeep(Ce),Ge=Object.keys(fe),da="";(Ta=(ra=A.cloneDeep(Be))==null?void 0:ra.compData)==null||Ta.forEach(de=>{var ma,oa;(de==null?void 0:de.key)==="formContent"&&((oa=(ma=A.cloneDeep(de))==null?void 0:ma.contents)==null||oa.forEach(Ve=>{var _a;Ge.includes(Ve==null?void 0:Ve.key)&&(Ve==null?void 0:Ve.value)===((_a=g.value)==null?void 0:_a.姓名)&&(da=Ve==null?void 0:Ve.key)}))});let Ja=[];(ee=Object.values(fe[da]))==null||ee.forEach(de=>{de!=null&&de.includes("(")&&Ja.push(de)}),Ja=[...new Set(Ja)];const R=Ja==null?void 0:Ja.map(async de=>{var ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe;let ma="";(Ca=(ha=(za=(La=(ya=(ze=A.cloneDeep(de))==null?void 0:ze.split("("))==null?void 0:ya[1])==null?void 0:La.split(")"))==null?void 0:za[0])==null?void 0:ha.split(":"))==null||Ca.forEach(sa=>{ma=ma===""?ma+sa.replaceAll("'",""):ma+"/"+sa.replaceAll("'","")});let oa=[];(qe=(pe=(xe=(Y=(ye=(Ne=A.cloneDeep(de))==null?void 0:Ne.split("<"))==null?void 0:ye[1])==null?void 0:Y.split(">"))==null?void 0:xe[0])==null?void 0:pe.split(":"))==null||qe.forEach(sa=>{oa.push(sa.replaceAll("'",""))});const Ve=await oe.getItemData(ma,sessionStorage.getItem("systemKey"),"");let _a="";return Ve==null||Ve.forEach(sa=>{var $a;sa.name===(oa==null?void 0:oa[0])&&(($a=sa==null?void 0:sa.compData)==null||$a.forEach(Ma=>{var Va;(Ma==null?void 0:Ma.key)==="formContent"&&((Va=Ma.contents)==null||Va.forEach(Ue=>{(Ue==null?void 0:Ue.key)===(oa==null?void 0:oa[1])&&(_a=Ue==null?void 0:Ue.value)}))}))}),{[de]:_a}}),H=await Promise.all(R);Be.compData=(ue=(pa=A.cloneDeep(Be))==null?void 0:pa.compData)==null?void 0:ue.map(de=>{var ma,oa;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(oa=(ma=A.cloneDeep(de))==null?void 0:ma.contents)==null?void 0:oa.map(Ve=>{var _a,ze,ya,La;return(_a=fe[da])!=null&&_a[Ve==null?void 0:Ve.key]&&(fe[da][Ve==null?void 0:Ve.key].includes("(")?Ve.value=(ze=H==null?void 0:H.find(za=>{var ha;return((ha=Object.keys(za))==null?void 0:ha[0])===fe[da][Ve==null?void 0:Ve.key]}))==null?void 0:ze[fe[da][Ve==null?void 0:Ve.key]]:Ve.value=(La=(ya=A.cloneDeep(fe))==null?void 0:ya[da])==null?void 0:La[Ve==null?void 0:Ve.key]),Ve})),de});const X=await Rr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let he="";((ua=X==null?void 0:X.data)==null?void 0:ua.type)==="success"&&((se=(Se=X==null?void 0:X.data)==null?void 0:Se.result)==null||se.forEach(de=>{var ma,oa;((oa=(ma=de==null?void 0:de.value)==null?void 0:ma.pageData)==null?void 0:oa.name)===(te==null?void 0:te[0])&&(he=de.id)}),await Rr.updateInsofDataApi({id:he,value:{pageData:Be}}))}}},F=(fe,N="",te={})=>{for(const[U,Ce]of Object.entries(fe)){const Me=N?`${N}.${U}`:U;Ce!==null&&typeof Ce=="object"&&!Array.isArray(Ce)&&Object.prototype.toString.call(Ce)!=="[object Date]"?F(Ce,Me,te):te[Me]=Ce}return te},ne=async(fe,N,te,U)=>{var Pe,ra,Ta,ee,pa,ue,ua,Se,se,Be,Ge,da,Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La;let Ce=await oe.getItemData(N,sessionStorage.getItem("systemKey"),""),Me=Ce==null?void 0:Ce.find(za=>(za==null?void 0:za.name)===(te==null?void 0:te[0]));if(Me){if(!(te!=null&&te[1])&&(Me==null?void 0:Me.comp)==="Table"){let za={},ha=[],Ca=(ra=(Pe=Me==null?void 0:Me.compData)==null?void 0:Pe.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:ra.contents;Ca!=null&&Ca.every(Y=>Array.isArray(Y))?ha=(ee=oe.getColumnChild((Ta=Ca==null?void 0:Ca[0])==null?void 0:Ta.filter(Y=>(Y==null?void 0:Y.label)!=="操作")))==null?void 0:ee.map(Y=>Y==null?void 0:Y.prop):ha=Ca==null?void 0:Ca.map(Y=>Y==null?void 0:Y.label);for(let Y in A.cloneDeep(fe))if(A.cloneDeep(fe)[Y]!=="loginUser"){let xe=F(A.cloneDeep(fe)[Y]),pe={};for(let qe in xe)if(ha!=null&&ha.find(sa=>sa===qe))pe[qe]=xe[qe];else if(ha!=null&&ha.find(sa=>(sa==null?void 0:sa.toUpperCase())===(qe==null?void 0:qe.toUpperCase()))){let sa=ha==null?void 0:ha.find($a=>($a==null?void 0:$a.toUpperCase())===(qe==null?void 0:qe.toUpperCase()));pe[sa]=xe[qe]}za[Y]=pe}else za[Y]=((pa=g.value)==null?void 0:pa.account)||((ue=g.value)==null?void 0:ue.账号);let Ne=await Rr.getInsofDataApi({keyLikes:{tableId:Me==null?void 0:Me.id}});if(((Se=(ua=Ne==null?void 0:Ne.data)==null?void 0:ua.result)==null?void 0:Se.length)>0){let Y=(Be=(se=Ne==null?void 0:Ne.data)==null?void 0:se.result)==null?void 0:Be.map(xe=>xe==null?void 0:xe.id);(Y==null?void 0:Y.length)>0&&await Rr.batchDeleteInsofDataApi({ids:Y})}let ye=[];if((Ge=Me==null?void 0:Me.compData)!=null&&Ge.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&((R=(Ja=(da=Me==null?void 0:Me.compData)==null?void 0:da.find(Y=>(Y==null?void 0:Y.key)==="pageColumn"))==null?void 0:Ja.contents)!=null&&R.includes("["))){const Y=await Rr.getInsofDataApi({id:Me==null?void 0:Me.tableId});let xe=((de=(he=(X=(H=Y==null?void 0:Y.data)==null?void 0:H.result)==null?void 0:X[0])==null?void 0:he.key)==null?void 0:de.pageKey)??"";(ma=Object.values(za))==null||ma.forEach(pe=>{ye.push({key:{type:"data",pageKey:xe,tableId:Me==null?void 0:Me.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})})}else(oa=Object.values(za))==null||oa.forEach(Y=>{ye.push({key:{type:"data",pageKey:N,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Y}})});(ye==null?void 0:ye.length)>0&&await Rr.batchAddInsofDataApi({dataList:ye})}else if(!(te!=null&&te[1])&&(Me==null?void 0:Me.comp)==="Form"){let za=A.cloneDeep(Me);za.compData=(_a=(Ve=A.cloneDeep(za))==null?void 0:Ve.compData)==null?void 0:_a.map(Ne=>{var ye,Y;return(Ne==null?void 0:Ne.key)==="formContent"&&(Ne.contents=(Y=(ye=A.cloneDeep(Ne))==null?void 0:ye.contents)==null?void 0:Y.map(xe=>{var pe,qe;return(pe=A.cloneDeep(fe))!=null&&pe[xe==null?void 0:xe.key]&&(xe.value=(qe=A.cloneDeep(fe))==null?void 0:qe[xe==null?void 0:xe.key]),xe})),Ne});const ha=await Rr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let Ca="";((ze=ha==null?void 0:ha.data)==null?void 0:ze.type)==="success"&&((La=(ya=ha==null?void 0:ha.data)==null?void 0:ya.result)==null||La.forEach(Ne=>{var ye,Y;((Y=(ye=Ne==null?void 0:Ne.value)==null?void 0:ye.pageData)==null?void 0:Y.name)===(te==null?void 0:te[0])&&(Ca=Ne.id)}),await Rr.updateInsofDataApi({id:Ca,value:{pageData:za}}))}}},J=async fe=>{var N,te,U,Ce,Me,Pe,ra,Ta,ee,pa,ue,ua,Se,se;u.setImportLoading(!0);try{if(fe.api){let Be=new WeakMap,Ge=await oe.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be),da="";if(Ge=Ge==null?void 0:Ge.map(oa=>{var Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe;if((oa==null?void 0:oa.comp)==="Form")oa.compData=(Ve=oa.compData)==null?void 0:Ve.map(pe=>{var qe;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(qe=pe.contents)==null?void 0:qe.map(sa=>{var $a;if((sa==null?void 0:sa.value)===""&&(sa==null?void 0:sa.type)==="Select"){let Ma=oe.judgeContents(($a=A.cloneDeep(sa))==null?void 0:$a.optionUrl,Be);sa.value=sa.value||Ma}return sa})),pe});else if((oa==null?void 0:oa.comp)==="Table"&&(_a=oa.compData)!=null&&_a.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")){let pe=(ya=(ze=oa.compData)==null?void 0:ze.find(Ma=>(Ma==null?void 0:Ma.key)==="pageColumn"))==null?void 0:ya.contents,qe=((za=(La=oa.compData)==null?void 0:La.find(Ma=>(Ma==null?void 0:Ma.key)==="pageGroup"))==null?void 0:za.contents)??"",sa=(Ne=(Ca=(ha=pe==null?void 0:pe.split("["))==null?void 0:ha[1])==null?void 0:Ca.split("]"))==null?void 0:Ne[0];da=((ye=pe==null?void 0:pe.split("["))==null?void 0:ye[0])+((xe=(Y=I.value)==null?void 0:Y.find(Ma=>(Ma==null?void 0:Ma.key)===sa))==null?void 0:xe.value)}return oa}),!(da===""||da==="")){const oa=await oe.getItemData(da,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Ge=Ge==null?void 0:Ge.map(Ve=>{var _a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe;if((Ve==null?void 0:Ve.comp)==="Table"&&(_a=Ve.compData)!=null&&_a.find(sa=>(sa==null?void 0:sa.key)==="pageColumn")){let sa=(ya=(ze=Ve.compData)==null?void 0:ze.find(Ie=>(Ie==null?void 0:Ie.key)==="pageColumn"))==null?void 0:ya.contents,$a=((za=(La=Ve.compData)==null?void 0:La.find(Ie=>(Ie==null?void 0:Ie.key)==="pageGroup"))==null?void 0:za.contents)??"",Ma=(Ne=(Ca=(ha=sa==null?void 0:sa.split("["))==null?void 0:ha[1])==null?void 0:Ca.split("]"))==null?void 0:Ne[0],Va=((ye=sa==null?void 0:sa.split("["))==null?void 0:ye[0])+((xe=(Y=I.value)==null?void 0:Y.find(Ie=>(Ie==null?void 0:Ie.key)===Ma))==null?void 0:xe.value),Ue=(pe=oa==null?void 0:oa.find(Ie=>(Ie==null?void 0:Ie.name)===($a===""?o==null?void 0:o.compName:$a)))==null?void 0:pe.compData;Ve.compData=(qe=Ve.compData)==null?void 0:qe.map(Ie=>{var aa;return(Ie==null?void 0:Ie.key)==="tableContents"&&(Ie.contents=(aa=Ue==null?void 0:Ue.find(ke=>(ke==null?void 0:ke.key)==="tableContents"))==null?void 0:aa.contents),Ie})}return Ve})}let Ja={};if(((te=(N=fe==null?void 0:fe.extraValues)==null?void 0:N.input)==null?void 0:te.length)>0){const oa=(Ce=(U=fe==null?void 0:fe.extraValues)==null?void 0:U.input)==null?void 0:Ce.map(async Ve=>{var _a;ce!=null&&ce.find(ze=>ze===Ve)?Ja=await Z(Ve,Ge):Ja[Object.keys(Ve)[0]]=await Z((_a=Object.values(Ve))==null?void 0:_a[0],Ge,Be)});await Promise.all(oa)}else Ja=await Z("/",Ge);let R=!1;(Pe=(Me=fe==null?void 0:fe.extraValues)==null?void 0:Me.output)==null||Pe.forEach(oa=>{var Ve,_a;(_a=(Ve=Object.values(oa))==null?void 0:Ve[0])!=null&&_a.includes(".doc")&&(R=!0)});let H;if(R){const oa=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await qa.axios.post(fe.api,Ja,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{oa.close()})}else H=await qa.axios.post(fe.api,Ja,{headers:{"Content-Type":"application/json"}});let X=(pa=(ee=(Ta=(ra=A.cloneDeep(fe))==null?void 0:ra.extraValues)==null?void 0:Ta.output)==null?void 0:ee.map(oa=>{var Ve,_a,ze,ya,La,za,ha,Ca,Ne,ye,Y,xe,pe,qe,sa,$a;if(!((_a=(Ve=Object.values(oa))==null?void 0:Ve[0])!=null&&_a.includes(".doc"))){let Ma=(ye=(Ne=(Ca=(ya=A.cloneDeep((ze=Object.values(oa))==null?void 0:ze[0]))==null?void 0:ya.split("["))==null?void 0:Ca[((ha=(za=A.cloneDeep((La=Object.values(oa))==null?void 0:La[0]))==null?void 0:za.split("["))==null?void 0:ha.length)-1])==null?void 0:Ne.split("]"))==null?void 0:ye[0],Va=Ma==null?void 0:Ma.split(":"),Ue=(pe=A.cloneDeep((Y=Object.values(oa))==null?void 0:Y[0]))==null?void 0:pe.substring(0,A.cloneDeep((xe=Object.values(oa))==null?void 0:xe[0]).lastIndexOf("["));if(Ue=(sa=A.cloneDeep(Ue))==null?void 0:sa.slice(0,((qe=A.cloneDeep(Ue))==null?void 0:qe.length)-1),Ue!=null&&Ue.includes("[")){let Ie="";if(($a=oe.contentTransArrayToAll(Ue,"/"))==null||$a.forEach(aa=>{var ke,We,tl,Cl,El,Vl,_l;if(!(aa!=null&&aa.includes("[")))Ie=Ie===""?Ie+aa.replaceAll("/",""):Ie+"/"+aa.replaceAll("/","");else{let jl=A.cloneDeep(aa).slice(1,((ke=A.cloneDeep(aa))==null?void 0:ke.length)-1),Qe=(Vl=(El=(Cl=(tl=(We=A.cloneDeep(jl))==null?void 0:We.split("["))==null?void 0:tl[1])==null?void 0:Cl.split("]"))==null?void 0:El[0])==null?void 0:Vl.split(":"),Xa="",ba=(_l=Ge==null?void 0:Ge.find(ll=>(ll==null?void 0:ll.name)===(Qe==null?void 0:Qe[0])))==null?void 0:_l.compData;ba==null||ba.forEach(ll=>{var Ia;(ll==null?void 0:ll.key)==="formContent"&&((Ia=ll==null?void 0:ll.contents)==null||Ia.forEach(il=>{(il==null?void 0:il.key)===(Qe==null?void 0:Qe[1])&&(Xa=il==null?void 0:il.value)}))}),Ie=Ie===""?Ie+Xa.replaceAll("/",""):Ie+"/"+Xa.replaceAll("/","")}}),Ue=Ie,Ue[(Ue==null?void 0:Ue.length)-1]!=="/")return Ue}}}))==null?void 0:pa.filter(oa=>oa);X=[...new Set(A.cloneDeep(X))];let he=X==null?void 0:X.map(async oa=>{let Ve=await oe.getItemData(oa,sessionStorage.getItem("systemKey"),"",!1,"","",Be);if((Ve==null?void 0:Ve.length)===0)return await oe.getParentContents(oa)});await Promise.all(he);let de=[],ma=(Se=(ua=(ue=A.cloneDeep(fe))==null?void 0:ue.extraValues)==null?void 0:ua.output)==null?void 0:Se.map(async oa=>{var Ca,Ne,ye,Y,xe,pe,qe,sa,$a,Ma,Va,Ue,Ie,aa,ke,We,tl,Cl,El,Vl,_l,jl,Qe,Xa,ba,ll,Ia,il,rl,_e,Oa,Je,ie,Xe,Aa,Ze,wa,Fa,Za,He,va,ca,cl,Le,ja,ul,hr,dr,Ql,nr,pr,gr,Oe,er,Sr,Mr,zl,Nr,qr,Kl,br,$r,jr,Pl,lr,Wr,Ur,Vr,Kr,an;if((Ne=(Ca=Object.values(oa))==null?void 0:Ca[0])!=null&&Ne.includes(".doc")){var Ve=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),_a=H.headers["content-disposition"],ze=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ya=ze.exec(_a),La=ya==null?void 0:ya[1],za=document.createElement("a"),ha=window.URL.createObjectURL(Ve);h.value=[{name:La,blobUrl:ha}],s.value=!0}else{let hn=(Ma=($a=(sa=(Y=A.cloneDeep((ye=Object.values(oa))==null?void 0:ye[0]))==null?void 0:Y.split("["))==null?void 0:sa[((qe=(pe=A.cloneDeep((xe=Object.values(oa))==null?void 0:xe[0]))==null?void 0:pe.split("["))==null?void 0:qe.length)-1])==null?void 0:$a.split("]"))==null?void 0:Ma[0],Jl=hn==null?void 0:hn.split(":"),vr=(Ie=A.cloneDeep((Va=Object.values(oa))==null?void 0:Va[0]))==null?void 0:Ie.substring(0,A.cloneDeep((Ue=Object.values(oa))==null?void 0:Ue[0]).lastIndexOf("["));if(vr!=null&&vr.includes("[")?vr=(ke=A.cloneDeep(vr))==null?void 0:ke.slice(0,((aa=A.cloneDeep(vr))==null?void 0:aa.length)-1):vr===""&&(vr=E.value),vr=vr.replaceAll("<","[").replaceAll(">","]"),vr!=null&&vr.includes("[")){let vl="";(We=oe.contentTransArrayToAll(vr,"/"))==null||We.forEach((ir,Rl)=>{var Er,Hl,mr,ar,Xr,sn,Cn,Jn,Fn,Dn,In;if(!(ir!=null&&ir.includes("[")))vl=vl===""?vl+ir.replaceAll("/",""):vl+"/"+ir.replaceAll("/","");else{let jn="",vn="";(Er=A.cloneDeep(ir))!=null&&Er.includes("]")?(jn=A.cloneDeep(ir).slice(1,((Hl=A.cloneDeep(ir))==null?void 0:Hl.length)-1),vn=(Cn=(sn=(Xr=(ar=(mr=A.cloneDeep(jn))==null?void 0:mr.split("["))==null?void 0:ar[1])==null?void 0:Xr.split("]"))==null?void 0:sn[0])==null?void 0:Cn.split(":")):(jn=A.cloneDeep(ir).slice(1,(Jn=A.cloneDeep(ir))==null?void 0:Jn.length),vn=(Fn=A.cloneDeep(jn))==null?void 0:Fn.split("/"));let On="",Xn=(Dn=Ge==null?void 0:Ge.find(Gr=>(Gr==null?void 0:Gr.name)===(vn==null?void 0:vn[0])))==null?void 0:Dn.compData;Xn==null||Xn.forEach(Gr=>{var Zn;(Gr==null?void 0:Gr.key)==="formContent"&&((Zn=Gr==null?void 0:Gr.contents)==null||Zn.forEach(wn=>{(wn==null?void 0:wn.key)===(vn==null?void 0:vn[1])&&(On=wn==null?void 0:wn.value)}))}),((In=oe.contentTransArrayToAll(vr,"/"))==null?void 0:In.length)-1!==Rl?vl=vl===""?vl+On.replaceAll("/",""):vl+"/"+On.replaceAll("/",""):vl=vl+r.value+On.replaceAll("/","")}}),(tl=E.value)!=null&&tl.includes(vl)?vr=E.value:vr=vl}let Jr=A.cloneDeep((Cl=Object.keys(oa))==null?void 0:Cl[0]);if(((El=H==null?void 0:H.data)==null?void 0:El.statusCode)===200||((Vl=H==null?void 0:H.data)==null?void 0:Vl.code)===200){if(((jl=(_l=H==null?void 0:H.data)==null?void 0:_l.data)!=null&&jl[Jr]||(Xa=(Qe=H==null?void 0:H.data)==null?void 0:Qe.result)!=null&&Xa[Jr])&&(Jl==null?void 0:Jl.length)===1)return await ne(((ll=(ba=H==null?void 0:H.data)==null?void 0:ba.data)==null?void 0:ll[Jr])||((il=(Ia=H==null?void 0:H.data)==null?void 0:Ia.result)==null?void 0:il[Jr]),A.cloneDeep(vr),Jl,da);if((_e=(rl=H==null?void 0:H.data)==null?void 0:rl.data)!=null&&_e[Jr]||(Je=(Oa=H==null?void 0:H.data)==null?void 0:Oa.result)!=null&&Je[Jr]){let vl=await me(((Xe=(ie=H==null?void 0:H.data)==null?void 0:ie.data)==null?void 0:Xe[Jr])||((Ze=(Aa=H==null?void 0:H.data)==null?void 0:Aa.result)==null?void 0:Ze[Jr]),A.cloneDeep(vr),Jl);return vl&&(de=[...de,...vl]),vl}else{if(!((wa=H==null?void 0:H.data)!=null&&wa.data)){let vl=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be);vl=vl==null?void 0:vl.map(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Jl==null?void 0:Jl[0])&&(Rl.compData=(Er=Rl.compData)==null?void 0:Er.map(Hl=>{var mr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(mr=Hl.contents)==null?void 0:mr.map(ar=>{var Xr,sn;return(ar==null?void 0:ar.key)===(Jl==null?void 0:Jl[1])&&(ar.value=(sn=(Xr=H==null?void 0:H.data)==null?void 0:Xr.result)==null?void 0:sn[Jr==null?void 0:Jr.replaceAll(":","")]),ar})),Hl})),Rl});let ir=[];(Fa=vl==null?void 0:vl.filter(Rl=>(Rl==null?void 0:Rl.comp)==="Form"))==null||Fa.forEach(async Rl=>{let Er={};for(let Hl in Rl)Hl!=="id"&&(Er[Hl]=Rl[Hl]);ir.push({id:Rl==null?void 0:Rl.id,value:{pageData:Er}})}),(ir==null?void 0:ir.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:ir});return}if((Jl==null?void 0:Jl.length)===1){const vl=(va=(He=(Za=H==null?void 0:H.data)==null?void 0:Za.data)==null?void 0:He.path)==null?void 0:va.path;let ir="";(ul=(ja=(Le=(cl=(ca=vl==null?void 0:vl.split("("))==null?void 0:ca[1])==null?void 0:cl.split(")"))==null?void 0:Le[0])==null?void 0:ja.split(":"))==null||ul.forEach(Hl=>{var mr,ar;ir=ir===""?ir+((mr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:mr.trim()):ir+"/"+((ar=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:ar.trim())});let Rl=[(pr=(nr=(Ql=(dr=(hr=vl==null?void 0:vl.split("<"))==null?void 0:hr[1])==null?void 0:dr.split(">"))==null?void 0:Ql[0])==null?void 0:nr.replaceAll("'",""))==null?void 0:pr.trim()],Er;return(er=(Oe=(gr=H==null?void 0:H.data)==null?void 0:gr.data)==null?void 0:Oe.data)!=null&&er[Jl==null?void 0:Jl[0]]?Er=await ne((zl=(Mr=(Sr=H==null?void 0:H.data)==null?void 0:Sr.data)==null?void 0:Mr.data)==null?void 0:zl[Jl==null?void 0:Jl[0]],ir,Jl,da):Er=await Ae((qr=(Nr=H==null?void 0:H.data)==null?void 0:Nr.data)==null?void 0:qr.data,ir,Rl,Be),Er}else{const vl=($r=(br=(Kl=H==null?void 0:H.data)==null?void 0:Kl.data)==null?void 0:br.path)==null?void 0:$r.path;let ir="";return(Ur=(Wr=(lr=(Pl=(jr=vl==null?void 0:vl.split("("))==null?void 0:jr[1])==null?void 0:Pl.split(")"))==null?void 0:lr[0])==null?void 0:Wr.split(":"))==null||Ur.forEach(Er=>{var Hl,mr;ir=ir===""?ir+((Hl=Er==null?void 0:Er.replaceAll("'",""))==null?void 0:Hl.trim()):ir+"/"+((mr=Er==null?void 0:Er.replaceAll("'",""))==null?void 0:mr.trim())}),await me((an=(Kr=(Vr=H==null?void 0:H.data)==null?void 0:Vr.data)==null?void 0:Kr.data)==null?void 0:an[Jl==null?void 0:Jl[0]],ir,Jl)}}}}});if(await Promise.all(ma),(de==null?void 0:de.length)>0){let oa=[];de==null||de.forEach(ze=>{oa!=null&&oa.find(ya=>{var La,za,ha,Ca;return((za=(La=ya==null?void 0:ya.value)==null?void 0:La.pageData)==null?void 0:za.name)===((Ca=(ha=ze==null?void 0:ze.value)==null?void 0:ha.pageData)==null?void 0:Ca.name)})||oa.push(ze)});let Ve=[];oa==null||oa.forEach(ze=>{var za,ha,Ca,Ne;let ya=A.cloneDeep(ze);ya.value.pageData.compData=(za=ya.value.pageData.compData)==null?void 0:za.map(ye=>{var Y;return(ye==null?void 0:ye.key)==="formContent"&&(ye.contents=(Y=ye.contents)==null?void 0:Y.map(xe=>{var qe,sa,$a,Ma;let pe=(qe=A.cloneDeep(de))==null?void 0:qe.find(Va=>(Va==null?void 0:Va.keyType)===(xe==null?void 0:xe.key));if(pe){let Va=(Ma=($a=(sa=pe.value.pageData.compData)==null?void 0:sa.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:$a.contents)==null?void 0:Ma.find(Ue=>(Ue==null?void 0:Ue.key)===(xe==null?void 0:xe.key));xe.value=Va==null?void 0:Va.value}return xe})),ye}),Ve.push({id:ya==null?void 0:ya.id,value:ya==null?void 0:ya.value});let La=[];(Ne=(Ca=(ha=ya==null?void 0:ya.value)==null?void 0:ha.pageData)==null?void 0:Ca.compData)==null||Ne.forEach(ye=>{var Y;(ye==null?void 0:ye.key)==="formContent"&&((Y=ye==null?void 0:ye.contents)==null||Y.forEach(xe=>{var pe,qe,sa,$a,Ma,Va;if((qe=(pe=xe==null?void 0:xe.optionUrl)==null?void 0:pe.menuSelect)!=null&&qe.find(Ue=>Ue==null?void 0:Ue.includes("[")))if(La!=null&&La.find(Ue=>{var Ie,aa,ke;return((Ie=Ue==null?void 0:Ue.key)==null?void 0:Ie.join(","))===((ke=(aa=xe==null?void 0:xe.optionUrl)==null?void 0:aa.menuSelect)==null?void 0:ke.join(","))})){let Ue=(sa=La==null?void 0:La.find(Ie=>{var aa,ke,We;return((aa=Ie==null?void 0:Ie.key)==null?void 0:aa.join(","))===((We=(ke=xe==null?void 0:xe.optionUrl)==null?void 0:ke.menuSelect)==null?void 0:We.join(","))}))==null?void 0:sa.value;Ue.push({key:xe==null?void 0:xe.prop,groups:($a=xe==null?void 0:xe.optionUrl)==null?void 0:$a.groupSelect,value:xe==null?void 0:xe.value}),La=La==null?void 0:La.map(Ie=>{var aa,ke,We;return((aa=Ie==null?void 0:Ie.key)==null?void 0:aa.join(","))===((We=(ke=xe==null?void 0:xe.optionUrl)==null?void 0:ke.menuSelect)==null?void 0:We.join(","))&&(Ie.value=Ue),Ie})}else La.push({key:(Ma=xe==null?void 0:xe.optionUrl)==null?void 0:Ma.menuSelect,value:[{key:xe==null?void 0:xe.prop,groups:(Va=xe==null?void 0:xe.optionUrl)==null?void 0:Va.groupSelect,value:xe==null?void 0:xe.value}]})}))}),(La==null?void 0:La.length)>0&&(La=La==null?void 0:La.map(ye=>{var xe;let Y="";return(xe=ye==null?void 0:ye.key)==null||xe.forEach(pe=>{var qe;if(!(pe!=null&&pe.includes("[")))Y=Y===""?Y+pe:Y+"/"+pe;else{let sa="",$a=(qe=pe==null?void 0:pe.replaceAll("[","").replaceAll("]",""))==null?void 0:qe.split(":");Ge==null||Ge.forEach(Ma=>{var Va;(Ma==null?void 0:Ma.name)===($a==null?void 0:$a[0])&&((Va=Ma==null?void 0:Ma.compData)==null||Va.forEach(Ue=>{var Ie;(Ue==null?void 0:Ue.key)==="formContent"&&((Ie=Ue==null?void 0:Ue.contents)==null||Ie.forEach(aa=>{(aa==null?void 0:aa.prop)===($a==null?void 0:$a[1])&&(sa=aa==null?void 0:aa.value)}))}))}),Y=Y+r.value+sa}}),ye.key=Y,ye})),La==null||La.forEach(ye=>{var qe,sa,$a;let Y=(qe=Be[ye.key])==null?void 0:qe.find(Ma=>{var Va,Ue,Ie,aa,ke,We,tl;return((Ue=(Va=Ma==null?void 0:Ma.value)==null?void 0:Va.pageData)==null?void 0:Ue.name)===((ke=(aa=(Ie=ye==null?void 0:ye.value)==null?void 0:Ie[0])==null?void 0:aa.groups)==null?void 0:ke[0])&&((tl=(We=Ma==null?void 0:Ma.value)==null?void 0:We.pageData)==null?void 0:tl.name)!==void 0}),xe=Y==null?void 0:Y.id,pe=(sa=Y==null?void 0:Y.value)==null?void 0:sa.pageData;pe.compData=($a=pe.compData)==null?void 0:$a.map(Ma=>{var Va;return(Ma==null?void 0:Ma.key)==="formContent"&&(Ma.contents=(Va=Ma.contents)==null?void 0:Va.map(Ue=>{var aa;let Ie=(aa=ye.value)==null?void 0:aa.find(ke=>(ke==null?void 0:ke.key)===(Ue==null?void 0:Ue.prop));return Ie&&(Ue.value=Ie.value),Ue})),Ma}),Ve.push({id:xe,value:{pageData:pe}})})});let _a=(se=A.cloneDeep(de))==null?void 0:se[0];(Ve==null?void 0:Ve.length)>0&&await Rr.batchUpdateInsofDataApi({dataList:Ve})}m.setFreshContent(!0)}u.setImportLoading(!1)}catch{qa.ElMessage.error("方法执行错误,请查看方法!"),u.setImportLoading(!1)}S.value=!0},ce=["createInsofDataApi"],Te=Al.debounce(async fe=>{J(fe)},100),$e=async fe=>{var Pe,ra,Ta;const N=A.cloneDeep(fe);let te,U=new WeakMap;fe!=null&&fe[0].path&&(te=await(N==null?void 0:N.map(async(ee,pa)=>{var Ja,R,H,X,he,de,ma,oa,Ve,_a,ze,ya,La,za,ha,Ca;const ua=(Ja=U[ee==null?void 0:ee.path])==null?void 0:Ja.filter(Ne=>{var ye;return((ye=Ne==null?void 0:Ne.key)==null?void 0:ye.type)==="data"});let Se="";const se=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);ua==null||ua.forEach(Ne=>{var ye,Y,xe,pe,qe;((Y=(ye=Ne==null?void 0:Ne.value)==null?void 0:ye.tableData)==null?void 0:Y.算法名称)===((xe=N==null?void 0:N[pa])==null?void 0:xe.method)&&(Se=(qe=(pe=Ne==null?void 0:Ne.value)==null?void 0:pe.tableData)==null?void 0:qe.算法体)});const Be=await oe.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);let Ge="",da=(he=(X=(H=(R=Be==null?void 0:Be[0])==null?void 0:R.compData)==null?void 0:H.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:X.contents)==null?void 0:he.findIndex(Ne=>(Ne==null?void 0:Ne.prop)==="算法体");return(ma=(de=Be==null?void 0:Be[0])==null?void 0:de.compData)==null||ma.forEach(Ne=>{var ye;(Ne==null?void 0:Ne.key)==="tableContents"&&((ye=Ne==null?void 0:Ne.contents)==null||ye.forEach(Y=>{Y!=null&&Y.find(xe=>xe===(ee==null?void 0:ee.method))&&(Ge=Y[da])}))}),{buttonName:((oa=N==null?void 0:N[pa])==null?void 0:oa.method)||((ze=(_a=(Ve=ua==null?void 0:ua[0])==null?void 0:Ve.value)==null?void 0:_a.tableData)==null?void 0:ze.算法名称),api:(Se===""?(za=(La=(ya=ua==null?void 0:ua[0])==null?void 0:ya.value)==null?void 0:La.tableData)==null?void 0:za.算法体:Se)||Ge,content:se==null?void 0:se.filter(Ne=>Ne.comp!=="methodButton"),extraContent:(ha=A.cloneDeep(ee.value))==null?void 0:ha.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(Ca=N==null?void 0:N[pa])==null?void 0:Ca.data}})));const Ce=N==null?void 0:N.map(async ee=>{var Be,Ge,da,Ja,R,H;const pa=(Be=resAll.data.result)==null?void 0:Be.filter(X=>{var he,de,ma;return((he=X==null?void 0:X.key)==null?void 0:he.parentTable)===""&&((de=X==null?void 0:X.key)==null?void 0:de.type)==="method"&&((ma=X==null?void 0:X.key)==null?void 0:ma.methodName)===X.method}),ue=pa==null?void 0:pa[0],ua=(Ge=resAll.data.result)==null?void 0:Ge.filter(X=>{var he,de;return((he=X==null?void 0:X.key)==null?void 0:he.type)==="methodData"&&((de=X==null?void 0:X.key)==null?void 0:de.tableId)===(ue==null?void 0:ue.id)}),Se=await oe.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U),se=ua==null?void 0:ua[0];return{buttonName:(da=ue==null?void 0:ue.key)==null?void 0:da.methodKey,api:(R=(Ja=se==null?void 0:se.value)==null?void 0:Ja.tableData)==null?void 0:R[0],content:Se==null?void 0:Se.filter(X=>X.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ee.value))==null?void 0:H.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Me=(Pe=fe==null?void 0:fe[0])!=null&&Pe.path&&((ra=fe==null?void 0:fe[0])==null?void 0:ra.path)!==""?await Promise.all(te):await Promise.all(Ce);l.value=Me==null?void 0:Me.filter(ee=>ee==null?void 0:ee.extraContent),(Ta=l.value)==null||Ta.forEach(ee=>{var pa;ee.api===""&&((pa=ee.content)==null||pa.forEach(ue=>{var ua;ue.comp=="Table"&&m.setExtraContents(oe.methodTableToContent(ue.compData,(ua=ee.extraContent)==null?void 0:ua[0]))}))})};return e.watch(()=>o.itemData,async()=>{k.value=="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{immediate:!0,deep:!0}),(fe,N)=>{var te,U,Ce;return e.unref(k)!=="edit"?(e.openBlock(),e.createElementBlock("div",i2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=l.value)==null?void 0:te.filter(Me=>(Me==null?void 0:Me.buttonName)!=="保存"),Me=>{var Pe;return e.openBlock(),e.createElementBlock("div",null,[Me.api!==""?(e.openBlock(),e.createBlock(e.unref(ts._sfc_main),{key:0,disabled:e.unref(j)===e.unref(E)&&!((Pe=Me==null?void 0:Me.buttonName)!=null&&Pe.includes("预览")),class:"calculator-content",modelValue:Me.buttonName,onClickTrigger:ra=>e.unref(Te)(Me),loading:b.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(W)!==""&&((Ce=e.unref(E))==null?void 0:Ce[((U=e.unref(E))==null?void 0:U.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ts._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(sl.ssFilePreview,{key:0,fileDataList:h.value,onDestroy:V},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},t2=Zl._export_sfc(o2,[["__scopeId","data-v-063aa9af"]]),s2={};function c2(a,l){return" 567 "}const u2=Zl._export_sfc(s2,[["render",c2]]),d2={class:"module content"},p2={class:"module data"},f2={class:"module layout"},h2={class:"form-content"},v2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=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}]),d=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({}),b=e.ref([]),u=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:b.value},{key:"signConfig",contents:m.value}]}),C=I=>{var j;m.value=A.cloneDeep(I),r("change",(j=u())==null?void 0:j.compData)},M=I=>{var j,L;if((I==null?void 0:I.buttonName)==="确认"){const E=A.cloneDeep(I==null?void 0:I.content);switch(s.value){case"create":b.value.push({...E,index:((j=b.value)==null?void 0:j.length)+1});break}r("change",(L=u())==null?void 0:L.compData),o.visible=!1}else o.visible=!1},k=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),s.value="create",o.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),s.value="update",o.visible=!0;break;case"delete":b.value.splice(j,1),s.value="delete";break}},W=()=>{o.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="signConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",d2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>k("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",p2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>k("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>k("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",f2,[e.createVNode(sl.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:W,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",h2,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),m2=Zl._export_sfc(v2,[["__scopeId","data-v-487e0536"]]),y2=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(0),s=e.computed(()=>{var u,C;return(u=n==null?void 0:n.stepConfig)!=null&&u.allowTrigger?o.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),h=(u,C)=>{o.value=C-1,r("clickStep",u,C)};e.onMounted(()=>{var u;r("clickStep",(u=n==null?void 0:n.stepList)==null?void 0:u[0],0)});const c=u=>sl.getComponent(u),d=()=>{var C;const u=(C=n==null?void 0:n.stepList)==null?void 0:C.find((M,k)=>k+1===s.value);return console.log("findStep",u),u?u==null?void 0:u.children:[]},m=u=>{r("clickTrigger",u)},b=u=>{r("changeTrigger",u)};return(u,C)=>{var W,I,j,L,E;const M=e.resolveComponent("el-step"),k=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{direction:(W=a.stepConfig)==null?void 0:W.direction,active:s.value,"finish-status":"success",simple:(I=a.stepConfig)==null?void 0:I.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(x,w)=>(e.openBlock(),e.createBlock(M,{key:w,class:"step-item",onClick:g=>h(x,w+1)},{title:e.withCtx(()=>[e.renderSlot(u.$slots,"title",{title:x==null?void 0:x.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(u.$slots,"description",{descriptions:x==null?void 0:x.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(x==null?void 0:x.type)),{modelValue:x.value,"onUpdate:modelValue":g=>x.value=g,onClickTrigger:m,onChangeTrigger:b,content:x==null?void 0:x.content},e.createSlots({_:2},[e.renderList(u.$slots,(g,S)=>({name:S,fn:e.withCtx($=>[e.renderSlot(u.$slots,S,e.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),g2=Zl._export_sfc(y2,[["__scopeId","data-v-fdbd6832"]]),b2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,o=e.ref({}),s=e.ref([]),h=(c,d)=>{r("clickStep",c,d)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var u,C,M,k;o.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let d=((u=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="stepName"))==null?void 0:u.contents)??[],m=[];(M=(C=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:C.contents)==null||M.forEach(W=>{m.push({label:W==null?void 0:W.label,prop:W==null?void 0:W.prop,name:W==null?void 0:W.prop,type:"text",disabled:!0})});let b=((k=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)??[];d=d==null?void 0:d.map((W,I)=>{let j=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=b==null?void 0:b[I])==null?void 0:E[L==null?void 0:L.prop]}});return{title:W,description:j}}),s.value=d},{immediate:!0,deep:!0}),(c,d)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(g2,{stepConfig:o.value,stepList:s.value,onClickStep:h},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:b})=>[e.createTextVNode(e.toDisplayString(b),1)]),description:e.withCtx(({descriptions:b})=>[e.createVNode(sl.ssForm,{ref:"formRef",rowContents:b,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),k2=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,h)=>(e.openBlock(),e.createBlock(r,{key:h,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(l.$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})}}}),x2=Zl._export_sfc(k2,[["__scopeId","data-v-4172a886"]]),w2={class:"line-content"},_2={class:"line-time"},S2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,o=>{var s,h;r.value=(s=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:s.contents,n.value=(h=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:h.contents},{immediate:!0}),(o,s)=>(e.openBlock(),e.createBlock(x2,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:h,timestamp:c})=>[e.createElementVNode("span",w2,e.toDisplayString(h),1),e.createElementVNode("span",_2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),E2=Zl._export_sfc(S2,[["__scopeId","data-v-b4d9deed"]]),C2={class:"tabs-content"},D2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const n=a,r=l,o=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const s=C=>{r("change",C)},h=(C,M)=>{r("contentChange",C,M)},c=C=>{r("pageChange",C)},d=C=>{r("rowClick",C)},m=(C,M)=>{r("routeUrl",C,M)},b=C=>{r("clickTrigger",C)},u=(C,M)=>{r("clickMainKey",C,M)};return(C,M)=>{var k,W;return e.openBlock(),e.createElementBlock("div",C2,[(k=o.value)!=null&&k.length?(e.openBlock(),e.createBlock(sl.ssTab,{tabsContents:o.value,key:(W=o.value)==null?void 0:W.length},{pane:e.withCtx(({tab:I,index:j})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(I==null?void 0:I.comp)),{related:I==null?void 0:I.relatedTables,compNames:n==null?void 0:n.compNames,compName:I==null?void 0:I.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:s,index:(I==null?void 0:I.id)??j,config:{showIndex:I==null?void 0:I.showIndex,allowMove:I==null?void 0:I.allowMove,viewport:I==null?void 0:I.viewport,status:I==null?void 0:I.status},onContentChange:h,onPageChange:c,onRowClick:d,onRouteUrl:m,parentTableId:I==null?void 0:I.tableId,allMapContents:a.allMapContents,children:I==null?void 0:I.children,level:1,onClickTrigger:b,onClickMainKey:u},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),T2=Zl._export_sfc(D2,[["__scopeId","data-v-1ea318b4"]]),B2={class:"type-select"},N2=["onClick"],A2={class:"list-icon"},z2={__name:"modelSelect",setup(a){const l=Yn(A.pinia),{itemData:n}=A.storeToRefs(l),r=o=>{const s=A.cloneDeep(n.value);s.push({comp:o.comp,name:o.name,compData:[]}),l.setItemData(s)};return(o,s)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(su),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:d},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",A2,[e.createVNode(h,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,N2)]))),128))])}}},M2=Zl._export_sfc(z2,[["__scopeId","data-v-91799bf8"]]),I2={class:"fill-content"},O2={class:"operate-content"},L2={class:"collapse-title-content"},R2={class:"collapse-title-item"},$2={key:1},V2=["onClick"],P2={class:"icon-content"},F2={key:0,class:"edit-content"},j2=["onClick"],H2={class:"comp-child"},U2={__name:"modelFill",setup(a){const l=Yn(A.pinia),{itemData:n,originalData:r}=A.storeToRefs(l),o=e.ref([]);e.ref([]);const s=e.ref([]),h=e.ref([]),c=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!0),I));h.value=k},d=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!1),I));h.value=k,o.value=A.cloneDeep(n.value)},m=(M,k)=>{var L;let W=(L=A.cloneDeep(h.value))==null?void 0:L.map((E,x)=>(M===x&&(E.content=!1),E));h.value=W;const I=A.cloneDeep(n.value),j=I==null?void 0:I.filter((E,x)=>(x===M&&(E.name=k),E));l.setOriginalData(j),l.setItemData(j)};e.watch(()=>n.value,()=>{var M,k,W;!n.value||((M=n.value)==null?void 0:M.length)===0?o.value=[]:o.value=(k=A.cloneDeep(n.value))==null?void 0:k.filter(I=>(I==null?void 0:I.comp)!=="methodButton"),s.value=o.value,h.value=(W=A.cloneDeep(s.value))==null?void 0:W.map((I,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const b=M=>zi(M),u=(M,k,W)=>{var j,L;if(!M)return;let I=A.cloneDeep(n.value);I=(j=I==null?void 0:I.map((E,x)=>(x===W&&(E.compData=M),E)))==null?void 0:j.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),h.value=(L=A.cloneDeep(I))==null?void 0:L.map((E,x)=>({id:x,content:!1})),l.setOriginalData(I),l.setItemData(I)},C=M=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const k=A.cloneDeep(n.value),W=k==null?void 0:k.filter((I,j)=>j!==M);l.setOriginalData(W),l.setItemData(W),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(M,k)=>{const W=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",I2,[k[1]||(k[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",O2,[e.createVNode(ec.default,{class:"collapse-content",collapseContents:o.value},{title:e.withCtx(({item:I,index:j})=>{var L,E,x,w,g,S,$,V,ae,Z;return[e.createElementVNode("div",L2,[e.createElementVNode("div",R2,[(E=(L=h.value)==null?void 0:L.find(me=>me.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:I.name&&I.name!==""?"8px":"0px"})},e.toDisplayString(I.name),5)),(w=(x=h.value)==null?void 0:x.find(me=>me.id===j))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",$2,[e.createVNode(sl.ssInput,{modelValue:I.name,"onUpdate:modelValue":me=>I.name=me,onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(g=h.value)==null?void 0:g.find(me=>me.id===j))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(me=>c(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Edit",style:{width:"16px",height:"16px"}})],8,V2))]),e.createElementVNode("div",P2,[(V=($=h.value)==null?void 0:$.find(me=>me.id===j))!=null&&V.content?(e.openBlock(),e.createElementBlock("div",F2,[e.createVNode(W,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(me=>d(j),["stop"])},null,8,["onClick"]),e.createVNode(W,{name:"Save",onClick:e.withModifiers(me=>m(j,I.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Z=(ae=h.value)==null?void 0:ae.find(me=>me.id===j))!=null&&Z.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(me=>C(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Delete",style:{width:"16px",height:"16px"}})],8,j2))])])]}),content:e.withCtx(({item:I,index:j})=>{var L,E;return[e.createElementVNode("div",H2,[e.createTextVNode(e.toDisplayString(b(I.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:(E=(L=s.value)==null?void 0:L.find((x,w)=>w===j))==null?void 0:E.compData,onChange:x=>u(x,I,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},q2=Zl._export_sfc(U2,[["__scopeId","data-v-a46a44b9"]]),W2={key:0,class:"show-content"},K2={style:{display:"flex"}},G2={__name:"modelShow",setup(a){const l=Yn(A.pinia),{itemData:n}=A.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var s;!n.value||((s=n.value)==null?void 0:s.length)===0?r.value=[]:r.value=A.cloneDeep(n.value)},{deep:!0,immediate:!0});const o=s=>zi(s);return(s,h)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",W2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",K2,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Y2=Zl._export_sfc(G2,[["__scopeId","data-v-3f3e863e"]]),J2={class:"tabs-header"},X2={class:"tabs-list"},Z2={class:"tab-name"},Q2={class:"tab-actions"},e6=["onClick"],a6=["onClick"],l6=["onClick"],r6={class:"model-operate"},n6={class:"model-select",style:{display:"unset"}},i6={class:"existing-components"},o6={class:"component-list"},t6=["onClick"],s6={class:"component-info"},c6={class:"component-type"},u6={class:"component-name"},d6={class:"model-fill"},p6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(""),c=e.ref({title:""}),d=e.ref(-1),m=e.ref(!1),b=e.ref(-1),u=e.ref(new WeakMap),C=e.ref(null),M=Yn(A.pinia),{itemData:k}=A.storeToRefs(M),W=()=>{h.value="新增标签页",c.value.title="",d.value=-1,s.value=!0},I=fe=>{h.value="修改标签页",c.value.title=o.value[fe].title,d.value=fe,s.value=!0},j=fe=>{const N=x(fe);u.value.delete(N),o.value.splice(fe,1),$e()},L=()=>{if(c.value.title.trim()){if(d.value===-1){const fe={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};o.value.push(fe)}else o.value[d.value].title=c.value.title,o.value[d.value].value=c.value.title,o.value[d.value].label=c.value.title;s.value=!1,$e()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,x=fe=>{const N=o.value[fe];return N.id||(N.id=E()),N.id},w=fe=>{var U;b.value=fe;const N=x(fe);C.value=A.cloneDeep(k.value);let te=u.value.get(N);!te&&((U=o.value[fe].children)==null?void 0:U.length)>0&&(te=V(o.value[fe].children)),te?M.setItemData(A.cloneDeep(te)):M.setItemData([]),m.value=!0},g=e.computed(()=>{const fe=A.useModelComp(A.pinia),N=A.storeToRefs(fe).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(te=>{var U;if(te.comp==="Tabs"&&b.value>=0){const Ce=x(b.value);if((U=te.compData)==null?void 0:U.some(Pe=>{var ra;return Pe.key==="stepList"&&((ra=Pe.contents)==null?void 0:ra.some(Ta=>Ta.id===Ce))}))return!1}return!0})}),S=fe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[fe]||fe,$=fe=>{var N;try{const te=A.cloneDeep(fe);te.id=Date.now()+Math.random(),te.comp==="Tabs"&&((N=te.compData)==null||N.forEach(Ce=>{Ce.key==="stepList"&&Ce.contents&&Ce.contents.forEach(Me=>{Me.id=E()})}));const U=A.cloneDeep(k.value);U.push(te),M.setItemData(U)}catch(te){console.error("添加组件失败:",te)}},V=fe=>fe.map(N=>{var te;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:ae(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:Z(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((te=N.content)==null?void 0:te.originalData)||[]}}}),ae=fe=>{if(!fe)return[];const N=[];return fe.rowContents&&N.push({key:"formContent",contents:fe.rowContents}),fe.buttonValue&&N.push({key:"formButton",contents:fe.buttonValue}),typeof fe.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:fe.isEnableWrap}),N},Z=fe=>[],me=()=>{if(b.value>=0&&b.value<o.value.length){const fe=x(b.value);u.value.set(fe,A.cloneDeep(k.value)),o.value[b.value].children=ne(k.value),console.log("保存后的数据",ne(k.value))}m.value=!1,b.value=-1,C.value=null,$e()},Ae=()=>{C.value&&M.setItemData(A.cloneDeep(C.value)),m.value=!1,b.value=-1,C.value=null},F=()=>{m.value&&Ae()},ne=fe=>{if(!Array.isArray(fe))throw new Error("sourceData must be an array");return fe.map((N,te)=>{if(!N||typeof N!="object")return N;const{comp:U,name:Ce,compData:Me}=N;switch(U){case"Form":return{type:"form",content:J(Me||[]),value:"表单"};case"Table":return{type:"table",content:ce(Me||[]),value:"表格"};default:return{type:"xxx",content:Te(Me||[]),value:""}}})},J=fe=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},te={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return fe.forEach((U,Ce)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${Ce}:`,U);return}const{key:Me,contents:Pe}=U,ra=te[Me];if(!ra){console.warn(`Unknown Form config key: ${Me}`);return}Me==="enableWrap"?N[ra]=!!Pe:N[ra]=Array.isArray(Pe)?Pe:[]}),N},ce=fe=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},te={header:"columns",tableContents:"tableData"};return fe.forEach((U,Ce)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${Ce}:`,U);return}const{key:Me,contents:Pe}=U,ra=te[Me];if(!ra){console.warn(`Unknown Table config key: ${Me}`);return}N[ra]=Array.isArray(Pe)?Pe:[]}),N},Te=fe=>(console.log("Default conversion logic - to be implemented"),{originalData:fe,processed:!1,componentType:"unknown"}),$e=()=>{const fe=[{key:"stepList",contents:o.value}];r("change",fe)};return e.watch(()=>n.itemContents,fe=>{if(fe&&fe.length>0){const N=fe.find(te=>te.key==="stepList");N&&N.contents&&(o.value=N.contents.map(te=>({title:te.title||"",value:te.value||te.title||"",label:te.label||te.title||"",children:te.children||[],id:te.id||E()})))}},{immediate:!0,deep:!0}),(fe,N)=>{const te=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-input"),Ce=e.resolveComponent("el-form-item"),Me=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",J2,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:W},[e.createVNode(te,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",X2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(Pe,ra)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ra},[e.createElementVNode("span",Z2,e.toDisplayString(Pe.title),1),e.createElementVNode("div",Q2,[e.createElementVNode("button",{onClick:Ta=>I(ra)},"修改标题",8,e6),e.createElementVNode("button",{onClick:Ta=>w(ra)},"布局调整",8,a6),e.createElementVNode("button",{onClick:Ta=>j(ra)},"删除",8,l6)])]))),128))]),e.createVNode(Br.ssDialog,{modelValue:s.value,"onUpdate:modelValue":N[2]||(N[2]=Pe=>s.value=Pe),title:h.value,onBeforeDestroy:N[3]||(N[3]=Pe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=Pe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Me,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ce,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=Pe=>c.value.title=Pe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Br.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=Pe=>m.value=Pe),title:"布局调整",fullScreen:"",onBeforeDestroy:F},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ae},"取消"),e.createElementVNode("button",{onClick:me},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",r6,[e.createElementVNode("div",n6,[e.createVNode(M2),e.createElementVNode("div",i6,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,Pe=>(e.openBlock(),e.createElementBlock("div",{key:Pe.id,class:"component-item",onClick:ra=>$(Pe)},[e.createElementVNode("div",s6,[e.createElementVNode("span",c6,e.toDisplayString(S(Pe.comp)),1),e.createElementVNode("span",u6,e.toDisplayString(Pe.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,t6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:fe.innerWidth},[e.createVNode(Y2)])),e.createElementVNode("div",d6,[e.createVNode(q2)])])]),_:1},8,["modelValue"])])}}},f6=Zl._export_sfc(p6,[["__scopeId","data-v-9096ed0d"]]);function h6(){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 v6(a){return{type:"line",...a}}function m6(){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:[]},yAxis:[{type:"value"}],series:[]}}function y6(a){return{type:"bar",barWidth:"60%",...a}}function g6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function b6(a){return{type:"pie",radius:"80%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const k6=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),x6=a=>({type:"scatter",symbolSize:20,...a}),En={Line:{initBaseoptions:h6,initSeries:v6},Bar:{initBaseoptions:m6,initSeries:y6},Pie:{initBaseoptions:g6,initSeries:b6},Scatter:{initBaseoptions:k6,initSeries:x6}},w6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},_6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},S6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(M=>M==null?void 0:M.prop);let b=[];if(m==null||m.forEach(M=>{var k;b.push((k=n==null?void 0:n[0])==null?void 0:k[M])}),!m||!b)return d;const u=[];for(let M=0;M<m.length;M++){const k=m[M],W=b[M];u.push({name:k,value:W})}const C=c({data:u});return d.series.push(C),d},E6=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=En==null?void 0:En[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";let m=[];const b=l==null?void 0:l.map(M=>M==null?void 0:M.prop);if(m=b==null?void 0:b.map(M=>{var W;let k=[];return k.push(M),k.push((W=n==null?void 0:n[0])==null?void 0:W[M]),k}),!m)return d;const C=c({data:m});return d.series.push(C),d},C6=async(a=[])=>{var h,c,d;const l=((h=a==null?void 0:a.find(m=>m.key==="ChartType"))==null?void 0:h.contents)??{},n=((c=a==null?void 0:a.find(m=>m.key==="header"))==null?void 0:c.contents)??[],r=((d=a==null?void 0:a.find(m=>m.key==="tableContents"))==null?void 0:d.contents)??[];let{type:o}=l,s={};return o==="Line"&&(s=await w6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(s=await _6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(s=await S6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(s=await E6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),s},D6=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 l=a,n=e.ref({});e.onMounted(async()=>{const o=l==null?void 0:l.itemData;n.value=await C6(o)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Ou.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),T6=Zl._export_sfc(D6,[["__scopeId","data-v-d4c081e8"]]),B6={class:"chart-module layout"},N6={class:"chart-module content"},A6={class:"chart-module content"},z6={class:"form-content"},M6={class:"dialog-footer"},I6={class:"form-content"},O6={class:"dialog-footer"},L6={class:"form-content"},R6={class:"dialog-footer"},$6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),h=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],c=e.ref({}),d=()=>{var Se;s.value=h(),(Se=s.value)==null||Se.forEach(se=>{var Ge;const Be=se==null?void 0:se.prop;se.value=(Ge=c==null?void 0:c.value)==null?void 0:Ge[Be]}),o.visible=!0},m=Se=>{c.value=Se},b=()=>{var Se;o.visible=!1,r("change",(Se=ue())==null?void 0:Se.compData)},u=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=e.ref([]),M=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),W=()=>{const Se=C.value,se=A.cloneDeep(Se);return se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=k.value)==null?void 0:da[Ge]}),se},I=Se=>{var Be;k.value=Se;const se=W();C.value=se,r("change",(Be=ue())==null?void 0:Be.compData)},j=async()=>{const Se=await oe.getMenusContent(),se=W();se==null||se.forEach(Be=>{(Be==null?void 0:Be.prop)==="menu"&&(Be.contents=Se)}),C.value=se,u.visible=!0,await Pe(k.value.menu),await ee(k.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),x=()=>[{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:[]}],w=e.ref({}),g=()=>{const Se=E.value,se=A.cloneDeep(Se);return se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=w.value)==null?void 0:da[Ge]}),se},S=Se=>{var Be;w.value=Se;const se=g();E.value=se,r("change",(Be=ue())==null?void 0:Be.compData)},$=async()=>{await F();const Se=A.cloneDeep(V.value),se=g();se==null||se.forEach(Be=>{var da;const Ge=Be==null?void 0:Be.prop;Be.value=(da=w==null?void 0:w.value)==null?void 0:da[Ge],Ge==="mainKey"&&(Be.contents=Se)}),E.value=se,L.visible=!0},V=e.ref([]),ae=e.ref([]),Z=e.ref({}),me=e.ref({}),Ae=()=>{const{compData:Se}=U.value||{},se=Se==null?void 0:Se.find(X=>{const{key:he}=X;return he==="header"}),Be=(se==null?void 0:se.contents)||[],Ge=Be==null?void 0:Be.filter((X,he)=>{const{label:de}=X;return de!=="操作"}),da=Ge==null?void 0:Ge.findIndex((X,he)=>{const{isMainKey:de}=X;return de});if(da<0)return[];const Ja=Se==null?void 0:Se.find(X=>{const{key:he}=X;return he==="tableContents"}),R=(Ja==null?void 0:Ja.contents)||[];return R==null?void 0:R.map(X=>{const he=X==null?void 0:X[0];let de=da;qa.isObject(he)&&(he!=null&&he.id)&&(de=de+1);const ma=X==null?void 0:X[de];return{label:ma,value:ma}})},F=async()=>{const Se=await Ae();V.value=Se},ne=async Se=>{const se=sessionStorage.getItem("systemKey");return await oe.getItemData(Se,se,"")},J=async Se=>{const se=Se;ae.value=se==null?void 0:se.map(Be=>{const{name:Ge}=Be;return Z.value[Ge]=Be,{label:Ge,value:Ge}})},ce=Se=>{const{comp:se,compData:Be}=me.value||{};if(se==="Table"){let Ge=g();Ge=Ge.filter(da=>{const{prop:Ja}=da;return Ja!=="formItems"}),ra(Ge,Be),E.value=Ge}},Te=async()=>{var Be,Ge;const Se=(Be=w==null?void 0:w.value)==null?void 0:Be.mainKey,se=(Ge=k==null?void 0:k.value)==null?void 0:Ge.menu;if(Se){const Ja=`${se==null?void 0:se.join("/")}^${Se}`,R=await ne(Ja);await J(R);const H=g();H==null||H.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=ae.value)}),E.value=H}};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.mainKey},async(Se,se)=>{Se!=se&&Se&&await Te()});const $e=async Se=>{const se=Z.value[Se];me.value=se,await ce()};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.group},async(Se,se)=>{Se!=se&&Se&&$e(Se)});const fe=async()=>{var se;await Te();const Se=(se=w.value)==null?void 0:se.group;await $e(Se)},N=e.ref([]),te=e.ref({}),U=e.ref({}),Ce=async Se=>{const se=Se==null?void 0:Se.join("/"),Be=sessionStorage.getItem("systemKey");return await oe.getItemData(se,Be,"")},Me=async Se=>{const se=await Ce(Se);N.value=se==null?void 0:se.map(Be=>{const{name:Ge}=Be;return te.value[Ge]=Be,{label:Ge,value:Ge}})},Pe=async(Se,se)=>{await Me(Se);const Be=W();Be==null||Be.forEach(Ge=>{(Ge==null?void 0:Ge.prop)==="group"&&(Ge.contents=N.value)}),C.value=Be};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.menu},async(Se,se)=>{const Be=Se==null?void 0:Se.join("/"),Ge=se==null?void 0:se.join("/");Be!=Ge&&await Pe(Se)});const ra=(Se,se)=>{const Be=se==null?void 0:se.find(R=>{const{key:H}=R;return H==="header"}),Ge=(Be==null?void 0:Be.contents)||[],da=Ge==null?void 0:Ge.filter((R,H)=>{const{label:X}=R;return X!=="操作"}),Ja=da==null?void 0:da.map((R,H)=>{const{label:X}=R;return{label:X,value:H}});Se==null||Se.forEach(R=>{const H=R==null?void 0:R.prop;(H==="nameCol"||H==="valueCol")&&(R.contents=Ja)})},Ta=Se=>{const{comp:se,compData:Be}=U.value||{};if(se==="Table"){k.value.formItems=[];let Ge=W();Ge=Ge.filter(da=>{const{prop:Ja}=da;return Ja!=="formItems"}),ra(Ge,Be),C.value=Ge}},ee=async Se=>{const se=te.value[Se];U.value=se,await Ta()};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.group},async(Se,se)=>{Se!=se&&ee(Se)});const pa=async()=>{var Be,Ge;const Se=(Be=k.value)==null?void 0:Be.menu;await Pe(Se);const se=(Ge=k.value)==null?void 0:Ge.group;await ee(se)},ue=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:k.value},{key:"chartDetailConfig",contents:w.value}]}),ua=()=>{o.visible=!1,u.visible=!1,L.visible=!1};return e.onMounted(async()=>{var se,Be,Ge;C.value=M(),E.value=x();const Se=n==null?void 0:n.itemContents;c.value=((se=Se==null?void 0:Se.find(da=>da.key==="chartBaseConfig"))==null?void 0:se.contents)??{},k.value=((Be=Se==null?void 0:Se.find(da=>da.key==="chartDataConfig"))==null?void 0:Be.contents)??{},await pa(),w.value=((Ge=Se==null?void 0:Se.find(da=>da.key==="chartDetailConfig"))==null?void 0:Ge.contents)??{},await fe()}),(Se,se)=>{const Be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",B6,[se[4]||(se[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[0]||(se[0]=Ge=>d())},{default:e.withCtx(()=>se[3]||(se[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",N6,[se[6]||(se[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[1]||(se[1]=Ge=>j())},{default:e.withCtx(()=>se[5]||(se[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",A6,[se[8]||(se[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[2]||(se[2]=Ge=>$())},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:ua,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Be,{class:"ok-button button",onClick:b,id:"themeButton"},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ua,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[11]||(se[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Be,{class:"ok-button button",onClick:ua,id:"themeButton"},{default:e.withCtx(()=>se[12]||(se[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:ua,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",L6,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",R6,[e.createVNode(Be,{class:"cancel-button button",onClick:ua,id:"themeBorderButton"},{default:e.withCtx(()=>se[13]||(se[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Be,{class:"ok-button button",onClick:ua,id:"themeButton"},{default:e.withCtx(()=>se[14]||(se[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),V6=Zl._export_sfc($6,[["__scopeId","data-v-fe119645"]]),P6={class:"layout"},F6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const o=e.computed(()=>A.cloneDeep(r==null?void 0:r.itemData)||[]),s=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="baseConfig"});return m==null?void 0:m.contents}),h=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=A.cloneDeep(h.value)||[];const b=m.length;let u=0;const C=[];if(m=m.map(M=>{const k=M.span;return k?(M.span=Number(k),u=u+M.span):C.push(M),M}),u<24){const M=Math.floor((24-u)/b);C.forEach(k=>{k.span=M})}return m}),d=m=>{n("rowClick",m)};return(m,b)=>{var M;const u=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",P6,[e.createVNode(C,{style:e.normalizeStyle({height:(M=s.value)==null?void 0:M.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,W)=>(e.openBlock(),e.createBlock(u,{span:k==null?void 0:k.span},{default:e.withCtx(()=>{var I;return[e.unref(Ai)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(k.comp)),{key:e.unref(Gn),compName:k.name,index:(k==null?void 0:k.id)??W,height:(I=s.value)==null?void 0:I.height,itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,onChange:e.unref(Io),onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),onRowClick:d},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),j6=Zl._export_sfc(F6,[["__scopeId","data-v-ab9a36ed"]]),H6={class:"layout-operate"},U6={class:"layout-module"},q6={class:"collapse-title-item"},W6={class:"collapse-title"},K6={class:"icon-content"},G6=["onClick"],Y6={class:"comp-child"},J6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{W()});const o=e.ref({}),s=e.ref({}),h=e.ref([]),c=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],d=w=>{s.value=w,r("change",x(),!0)},m=e.ref([]),b=e.ref([]),u=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=n==null?void 0:n.itemContents;return A.cloneDeep(w)}),M=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="baseConfig"});return g==null?void 0:g.contents}),k=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="children"});return g==null?void 0:g.contents}),W=()=>{var w;o.value=C.value||{},m.value=(k==null?void 0:k.value)||[],h.value=c(),h.value=(w=h.value)==null?void 0:w.map(g=>{var $;const{prop:S}=g;return g.value=($=M.value)==null?void 0:$[S],g})};e.watch(()=>{var w;return(w=k==null?void 0:k.value)==null?void 0:w.length},()=>{var w;m.value=(k==null?void 0:k.value)||[],b.value=(w=k.value)==null?void 0:w.map(g=>u(g))},{immediate:!0});const I=(w,g)=>{const S=A.cloneDeep(k==null?void 0:k.value);S[g].span=w.span,m.value=S,r("change",x(),!0)},j=w=>zi(w),L=(w,g,S)=>{if(!w)return;const $=A.cloneDeep(k==null?void 0:k.value);$[S]&&($[S].compData=w,m.value=$,r("change",x(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let g=A.cloneDeep(k==null?void 0:k.value);g=g==null?void 0:g.filter((S,$)=>w!==$),m.value=g,r("change",x(),!0),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,g)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",H6,[e.createElementVNode("div",U6,[g[1]||(g[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(sl.ssForm,{rowContents:h.value,isEnableWrap:!0,onChange:g[0]||(g[0]=$=>d($))},null,8,["rowContents"])])]),e.createVNode(ec.default,{class:"collapse-content",collapseContents:k.value},{title:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",q6,[e.createElementVNode("div",W6,e.toDisplayString($.name),1),e.createElementVNode("div",K6,[e.createElementVNode("div",{onClick:e.withModifiers(ae=>E(V),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,G6)])])]),content:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",Y6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(sl.ssForm,{rowContents:b.value[V],key:V,isEnableWrap:!0,onChange:ae=>I(ae,V)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:ae=>L(ae,$,V)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),X6=Zl._export_sfc(J6,[["__scopeId","data-v-ba05456e"]]),Z6=typeof window<"u";var Ds;Z6&&((Ds=window==null?void 0:window.navigator)!=null&&Ds.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kn(a){return a==null}function jc(){}const Q6=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(Q6)));function e1(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(o=>{o(...n)})}}}function Ts(a,l=16){if(typeof a!="function")return jc;const n=(...s)=>{a(...s)};if(l<=0)return Hc(n);let r=0,o;return function(...s){const h=Date.now(),c=h-r;clearTimeout(o),c>=l?(r=h,n(...s)):o=setTimeout(()=>{r=Date.now(),n(...s)},Math.max(0,l-c))}}function a1(a,l=100){if(typeof a!="function")return jc;const n=(...o)=>{a(...o)};if(l<=0)return Hc(n);let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{n(...o)},l)}}function Hc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...o){return n=o,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Gi=new Set,Uc=new WeakMap;function l1(){Gi.forEach(a=>{a(...Uc.get(a))}),Gi.clear()}function un(a,...l){if(typeof a!="function")return a;Uc.set(a,l),!Gi.has(a)&&(Gi.add(a),Gi.size===1&&Promise.resolve().then(l1))}const qc=Symbol("LAYOUT_KEY"),Wc=Symbol("EMITTER_KEY");function r1(a){let l=0,n;for(let r=0,o=a.length;r<o;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function Tt(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=n1(a[n]);return l}function n1(a){return{...a}}function Kc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function Ci(a,l,n){const r=Yc(a),o=Jc(a),s=Array(a.length);for(let h=0,c=o.length;h<c;h++){let d=o[h];d.static||(d=i1(r,d,l,n),r.push(d)),s[a.findIndex(m=>m.i===d.i)]=d,d.moved=!1}return s}function i1(a,l,n,r){if(n)for(;l.y>0&&!Yi(a,l);)l.y--;else if(r){const s=r[l.i].y;for(;l.y>s&&!Yi(a,l);)l.y--}let o;for(;o=Yi(a,l);)l.y=o.y+o.h;return l}function o1(a,l){const n=Yc(a);for(let r=0,o=a.length;r<o;r++){const s=a[r];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)n.push(s);else for(;Yi(n,s);)s.y++}return a}function Bs(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function Yi(a,l){for(let n=0,r=a.length;n<r;n++)if(Kc(a[n],l))return a[n]}function Gc(a,l){return a.filter(n=>Kc(n,l))}function Yc(a){return a.filter(l=>l.static)}function Bt(a,l,n,r,o=!1,s=!1){if(l.static)return a;const h=l.x,c=l.y,d=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=Jc(a);d&&(m=m.reverse());const b=Gc(m,l);if(s&&b.length)return l.x=h,l.y=c,l.moved=!1,a;for(let u=0,C=b.length;u<C;u++){const M=b[u];M.moved||l.y>M.y&&l.y-M.y>M.h/4||(M.static?a=Ns(a,M,l,o):a=Ns(a,l,M,o))}return a}function Ns(a,l,n,r){if(r){const o={x:n.x,y:n.y,w:n.w,h:n.h};if(o.y=Math.max(l.y-n.h,0),!Yi(a,o))return Bt(a,n,void 0,o.y,!1)}return Bt(a,n,void 0,n.y+1,!1)}function s1(a,l,n,r){const o="translate3d("+l+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function c1(a,l,n,r){const o="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function u1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function d1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function Jc(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function p1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let o=0,s=a.length;o<s;o++){const h=a[o];for(let c=0;c<n.length;c++)if(typeof h[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+o+"]."+n[c]+" must be a number!");if(h.i===void 0||h.i===null)throw new Error("VueGridLayout: "+l+"["+o+"].i cannot be null!");if(typeof h.i!="number"&&typeof h.i!="string")throw new Error("VueGridLayout: "+l+"["+o+"].i must be a string or number!");if(r.indexOf(h.i)>=0)throw new Error("VueGridLayout: "+l+"["+o+"].i must be unique!");if(r.push(h.i),h.static!==void 0&&typeof h.static!="boolean")throw new Error("VueGridLayout: "+l+"["+o+"].static must be a boolean!")}}function f1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,o)=>`${n()}__${r}--${o}`}}function As(a){return h1(a)}function h1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),o=a.clientX+n.scrollLeft-r.left,s=a.clientY+n.scrollTop-r.top;return{x:o,y:s}}function zs(a,l,n,r){return v1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function v1(a){return typeof a=="number"&&!Number.isNaN(a)}function m1(a,l){const n=Zc(a);let r=n[0];for(let o=1,s=n.length;o<s;o++){const h=n[o];l>a[h]&&(r=h)}return r}function Xc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function y1(a,l,n,r,o,s,h){if(l[r])return Tt(l[r]);let c=a;const d=Zc(n),m=d.slice(d.indexOf(r));for(let b=0,u=m.length;b<u;b++){const C=m[b];if(l[C]){c=l[C];break}}return c=Tt(c||[]),Ci(o1(c,{cols:s}),h)}function Zc(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let g1="auto";function b1(){return typeof document<"u"}function Ms(){return b1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):g1}var Wi={exports:{}},k1=Wi.exports,Is;function x1(){return Is||(Is=1,function(a,l){(function(n,r){a.exports=r()})(k1,function(){function n(t,i){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);i&&(y=y.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),f.push.apply(f,y)}return f}function r(t){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?n(Object(f),!0).forEach(function(y){d(t,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(f,y))})}return t}function o(t){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(t)}function s(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function h(t,i){for(var f=0;f<i.length;f++){var y=i[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,W(y.key),y)}}function c(t,i,f){return i&&h(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,i,f){return(i=W(i))in t?Object.defineProperty(t,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[i]=f,t}function m(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&u(t,i)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},b(t)}function u(t,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,y){return f.__proto__=y,f},u(t,i)}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){var i=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 f,y=b(t);if(i){var _=b(this).constructor;f=Reflect.construct(y,arguments,_)}else f=y.apply(this,arguments);return function(O,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(O)}(this,f)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,f){var y=function(O,K){for(;!Object.prototype.hasOwnProperty.call(O,K)&&(O=b(O))!==null;);return O}(t,i);if(y){var _=Object.getOwnPropertyDescriptor(y,i);return _.get?_.get.call(arguments.length<3?t:f):_.value}},k.apply(this,arguments)}function W(t){var i=function(f,y){if(typeof f!="object"||f===null)return f;var _=f[Symbol.toPrimitive];if(_!==void 0){var O=_.call(f,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof i=="symbol"?i:i+""}var I=function(t){return!(!t||!t.Window)&&t instanceof t.Window},j=void 0,L=void 0;function E(t){j=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),L=t}function x(t){return I(t)?t:(t.ownerDocument||t).defaultView||L.window}typeof window<"u"&&window&&E(window);var w=function(t){return!!t&&o(t)==="object"},g=function(t){return typeof t=="function"},S={window:function(t){return t===L||I(t)},docFrag:function(t){return w(t)&&t.nodeType===11},object:w,func:g,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||o(t)!=="object")return!1;var i=x(t)||L;return/object|function/.test(typeof Element>"u"?"undefined":o(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return w(t)&&t.length!==void 0&&g(t.splice)}};function $(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function V(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var y=f.prepared.axis;if(y==="x"||y==="y"){var _=y==="x"?"y":"x";i.page[_]=f.coords.start.page[_],i.client[_]=f.coords.start.client[_],i.delta[_]=0}}}var ae={id:"actions/drag",install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.draggable=ae.draggable,i.map.drag=ae,i.methodDict.drag="draggable",y.actions.drag=ae.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":V,"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.buttons,_=f.options.drag;if(_&&_.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(t){return S.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):S.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:$,move:V,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Z=ae,me={init:function(t){var i=t;me.document=i.document,me.DocumentFragment=i.DocumentFragment||Ae,me.SVGElement=i.SVGElement||Ae,me.SVGSVGElement=i.SVGSVGElement||Ae,me.SVGElementInstance=i.SVGElementInstance||Ae,me.Element=i.Element||Ae,me.HTMLElement=i.HTMLElement||me.Element,me.Event=i.Event,me.Touch=i.Touch||Ae,me.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ae(){}var F=me,ne={init:function(t){var i=F.Element,f=t.navigator||{};ne.supportsTouch="ontouchstart"in t||S.func(t.DocumentTouch)&&F.document instanceof t.DocumentTouch,ne.supportsPointerEvent=f.pointerEnabled!==!1&&!!F.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(f.platform),ne.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ne.isIe9=/MSIE 9/.test(f.userAgent),ne.isOperaMobile=f.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(f.userAgent),ne.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?F.PointerEvent===t.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,ne.wheelEvent=F.document&&"onmousewheel"in F.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},J=ne;function ce(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function Te(t,i){for(;S.element(t);){if(fe(t,i))return t;t=$e(t)}return null}function $e(t){var i=t.parentNode;if(S.docFrag(i)){for(;(i=i.host)&&S.docFrag(i););return i}return i}function fe(t,i){return L!==j&&(i=i.replace(/\/deep\//g," ")),t[J.prefixedMatchesSelector](i)}var N=function(t){return t.parentNode||t.host};function te(t,i){for(var f,y=[],_=t;(f=N(_))&&_!==i&&f!==_.ownerDocument;)y.unshift(_),_=f;return y}function U(t,i,f){for(;S.element(t);){if(fe(t,i))return!0;if((t=$e(t))===f)return fe(t,i)}return!1}function Ce(t){return t.correspondingUseElement||t}function Me(t){var i=t instanceof F.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function Pe(t){var i,f=Me(t);if(!J.isIOS7&&f){var y={x:(i=(i=x(t))||L).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=y.x,f.right+=y.x,f.top+=y.y,f.bottom+=y.y}return f}function ra(t){for(var i=[];t;)i.push(t),t=$e(t);return i}function Ta(t){return!!S.string(t)&&(F.document.querySelector(t),!0)}function ee(t,i){for(var f in i)t[f]=i[f];return t}function pa(t,i,f){return t==="parent"?$e(f):t==="self"?i.getRect(f):Te(f,t)}function ue(t,i,f,y){var _=t;return S.string(_)?_=pa(_,i,f):S.func(_)&&(_=_.apply(void 0,y)),S.element(_)&&(_=Pe(_)),_}function ua(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Se(t){return!t||"x"in t&&"y"in t||((t=ee({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function se(t,i,f){t.left&&(i.left+=f.x),t.right&&(i.right+=f.x),t.top&&(i.top+=f.y),t.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Be(t,i,f){var y=f&&t.options[f];return ua(ue(y&&y.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function Ge(t,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ge){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},S.string(t)&&t.search(" ")!==-1&&(t=da(t)),S.array(t))return t.forEach(function(ge){return Ge(ge,i,f,y)}),y;if(S.object(t)&&(i=t,t=""),S.func(i)&&f(t))y[t]=y[t]||[],y[t].push(i);else if(S.array(i))for(var _=0,O=i;_<O.length;_++){var K=O[_];Ge(t,K,f,y)}else if(S.object(i))for(var Q in i)Ge(da(Q).map(function(ge){return"".concat(t).concat(ge)}),i[Q],f,y);return y}function da(t){return t.trim().split(/ +/)}var Ja=function(t,i){return Math.sqrt(t*t+i*i)},R=["webkit","moz"];function H(t,i){t.__set||(t.__set={});var f=function(_){if(R.some(function(O){return _.indexOf(O)===0}))return 1;typeof t[_]!="function"&&_!=="__set"&&Object.defineProperty(t,_,{get:function(){return _ in t.__set?t.__set[_]:t.__set[_]=i[_]},set:function(O){t.__set[_]=O},configurable:!0})};for(var y in i)f(y);return t}function X(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function he(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function de(t){return t instanceof F.Event||t instanceof F.Touch}function ma(t,i,f){return t=t||"page",(f=f||{}).x=i[t+"X"],f.y=i[t+"Y"],f}function oa(t,i){return i=i||{x:0,y:0},J.isOperaMobile&&de(t)?(ma("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):ma("page",t,i),i}function Ve(t){return S.number(t.pointerId)?t.pointerId:t.identifier}function _a(t,i,f){var y=i.length>1?ya(i):i[0];oa(y,t.page),function(_,O){O=O||{},J.isOperaMobile&&de(_)?ma("screen",_,O):ma("client",_,O)}(y,t.client),t.timeStamp=f}function ze(t){var i=[];return S.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ya(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var y=t[f];for(var _ in i)i[_]+=y[_]}for(var O in i)i[O]/=t.length;return i}function La(t){if(!t.length)return null;var i=ze(t),f=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),_=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:f,y,left:f,top:y,right:_,bottom:O,width:_-f,height:O-y}}function za(t,i){var f=i+"X",y=i+"Y",_=ze(t),O=_[0][f]-_[1][f],K=_[0][y]-_[1][y];return Ja(O,K)}function ha(t,i){var f=i+"X",y=i+"Y",_=ze(t),O=_[1][f]-_[0][f],K=_[1][y]-_[0][y];return 180*Math.atan2(K,O)/Math.PI}function Ca(t){return S.string(t.pointerType)?t.pointerType:S.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof F.Touch?"touch":"mouse"}function Ne(t){var i=S.func(t.composedPath)?t.composedPath():t.path;return[Ce(i?i[0]:t.target),Ce(t.currentTarget)]}var ye=function(){function t(i){s(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return c(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(ye.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Y=function(t,i){for(var f=0;f<i.length;f++){var y=i[f];t.push(y)}return t},xe=function(t){return Y([],t)},pe=function(t,i){for(var f=0;f<t.length;f++)if(i(t[f],f,t))return f;return-1},qe=function(t,i){return t[pe(t,i)]},sa=function(t){m(f,t);var i=M(f);function f(y,_,O){var K;s(this,f),(K=i.call(this,_._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ge=Q.element,Fe=Q.dropzone;return K.type=O,K.target=ge,K.currentTarget=ge,K.dropzone=Fe,K.dragEvent=_,K.relatedTarget=_.target,K.draggable=_.interactable,K.timeStamp=_.timeStamp,K}return c(f,[{key:"reject",value:function(){var y=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=_.activeDrops,K=pe(O,function(ge){var Fe=ge.dropzone,Ee=ge.element;return Fe===y.dropzone&&Ee===y.target});_.activeDrops.splice(K,1);var Q=new f(_,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(ye);function $a(t,i){for(var f=0,y=t.slice();f<y.length;f++){var _=y[f],O=_.dropzone,K=_.element;i.dropzone=O,i.target=K,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function Ma(t,i){for(var f=function(O,K){for(var Q=[],ge=0,Fe=O.interactables.list;ge<Fe.length;ge++){var Ee=Fe[ge];if(Ee.options.drop.enabled){var na=Ee.options.drop.accept;if(!(S.element(na)&&na!==K||S.string(na)&&!fe(K,na)||S.func(na)&&!na({dropzone:Ee,draggableElement:K})))for(var Da=0,Qa=Ee.getAllElements();Da<Qa.length;Da++){var Ka=Qa[Da];Ka!==K&&Q.push({dropzone:Ee,element:Ka,rect:Ee.getRect(Ka)})}}}return Q}(t,i),y=0;y<f.length;y++){var _=f[y];_.rect=_.dropzone.getRect(_.element)}return f}function Va(t,i,f){for(var y=t.dropState,_=t.interactable,O=t.element,K=[],Q=0,ge=y.activeDrops;Q<ge.length;Q++){var Fe=ge[Q],Ee=Fe.dropzone,na=Fe.element,Da=Fe.rect,Qa=Ee.dropCheck(i,f,_,O,na,Da);K.push(Qa?na:null)}var Ka=function(nl){for(var wl,gl,Tl,Ul=[],Bl=0;Bl<nl.length;Bl++){var Ll=nl[Bl],Ol=nl[wl];if(Ll&&Bl!==wl)if(Ol){var rn=N(Ll),or=N(Ol);if(rn!==Ll.ownerDocument)if(or!==Ll.ownerDocument)if(rn!==or){Ul=Ul.length?Ul:te(Ol);var cn=void 0;if(Ol instanceof F.HTMLElement&&Ll instanceof F.SVGElement&&!(Ll instanceof F.SVGSVGElement)){if(Ll===or)continue;cn=Ll.ownerSVGElement}else cn=Ll;for(var bn=te(cn,Ol.ownerDocument),Tn=0;bn[Tn]&&bn[Tn]===Ul[Tn];)Tn++;var bi=[bn[Tn-1],bn[Tn],Ul[Tn]];if(bi[0])for(var ii=bi[0].lastChild;ii;){if(ii===bi[1]){wl=Bl,Ul=bn;break}if(ii===bi[2])break;ii=ii.previousSibling}}else Tl=Ol,(parseInt(x(gl=Ll).getComputedStyle(gl).zIndex,10)||0)>=(parseInt(x(Tl).getComputedStyle(Tl).zIndex,10)||0)&&(wl=Bl);else wl=Bl}else wl=Bl}return wl}(K);return y.activeDrops[Ka]||null}function Ue(t,i,f){var y=t.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(_.activate=new sa(y,f,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),f.type==="dragend"&&(_.deactivate=new sa(y,f,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(_.leave=new sa(y,f,"dragleave"),f.dragLeave=_.leave.target=y.prev.element,f.prevDropzone=_.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(_.enter=new sa(y,f,"dragenter"),f.dragEnter=y.cur.element,f.dropzone=y.cur.dropzone)),f.type==="dragend"&&y.cur.dropzone&&(_.drop=new sa(y,f,"drop"),f.dropzone=y.cur.dropzone,f.relatedTarget=y.cur.element),f.type==="dragmove"&&y.cur.dropzone&&(_.move=new sa(y,f,"dropmove"),f.dropzone=y.cur.dropzone)),_}function Ie(t,i){var f=t.dropState,y=f.activeDrops,_=f.cur,O=f.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&_.dropzone.fire(i.enter),i.move&&_.dropzone.fire(i.move),i.drop&&_.dropzone.fire(i.drop),i.deactivate&&$a(y,i.deactivate),f.prev.dropzone=_.dropzone,f.prev.element=_.element}function aa(t,i){var f=t.interaction,y=t.iEvent,_=t.event;if(y.type==="dragmove"||y.type==="dragend"){var O=f.dropState;i.dynamicDrop&&(O.activeDrops=Ma(i,f.element));var K=y,Q=Va(f,K,_);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=Ue(f,0,K)}}var ke={id:"actions/drop",install:function(t){var i=t.actions,f=t.interactStatic,y=t.Interactable,_=t.defaults;t.usePlugin(Z),y.prototype.dropzone=function(O){return function(K,Q){if(S.object(Q)){if(K.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ge=Ge(Q.listeners),Fe=Object.keys(ge).reduce(function(na,Da){return na[/^(enter|leave)/.test(Da)?"drag".concat(Da):/^(activate|deactivate|move)/.test(Da)?"drop".concat(Da):Da]=ge[Da],na},{}),Ee=K.options.drop.listeners;Ee&&K.off(Ee),K.on(Fe),K.options.drop.listeners=Fe}return S.func(Q.ondrop)&&K.on("drop",Q.ondrop),S.func(Q.ondropactivate)&&K.on("dropactivate",Q.ondropactivate),S.func(Q.ondropdeactivate)&&K.on("dropdeactivate",Q.ondropdeactivate),S.func(Q.ondragenter)&&K.on("dragenter",Q.ondragenter),S.func(Q.ondragleave)&&K.on("dragleave",Q.ondragleave),S.func(Q.ondropmove)&&K.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?K.options.drop.overlap=Q.overlap:S.number(Q.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(K.options.drop.accept=Q.accept),"checker"in Q&&(K.options.drop.checker=Q.checker),K}return S.bool(Q)?(K.options.drop.enabled=Q,K):K.options.drop}(this,O)},y.prototype.dropCheck=function(O,K,Q,ge,Fe,Ee){return function(na,Da,Qa,Ka,nl,wl,gl){var Tl=!1;if(!(gl=gl||na.getRect(wl)))return!!na.options.drop.checker&&na.options.drop.checker(Da,Qa,Tl,na,wl,Ka,nl);var Ul=na.options.drop.overlap;if(Ul==="pointer"){var Bl=Be(Ka,nl,"drag"),Ll=oa(Da);Ll.x+=Bl.x,Ll.y+=Bl.y;var Ol=Ll.x>gl.left&&Ll.x<gl.right,rn=Ll.y>gl.top&&Ll.y<gl.bottom;Tl=Ol&&rn}var or=Ka.getRect(nl);if(or&&Ul==="center"){var cn=or.left+or.width/2,bn=or.top+or.height/2;Tl=cn>=gl.left&&cn<=gl.right&&bn>=gl.top&&bn<=gl.bottom}return or&&S.number(Ul)&&(Tl=Math.max(0,Math.min(gl.right,or.right)-Math.max(gl.left,or.left))*Math.max(0,Math.min(gl.bottom,or.bottom)-Math.max(gl.top,or.top))/(or.width*or.height)>=Ul),na.options.drop.checker&&(Tl=na.options.drop.checker(Da,Qa,Tl,na,wl,Ka,nl)),Tl}(this,O,K,Q,ge,Fe,Ee)},f.dynamicDrop=function(O){return S.bool(O)?(t.dynamicDrop=O,f):t.dynamicDrop},ee(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,_.actions.drop=ke.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var f=t.interaction,y=(t.event,t.iEvent);if(f.prepared.name==="drag"){var _=f.dropState;_.activeDrops=[],_.events={},_.activeDrops=Ma(i,f.element),_.events=Ue(f,0,y),_.events.activate&&($a(_.activeDrops,_.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:y}))}},"interactions:action-move":aa,"interactions:after-action-move":function(t,i){var f=t.interaction,y=t.iEvent;if(f.prepared.name==="drag"){var _=f.dropState;Ie(f,_.events),i.fire("actions/drop:move",{interaction:f,dragEvent:y}),_.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var f=t.interaction,y=t.iEvent;aa(t,i),Ie(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:y})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:Ma,getDrop:Va,getDropEvents:Ue,fireDropEvents:Ie,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},We=ke;function tl(t){var i=t.interaction,f=t.iEvent,y=t.phase;if(i.prepared.name==="gesture"){var _=i.pointers.map(function(Fe){return Fe.pointer}),O=y==="start",K=y==="end",Q=i.interactable.options.deltaSource;if(f.touches=[_[0],_[1]],O)f.distance=za(_,Q),f.box=La(_),f.scale=1,f.ds=0,f.angle=ha(_,Q),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(K||i.pointers.length<2){var ge=i.prevEvent;f.distance=ge.distance,f.box=ge.box,f.scale=ge.scale,f.ds=0,f.angle=ge.angle,f.da=0}else f.distance=za(_,Q),f.box=La(_),f.scale=f.distance/i.gesture.startDistance,f.angle=ha(_,Q),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,S.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var Cl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.gesturable=function(_){return S.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):S.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},i.map.gesture=Cl,i.methodDict.gesture="gesturable",y.actions.gesture=Cl.defaults},listeners:{"interactions:action-start":tl,"interactions:action-move":tl,"interactions:action-end":tl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},El=Cl;function Vl(t,i,f,y,_,O,K){if(!i)return!1;if(i===!0){var Q=S.number(O.width)?O.width:O.right-O.left,ge=S.number(O.height)?O.height:O.bottom-O.top;if(K=Math.min(K,Math.abs((t==="left"||t==="right"?Q:ge)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),ge<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Fe=Q>=0?O.left:O.right;return f.x<Fe+K}if(t==="top"){var Ee=ge>=0?O.top:O.bottom;return f.y<Ee+K}if(t==="right")return f.x>(Q>=0?O.right:O.left)-K;if(t==="bottom")return f.y>(ge>=0?O.bottom:O.top)-K}return!!S.element(y)&&(S.element(i)?i===y:U(y,i,_))}function _l(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var y=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=f.resizeAxes,f.resizeAxes==="x"?y.delta.y=0:f.resizeAxes==="y"&&(y.delta.x=0))}}var jl,Qe,Xa={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,f=t.browser,y=t.Interactable,_=t.defaults;Xa.cursors=function(O){return O.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"}}(f),Xa.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(K,Q,ge){return S.object(Q)?(K.options.resize.enabled=Q.enabled!==!1,K.setPerAction("resize",Q),K.setOnEvents("resize",Q),S.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?K.options.resize.axis=Q.axis:Q.axis===null&&(K.options.resize.axis=ge.defaults.actions.resize.axis),S.bool(Q.preserveAspectRatio)?K.options.resize.preserveAspectRatio=Q.preserveAspectRatio:S.bool(Q.square)&&(K.options.resize.square=Q.square),K):S.bool(Q)?(K.options.resize.enabled=Q,K):K.options.resize}(this,O,t)},i.map.resize=Xa,i.methodDict.resize="resizable",_.actions.resize=Xa.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.rect;y._rects={start:ee({},O),corrected:ee({},O),previous:ee({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=y.prepared.edges,_.rect=y._rects.corrected,_.deltaRect=y._rects.delta}})(t),_l(t)},"interactions:action-move":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.interactable.options.resize.invert,K=O==="reposition"||O==="negate",Q=y.rect,ge=y._rects,Fe=ge.start,Ee=ge.corrected,na=ge.delta,Da=ge.previous;if(ee(Da,Ee),K){if(ee(Ee,Q),O==="reposition"){if(Ee.top>Ee.bottom){var Qa=Ee.top;Ee.top=Ee.bottom,Ee.bottom=Qa}if(Ee.left>Ee.right){var Ka=Ee.left;Ee.left=Ee.right,Ee.right=Ka}}}else Ee.top=Math.min(Q.top,Fe.bottom),Ee.bottom=Math.max(Q.bottom,Fe.top),Ee.left=Math.min(Q.left,Fe.right),Ee.right=Math.max(Q.right,Fe.left);for(var nl in Ee.width=Ee.right-Ee.left,Ee.height=Ee.bottom-Ee.top,Ee)na[nl]=Ee[nl]-Da[nl];_.edges=y.prepared.edges,_.rect=Ee,_.deltaRect=na}})(t),_l(t)},"interactions:action-end":function(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var y=i;y.edges=f.prepared.edges,y.rect=f._rects.corrected,y.deltaRect=f._rects.delta}},"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.element,_=t.rect,O=t.buttons;if(_){var K=ee({},i.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(S.object(Q.edges)){var ge={left:!1,right:!1,top:!1,bottom:!1};for(var Fe in ge)ge[Fe]=Vl(Fe,Q.edges[Fe],K,i._latestPointer.eventTarget,y,_,Q.margin||Xa.defaultMargin);ge.left=ge.left&&!ge.right,ge.top=ge.top&&!ge.bottom,(ge.left||ge.right||ge.top||ge.bottom)&&(t.action={name:"resize",edges:ge})}else{var Ee=Q.axis!=="y"&&K.x>_.right-Xa.defaultMargin,na=Q.axis!=="x"&&K.y>_.bottom-Xa.defaultMargin;(Ee||na)&&(t.action={name:"resize",axes:(Ee?"x":"")+(na?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,f=t.axis,y=t.name,_=Xa.cursors,O=null;if(f)O=_[y+f];else if(i){for(var K="",Q=0,ge=["top","bottom","left","right"];Q<ge.length;Q++){var Fe=ge[Q];i[Fe]&&(K+=Fe)}O=_[K]}return O},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},ba=Xa,ll={id:"actions",install:function(t){t.usePlugin(El),t.usePlugin(ba),t.usePlugin(Z),t.usePlugin(We)}},Ia=0,il={request:function(t){return jl(t)},cancel:function(t){return Qe(t)},init:function(t){if(jl=t.requestAnimationFrame,Qe=t.cancelAnimationFrame,!jl)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var y=i[f];jl=t["".concat(y,"RequestAnimationFrame")],Qe=t["".concat(y,"CancelAnimationFrame")]||t["".concat(y,"CancelRequestAnimationFrame")]}jl=jl&&jl.bind(t),Qe=Qe&&Qe.bind(t),jl||(jl=function(_){var O=Date.now(),K=Math.max(0,16-(O-Ia)),Q=t.setTimeout(function(){_(O+K)},K);return Ia=O+K,Q},Qe=function(_){return clearTimeout(_)})}},rl={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(t){rl.isScrolling=!0,il.cancel(rl.i),t.autoScroll=rl,rl.interaction=t,rl.prevTime=rl.now(),rl.i=il.request(rl.scroll)},stop:function(){rl.isScrolling=!1,rl.interaction&&(rl.interaction.autoScroll=null),il.cancel(rl.i)},scroll:function(){var t=rl.interaction,i=t.interactable,f=t.element,y=t.prepared.name,_=i.options[y].autoScroll,O=_e(_.container,i,f),K=rl.now(),Q=(K-rl.prevTime)/1e3,ge=_.speed*Q;if(ge>=1){var Fe={x:rl.x*ge,y:rl.y*ge};if(Fe.x||Fe.y){var Ee=Oa(O);S.window(O)?O.scrollBy(Fe.x,Fe.y):O&&(O.scrollLeft+=Fe.x,O.scrollTop+=Fe.y);var na=Oa(O),Da={x:na.x-Ee.x,y:na.y-Ee.y};(Da.x||Da.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:Da,interaction:t,container:O})}rl.prevTime=K}rl.isScrolling&&(il.cancel(rl.i),rl.i=il.request(rl.scroll))},check:function(t,i){var f;return(f=t.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var i=t.interaction,f=t.pointer;if(i.interacting()&&rl.check(i.interactable,i.prepared.name))if(i.simulation)rl.x=rl.y=0;else{var y,_,O,K,Q=i.interactable,ge=i.element,Fe=i.prepared.name,Ee=Q.options[Fe].autoScroll,na=_e(Ee.container,Q,ge);if(S.window(na))K=f.clientX<rl.margin,y=f.clientY<rl.margin,_=f.clientX>na.innerWidth-rl.margin,O=f.clientY>na.innerHeight-rl.margin;else{var Da=Me(na);K=f.clientX<Da.left+rl.margin,y=f.clientY<Da.top+rl.margin,_=f.clientX>Da.right-rl.margin,O=f.clientY>Da.bottom-rl.margin}rl.x=_?1:K?-1:0,rl.y=O?1:y?-1:0,rl.isScrolling||(rl.margin=Ee.margin,rl.speed=Ee.speed,rl.start(i))}}};function _e(t,i,f){return(S.string(t)?pa(t,i,f):t)||x(f)}function Oa(t){return S.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Je={id:"auto-scroll",install:function(t){var i=t.defaults,f=t.actions;t.autoScroll=rl,rl.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=rl.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,rl.stop(),rl.interaction&&(rl.interaction=null)},"interactions:stop":rl.stop,"interactions:action-move":function(t){return rl.onInteractionMove(t)}}},ie=Je;function Xe(t,i){var f=!1;return function(){return f||(L.console.warn(i),f=!0),t.apply(this,arguments)}}function Aa(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function Ze(t){return S.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wa(t){return S.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Fa={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(f,y,_,O){var K=function(Q,ge,Fe,Ee,na){var Da=Q.getRect(Ee),Qa=ge.buttons||{0:1,1:4,3:8,4:16}[ge.button],Ka={action:null,interactable:Q,interaction:Fe,element:Ee,rect:Da,buttons:Qa};return na.fire("auto-start:check",Ka),Ka.action}(this,y,_,O,t);return this.options.actionChecker?this.options.actionChecker(f,y,K,this,O,_):K},i.prototype.ignoreFrom=Xe(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=Xe(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=wa,i.prototype.styleCursor=Ze}};function Za(t,i,f,y,_){return i.testIgnoreAllow(i.options[t.name],f,y)&&i.options[t.name].enabled&&cl(i,f,t,_)?t:null}function He(t,i,f,y,_,O,K){for(var Q=0,ge=y.length;Q<ge;Q++){var Fe=y[Q],Ee=_[Q],na=Fe.getAction(i,f,t,Ee);if(na){var Da=Za(na,Fe,Ee,O,K);if(Da)return{action:Da,interactable:Fe,element:Ee}}}return{action:null,interactable:null,element:null}}function va(t,i,f,y,_){var O=[],K=[],Q=y;function ge(Ee){O.push(Ee),K.push(Q)}for(;S.element(Q);){O=[],K=[],_.interactables.forEachMatch(Q,ge);var Fe=He(t,i,f,O,K,y,_);if(Fe.action&&!Fe.interactable.options[Fe.action.name].manualStart)return Fe;Q=$e(Q)}return{action:null,interactable:null,element:null}}function ca(t,i,f){var y=i.action,_=i.interactable,O=i.element;y=y||{name:null},t.interactable=_,t.element=O,Aa(t.prepared,y),t.rect=_&&y.name?_.getRect(O):null,ul(t,f),f.fire("autoStart:prepared",{interaction:t})}function cl(t,i,f,y){var _=t.options,O=_[f.name].max,K=_[f.name].maxPerElement,Q=y.autoStart.maxInteractions,ge=0,Fe=0,Ee=0;if(!(O&&K&&Q))return!1;for(var na=0,Da=y.interactions.list;na<Da.length;na++){var Qa=Da[na],Ka=Qa.prepared.name;if(Qa.interacting()&&(++ge>=Q||Qa.interactable===t&&((Fe+=Ka===f.name?1:0)>=O||Qa.element===i&&(Ee++,Ka===f.name&&Ee>=K))))return!1}return Q>0}function Le(t,i){return S.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function ja(t,i,f){var y=f.autoStart.cursorElement;y&&y!==t&&(y.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,f.autoStart.cursorElement=i?t:null}function ul(t,i){var f=t.interactable,y=t.element,_=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var O="";if(_.name){var K=f.options[_.name].cursorChecker;O=S.func(K)?K(_,f,y,t._interacting):i.actions.map[_.name].getCursor(_)}ja(t.element,O||"",i)}else i.autoStart.cursorElement&&ja(i.autoStart.cursorElement,"",i)}var hr={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,f=t.defaults;t.usePlugin(Fa),f.base.actionChecker=null,f.base.styleCursor=!0,ee(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Le(y,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:cl,cursorElement:null}},listeners:{"interactions:down":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;f.interacting()||ca(f,va(f,y,_,O,i),i)},"interactions:move":function(t,i){(function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||ca(_,va(_,O,K,Q,y),y)})(t,i),function(f,y){var _=f.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){y.fire("autoStart:before-start",f);var O=_.interactable,K=_.prepared.name;K&&O&&(O.options[K].manualStart||!cl(O,_.element,_.prepared,y)?_.stop():(_.start(_.prepared,O,_.element),ul(_,y)))}}(t,i)},"interactions:stop":function(t,i){var f=t.interaction,y=f.interactable;y&&y.options.styleCursor&&ja(f.element,"",i)}},maxInteractions:Le,withinInteractionLimit:cl,validateAction:Za},dr=hr,Ql={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var f=t.interaction,y=t.eventTarget,_=t.dx,O=t.dy;if(f.prepared.name==="drag"){var K=Math.abs(_),Q=Math.abs(O),ge=f.interactable.options.drag,Fe=ge.startAxis,Ee=K>Q?"x":K<Q?"y":"xy";if(f.prepared.axis=ge.lockAxis==="start"?Ee[0]:ge.lockAxis,Ee!=="xy"&&Fe!=="xy"&&Fe!==Ee){f.prepared.name=null;for(var na=y,Da=function(Ka){if(Ka!==f.interactable){var nl=f.interactable.options.drag;if(!nl.manualStart&&Ka.testIgnoreAllow(nl,na,y)){var wl=Ka.getAction(f.downPointer,f.downEvent,f,na);if(wl&&wl.name==="drag"&&function(gl,Tl){if(!Tl)return!1;var Ul=Tl.options.drag.startAxis;return gl==="xy"||Ul==="xy"||Ul===gl}(Ee,Ka)&&dr.validateAction(wl,Ka,na,y,i))return Ka}}};S.element(na);){var Qa=i.interactables.forEachMatch(na,Da);if(Qa){f.prepared.name="drag",f.interactable=Qa,f.element=na;break}na=$e(na)}}}}}};function nr(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var f=t.interactable.options;return f[i].hold||f[i].delay}var pr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(dr),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,f=nr(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(t){var i=t.interaction,f=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;nr(i)>0&&(i.prepared.name=null)}},getHoldDuration:nr},gr=pr,Oe={id:"auto-start",install:function(t){t.usePlugin(dr),t.usePlugin(gr),t.usePlugin(Ql)}},er=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):S.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Sr(t){var i=t.interaction,f=t.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var Mr={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=er,i.prototype.checkAndPreventDefault=function(f){return function(y,_,O){var K=y.options.preventDefault;if(K!=="never")if(K!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=x(O.target).document,ge=_.getDocOptions(Q);if(!ge||!ge.events||ge.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||S.element(O.target)&&fe(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var y=0,_=t.interactions.list;y<_.length;y++){var O=_[y];if(O.element&&(O.element===f.target||ce(O.element,f.target)))return void O.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=Sr,t},{})};function zl(t,i){if(i.phaselessTypes[t])return!0;for(var f in i.map)if(t.indexOf(f)===0&&t.substr(f.length)in i.phases)return!0;return!1}function Nr(t){var i={};for(var f in t){var y=t[f];S.plainObject(y)?i[f]=Nr(y):S.array(y)?i[f]=xe(y):i[f]=y}return i}var qr=function(){function t(i){s(this,t),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=i,this.result=Kl(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(t,[{key:"start",value:function(i,f){var y,_,O=i.phase,K=this.interaction,Q=function(Fe){var Ee=Fe.interactable.options[Fe.prepared.name],na=Ee.modifiers;return na&&na.length?na:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Da){var Qa=Ee[Da];return Qa&&Qa.enabled&&{options:Qa,methods:Qa._methods}}).filter(function(Da){return!!Da})}(K);this.prepareStates(Q),this.startEdges=ee({},K.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=K.rect,_=f,y?{left:_.x-y.left,top:_.y-y.top,right:y.right-_.x,bottom:y.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ge=this.fillArg({phase:O,pageCoords:f,preEnd:!1});return this.result=Kl(),this.startAll(ge),this.result=this.setAll(ge)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,y=this.states;f<y.length;f++){var _=y[f];_.methods.start&&(i.state=_,_.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,y=i.preEnd,_=i.skipModifiers,O=i.rect,K=i.edges;i.coords=ee({},i.pageCoords),i.rect=ee({},O),i.edges=ee({},K);for(var Q=_?this.states.slice(_):this.states,ge=Kl(i.coords,i.rect),Fe=0;Fe<Q.length;Fe++){var Ee,na=Q[Fe],Da=na.options,Qa=ee({},i.coords),Ka=null;(Ee=na.methods)!=null&&Ee.set&&this.shouldDo(Da,y,f)&&(i.state=na,Ka=na.methods.set(i),se(i.edges,i.rect,{x:i.coords.x-Qa.x,y:i.coords.y-Qa.y})),ge.eventProps.push(Ka)}ee(this.edges,i.edges),ge.delta.x=i.coords.x-i.pageCoords.x,ge.delta.y=i.coords.y-i.pageCoords.y,ge.rectDelta.left=i.rect.left-O.left,ge.rectDelta.right=i.rect.right-O.right,ge.rectDelta.top=i.rect.top-O.top,ge.rectDelta.bottom=i.rect.bottom-O.bottom;var nl=this.result.coords,wl=this.result.rect;if(nl&&wl){var gl=ge.rect.left!==wl.left||ge.rect.right!==wl.right||ge.rect.top!==wl.top||ge.rect.bottom!==wl.bottom;ge.changed=gl||nl.x!==ge.coords.x||nl.y!==ge.coords.y}return ge}},{key:"applyToInteraction",value:function(i){var f=this.interaction,y=i.phase,_=f.coords.cur,O=f.coords.start,K=this.result,Q=this.startDelta,ge=K.delta;y==="start"&&ee(this.startDelta,K.delta);for(var Fe=0,Ee=[[O,Q],[_,ge]];Fe<Ee.length;Fe++){var na=Ee[Fe],Da=na[0],Qa=na[1];Da.page.x+=Qa.x,Da.page.y+=Qa.y,Da.client.x+=Qa.x,Da.client.y+=Qa.y}var Ka=this.result.rectDelta,nl=i.rect||f.rect;nl.left+=Ka.left,nl.right+=Ka.right,nl.top+=Ka.top,nl.bottom+=Ka.bottom,nl.width=nl.right-nl.left,nl.height=nl.bottom-nl.top}},{key:"setAndApply",value:function(i){var f=this.interaction,y=i.phase,_=i.preEnd,O=i.skipModifiers,K=this.setAll(this.fillArg({preEnd:_,phase:y,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=K,!K.changed&&(!O||O<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var Q=f.coords.cur.page,ge={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};K.coords.x+=ge.x,K.coords.y+=ge.y,K.delta.x+=ge.x,K.delta.y+=ge.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,y=i.event,_=this.states;if(_&&_.length){for(var O=!1,K=0;K<_.length;K++){var Q=_[K];i.state=Q;var ge=Q.options,Fe=Q.methods,Ee=Fe.beforeEnd&&Fe.beforeEnd(i);if(Ee)return this.endResult=Ee,!1;O=O||!O&&this.shouldDo(ge,!0,i.phase,!0)}O&&f.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(y);for(var _=0,O=this.states;_<O.length;_++){var K=O[_];y.state=K,K.methods.stop&&K.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var y=i[f],_=y.options,O=y.methods,K=y.name;this.states.push({options:_,methods:O,index:f,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,y=f.coords,_=f.rect,O=f.modification;if(O.result){for(var K=O.startDelta,Q=O.result,ge=Q.delta,Fe=Q.rectDelta,Ee=0,na=[[y.start,K],[y.cur,ge]];Ee<na.length;Ee++){var Da=na[Ee],Qa=Da[0],Ka=Da[1];Qa.page.x-=Ka.x,Qa.page.y-=Ka.y,Qa.client.x-=Ka.x,Qa.client.y-=Ka.y}_.left-=Fe.left,_.right-=Fe.right,_.top-=Fe.top,_.bottom-=Fe.bottom}}},{key:"shouldDo",value:function(i,f,y,_){return!(!i||i.enabled===!1||_&&!i.endOnly||i.endOnly&&!f||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Nr(f)}),this.result=Kl(ee({},i.result.coords),ee({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Kl(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function br(t,i){var f=t.defaults,y={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},_=function(O){var K=O||{};for(var Q in K.enabled=K.enabled!==!1,f)Q in K||(K[Q]=f[Q]);var ge={options:K,methods:y,name:i,enable:function(){return K.enabled=!0,ge},disable:function(){return K.enabled=!1,ge}};return ge};return i&&typeof i=="string"&&(_._defaults=f,_._methods=y),_}function $r(t){var i=t.iEvent,f=t.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var jr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new qr(i)},"interactions:before-action-start":function(t){var i=t.interaction,f=t.interaction.modification;f.start(t,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,f=i.modification,y=f.setAndApply(t);return i.edges=f.edges,y},"interactions:before-action-end":function(t){var i=t.interaction,f=i.modification,y=f.beforeEnd(t);return i.edges=f.startEdges,y},"interactions:action-start":$r,"interactions:action-move":$r,"interactions:action-end":$r,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Pl=jr,lr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Wr=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ge,Fe){var Ee;s(this,f),(Ee=i.call(this,y)).relatedTarget=null,Ee.screenX=void 0,Ee.screenY=void 0,Ee.button=void 0,Ee.buttons=void 0,Ee.ctrlKey=void 0,Ee.shiftKey=void 0,Ee.altKey=void 0,Ee.metaKey=void 0,Ee.page=void 0,Ee.client=void 0,Ee.delta=void 0,Ee.rect=void 0,Ee.x0=void 0,Ee.y0=void 0,Ee.t0=void 0,Ee.dt=void 0,Ee.duration=void 0,Ee.clientX0=void 0,Ee.clientY0=void 0,Ee.velocity=void 0,Ee.speed=void 0,Ee.swipe=void 0,Ee.axes=void 0,Ee.preEnd=void 0,Q=Q||y.element;var na=y.interactable,Da=(na&&na.options||lr).deltaSource,Qa=Be(na,Q,O),Ka=K==="start",nl=K==="end",wl=Ka?C(Ee):y.prevEvent,gl=Ka?y.coords.start:nl?{page:wl.page,client:wl.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return Ee.page=ee({},gl.page),Ee.client=ee({},gl.client),Ee.rect=ee({},y.rect),Ee.timeStamp=gl.timeStamp,nl||(Ee.page.x-=Qa.x,Ee.page.y-=Qa.y,Ee.client.x-=Qa.x,Ee.client.y-=Qa.y),Ee.ctrlKey=_.ctrlKey,Ee.altKey=_.altKey,Ee.shiftKey=_.shiftKey,Ee.metaKey=_.metaKey,Ee.button=_.button,Ee.buttons=_.buttons,Ee.target=Q,Ee.currentTarget=Q,Ee.preEnd=ge,Ee.type=Fe||O+(K||""),Ee.interactable=na,Ee.t0=Ka?y.pointers[y.pointers.length-1].downTime:wl.t0,Ee.x0=y.coords.start.page.x-Qa.x,Ee.y0=y.coords.start.page.y-Qa.y,Ee.clientX0=y.coords.start.client.x-Qa.x,Ee.clientY0=y.coords.start.client.y-Qa.y,Ee.delta=Ka||nl?{x:0,y:0}:{x:Ee[Da].x-wl[Da].x,y:Ee[Da].y-wl[Da].y},Ee.dt=y.coords.delta.timeStamp,Ee.duration=Ee.timeStamp-Ee.t0,Ee.velocity=ee({},y.coords.velocity[Da]),Ee.speed=Ja(Ee.velocity.x,Ee.velocity.y),Ee.swipe=nl||K==="inertiastart"?Ee.getSwipe():null,Ee}return c(f,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var O=112.5<=_&&_<247.5,K=202.5<=_&&_<337.5;return{up:K,down:!K&&22.5<=_&&_<157.5,left:O,right:!O&&(292.5<=_||_<67.5),angle:_,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(ye);Object.defineProperties(Wr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Ur=c(function t(i,f,y,_,O){s(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=f,this.event=y,this.downTime=_,this.downTarget=O}),Vr=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),Kr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),an=0,hn=function(){function t(i){var f=this,y=i.pointerType,_=i.scopeFire;s(this,t),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=Xe(function(Ee){this.move(Ee)},"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=an++,this._scopeFire=_,this.pointerType=y;var O=this;this._proxy={};var K=function(Ee){Object.defineProperty(f._proxy,Ee,{get:function(){return O[Ee]}})};for(var Q in Vr)K(Q);var ge=function(Ee){Object.defineProperty(f._proxy,Ee,{value:function(){return O[Ee].apply(O,arguments)}})};for(var Fe in Kr)ge(Fe);this._scopeFire("interactions:new",{interaction:this})}return c(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,y){var _=this.updatePointer(i,f,y,!0),O=this.pointers[_];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:y,pointerIndex:_,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,f,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(Aa(this.prepared,i),this.interactable=f,this.element=y,this.rect=f.getRect(y),this.edges=this.prepared.edges?ee({},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(i,f,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,y,!1);var _,O,K=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&&(_=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ja(_,O)>this.pointerMoveTolerance);var Q,ge,Fe,Ee=this.getPointerIndex(i),na={pointer:i,pointerIndex:Ee,pointerInfo:this.pointers[Ee],event:f,type:"move",eventTarget:y,dx:_,dy:O,duplicate:K,interaction:this};K||(Q=this.coords.velocity,ge=this.coords.delta,Fe=Math.max(ge.timeStamp/1e3,.001),Q.page.x=ge.page.x/Fe,Q.page.y=ge.page.y/Fe,Q.client.x=ge.client.x/Fe,Q.client.y=ge.client.y/Fe,Q.timeStamp=Fe),this._scopeFire("interactions:move",na),K||this.simulation||(this.interacting()&&(na.type=null,this.move(na)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||he(this.coords.delta),(i=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,f,y,_){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,f,y,!1));var K=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:f,eventTarget:y,type:K,curEventTarget:_,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!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(i){var f=Ve(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:pe(this.pointers,function(y){return y.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,y,_){var O,K,Q,ge=Ve(i),Fe=this.getPointerIndex(i),Ee=this.pointers[Fe];return _=_!==!1&&(_||/(down|start)$/i.test(f.type)),Ee?Ee.pointer=i:(Ee=new Ur(ge,i,f,null,null),Fe=this.pointers.length,this.pointers.push(Ee)),_a(this.coords.cur,this.pointers.map(function(na){return na.pointer}),this._now()),O=this.coords.delta,K=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-K.page.x,O.page.y=Q.page.y-K.page.y,O.client.x=Q.client.x-K.client.x,O.client.y=Q.client.y-K.client.y,O.timeStamp=Q.timeStamp-K.timeStamp,_&&(this.pointerIsDown=!0,Ee.downTime=this.coords.cur.timeStamp,Ee.downTarget=y,H(this.downPointer,i),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:y,down:_,pointerInfo:Ee,pointerIndex:Fe,interaction:this}),Fe}},{key:"removePointer",value:function(i,f){var y=this.getPointerIndex(i);if(y!==-1){var _=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:y,pointerInfo:_,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,y){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,y,_){return new Wr(this,i,this.prepared.name,f,this.element,y,_)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,y=i.phase,_=i.preEnd,O=i.type,K=this.rect;if(K&&y==="move"&&(se(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(f,y,_,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Jl(t){vr(t.interaction)}function vr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var i=t.offset.pending;return vl(t.coords.cur,i),vl(t.coords.delta,i),se(t.edges,t.rect,i),i.x=0,i.y=0,!0}function Jr(t){var i=t.x,f=t.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function vl(t,i){var f=t.page,y=t.client,_=i.x,O=i.y;f.x+=_,f.y+=O,y.x+=_,y.y+=O}Kr.offsetBy="";var ir={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Jr},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(vl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Jl,"interactions:before-action-move":Jl,"interactions:before-action-end":function(t){var i=t.interaction;if(vr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Rl=ir,Er=function(){function t(i){s(this,t),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=i}return c(t,[{key:"start",value:function(i){var f=this.interaction,y=Hl(f);if(!y||!y.enabled)return!1;var _=f.coords.velocity.client,O=Ja(_.x,_.y),K=this.modification||(this.modification=new qr(f));if(K.copyFrom(f.modification),this.t0=f._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,y=Hl(this.interaction),_=y.resistance,O=-Math.log(y.endSpeed/this.v0)/_;this.targetOffset={x:(f.x-O)/_,y:(f.y-O)/_},this.te=O,this.lambda_v0=_/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var K=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(Q),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=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 i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=il.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,y,_,O,K,Q,ge=this,Fe=this.interaction,Ee=Hl(Fe).resistance,na=(Fe._now()-this.t0)/1e3;if(na<this.te){var Da,Qa=1-(Math.exp(-Ee*na)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,y=this.targetOffset.x,_=this.targetOffset.y,O=this.modifiedOffset.x,K=this.modifiedOffset.y,Da={x:ar(Q=Qa,i,y,O),y:ar(Q,f,_,K)}):Da={x:this.targetOffset.x*Qa,y:this.targetOffset.y*Qa};var Ka={x:Da.x-this.currentOffset.x,y:Da.y-this.currentOffset.y};this.currentOffset.x+=Ka.x,this.currentOffset.y+=Ka.y,Fe.offsetBy(Ka),Fe.move(),this.onNextFrame(function(){return ge.inertiaTick()})}else Fe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,y=f._now()-this.t0,_=Hl(f).smoothEndDuration;if(y<_){var O={x:Xr(y,0,this.targetOffset.x,_),y:Xr(y,0,this.targetOffset.y,_)},K={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,f.offsetBy(K),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,y=i.event,_=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(f,y,_,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),X(O.coords.prev,O.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,il.cancel(this.timeout)}}]),t}();function Hl(t){var i=t.interactable,f=t.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var mr={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(Rl),t.usePlugin(Pl),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new Er(i)},"interactions:before-action-end":function(t){var i=t.interaction,f=t.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(t){var i=t.interaction,f=t.eventTarget,y=i.inertia;if(y.active)for(var _=f;S.element(_);){if(_===i.element){y.resume(t);break}_=$e(_)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":$r,"interactions:action-inertiastart":$r,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function ar(t,i,f,y){var _=1-t;return _*_*i+2*_*t*f+t*t*y}function Xr(t,i,f,y){return-f*(t/=y)*(t-2)+i}var sn=mr;function Cn(t,i){for(var f=0;f<i.length;f++){var y=i[f];if(t.immediatePropagationStopped)break;y(t)}}var Jn=function(){function t(i){s(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},i||{})}return c(t,[{key:"fire",value:function(i){var f,y=this.global;(f=this.types[i.type])&&Cn(i,f),!i.propagationStopped&&y&&(f=y[i.type])&&Cn(i,f)}},{key:"on",value:function(i,f){var y=Ge(i,f);for(i in y)this.types[i]=Y(this.types[i]||[],y[i])}},{key:"off",value:function(i,f){var y=Ge(i,f);for(i in y){var _=this.types[i];if(_&&_.length)for(var O=0,K=y[i];O<K.length;O++){var Q=K[O],ge=_.indexOf(Q);ge!==-1&&_.splice(ge,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),Fn=function(){function t(i){s(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return c(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Dn(t){return S.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function In(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var jn={id:"events",install:function(t){var i,f=[],y={},_=[],O={add:K,remove:Q,addDelegate:function(Ee,na,Da,Qa,Ka){var nl=Dn(Ka);if(!y[Da]){y[Da]=[];for(var wl=0;wl<_.length;wl++){var gl=_[wl];K(gl,Da,ge),K(gl,Da,Fe,!0)}}var Tl=y[Da],Ul=qe(Tl,function(Bl){return Bl.selector===Ee&&Bl.context===na});Ul||(Ul={selector:Ee,context:na,listeners:[]},Tl.push(Ul)),Ul.listeners.push({func:Qa,options:nl})},removeDelegate:function(Ee,na,Da,Qa,Ka){var nl,wl=Dn(Ka),gl=y[Da],Tl=!1;if(gl)for(nl=gl.length-1;nl>=0;nl--){var Ul=gl[nl];if(Ul.selector===Ee&&Ul.context===na){for(var Bl=Ul.listeners,Ll=Bl.length-1;Ll>=0;Ll--){var Ol=Bl[Ll];if(Ol.func===Qa&&In(Ol.options,wl)){Bl.splice(Ll,1),Bl.length||(gl.splice(nl,1),Q(na,Da,ge),Q(na,Da,Fe,!0)),Tl=!0;break}}if(Tl)break}}},delegateListener:ge,delegateUseCapture:Fe,delegatedEvents:y,documents:_,targets:f,supportsOptions:!1,supportsPassive:!1};function K(Ee,na,Da,Qa){if(Ee.addEventListener){var Ka=Dn(Qa),nl=qe(f,function(wl){return wl.eventTarget===Ee});nl||(nl={eventTarget:Ee,events:{}},f.push(nl)),nl.events[na]||(nl.events[na]=[]),qe(nl.events[na],function(wl){return wl.func===Da&&In(wl.options,Ka)})||(Ee.addEventListener(na,Da,O.supportsOptions?Ka:Ka.capture),nl.events[na].push({func:Da,options:Ka}))}}function Q(Ee,na,Da,Qa){if(Ee.addEventListener&&Ee.removeEventListener){var Ka=pe(f,function(rn){return rn.eventTarget===Ee}),nl=f[Ka];if(nl&&nl.events)if(na!=="all"){var wl=!1,gl=nl.events[na];if(gl){if(Da==="all"){for(var Tl=gl.length-1;Tl>=0;Tl--){var Ul=gl[Tl];Q(Ee,na,Ul.func,Ul.options)}return}for(var Bl=Dn(Qa),Ll=0;Ll<gl.length;Ll++){var Ol=gl[Ll];if(Ol.func===Da&&In(Ol.options,Bl)){Ee.removeEventListener(na,Da,O.supportsOptions?Bl:Bl.capture),gl.splice(Ll,1),gl.length===0&&(delete nl.events[na],wl=!0);break}}}wl&&!Object.keys(nl.events).length&&f.splice(Ka,1)}else for(na in nl.events)nl.events.hasOwnProperty(na)&&Q(Ee,na,"all")}}function ge(Ee,na){for(var Da=Dn(na),Qa=new Fn(Ee),Ka=y[Ee.type],nl=Ne(Ee)[0],wl=nl;S.element(wl);){for(var gl=0;gl<Ka.length;gl++){var Tl=Ka[gl],Ul=Tl.selector,Bl=Tl.context;if(fe(wl,Ul)&&ce(Bl,nl)&&ce(Bl,wl)){var Ll=Tl.listeners;Qa.currentTarget=wl;for(var Ol=0;Ol<Ll.length;Ol++){var rn=Ll[Ol];In(rn.options,Da)&&rn.func(Qa)}}}wl=$e(wl)}}function Fe(Ee){return ge(Ee,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),t.events=O,O}},vn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,f=vn.methodOrder;i<f.length;i++){var y=f[i],_=vn[y](t);if(_)return _}return null},simulationResume:function(t){var i=t.pointerType,f=t.eventType,y=t.eventTarget,_=t.scope;if(!/down|start/i.test(f))return null;for(var O=0,K=_.interactions.list;O<K.length;O++){var Q=K[O],ge=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ge;){if(ge===Q.element)return Q;ge=$e(ge)}}return null},mouseOrPen:function(t){var i,f=t.pointerId,y=t.pointerType,_=t.eventType,O=t.scope;if(y!=="mouse"&&y!=="pen")return null;for(var K=0,Q=O.interactions.list;K<Q.length;K++){var ge=Q[K];if(ge.pointerType===y){if(ge.simulation&&!On(ge,f))continue;if(ge.interacting())return ge;i||(i=ge)}}if(i)return i;for(var Fe=0,Ee=O.interactions.list;Fe<Ee.length;Fe++){var na=Ee[Fe];if(!(na.pointerType!==y||/down/i.test(_)&&na.simulation))return na}return null},hasPointer:function(t){for(var i=t.pointerId,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(On(_,i))return _}return null},idle:function(t){for(var i=t.pointerType,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(_.pointers.length===1){var O=_.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&i===_.pointerType)return _}return null}};function On(t,i){return t.pointers.some(function(f){return f.id===i})}var Xn=vn,Gr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Zn(t,i){return function(f){var y=i.interactions.list,_=Ca(f),O=Ne(f),K=O[0],Q=O[1],ge=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var Fe=0,Ee=f.changedTouches;Fe<Ee.length;Fe++){var na=Ee[Fe],Da={pointer:na,pointerId:Ve(na),pointerType:_,eventType:f.type,eventTarget:K,curEventTarget:Q,scope:i},Qa=wn(Da);ge.push([Da.pointer,Da.eventTarget,Da.curEventTarget,Qa])}}else{var Ka=!1;if(!J.supportsPointerEvent&&/mouse/.test(f.type)){for(var nl=0;nl<y.length&&!Ka;nl++)Ka=y[nl].pointerType!=="mouse"&&y[nl].pointerIsDown;Ka=Ka||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!Ka){var wl={pointer:f,pointerId:Ve(f),pointerType:_,eventType:f.type,curEventTarget:Q,eventTarget:K,scope:i},gl=wn(wl);ge.push([wl.pointer,wl.eventTarget,wl.curEventTarget,gl])}}for(var Tl=0;Tl<ge.length;Tl++){var Ul=ge[Tl],Bl=Ul[0],Ll=Ul[1],Ol=Ul[2];Ul[3][t](Bl,f,Ll,Ol)}}}function wn(t){var i=t.pointerType,f=t.scope,y={interaction:Xn.search(t),searchDetails:t};return f.fire("interactions:find",y),y.interaction||f.interactions.new({pointerType:i})}function Mi(t,i){var f=t.doc,y=t.scope,_=t.options,O=y.interactions.docEvents,K=y.events,Q=K[i];for(var ge in y.browser.isIOS&&!_.events&&(_.events={passive:!1}),K.delegatedEvents)Q(f,ge,K.delegateListener),Q(f,ge,K.delegateUseCapture,!0);for(var Fe=_&&_.events,Ee=0;Ee<O.length;Ee++){var na=O[Ee];Q(f,na.type,na.listener,Fe)}}var jo={id:"core/interactions",install:function(t){for(var i={},f=0;f<Gr.length;f++){var y=Gr[f];i[y]=Zn(y,t)}var _,O=J.pEventTypes;function K(){for(var Q=0,ge=t.interactions.list;Q<ge.length;Q++){var Fe=ge[Q];if(Fe.pointerIsDown&&Fe.pointerType==="touch"&&!Fe._interacting)for(var Ee=function(){var Qa=Da[na];t.documents.some(function(Ka){return ce(Ka.doc,Qa.downTarget)})||Fe.removePointer(Qa.pointer,Qa.event)},na=0,Da=Fe.pointers;na<Da.length;na++)Ee()}}(_=F.PointerEvent?[{type:O.down,listener:K},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:K},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ge=0,Fe=t.interactions.list;ge<Fe.length;ge++)Fe[ge].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){m(Fe,Q);var ge=M(Fe);function Fe(){return s(this,Fe),ge.apply(this,arguments)}return c(Fe,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Ee){t.interactions.pointerMoveTolerance=Ee}},{key:"_now",value:function(){return t.now()}}]),Fe}(hn),t.interactions={list:[],new:function(Q){Q.scopeFire=function(Fe,Ee){return t.fire(Fe,Ee)};var ge=new t.Interaction(Q);return t.interactions.list.push(ge),ge},listeners:i,docEvents:_,pointerMoveTolerance:1},t.usePlugin(Mr)},listeners:{"scope:add-document":function(t){return Mi(t,"add")},"scope:remove-document":function(t){return Mi(t,"remove")},"interactable:unset":function(t,i){for(var f=t.interactable,y=i.interactions.list.length-1;y>=0;y--){var _=i.interactions.list[y];_.interactable===f&&(_.stop(),i.fire("interactions:destroy",{interaction:_}),_.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Mi,doOnInteractions:Zn,methodNames:Gr},Ho=jo,Nn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Nn||{}),Uo=function(){function t(i,f,y,_){s(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Jn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||y,this._win=x(Ta(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=_,this.set(f)}return c(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return S.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),S.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),S.func(f.onend)&&this.on("".concat(i,"end"),f.onend),S.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,y){var _,O=this,K=(_=this._actions.map[i])==null?void 0:_.filterEventType,Q=function(ge){return(K==null||K(ge))&&zl(ge,O._actions)};(S.array(f)||S.object(f))&&this._onOff(Nn.Off,i,f,void 0,Q),(S.array(y)||S.object(y))&&this._onOff(Nn.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,f){var y=this._defaults;for(var _ in f){var O=_,K=this.options[i],Q=f[O];O==="listeners"&&this.updatePerActionListeners(i,K.listeners,Q),S.array(Q)?K[O]=xe(Q):S.plainObject(Q)?(K[O]=ee(K[O]||{},Nr(Q)),S.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(K[O].enabled=Q.enabled!==!1)):S.bool(Q)&&S.object(y.perAction[O])?K[O].enabled=Q:K[O]=Q}}},{key:"getRect",value:function(i){return i=i||(S.element(this.target)?this.target:null),S.string(this.target)&&(i=i||this._context.querySelector(this.target)),Pe(i)}},{key:"rectChecker",value:function(i){var f=this;return S.func(i)?(this.getRect=function(y){var _=ee({},i.apply(f,y));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,f){if(Ta(f)||S.object(f)){for(var y in this.options[i]=f,this._actions.map)this.options[y][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return S.string(i)?Array.from(this._context.querySelectorAll(i)):S.func(i)&&i.getAllElements?i.getAllElements():S.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||ce(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,y){return!this.testIgnore(i.ignoreFrom,f,y)&&this.testAllow(i.allowFrom,f,y)}},{key:"testAllow",value:function(i,f,y){return!i||!!S.element(y)&&(S.string(i)?U(y,i,f):!!S.element(i)&&ce(i,y))}},{key:"testIgnore",value:function(i,f,y){return!(!i||!S.element(y))&&(S.string(i)?U(y,i,f):!!S.element(i)&&ce(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,y,_,O){S.object(f)&&!S.array(f)&&(_=y,y=null);var K=Ge(f,y,O);for(var Q in K){Q==="wheel"&&(Q=J.wheelEvent);for(var ge=0,Fe=K[Q];ge<Fe.length;ge++){var Ee=Fe[ge];zl(Q,this._actions)?this.events[i===Nn.On?"on":"off"](Q,Ee):S.string(this.target)?this._scopeEvents[i===Nn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ee,_):this._scopeEvents[i===Nn.On?"add":"remove"](this.target,Q,Ee,_)}}return this}},{key:"on",value:function(i,f,y){return this._onOff(Nn.On,i,f,y)}},{key:"off",value:function(i,f,y){return this._onOff(Nn.Off,i,f,y)}},{key:"set",value:function(i){var f=this._defaults;for(var y in S.object(i)||(i={}),this.options=Nr(f.base),this._actions.methodDict){var _=y,O=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ee(ee({},f.perAction),f.actions[_])),this[O](i[_])}for(var K in i)K!=="getRect"?S.func(this[K])&&this[K](i[K]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],y=f.length-1;y>=0;y--){var _=f[y],O=_.selector,K=_.context,Q=_.listeners;O===this.target&&K===this._context&&f.splice(y,1);for(var ge=Q.length-1;ge>=0;ge--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ge][0],Q[ge][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),qo=function(){function t(i){var f=this;s(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var _=y.interactable,O=_.target,K=S.string(O)?f.selectorMap[O]:O[f.scope.id],Q=pe(K,function(ge){return ge===_});K.splice(Q,1)}})}return c(t,[{key:"new",value:function(i,f){f=ee(f||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),S.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:f,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,f){var y=f&&f.context||this.scope.document,_=S.string(i),O=_?this.selectorMap[i]:i[this.scope.id];if(O)return qe(O,function(K){return K._context===y&&(_||K.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var y=0,_=this.list;y<_.length;y++){var O=_[y],K=void 0;if((S.string(O.target)?S.element(i)&&fe(i,O.target):i===O.target)&&O.inContext(i)&&(K=f(O)),K!==void 0)return K}}}]),t}(),Wo=function(){function t(){var i=this;s(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=J,this.defaults=Nr(lr),this.Eventable=Jn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var _=function O(K,Q){var ge=y.interactables.getExisting(K,Q);return ge||((ge=y.interactables.new(K,Q)).events.global=O.globalEvents),ge};return _.getPointerAverage=ya,_.getTouchBBox=La,_.getTouchDistance=za,_.getTouchAngle=ha,_.getElementRect=Pe,_.getElementClientRect=Me,_.matchesSelector=fe,_.closest=Te,_.globalEvents={},_.version="1.10.27",_.scope=y,_.use=function(O,K){return this.scope.usePlugin(O,K),this},_.isSet=function(O,K){return!!this.scope.interactables.get(O,K&&K.context)},_.on=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ge=0,Fe=O;ge<Fe.length;ge++){var Ee=Fe[ge];this.on(Ee,K,Q)}return this}if(S.object(O)){for(var na in O)this.on(na,O[na],K);return this}return zl(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(K):this.globalEvents[O]=[K]:this.scope.events.add(this.scope.document,O,K,{options:Q}),this},"The interact.on() method is being deprecated"),_.off=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ge=0,Fe=O;ge<Fe.length;ge++){var Ee=Fe[ge];this.off(Ee,K,Q)}return this}if(S.object(O)){for(var na in O)this.off(na,O[na],K);return this}var Da;return zl(O,this.scope.actions)?O in this.globalEvents&&(Da=this.globalEvents[O].indexOf(K))!==-1&&this.globalEvents[O].splice(Da,1):this.scope.events.remove(this.scope.document,O,K,Q),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return J.supportsTouch},_.supportsPointerEvent=function(){return J.supportsPointerEvent},_.stop=function(){for(var O=0,K=this.scope.interactions.list;O<K.length;O++)K[O].stop();return this},_.pointerMoveTolerance=function(O){return S.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(O,K){this.scope.addDocument(O,K)},_.removeDocument=function(O){this.scope.removeDocument(O)},_}(this),this.InteractEvent=Wr,this.Interactable=void 0,this.interactables=new qo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var f=this;this.Interactable=function(y){m(O,y);var _=M(O);function O(){return s(this,O),_.apply(this,arguments)}return c(O,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(K){return k(b(O.prototype),"set",this).call(this,K),f.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){k(b(O.prototype),"unset",this).call(this);var K=f.interactables.list.indexOf(this);K<0||(f.interactables.list.splice(K,1),f.fire("interactable:unset",{interactable:this}))}}]),O}(Uo)}return c(t,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var y=0,_=this.listenerMaps;y<_.length;y++){var O=_[y].map[i];if(O&&O(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,y){return f.isInitialized=!0,S.window(y)&&E(y),F.init(y),J.init(y),il.init(y),f.window=y,f.document=y.document,f.usePlugin(Ho),f.usePlugin(jn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var y=0,_=this.listenerMaps.length,O=i.before.reduce(function(Q,ge){return Q[ge]=!0,Q[Ii(ge)]=!0,Q},{});y<_;y++){var K=this.listenerMaps[y].id;if(K&&(O[K]||O[Ii(K)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var y=x(i);f=f?ee({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),y=x(i),_=this.documents[f].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:_})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ii(t){return t&&t.replace(/\/.*$/,"")}var eo=new Wo,ln=eo.interactStatic,Ko=typeof globalThis<"u"?globalThis:window;eo.init(Ko);var Go=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var _=y[0],O=y[1];return _ in t||O in t}),f=function(y,_){for(var O=t.range,K=t.limits,Q=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,ge=t.offset,Fe=ge===void 0?{x:0,y:0}:ge,Ee={range:O,grid:t,x:null,y:null},na=0;na<i.length;na++){var Da=i[na],Qa=Da[0],Ka=Da[1],nl=Math.round((y-Fe.x)/t[Qa]),wl=Math.round((_-Fe.y)/t[Ka]);Ee[Qa]=Math.max(Q.left,Math.min(Q.right,nl*t[Qa]+Fe.x)),Ee[Ka]=Math.max(Q.top,Math.min(Q.bottom,wl*t[Ka]+Fe.y))}return Ee};return f.grid=t,f.coordFields=i,f}}),Oi={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=ee(i.snappers||{},Go),i.createSnapGrid=i.snappers.grid}},Yo=Oi,Li={start:function(t){var i=t.state,f=t.rect,y=t.edges,_=t.pageCoords,O=i.options,K=O.ratio,Q=O.enabled,ge=i.options,Fe=ge.equalDelta,Ee=ge.modifiers;K==="preserve"&&(K=f.width/f.height),i.startCoords=ee({},_),i.startRect=ee({},f),i.ratio=K,i.equalDelta=Fe;var na=i.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Da=(na.left?1:-1)*(na.top?1:-1);i.edgeSign={x:Da,y:Da}}else i.edgeSign={x:na.left?-1:1,y:na.top?-1:1};if(Q!==!1&&ee(y,na),Ee!=null&&Ee.length){var Qa=new qr(t.interaction);Qa.copyFrom(t.interaction.modification),Qa.prepareStates(Ee),i.subModification=Qa,Qa.startAll(r({},t))}},set:function(t){var i=t.state,f=t.rect,y=t.coords,_=i.linkedEdges,O=ee({},y),K=i.equalDelta?ao:lo;if(ee(t.edges,_),K(i,i.xIsPrimaryAxis,y,f),!i.subModification)return null;var Q=ee({},f);se(_,Q,{x:y.x-O.x,y:y.y-O.y});var ge=i.subModification.setAll(r(r({},t),{},{rect:Q,edges:_,pageCoords:y,prevCoords:y,prevRect:Q})),Fe=ge.delta;return ge.changed&&(K(i,Math.abs(Fe.x)>Math.abs(Fe.y),ge.coords,ge.rect),ee(y,ge.coords)),ge.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ao(t,i,f){var y=t.startCoords,_=t.edgeSign;i?f.y=y.y+(f.x-y.x)*_.y:f.x=y.x+(f.y-y.y)*_.x}function lo(t,i,f,y){var _=t.startRect,O=t.startCoords,K=t.ratio,Q=t.edgeSign;if(i){var ge=y.width/K;f.y=O.y+(ge-_.height)*Q.y}else{var Fe=y.height*K;f.x=O.x+(Fe-_.width)*Q.x}}var Jo=br(Li,"aspectRatio"),ro=function(){};ro._defaults={};var hi=ro;function gn(t,i,f){return S.func(t)?ue(t,i.interactable,i.element,[f.x,f.y,i]):ue(t,i.interactable,i.element)}var Qn={start:function(t){var i=t.rect,f=t.startOffset,y=t.state,_=t.interaction,O=t.pageCoords,K=y.options,Q=K.elementRect,ge=ee({left:0,top:0,right:0,bottom:0},K.offset||{});if(i&&Q){var Fe=gn(K.restriction,_,O);if(Fe){var Ee=Fe.right-Fe.left-i.width,na=Fe.bottom-Fe.top-i.height;Ee<0&&(ge.left+=Ee,ge.right+=Ee),na<0&&(ge.top+=na,ge.bottom+=na)}ge.left+=f.left-i.width*Q.left,ge.top+=f.top-i.height*Q.top,ge.right+=f.right-i.width*(1-Q.right),ge.bottom+=f.bottom-i.height*(1-Q.bottom)}y.offset=ge},set:function(t){var i=t.coords,f=t.interaction,y=t.state,_=y.options,O=y.offset,K=gn(_.restriction,f,i);if(K){var Q=function(ge){return!ge||"left"in ge&&"top"in ge||((ge=ee({},ge)).left=ge.x||0,ge.top=ge.y||0,ge.right=ge.right||ge.left+ge.width,ge.bottom=ge.bottom||ge.top+ge.height),ge}(K);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ri=br(Qn,"restrict"),no={top:1/0,left:1/0,bottom:-1/0,right:-1/0},io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function oo(t,i){for(var f=0,y=["top","left","bottom","right"];f<y.length;f++){var _=y[f];_ in t||(t[_]=i[_])}return t}var ei={noInner:no,noOuter:io,start:function(t){var i,f=t.interaction,y=t.startOffset,_=t.state,O=_.options;O&&(i=ua(gn(O.offset,f,f.coords.start.page))),i=i||{x:0,y:0},_.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(t){var i=t.coords,f=t.edges,y=t.interaction,_=t.state,O=_.offset,K=_.options;if(f){var Q=ee({},i),ge=gn(K.inner,y,Q)||{},Fe=gn(K.outer,y,Q)||{};oo(ge,no),oo(Fe,io),f.top?i.y=Math.min(Math.max(Fe.top+O.top,Q.y),ge.top+O.top):f.bottom&&(i.y=Math.max(Math.min(Fe.bottom+O.bottom,Q.y),ge.bottom+O.bottom)),f.left?i.x=Math.min(Math.max(Fe.left+O.left,Q.x),ge.left+O.left):f.right&&(i.x=Math.max(Math.min(Fe.right+O.right,Q.x),ge.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},to=br(ei,"restrictEdges"),ai=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Qn.defaults),so=br({start:Qn.start,set:Qn.set,defaults:ai},"restrictRect"),co={width:-1/0,height:-1/0},li={width:1/0,height:1/0},Xo=br({start:function(t){return ei.start(t)},set:function(t){var i=t.interaction,f=t.state,y=t.rect,_=t.edges,O=f.options;if(_){var K=Se(gn(O.min,i,t.coords))||co,Q=Se(gn(O.max,i,t.coords))||li;f.options={endOnly:O.endOnly,inner:ee({},ei.noInner),outer:ee({},ei.noOuter)},_.top?(f.options.inner.top=y.bottom-K.height,f.options.outer.top=y.bottom-Q.height):_.bottom&&(f.options.inner.bottom=y.top+K.height,f.options.outer.bottom=y.top+Q.height),_.left?(f.options.inner.left=y.right-K.width,f.options.outer.left=y.right-Q.width):_.right&&(f.options.inner.right=y.left+K.width,f.options.outer.right=y.left+Q.width),ei.set(t),f.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),vi={start:function(t){var i,f=t.interaction,y=t.interactable,_=t.element,O=t.rect,K=t.state,Q=t.startOffset,ge=K.options,Fe=ge.offsetWithOrigin?function(Da){var Qa=Da.interaction.element,Ka=ua(ue(Da.state.options.origin,null,null,[Qa])),nl=Ka||Be(Da.interactable,Qa,Da.interaction.prepared.name);return nl}(t):{x:0,y:0};if(ge.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ee=ue(ge.offset,y,_,[f]);(i=ua(Ee)||{x:0,y:0}).x+=Fe.x,i.y+=Fe.y}var na=ge.relativePoints;K.offsets=O&&na&&na.length?na.map(function(Da,Qa){return{index:Qa,relativePoint:Da,x:Q.left-O.width*Da.x+i.x,y:Q.top-O.height*Da.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,f=t.coords,y=t.state,_=y.options,O=y.offsets,K=Be(i.interactable,i.element,i.prepared.name),Q=ee({},f),ge=[];_.offsetWithOrigin||(Q.x-=K.x,Q.y-=K.y);for(var Fe=0,Ee=O;Fe<Ee.length;Fe++)for(var na=Ee[Fe],Da=Q.x-na.x,Qa=Q.y-na.y,Ka=0,nl=_.targets.length;Ka<nl;Ka++){var wl=_.targets[Ka],gl=void 0;(gl=S.func(wl)?wl(Da,Qa,i._proxy,na,Ka):wl)&&ge.push({x:(S.number(gl.x)?gl.x:Da)+na.x,y:(S.number(gl.y)?gl.y:Qa)+na.y,range:S.number(gl.range)?gl.range:_.range,source:wl,index:Ka,offset:na})}for(var Tl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ul=0;Ul<ge.length;Ul++){var Bl=ge[Ul],Ll=Bl.range,Ol=Bl.x-Q.x,rn=Bl.y-Q.y,or=Ja(Ol,rn),cn=or<=Ll;Ll===1/0&&Tl.inRange&&Tl.range!==1/0&&(cn=!1),Tl.target&&!(cn?Tl.inRange&&Ll!==1/0?or/Ll<Tl.distance/Tl.range:Ll===1/0&&Tl.range!==1/0||or<Tl.distance:!Tl.inRange&&or<Tl.distance)||(Tl.target=Bl,Tl.distance=or,Tl.range=Ll,Tl.inRange=cn,Tl.delta.x=Ol,Tl.delta.y=rn)}return Tl.inRange&&(f.x=Tl.target.x,f.y=Tl.target.y),y.closest=Tl,Tl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},ri=br(vi,"snap"),mi={start:function(t){var i=t.state,f=t.edges,y=i.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],vi.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,f=t.state,y=t.coords,_=f.options,O=f.offsets,K={x:y.x-O[0].x,y:y.y-O[0].y};f.options=ee({},_),f.options.targets=[];for(var Q=0,ge=_.targets||[];Q<ge.length;Q++){var Fe=ge[Q],Ee=void 0;if(Ee=S.func(Fe)?Fe(K.x,K.y,i):Fe){for(var na=0,Da=f.targetFields;na<Da.length;na++){var Qa=Da[na],Ka=Qa[0],nl=Qa[1];if(Ka in Ee||nl in Ee){Ee.x=Ee[Ka],Ee.y=Ee[nl];break}}f.options.targets.push(Ee)}}var wl=vi.set(t);return f.options=_,wl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Zo=br(mi,"snapSize"),$i={aspectRatio:Jo,restrictEdges:to,restrict:Ri,restrictRect:so,restrictSize:Xo,snapEdges:br({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],mi.start(t)):null},set:mi.set,defaults:ee(Nr(mi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:ri,snapSize:Zo,spring:hi,avoid:hi,transform:hi,rubberband:hi},Qo={id:"modifiers",install:function(t){var i=t.interactStatic;for(var f in t.usePlugin(Pl),t.usePlugin(Yo),i.modifiers=$i,$i){var y=$i[f],_=y._defaults,O=y._methods;_._methods=O,t.defaults.perAction[f]=_}}},et=Qo,uo=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ge){var Fe;if(s(this,f),H(C(Fe=i.call(this,Q)),O),O!==_&&H(C(Fe),_),Fe.timeStamp=ge,Fe.originalEvent=O,Fe.type=y,Fe.pointerId=Ve(_),Fe.pointerType=Ca(_),Fe.target=K,Fe.currentTarget=null,y==="tap"){var Ee=Q.getPointerIndex(_);Fe.dt=Fe.timeStamp-Q.pointers[Ee].downTime;var na=Fe.timeStamp-Q.tapTime;Fe.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===Fe.target&&na<500}else y==="doubletap"&&(Fe.dt=_.timeStamp-Q.tapTime,Fe.double=!0);return Fe}return c(f,[{key:"_subtractOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX-=_,this.pageY-=O,this.clientX-=_,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX+=_,this.pageY+=O,this.clientX+=_,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(ye),ni={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=ni,t.defaults.actions.pointerEvents=ni.defaults,ee(t.actions.phaselessTypes,ni.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,f=t.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Pi(t),An({interaction:f,pointer:y,event:_,eventTarget:O,type:"move"},i))},"interactions:down":function(t,i){(function(f,y){for(var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget,ge=f.pointerIndex,Fe=_.pointers[ge].hold,Ee=ra(Q),na={interaction:_,pointer:O,event:K,eventTarget:Q,type:"hold",targets:[],path:Ee,node:null},Da=0;Da<Ee.length;Da++){var Qa=Ee[Da];na.node=Qa,y.fire("pointerEvents:collect-targets",na)}if(na.targets.length){for(var Ka=1/0,nl=0,wl=na.targets;nl<wl.length;nl++){var gl=wl[nl].eventable.options.holdDuration;gl<Ka&&(Ka=gl)}Fe.duration=Ka,Fe.timeout=setTimeout(function(){An({interaction:_,eventTarget:Q,pointer:O,event:K,type:"hold"},y)},Ka)}})(t,i),An(t,i)},"interactions:up":function(t,i){Pi(t),An(t,i),function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerWasMoved||An({interaction:_,eventTarget:Q,pointer:O,event:K,type:"tap"},y)}(t,i)},"interactions:cancel":function(t,i){Pi(t),An(t,i)}},PointerEvent:uo,fire:An,collectEventTargets:Vi,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 An(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=t.targets,ge=Q===void 0?Vi(t,i):Q,Fe=new uo(K,y,_,O,f,i.now());i.fire("pointerEvents:new",{pointerEvent:Fe});for(var Ee={interaction:f,pointer:y,event:_,eventTarget:O,targets:ge,type:K,pointerEvent:Fe},na=0;na<ge.length;na++){var Da=ge[na];for(var Qa in Da.props||{})Fe[Qa]=Da.props[Qa];var Ka=Be(Da.eventable,Da.node);if(Fe._subtractOrigin(Ka),Fe.eventable=Da.eventable,Fe.currentTarget=Da.node,Da.eventable.fire(Fe),Fe._addOrigin(Ka),Fe.immediatePropagationStopped||Fe.propagationStopped&&na+1<ge.length&&ge[na+1].node!==Fe.currentTarget)break}if(i.fire("pointerEvents:fired",Ee),K==="tap"){var nl=Fe.double?An({interaction:f,pointer:y,event:_,eventTarget:O,type:"doubletap"},i):Fe;f.prevTap=nl,f.tapTime=nl.timeStamp}return Fe}function Vi(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=f.getPointerIndex(y),ge=f.pointers[Q];if(K==="tap"&&(f.pointerWasMoved||!ge||ge.downTarget!==O))return[];for(var Fe=ra(O),Ee={interaction:f,pointer:y,event:_,eventTarget:O,type:K,path:Fe,targets:[],node:null},na=0;na<Fe.length;na++){var Da=Fe[na];Ee.node=Da,i.fire("pointerEvents:collect-targets",Ee)}return K==="hold"&&(Ee.targets=Ee.targets.filter(function(Qa){var Ka,nl;return Qa.eventable.options.holdDuration===((Ka=f.pointers[Q])==null||(nl=Ka.hold)==null?void 0:nl.duration)})),Ee.targets}function Pi(t){var i=t.interaction,f=t.pointerIndex,y=i.pointers[f].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var at=Object.freeze({__proto__:null,default:ni});function lt(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var rt={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(ni);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=lt,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var f=t.interaction,y=t.pointerEvent,_=t.eventTarget,O=t.targets;if(y.type==="hold"&&O.length){var K=O[0].eventable.options.holdRepeatInterval;K<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:_,type:"hold",pointer:y,event:y},i)},K))}}})},yi=rt,nt={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,_){var O=f.call(this,y,_);return O===this&&(this.events.options[y]=_),O}},listeners:{"pointerEvents:collect-targets":function(t,i){var f=t.targets,y=t.node,_=t.type,O=t.eventTarget;i.interactables.forEachMatch(y,function(K){var Q=K.events,ge=Q.options;Q.types[_]&&Q.types[_].length&&K.testIgnoreAllow(ge,y,O)&&f.push({node:y,eventable:Q,props:{interactable:K}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(t,i){var f=t.interactable,y=t.options;ee(f.events.options,i.pointerEvents.defaults),ee(f.events.options,y.pointerEvents||{})}}},it=nt,ot={id:"pointer-events",install:function(t){t.usePlugin(at),t.usePlugin(yi),t.usePlugin(it)}},tt=ot,po={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(y,_,O){for(var K=y.getAllElements(),Q=O.window.Promise,ge=Q?[]:null,Fe=function(){var na=K[Ee],Da=y.getRect(na);if(!Da)return 1;var Qa,Ka=qe(O.interactions.list,function(gl){return gl.interacting()&&gl.interactable===y&&gl.element===na&&gl.prepared.name===_.name});if(Ka)Ka.move(),ge&&(Qa=Ka._reflowPromise||new Q(function(gl){Ka._reflowResolve=gl}));else{var nl=Se(Da),wl=function(gl){return{coords:gl,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:nl.x,y:nl.y},client:{x:nl.x,y:nl.y},timeStamp:O.now()});Qa=function(gl,Tl,Ul,Bl,Ll){var Ol=gl.interactions.new({pointerType:"reflow"}),rn={interaction:Ol,event:Ll,pointer:Ll,eventTarget:Ul,phase:"reflow"};Ol.interactable=Tl,Ol.element=Ul,Ol.prevEvent=Ll,Ol.updatePointer(Ll,Ll,Ul,!0),he(Ol.coords.delta),Aa(Ol.prepared,Bl),Ol._doPhase(rn);var or=gl.window,cn=or.Promise,bn=cn?new cn(function(Tn){Ol._reflowResolve=Tn}):void 0;return Ol._reflowPromise=bn,Ol.start(Bl,Tl,Ul),Ol._interacting?(Ol.move(rn),Ol.end(Ll)):(Ol.stop(),Ol._reflowResolve()),Ol.removePointer(Ll,Ll),bn}(O,y,na,_,wl)}ge&&ge.push(Qa)},Ee=0;Ee<K.length&&!Fe();Ee++);return ge&&Q.all(ge).then(function(){return y})}(this,f,t)}},listeners:{"interactions:stop":function(t,i){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(y,_){y.splice(y.indexOf(_),1)}(i.interactions.list,f))}}},gi=po;if(ln.use(Mr),ln.use(Rl),ln.use(tt),ln.use(sn),ln.use(et),ln.use(Oe),ln.use(ll),ln.use(ie),ln.use(gi),ln.default=ln,o(a)==="object"&&a)try{a.exports=ln}catch{}return ln.default=ln,ln})}(Wi,Wi.exports)),Wi.exports}var w1=x1();const Os=A.getDefaultExportFromCjs(w1),$o=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:l,emit:n}){const r=a,o=n,s=e.inject(qc),h=e.inject(Wc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),d=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,b=!1,u=NaN,C=NaN,M=NaN,k=NaN,W=-1,I=-1,j=-1,L=-1,E=r.x,x=r.y,w=r.w,g=r.h;const S=e.ref(),$=e.reactive({i:e.toRef(r,"i"),state:d,wrapper:S,calcXY:ue});function V(de){Ge(de)}function ae(){da()}function Z(de){kn(r.isDraggable)&&(d.draggable=de)}function me(de){kn(r.isResizable)&&(d.resizable=de)}function Ae(de){kn(r.isBounded)&&(d.bounded=de)}function F(de){d.transformScale=de}function ne(de){d.rowHeight=de}function J(de){d.maxRows=de}function ce(){d.rtl=Ms()==="rtl",da()}function Te(de){d.cols=Math.floor(de)}s.increaseItem($),e.onBeforeMount(()=>{d.rtl=Ms()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?d.cols=Xc(s.lastBreakpoint,s.cols):d.cols=s.colNum,d.rowHeight=s.rowHeight,d.containerWidth=s.width!==null?s.width:100,d.margin=s.margin!==void 0?s.margin.map(Number):[10,10],d.maxRows=s.maxRows,kn(r.isDraggable)?d.draggable=s.isDraggable:d.draggable=r.isDraggable,kn(r.isResizable)?d.resizable=s.isResizable:d.resizable=r.isResizable,kn(r.isBounded)?d.bounded=s.isBounded:d.bounded=r.isBounded,d.transformScale=s.transformScale,d.useCssTransforms=s.useCssTransforms,d.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=r.x,x=r.y,g=r.h,w=r.w,un(Pe)}),h.on("updateWidth",V),h.on("compact",ae),h.on("setDraggable",Z),h.on("setResizable",me),h.on("setBounded",Ae),h.on("setTransformScale",F),h.on("setRowHeight",ne),h.on("setMaxRows",J),h.on("directionchange",ce),h.on("setColNum",Te)}),e.onBeforeUnmount(()=>{h.off("updateWidth",V),h.off("compact",ae),h.off("setDraggable",Z),h.off("setResizable",me),h.off("setBounded",Ae),h.off("setTransformScale",F),h.off("setRowHeight",ne),h.off("setMaxRows",J),h.off("directionchange",ce),h.off("setColNum",Te),c.value&&(c.value.unset(),c.value=null),s.decreaseItem($)}),l({state:d,wrapper:S});const $e=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,fe=e.computed(()=>d.resizable&&!r.static),N=e.computed(()=>s.isMirrored?!d.rtl:d.rtl),te=e.computed(()=>(d.draggable||d.resizable)&&!r.static),U=f1("item"),Ce=e.computed(()=>({[U.b()]:!0,[U.bm("resizable")]:fe.value,[U.bm("static")]:r.static,[U.bm("resizing")]:d.isResizing,[U.bm("dragging")]:d.isDragging,[U.bm("transform")]:d.useCssTransforms,[U.bm("rtl")]:N.value,[U.bm("no-touch")]:$e&&te.value})),Me=e.computed(()=>[U.be("resizer"),N.value&&U.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,de=>{d.draggable=de}),e.watch(()=>r.static,()=>{un(H),un(he)}),e.watch(()=>d.draggable,()=>{un(H)}),e.watch(()=>r.isResizable,de=>{d.resizable=de}),e.watch(()=>r.isBounded,de=>{d.bounded=de}),e.watch(()=>d.resizable,()=>{un(he)}),e.watch(()=>d.rowHeight,()=>{un(Pe),un(ra)}),e.watch([()=>d.cols,()=>d.containerWidth],()=>{un(he),un(Pe),un(ra)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{un(he)}),e.watch(N,()=>{un(he),un(Pe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const de=s.margin;!de||de[0]===d.margin[0]&&de[1]===d.margin[1]||(d.margin=de.map(Number),un(Pe),un(ra))});function Pe(){r.x+r.w>d.cols?(E=0,w=r.w>d.cols?d.cols:r.w):(E=r.x,w=r.w);const de=pa(E,x,w,g);d.isDragging&&(de.top=d.dragging.top,N.value?de.right=d.dragging.left:de.left=d.dragging.left),d.isResizing&&(de.width=d.resizing.width,de.height=d.resizing.height);let ma;d.useCssTransforms?N.value?ma=c1(de.top,de.right,de.width,de.height):ma=s1(de.top,de.left,de.width,de.height):N.value?ma=d1(de.top,de.right,de.width,de.height):ma=u1(de.top,de.left,de.width,de.height),d.style=ma}function ra(){const de={};for(const ma of["width","height"]){const oa=d.style[ma].match(/^(\d+)px$/);if(!oa)return;de[ma]=oa[1]}o("container-resized",r.i,r.h,r.w,de.height,de.width)}function Ta(de){if(r.static)return;const ma=de.type;if(ma==="resizestart"&&d.isResizing||ma!=="resizestart"&&!d.isResizing)return;const oa=As(de);if(kn(oa))return;const{x:Ve,y:_a}=oa,ze={width:0,height:0};let ya;switch(ma){case"resizestart":{he(),W=w,I=g,ya=pa(E,x,w,g),ze.width=ya.width,ze.height=ya.height,d.resizing=ze,d.isResizing=!0;break}case"resizemove":{!de.edges.right&&!de.edges.left&&(M=Ve),!de.edges.top&&!de.edges.bottom&&(k=_a);const La=zs(M,k,Ve,_a);N.value?ze.width=d.resizing.width-La.deltaX/d.transformScale:ze.width=d.resizing.width+La.deltaX/d.transformScale,ze.height=d.resizing.height+La.deltaY/d.transformScale,d.resizing=ze;break}case"resizeend":{ya=pa(E,x,w,g),ze.width=ya.width,ze.height=ya.height,d.resizing={width:-1,height:-1},d.isResizing=!1;break}}ya=Be(ze.height,ze.width),ya.w<r.minW&&(ya.w=r.minW),ya.w>r.maxW&&(ya.w=r.maxW),ya.h<r.minH&&(ya.h=r.minH),ya.h>r.maxH&&(ya.h=r.maxH),ya.h<1&&(ya.h=1),ya.w<1&&(ya.w=1),M=Ve,k=_a,(w!==ya.w||g!==ya.h)&&o("resize",r.i,ya.h,ya.w,ze.height,ze.width),de.type==="resizeend"&&(W!==w||I!==g)&&o("resized",r.i,ya.h,ya.w,ze.height,ze.width),h.emit("resizeEvent",de.type,r.i,E,x,ya.h,ya.w)}function ee(de){if(r.static||d.isResizing)return;const ma=de.type;if(ma==="dragstart"&&d.isDragging||ma!=="dragstart"&&!d.isDragging)return;const oa=As(de);if(kn(oa))return;const{x:Ve,y:_a}=oa,ze=de.target;if(!ze.offsetParent)return;const ya={top:0,left:0};switch(ma){case"dragstart":{j=E,L=x;const za=ze.offsetParent.getBoundingClientRect(),ha=ze.getBoundingClientRect(),Ca=ha.left/d.transformScale,Ne=za.left/d.transformScale,ye=ha.right/d.transformScale,Y=za.right/d.transformScale,xe=ha.top/d.transformScale,pe=za.top/d.transformScale;N.value?ya.left=(ye-Y)*-1:ya.left=Ca-Ne,ya.top=xe-pe,d.dragging=ya,d.isDragging=!0;break}case"dragmove":{const za=zs(u,C,Ve,_a);if(N.value?ya.left=d.dragging.left-za.deltaX/d.transformScale:ya.left=d.dragging.left+za.deltaX/d.transformScale,ya.top=d.dragging.top+za.deltaY/d.transformScale,d.bounded){const ha=ze.offsetParent.clientHeight-Se(r.h,d.rowHeight,d.margin[1]);ya.top=se(ya.top,0,ha);const Ca=ua(),Ne=d.containerWidth-Se(r.w,Ca,d.margin[0]);ya.left=se(ya.left,0,Ne)}d.dragging=ya;break}case"dragend":{const za=ze.offsetParent.getBoundingClientRect(),ha=ze.getBoundingClientRect(),Ca=ha.left/d.transformScale,Ne=za.left/d.transformScale,ye=ha.right/d.transformScale,Y=za.right/d.transformScale,xe=ha.top/d.transformScale,pe=za.top/d.transformScale;N.value?ya.left=(ye-Y)*-1:ya.left=Ca-Ne,ya.top=xe-pe,d.dragging={top:-1,left:-1},d.isDragging=!1;break}}let La;N.value,La=ue(ya.top,ya.left),u=Ve,C=_a,(E!==La.x||x!==La.y)&&o("move",r.i,La.x,La.y),de.type==="dragend"&&(j!==E||L!==x)&&o("moved",r.i,La.x,La.y),h.emit("dragEvent",de.type,r.i,La.x,La.y,g,w)}function pa(de,ma,oa,Ve){const _a=ua();let ze;return N.value?ze={right:Math.round(_a*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*ma+(ma+1)*d.margin[1]),width:oa===1/0?oa:Math.round(_a*oa+Math.max(0,oa-1)*d.margin[0]),height:Ve===1/0?Ve:Math.round(d.rowHeight*Ve+Math.max(0,Ve-1)*d.margin[1])}:ze={left:Math.round(_a*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*ma+(ma+1)*d.margin[1]),width:oa===1/0?oa:Math.round(_a*oa+Math.max(0,oa-1)*d.margin[0]),height:Ve===1/0?Ve:Math.round(d.rowHeight*Ve+Math.max(0,Ve-1)*d.margin[1])},ze}function ue(de,ma){const oa=ua();let Ve=Math.round((ma-d.margin[0])/(oa+d.margin[0])),_a=Math.round((de-d.margin[1])/(d.rowHeight+d.margin[1]));return Ve=Math.max(Math.min(Ve,d.cols-w),0),_a=Math.max(Math.min(_a,d.maxRows-g),0),{x:Ve,y:_a}}function ua(){return(d.containerWidth-d.margin[0]*(d.cols+1))/d.cols}function Se(de,ma,oa){return Number.isFinite(de)?Math.round(ma*de+Math.max(0,de-1)*oa):de}function se(de,ma,oa){return Math.max(Math.min(de,oa),ma)}function Be(de,ma,oa=!1){const Ve=ua();let _a=Math.round((ma+d.margin[0])/(Ve+d.margin[0])),ze=0;return oa?ze=Math.ceil((de+d.margin[1])/(d.rowHeight+d.margin[1])):ze=Math.round((de+d.margin[1])/(d.rowHeight+d.margin[1])),_a=Math.max(Math.min(_a,d.cols-E),0),ze=Math.max(Math.min(ze,d.maxRows-x),0),{w:_a,h:ze}}function Ge(de,ma){d.containerWidth=de}function da(){Pe()}function Ja(){!c.value&&S.value&&(c.value=Os(S.value),d.useStyleCursor||c.value.styleCursor(!1))}const R=Ts(ee);function H(){if(Ja(),!!c.value)if(d.draggable&&!r.static){const de={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(de),m||(m=!0,c.value.on("dragstart dragmove dragend",ma=>{ma.type==="dragmove"?R(ma):ee(ma)}))}else c.value.draggable({enabled:!1})}const X=Ts(Ta);function he(){if(Ja(),!!c.value)if(d.resizable&&!r.static){const de=pa(0,0,r.maxW,r.maxH),ma=pa(0,0,r.minW,r.minH),oa={edges:{left:N.value?`.${Me.value[0]}`:!1,right:N.value?!1:`.${Me.value[0]}`,bottom:`.${Me.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:ma.height*d.transformScale,width:ma.width*d.transformScale},max:{height:de.height*d.transformScale,width:de.width*d.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(oa.modifiers=[Os.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(oa),b||(b=!0,c.value.on("resizestart resizemove resizeend",Ve=>{Ve.type==="resizemove"?X(Ve):Ta(Ve)}))}else c.value.resizable({enabled:!1})}return(de,ma)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(Ce.value),style:e.normalizeStyle(d.style)},[e.renderSlot(de.$slots,"default"),fe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Me.value)},null,2)):e.createCommentVNode("",!0)],6))}}),fi=typeof window<"u";var Ls;fi&&(Ls=window==null?void 0:window.navigator)!=null&&Ls.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Rs(a){return a!=null}function $s(){}const _1=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(_1)));const S1=fi&&("ontouchstart"in window||C1()>0),E1=S1?"pointerdown":"click";function C1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function D1(a,l,n=window.Event){const{type:r,bubbles:o=!1,cancelable:s=!1,...h}=l;if(!Rs(r)||r==="")return!1;let c;return Rs(n)?c=new n(r,{bubbles:o,cancelable:s}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,o,s)),Object.assign(c,h),a.dispatchEvent(c)}const T1="clickoutside",B1=new Set;fi&&document.addEventListener(E1,a=>{const l=a.target,n=a.composedPath&&a.composedPath();B1.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&D1(r,{type:T1})})},!0);const N1=[["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 Do;if(fi){for(const a of N1)if(a[1]in document){Do=a;break}}e.computed(()=>!1);const A1=new Set,z1=new WeakMap;if(fi&&Do){const a=Do[2],l=Do[4];document.addEventListener(l,()=>{if(A1.forEach(n=>{n.value=!1}),document[a]){const n=z1.get(document[a]);n&&(n.value=!0)}},!1)}const Qc=new Map;Qc.set("x",0);Qc.set("y",0);var di=[],M1=function(){return di.some(function(a){return a.activeTargets.length>0})},I1=function(){return di.some(function(a){return a.skippedTargets.length>0})},Vs="ResizeObserver loop completed with undelivered notifications.",O1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Vs}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Vs),window.dispatchEvent(a)},Qi;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Qi||(Qi={}));var pi=function(a){return Object.freeze(a)},L1=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,pi(this)}return a}(),eu=function(){function a(l,n,r,o){return this.x=l,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,pi(this)}return a.prototype.toJSON=function(){var l=this,n=l.x,r=l.y,o=l.top,s=l.right,h=l.bottom,c=l.left,d=l.width,m=l.height;return{x:n,y:r,top:o,right:s,bottom:h,left:c,width:d,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Mt=function(a){return a instanceof SVGElement&&"getBBox"in a},au=function(a){if(Mt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var o=a,s=o.offsetWidth,h=o.offsetHeight;return!(s||h||a.getClientRects().length)},Ps=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},R1=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},Ji=typeof window<"u"?window:{},_o=new WeakMap,Fs=/auto|scroll/,$1=/^tb|vertical/,V1=/msie|trident/i.test(Ji.navigator&&Ji.navigator.userAgent),Mn=function(a){return parseFloat(a||"0")},Bi=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new L1((n?l:a)||0,(n?a:l)||0)},js=pi({devicePixelContentBoxSize:Bi(),borderBoxSize:Bi(),contentBoxSize:Bi(),contentRect:new eu(0,0,0,0)}),lu=function(a,l){if(l===void 0&&(l=!1),_o.has(a)&&!l)return _o.get(a);if(au(a))return _o.set(a,js),js;var n=getComputedStyle(a),r=Mt(a)&&a.ownerSVGElement&&a.getBBox(),o=!V1&&n.boxSizing==="border-box",s=$1.test(n.writingMode||""),h=!r&&Fs.test(n.overflowY||""),c=!r&&Fs.test(n.overflowX||""),d=r?0:Mn(n.paddingTop),m=r?0:Mn(n.paddingRight),b=r?0:Mn(n.paddingBottom),u=r?0:Mn(n.paddingLeft),C=r?0:Mn(n.borderTopWidth),M=r?0:Mn(n.borderRightWidth),k=r?0:Mn(n.borderBottomWidth),W=r?0:Mn(n.borderLeftWidth),I=u+m,j=d+b,L=W+M,E=C+k,x=c?a.offsetHeight-E-a.clientHeight:0,w=h?a.offsetWidth-L-a.clientWidth:0,g=o?I+L:0,S=o?j+E:0,$=r?r.width:Mn(n.width)-g-w,V=r?r.height:Mn(n.height)-S-x,ae=$+I+w+L,Z=V+j+x+E,me=pi({devicePixelContentBoxSize:Bi(Math.round($*devicePixelRatio),Math.round(V*devicePixelRatio),s),borderBoxSize:Bi(ae,Z,s),contentBoxSize:Bi($,V,s),contentRect:new eu(u,d,$,V)});return _o.set(a,me),me},ru=function(a,l,n){var r=lu(a,n),o=r.borderBoxSize,s=r.contentBoxSize,h=r.devicePixelContentBoxSize;switch(l){case Qi.DEVICE_PIXEL_CONTENT_BOX:return h;case Qi.BORDER_BOX:return o;default:return s}},P1=function(){function a(l){var n=lu(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=pi([n.borderBoxSize]),this.contentBoxSize=pi([n.contentBoxSize]),this.devicePixelContentBoxSize=pi([n.devicePixelContentBoxSize])}return a}(),nu=function(a){if(au(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},F1=function(){var a=1/0,l=[];di.forEach(function(s){if(s.activeTargets.length!==0){var h=[];s.activeTargets.forEach(function(c){var d=new P1(c.target),m=nu(c.target);h.push(d),c.lastReportedSize=ru(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,h,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var o=r[n];o()}return a},Hs=function(a){di.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(nu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},j1=function(){var a=0;for(Hs(a);M1();)a=F1(),Hs(a);return I1()&&O1(),a>0},mt,iu=[],H1=function(){return iu.splice(0).forEach(function(a){return a()})},U1=function(a){if(!mt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return H1()}).observe(n,r),mt=function(){n.textContent="".concat(l?l--:l++)}}iu.push(a),mt()},q1=function(a){U1(function(){requestAnimationFrame(a)})},To=0,W1=function(){return!!To},K1=250,G1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Us=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qs=function(a){return a===void 0&&(a=0),Date.now()+a},yt=!1,Y1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=K1),!yt){yt=!0;var r=qs(l);q1(function(){var o=!1;try{o=j1()}finally{if(yt=!1,l=r-qs(),!W1())return;o?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,G1)};document.body?n():Ji.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Us.forEach(function(n){return Ji.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Us.forEach(function(n){return Ji.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Nt=new Y1,Ws=function(a){!To&&a>0&&Nt.start(),To+=a,!To&&Nt.stop()},J1=function(a){return!Mt(a)&&!R1(a)&&getComputedStyle(a).display==="inline"},X1=function(){function a(l,n){this.target=l,this.observedBox=n||Qi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=ru(this.target,this.observedBox,!0);return J1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),Z1=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),So=new WeakMap,Ks=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},Eo=function(){function a(){}return a.connect=function(l,n){var r=new Z1(l,n);So.set(l,r)},a.observe=function(l,n,r){var o=So.get(l),s=o.observationTargets.length===0;Ks(o.observationTargets,n)<0&&(s&&di.push(o),o.observationTargets.push(new X1(n,r&&r.box)),Ws(1),Nt.schedule())},a.unobserve=function(l,n){var r=So.get(l),o=Ks(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&di.splice(di.indexOf(r),1),r.observationTargets.splice(o,1),Ws(-1))},a.disconnect=function(l){var n=this,r=So.get(l);r.observationTargets.slice().forEach(function(o){return n.unobserve(l,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),Q1=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Eo.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Eo.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Eo.unobserve(this,l)},a.prototype.disconnect=function(){Eo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Vo=new WeakMap;function ev(a){var l;for(let n=0,r=a.length;n<r;++n){const o=a[n],s=Vo.get(o.target);if(typeof s=="function"){const{inlineSize:h,blockSize:c}=((l=o.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:d,offsetHeight:m}=o.target;s(Object.assign(o,{offsetWidth:d,offsetHeight:m,width:h??d,height:c??m}))}}}const ou=new(fi&&window.ResizeObserver||Q1)(ev);function Gs(a,l){Vo.set(a,l),ou.observe(a)}function Ys(a){Vo.has(a)&&(ou.unobserve(a),Vo.delete(a))}function av(a={}){let l=$s;const n=e.watch(()=>e.unref(a.target),o=>{l(),!(!o||typeof a.onResize!="function")&&(Gs(o,a.onResize),l=()=>{Ys(o),l=$s})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Gs,unobserveResize:Ys,unobserve:r}}const lv=e.ref(!1);e.computed(()=>lv.value);const Js="__theme_style__",gt="__theme_observer__",Xs=e.reactive(new Map),Zs=new Map;e.watch(Xs,()=>{if(!fi)return;Zs.clear();const a=document.head.querySelector(`#${Js}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${gt} { width: 1px }`,r=1;for(const[o,[s,h]]of Xs.entries())n+=` html.${s} .${gt}, .${h} .${gt} { width: ${++r}px }`,Zs.set(r,o);l.textContent=n,l.id=Js,document.head.appendChild(l)});const tu=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:l,emit:n}){const r=a,o=n,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}),h=new Map,c=e.ref(r.layout),d=e.ref(),{observeResize:m,unobserveResize:b}=av(),u=e1();u.on("resizeEvent",C),u.on("dragEvent",M),e.onBeforeMount(()=>{o("layout-before-mount",c.value)}),e.onMounted(()=>{o("layout-mounted",c.value),e.nextTick(()=>{p1(c.value),s.originalLayout=c.value,e.nextTick(()=>{V(),d.value&&m(d.value,a1(E,16)),Ci(c.value,r.verticalCompact),o("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{u.clearAll(),d.value&&b(d.value)});function C(Z,me,Ae,F,ne,J){S(Z,me,Ae,F,ne,J)}function M(Z,me,Ae,F,ne,J){g(Z,me,Ae,F,ne,J)}e.watch(()=>s.width,(Z,me)=>{e.nextTick(()=>{u.emit("updateWidth",Z),me===-1&&e.nextTick(()=>{o("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,j()}),e.watch(()=>r.colNum,Z=>{u.emit("setColNum",Z)}),e.watch(()=>r.rowHeight,Z=>{u.emit("setRowHeight",Z)}),e.watch(()=>r.isDraggable,Z=>{u.emit("setDraggable",Z)}),e.watch(()=>r.isResizable,Z=>{u.emit("setResizable",Z)}),e.watch(()=>r.isBounded,Z=>{u.emit("setBounded",Z)}),e.watch(()=>r.transformScale,Z=>{u.emit("setTransformScale",Z)}),e.watch(()=>r.responsive,Z=>{Z||(o("update:layout",s.originalLayout),u.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Z=>{u.emit("setMaxRows",Z)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(qc,e.reactive({...e.toRefs(r),...e.toRefs(s),increaseItem:k,decreaseItem:W})),e.provide(Wc,u),l({state:s,getItem:I,resizeEvent:S,dragEvent:g,layoutUpdate:j});function k(Z){h.set(Z.i,Z)}function W(Z){h.delete(Z.i)}function I(Z){return h.get(Z)}function j(){if(!kn(c.value)&&!kn(s.originalLayout)){if(c.value.length!==s.originalLayout.length){const Z=ae(c.value,s.originalLayout);if(Z.length>0)if(c.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Z);else{const me=new Set(Z.map(Ae=>Ae.i));s.originalLayout=s.originalLayout.filter(Ae=>!me.has(Ae.i))}s.lastLayoutLength=c.value.length,V()}Ci(c.value,r.verticalCompact),u.emit("updateWidth",s.width),L(),o("layout-updated",c.value)}}function L(){s.mergedStyle={height:x()}}function E(){d.value&&(s.width=d.value.offsetWidth),u.emit("resizeEvent")}function x(){if(!r.autoSize)return;const Z=parseFloat(r.margin[1]);return r1(c.value)*(r.rowHeight+Z)+Z+"px"}let w;function g(Z,me,Ae,F,ne,J){let ce=Bs(c.value,me);kn(ce)&&(ce={h:0,w:0,x:0,y:0,i:""}),Z==="dragstart"&&!r.verticalCompact&&(w=c.value.reduce((Te,{i:$e,x:fe,y:N})=>({...Te,[$e]:{x:fe,y:N}}),{})),Z==="dragmove"||Z==="dragstart"?(s.placeholder.i=me,s.placeholder.x=ce.x,s.placeholder.y=ce.y,s.placeholder.w=J,s.placeholder.h=ne,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),c.value=Bt(c.value,ce,Ae,F,!0,r.preventCollision),r.restoreOnDrag?(ce.static=!0,Ci(c.value,r.verticalCompact,w),ce.static=!1):Ci(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="dragend"&&(w=void 0,o("layout-updated",c.value))}function S(Z,me,Ae,F,ne,J){let ce=Bs(c.value,me);kn(ce)&&(ce={h:0,w:0,x:0,y:0,i:""});let Te;if(r.preventCollision){const $e=Gc(c.value,{...ce,w:J,h:ne}).filter(fe=>fe.i!==ce.i);if(Te=$e.length>0,Te){let fe=1/0,N=1/0;$e.forEach(te=>{te.x>ce.x&&(fe=Math.min(fe,te.x)),te.y>ce.y&&(N=Math.min(N,te.y))}),Number.isFinite(fe)&&(ce.w=fe-ce.x),Number.isFinite(N)&&(ce.h=N-ce.y)}}Te||(ce.w=J,ce.h=ne),Z==="resizestart"||Z==="resizemove"?(s.placeholder.i=me,s.placeholder.x=Ae,s.placeholder.y=F,s.placeholder.w=ce.w,s.placeholder.h=ce.h,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):Z&&e.nextTick(()=>{s.isDragging=!1}),r.responsive&&$(),Ci(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="resizeend"&&o("layout-updated",c.value)}function $(){const Z=m1(r.breakpoints,s.width);if(Z===s.lastBreakpoint)return;const me=Xc(Z,r.cols);!kn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=Tt(c.value));const Ae=y1(s.originalLayout,s.layouts,r.breakpoints,Z,s.lastBreakpoint,me,r.verticalCompact);s.layouts[Z]=Ae,s.lastBreakpoint!==Z&&o("breakpoint-changed",Z,Ae),c.value=Ae,o("update:layout",Ae),s.lastBreakpoint=Z,u.emit("setColNum",me)}function V(){s.layouts=Object.assign({},r.responsiveLayouts)}function ae(Z,me){const Ae=new Set(me.map(ce=>ce.i)),F=new Set(Z.map(ce=>ce.i)),ne=Z.filter(ce=>!Ae.has(ce.i)),J=me.filter(ce=>!F.has(ce.i));return ne.concat(J)}return(Z,me)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:d,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Z.$slots.default?e.renderSlot(Z.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,Ae=>(e.openBlock(),e.createBlock($o,e.mergeProps({key:Ae.i,ref_for:!0},Ae),{default:e.withCtx(()=>[e.renderSlot(Z.$slots,"item",{item:Ae})]),_:2},1040))),128)),e.withDirectives(e.createVNode($o,{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(l){console.error("vite-plugin-css-injected-by-js",l)}})();const rv={key:0,class:"item-view-group"},nv={key:0,class:"item-view-group"},iv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=A.useModelComp(A.pinia),{isEdit:r}=A.storeToRefs(n),o=Yn(A.pinia),s=l,h=a,c=e.ref(""),d=e.computed(()=>h==null?void 0:h.children),m=e.computed(()=>{var L,E,x,w;return((L=h==null?void 0:h.children)==null?void 0:L.length)>0&&((E=h==null?void 0:h.children)!=null&&E.every(g=>g==null?void 0:g.layout))?(w=(x=h==null?void 0:h.children)==null?void 0:x[0])==null?void 0:w.layout:"vertical"}),b=L=>{c.value=L,s("radioChange",L)},u=e.computed(()=>{var L,E;return((E=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),C=e.ref((h==null?void 0:h.level)+1),M=e.computed(()=>{if(!(h!=null&&h.children)||!Array.isArray(h.children)||h.children.length<2)return!1;const L=h.children.some(x=>(x==null?void 0:x.name)==="测量系统配置表"&&(x==null?void 0:x.comp)==="ParentItem"),E=h.children.some(x=>(x==null?void 0:x.name)==="测量系统传递表"&&(x==null?void 0:x.comp)==="ParentItem");return L&&E}),k=e.computed(()=>{var E,x,w,g,S,$;let L=(E=h==null?void 0:h.children)==null?void 0:E.filter(V=>V==null?void 0:V.choice);if(o.setSelectTab((x=L==null?void 0:L[0])==null?void 0:x.choiceName),(c==null?void 0:c.value)!=="")return(w=h==null?void 0:h.children)==null?void 0:w.filter(V=>!(V!=null&&V.choiceName)||(V==null?void 0:V.choiceName)===(c==null?void 0:c.value));{let V=(S=(g=h==null?void 0:h.children)==null?void 0:g.find(ae=>ae==null?void 0:ae.choice))==null?void 0:S.choiceName;return($=h==null?void 0:h.children)==null?void 0:$.filter(ae=>!(ae!=null&&ae.choiceName)||(ae==null?void 0:ae.choiceName)===V)}}),W=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(x=>{const w=typeof x=="string"?x:JSON.stringify(x);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>h==null?void 0:h.children,()=>{M.value},{deep:!0});const I=L=>{s("rowClick",L)},j=(L,E)=>{s("routeUrl",L,E)};return(L,E)=>u.value?(e.openBlock(),e.createBlock(e.unref(tu),{key:0,layout:d.value,"onUpdate:layout":E[0]||(E[0]=x=>d.value=x),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(x,w)=>(e.openBlock(),e.createBlock(e.unref($o),{key:x.i,x:x.x,y:x.y,"min-h":x.minH,"max-h":x.maxH,"min-w":x.minW,w:x.w,h:x.h,i:x.i},{default:e.withCtx(()=>{var g,S,$,V,ae,Z,me,Ae,F,ne,J,ce,Te,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[(($=(S=x==null?void 0:x.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((V=x==null?void 0:x.component)!=null&&V.name)?(e.openBlock(),e.createElementBlock("div",rv,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((ae=x==null?void 0:x.component)==null?void 0:ae.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)((Z=x==null?void 0:x.component)==null?void 0:Z.comp)),{pageLayout:m.value,config:{showIndex:(me=e.unref(ur)[w])==null?void 0:me.showIndex,allowMove:(Ae=e.unref(ur)[w])==null?void 0:Ae.allowMove,viewport:(F=e.unref(ur)[w])==null?void 0:F.viewport,status:(ne=e.unref(ur)[w])==null?void 0:ne.status},related:x==null?void 0:x.relatedTables,compName:x==null?void 0:x.component.name,compNames:e.unref(Dc),itemData:(J=x==null?void 0:x.component)==null?void 0:J.compData,childItemData:(ce=x==null?void 0:x.component)==null?void 0:ce.itemChildData,key:e.unref(Gn),cacheNewData:e.unref(Cc),onChange:e.unref(Io),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),parentTableId:(Te=x==null?void 0:x.component)==null?void 0:Te.tableId,allMapContents:e.unref(Et),children:($e=x==null?void 0:x.component)==null?void 0:$e.children,level:C.value,onRowClick:I,onRouteUrl:j,onClickTrigger:e.unref(Tc),onClickMainKey:e.unref(Bc),onRadioChange:b},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(k.value,(x,w)=>{var g,S;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(x==null?void 0:x.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(w)===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[((S=x==null?void 0:x.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&x.name?(e.openBlock(),e.createElementBlock("div",nv,[W(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(x.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Zi)(x.comp)),{compName:x.name,groupNames:x==null?void 0:x.nameContents,config:{showIndex:x==null?void 0:x.showIndex,allowMove:x==null?void 0:x.allowMove,viewport:x==null?void 0:x.viewport,status:x==null?void 0:x.status},itemData:x==null?void 0:x.compData,related:x==null?void 0:x.relatedTables,childItemData:x==null?void 0:x.itemChildData,key:e.unref(Gn),onChange:e.unref(Io),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Oo),onPageChange:e.unref(Lo),parentTableId:x==null?void 0:x.tableId,allMapContents:e.unref(Et),children:x==null?void 0:x.children,level:C.value,onRowClick:I,onRouteUrl:j,onRadioChange:b},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),ov=Zl._export_sfc(iv,[["__scopeId","data-v-bafbdd45"]]),tv={class:"radio-group-container"},sv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(),s=Yn(A.pinia),{selectTab:h}=A.storeToRefs(s);e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=h.value},{immediate:!0,deep:!0});const c=d=>{o.value=d,r("radioChange",o.value)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",tv,[e.createVNode(sl.ssRadio,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=b=>o.value=b),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),cv=Zl._export_sfc(sv,[["__scopeId","data-v-ed48c2f8"]]),uv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var r,o;n.value=((o=(r=l==null?void 0:l.itemData)==null?void 0:r.find(s=>(s==null?void 0:s.key)==="backGround"))==null?void 0:o.contents)??[]},{deep:!0,immediate:!0}),(r,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(sl.ssCarousel,{carouselList:n.value},null,8,["carouselList"])]))}}),su=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"}]),dv={TABLE:Mc,FORM:Es,STATICFORM:Ic,TABLEOPERATE:e4,TABLESTYLE:y4,TABLEEXTEND:b4,TABLEINTERACTION:w4,FORMOPERATE:Cs,FOLD:Z4,CALCULATOR:n2,METHODBUTTON:t2,AVATARUPLOAD:os.ssAvatar,SIGNATURE:os.ssSignature,FORMTOP:Es,STEP:b2,STEPOPERATE:H4,TIMELINE:E2,TIMELINEOPERATE:Y4,FORMTOPOPERATE:Cs,SIGNATUREOPERATE:m2,AVATARUPLOADOPERATE:u2,TABS:T2,TABSOPERATE:f6,CHART:T6,CHARTOPERATE:V6,LAYOUT:j6,LAYOUTOPERATE:X6,PARENTITEM:ov,RADIO:cv,CAROUSEL:uv};function zi(a){return dv[a==null?void 0:a.toUpperCase()]||null}exports.De=tu;exports.activeStepInfo=Di;exports.addContents=Xi;exports.addVisibleDialog=zt;exports.affixItems=B0;exports.allMapContents=Et;exports.analyzeMenu=ic;exports.cacheNewData=Cc;exports.clickMainKey=Bc;exports.clickSavePage=T0;exports.clickStep=Ac;exports.clickTrigger=Tc;exports.compId=Gn;exports.compNames=Dc;exports.compShow=Ai;exports.existLayouts=R0;exports.fixChangeValue=Po;exports.generateLayouts=f4;exports.getComponent=zi;exports.getComponents=Zi;exports.getPageConstruct=Xd;exports.getPageData=en;exports.getSliceContLength=H0;exports.gridRowHeight=s4;exports.gridRowHeightHmPg=t4;exports.isStepLayout=zc;exports.onBack=C0;exports.onButtonChange=M0;exports.onChange=Io;exports.onClick=D0;exports.onClickStep=$0;exports.onContentChange=Oo;exports.onExtendTaskEnd=L0;exports.onOk=I0;exports.onPageBack=P0;exports.onPageChange=Lo;exports.onSelectFixContent=E0;exports.renderShowItems=Sc;exports.showItems=ur;exports.sliceTableLength=Ec;exports.slotContent=su;exports.ssTable=Mc;exports.st=$o;exports.stepItems=U0;exports.tabChange=V0;exports.toolBar=O0;exports.useFormComp=At;exports.useModelLoader=Df;exports.verifyButton=F0;
|