ss-component-new 1.3.262 → 1.3.263
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-B7wO-0f1.cjs → array-Dran49KI.cjs} +1 -1
- package/dist/{array-CYUGpz4O.js → array-eoEZosoh.js} +2 -2
- package/dist/{index-Co3wp2Cy.cjs → index-8WGtmbRz.cjs} +1 -1
- package/dist/{index-CvbjYGvP.js → index-BEIhV9SX.js} +1 -1
- package/dist/{index-BtR9HB1Q.js → index-BMKOhAua.js} +1 -1
- package/dist/{index-6lE4lIdS.cjs → index-C3Ptg78M.cjs} +1 -1
- package/dist/{index-XuUCP5i3.cjs → index-C8iHedd-.cjs} +1 -1
- package/dist/{index-BBt479yJ.cjs → index-CDAD78uL.cjs} +1 -1
- package/dist/{index-3JAC0BY8.cjs → index-CHq0b-zB.cjs} +1 -1
- package/dist/{index-B_l4zLmV.js → index-CR0p1rBc.js} +3 -3
- package/dist/{index-Gjye2Azo.js → index-CRZHUWpC.js} +2 -2
- package/dist/{index-CqGR39Q8.js → index-CS-flako.js} +1 -1
- package/dist/{index-BsUEryLM.js → index-CWePfaws.js} +7 -7
- package/dist/{index-CmZd-fdB.cjs → index-CYMg6uja.cjs} +1 -1
- package/dist/{index-JjGHGe5l.js → index-CaefM49R.js} +1 -1
- package/dist/{index-B2DPjbG8.cjs → index-ClouXXMe.cjs} +2 -2
- package/dist/{index-DdsQowL_.cjs → index-Cm-U9tfu.cjs} +1 -1
- package/dist/{index-D0kDkVh3.js → index-Cp4vuXJ2.js} +5 -5
- package/dist/{index-C4jRTFH9.js → index-D2U6CU-M.js} +2 -2
- package/dist/{index-Cf3QbECm.js → index-DY-ufi0D.js} +1 -1
- package/dist/{index-mvUm8jPu.cjs → index-DgroST_b.cjs} +1 -1
- package/dist/{index-D1EYr6nn.cjs → index-DiRRa2aL.cjs} +1 -1
- package/dist/{index-BsEoPl4e.cjs → index-DsTdVkqf.cjs} +1 -1
- package/dist/{index-BlpPah1w.cjs → index-Gsgko7hZ.cjs} +1 -1
- package/dist/{index-BOCJmIW5.js → index-uvNkzWF3.js} +2 -2
- package/dist/{index-BhWYB1l5.js → index-vzXAzEFZ.js} +1 -1
- package/dist/{main-CEytD3Ne.js → main-NwPOo-yo.js} +2 -2
- package/dist/{main-TiuHYRao.cjs → main-rVXsTF8F.cjs} +1 -1
- 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-CkBG9GLz.js → threeModel-CSaOx5lv.js} +1 -1
- package/dist/{threeModel-DQSSo6tg.cjs → threeModel-eVInH7HH.cjs} +1 -1
- package/dist/{threeSceneView-CEIV2olY.js → threeSceneView-BGJJb7MR.js} +3 -3
- package/dist/{threeSceneView-X_VX7OHS.cjs → threeSceneView-DjOeIm6C.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-YBwC7n_T.cjs → threeSceneViewForCPMPIP-BimvMbbp.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Cv0SaJIR.js → threeSceneViewForCPMPIP-DRuYDJgc.js} +1 -1
- package/dist/{threeViewerHost-CASwaHr5.js → threeViewerHost-BDeO3Dsm.js} +1 -1
- package/dist/{threeViewerHost-DQkTh1v6.cjs → threeViewerHost-CtuY-X_d.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var vu=Object.defineProperty;var mu=(l,n,r)=>n in l?vu(l,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[n]=r;var Vr=(l,n,r)=>mu(l,typeof n!="symbol"?n+"":n,r);const a=require("vue"),Qa=require("./request-BBDPqFah.cjs"),A=require("./index-jU-5AL6b.cjs"),pl=require("./index-mvUm8jPu.cjs"),Kl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ta=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyjUeBm.cjs"),yr=require("./index-CUw6nGTo.cjs"),bo=require("./threeViewerHost-DQkTh1v6.cjs"),ua=require("./index-Bb7RsNv1.cjs"),br=require("./index-CDIharql.cjs"),Yi=require("./index-BsEoPl4e.cjs");require("./index-C2veg6vn.cjs");const Fs=require("./index-BzcWcIFK.cjs");;/* empty css */const ko=require("./isString-Jc6FCt92.cjs"),Ji=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),js=require("./index-BVaHwt5f.cjs"),yu=require("./index-CuXU0jDA.cjs"),Dn=require("./MTLLoader-Di_vHXvU.cjs"),gu=require("./URDFLoader-BbO2ANmG.cjs");var bu="[object Boolean]";function Hs(l){return l===!0||l===!1||Qa.isObjectLike(l)&&Qa.baseGetTag(l)==bu}function ku(l){return l===void 0}const xu=l=>l.match(/\((.*)\)/)[1],_u={__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(l){const n=l,r=a.ref(null),t=a.ref(!1),s=a.ref(null);return a.watch(()=>n==null?void 0:n.isVisible,()=>{t.value=n==null?void 0:n.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var d,b;(b=(d=r.value)==null?void 0:d.updatePopper)==null||b.call(d)})},{deep:!0,immediate:!0}),(d,b)=>{const h=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(h,{visible:t.value,"onUpdate:visible":b[0]||(b[0]=v=>t.value=v),trigger:n.trigger,title:n==null?void 0:n.title,placement:n==null?void 0:n.placement,width:n==null?void 0:n.width,ref_key:"popOverRef",ref:r,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(d.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(d.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},wu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const n=l,r=a.computed(()=>{const t=String(n.value??"");return t==="已完成"?"task-status-completed":t==="进行中"?"task-status-running":t==="终止"||t==="暂停"?"task-status-stopped":""});return(t,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",r.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Us=Kl._export_sfc(wu,[["__scopeId","data-v-d81f59b4"]]);function Cu(l,n,r,t={}){if(!l||!n||!r||r.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:d="rgba(255, 235, 59, 0.3)",strokeWidth:b=2,fillOpacity:h=.2}=t,v=l.getBoundingClientRect(),y=n.getBoundingClientRect(),c=n.naturalWidth,C=n.naturalHeight,M=y.width/c,L=y.height/C,x=Math.min(M,L),Y=c*x,w=C*x,z=(v.width-Y)/2,ee=(v.height-w)/2,S=r.map(([T,k])=>{const g=z+T*Y,j=ee+k*w;return{x:g,y:j}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(S[0].x,S[0].y);for(let T=1;T<S.length;T++)s.lineTo(S[T].x,S[T].y);s.closePath();const $=d.replace(/[\d.]+\)$/,`${h})`);s.fillStyle=$,s.fill(),s.strokeStyle=d.replace(/[\d.]+\)$/,"1)"),s.lineWidth=b,s.stroke()}function mt(l){if(!l)return;const n=l.getContext("2d");n&&n.clearRect(0,0,l.width,l.height)}function Gi(l,n){if(!l||!n)return null;const r=l[n];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const Eu={key:0,class:"ocr-img-preview-root"},Su={class:"ocr-img-preview-window"},Du={key:0,class:"img-preview-body"},Bu={class:"img-preview-header"},Nu={class:"img-header-left"},Tu={class:"img-name"},Au={key:0,class:"img-header-right"},Mu={class:"img-index"},zu={key:0,class:"img-thumb-list"},Ou=["onClick"],Iu={key:1,class:"thumb-placeholder"},Lu={class:"thumb-name"},Vu={class:"img-preview-container"},Ru={key:0,class:"img-placeholder"},$u={key:2,class:"img-placeholder"},Pu={key:0},Fu={key:1},ju={key:1,class:"img-placeholder"},Hu=a.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(l,{emit:n}){const r=l,t=n,s=a.computed({get:()=>r.visible,set:D=>t("update:visible",D)});let d=!1,b="",h=0,v=0,y=0,c=0,C=0,M=0,L=null;const x=D=>{var ge,se;const ne=(se=(ge=D==null?void 0:D.target)==null?void 0:ge.closest)==null?void 0:se.call(ge,".ocr-img-preview-window");return ne||document.querySelector(".ocr-img-preview-window")},Y=D=>{if(!D||D==="none")return{tx:0,ty:0};let ne=D.match(/matrix\(([^)]+)\)/);if(ne){const ge=ne[1].split(",").map(se=>Number(se.trim()));return{tx:(ge==null?void 0:ge[4])||0,ty:(ge==null?void 0:ge[5])||0}}if(ne=D.match(/matrix3d\(([^)]+)\)/),ne){const ge=ne[1].split(",").map(se=>Number(se.trim()));return{tx:(ge==null?void 0:ge[12])||0,ty:(ge==null?void 0:ge[13])||0}}return ne=D.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),ne?{tx:Number(ne[1])||0,ty:Number(ne[2])||0}:{tx:0,ty:0}},w=(D,ne,ge)=>{D.style.transform=`translate(${ne}px, ${ge}px)`},z=D=>{const ne=x(D);if(!ne)return;d=!0,L=ne,b="move",h=D.clientX,v=D.clientY;const ge=window.getComputedStyle(ne),{tx:se,ty:we}=Y(ge.transform);C=se,M=we,document.addEventListener("mousemove",S),document.addEventListener("mouseup",$)},ee=(D,ne)=>{const ge=x(D);if(!ge)return;d=!0,L=ge,b=ne,h=D.clientX,v=D.clientY;const se=ge.getBoundingClientRect();y=se.width,c=se.height;const we=window.getComputedStyle(ge),{tx:la,ty:ya}=Y(we.transform);C=la,M=ya,document.addEventListener("mousemove",S),document.addEventListener("mouseup",$)},S=D=>{if(!d||!L)return;const ne=D.clientX-h,ge=D.clientY-v,se=360,we=420;let la=y,ya=c,Va=C,ae=M;if(b==="move"){Va=C+ne,ae=M+ge,w(L,Va,ae);return}if(b.includes("right")&&(la=Math.max(se,y+ne)),b.includes("bottom")&&(ya=Math.max(we,c+ge)),b.includes("left")){const ea=y-ne;ea<se?(la=se,Va=C+(y-se)):(la=ea,Va=C+ne)}if(b.includes("top")){const ea=c-ge;ea<we?(ya=we,ae=M+(c-we)):(ya=ea,ae=M+ge)}L.style.width=`${la}px`,L.style.height=`${ya}px`,w(L,Va,ae)},$=()=>{d=!1,b="",L=null,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",$)},T=a.ref([]),k=a.ref(!1);a.watch(()=>r.images,async D=>{if(!Array.isArray(D)||D.length===0){T.value=[];return}k.value=!0;const ne=[];for(const ge of D)if(ge.url&&!ge.url.startsWith("blob:")&&!ge.url.startsWith("http"))try{const se=await Ta.downloadFile(ge.url),we=URL.createObjectURL(se);ne.push({...ge,blobUrl:we})}catch(se){console.error(`Failed to load image for preview: ${ge.url}`,se),ne.push({...ge,blobUrl:""})}else ne.push({...ge,blobUrl:ge.url});T.value=ne,k.value=!1},{deep:!0,immediate:!0});const g=a.ref(0),j=a.ref(null),q=a.ref(null),J=a.computed(()=>T.value[g.value]||null),me=()=>{if(!T.value.length){g.value=0;return}if(r.defaultImageName){const D=T.value.findIndex(ne=>(ne==null?void 0:ne.name)===r.defaultImageName);g.value=D>=0?D:0}else g.value=0},ze=D=>{if(!T.value.length)return;const ne=Math.max(0,Math.min(D,T.value.length-1));g.value=ne},xe=()=>ze(g.value-1),te=()=>ze(g.value+1),be=D=>{if(!D)return;const ne=T.value.findIndex(ge=>(ge==null?void 0:ge.name)===D);ne>=0&&(g.value=ne)},Q=()=>{if(!q.value)return;const D=q.value.parentElement;if(!D)return;const ne=D.getBoundingClientRect();q.value.width=ne.width,q.value.height=ne.height},de=()=>{var se,we;if(!q.value||!j.value||!r.focusedFieldName){q.value&&mt(q.value);return}const D=(se=j.value.$el)==null?void 0:se.querySelector("img");if(!D)return;if(!D.complete||D.naturalWidth===0){D.onload=()=>{a.nextTick(()=>{de()})};return}const ne=((we=J.value)==null?void 0:we.name)||"",ge=Gi(r.fieldMeta,r.focusedFieldName);if(!ge){mt(q.value);return}if(ge.imageName!==ne){mt(q.value);return}Q(),Cu(q.value,D,ge.bboxNorm)},Ke=()=>{a.nextTick(()=>{Q(),de()})};a.watch(()=>r.focusedFieldName,()=>{if(!s.value)return;const D=Gi(r.fieldMeta,r.focusedFieldName);D!=null&&D.imageName&&be(D.imageName),a.nextTick(()=>{de()})}),a.watch(()=>{var D;return(D=J.value)==null?void 0:D.name},()=>{s.value&&a.nextTick(()=>{q.value&&mt(q.value),de()})}),a.watch(()=>r.visible,D=>{D?(me(),a.nextTick(()=>{Q(),de()})):q.value&&mt(q.value)}),a.watch(()=>r.defaultImageName,()=>{s.value&&me()});let wa=null;a.onMounted(()=>{var D;typeof ResizeObserver<"u"&&(wa=new ResizeObserver(()=>{Q(),a.nextTick(()=>{de()})}),(D=q.value)!=null&&D.parentElement&&wa.observe(q.value.parentElement))}),a.onUnmounted(()=>{wa&&(wa.disconnect(),wa=null),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",$)});const oe=()=>{q.value&&mt(q.value),t("update:visible",!1),t("close")};return(D,ne)=>{var ya,Va;const ge=a.resolveComponent("el-button"),se=a.resolveComponent("el-image"),we=a.resolveComponent("Loading"),la=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Eu,[ne[12]||(ne[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Su,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(z,["stop"])},[ne[8]||(ne[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:oe},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:ne[0]||(ne[0]=a.withModifiers(ae=>ee(ae,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:ne[1]||(ne[1]=a.withModifiers(ae=>ee(ae,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:ne[2]||(ne[2]=a.withModifiers(ae=>ee(ae,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:ne[3]||(ne[3]=a.withModifiers(ae=>ee(ae,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:ne[4]||(ne[4]=a.withModifiers(ae=>ee(ae,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:ne[5]||(ne[5]=a.withModifiers(ae=>ee(ae,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:ne[6]||(ne[6]=a.withModifiers(ae=>ee(ae,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:ne[7]||(ne[7]=a.withModifiers(ae=>ee(ae,"bottom-right"),["stop"]))},null,32),J.value?(a.openBlock(),a.createElementBlock("div",Du,[a.createElementVNode("div",Bu,[a.createElementVNode("div",Nu,[a.createElementVNode("span",Tu,a.toDisplayString(J.value.name?J.value.name+(J.value.url&&J.value.url.lastIndexOf(".")!==-1?J.value.url.substring(J.value.url.lastIndexOf(".")):""):""),1)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Au,[a.createVNode(ge,{size:"small",disabled:g.value===0,onClick:xe},{default:a.withCtx(()=>ne[9]||(ne[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Mu,a.toDisplayString(g.value+1)+" / "+a.toDisplayString(T.value.length),1),a.createVNode(ge,{size:"small",disabled:g.value===T.value.length-1,onClick:te},{default:a.withCtx(()=>ne[10]||(ne[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",zu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.value,(ae,ea)=>(a.openBlock(),a.createElementBlock("div",{key:(ae.name||"")+"-"+ea,class:a.normalizeClass(["img-thumb-item",{active:ea===g.value}]),onClick:Re=>ze(ea)},[ae!=null&&ae.blobUrl?(a.openBlock(),a.createBlock(se,{key:0,src:ae.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ae.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Iu,"加载失败")),a.createElementVNode("div",Lu,a.toDisplayString(ae.name||"-"),1)],10,Ou))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",Vu,[k.value?(a.openBlock(),a.createElementBlock("div",Ru,[a.createVNode(la,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(we)]),_:1}),ne[11]||(ne[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(ya=J.value)!=null&&ya.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(se,{ref_key:"imageRef",ref:j,src:J.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[J.value.blobUrl],onLoad:Ke},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:q,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",$u,[(Va=J.value)!=null&&Va.url?(a.openBlock(),a.createElementBlock("span",Pu,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",Fu,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",ju,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),Uu=Kl._export_sfc(Hu,[["__scopeId","data-v-48a4ecb1"]]),qu={class:"cert-preview-body"},Ku={key:0,class:"pdf-preview-container"},Wu={class:"thumbs"},Yu=["onClick"],Ju={class:"thumb-img"},Gu=["src"],Xu={key:1,class:"thumb-loading"},Zu={class:"thumb-title"},Qu={class:"viewer"},ed={key:0,class:"viewer-img-wrap"},ad=["src"],ld={key:1,class:"viewer-loading"},rd=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(""),d=a.ref(""),b=a.computed(()=>(r.versions||[]).find(x=>String(x.versionId)===String(s.value))),h=a.ref({}),v=a.ref(""),y=a.ref("证书附件.pdf"),c=()=>{try{Object.values(h.value||{}).forEach(x=>{x&&URL.revokeObjectURL(x)}),v.value&&URL.revokeObjectURL(v.value)}catch{}h.value={},v.value=""},C=async x=>{if(!x||x.fileType==="pdf")return;const Y=Array.isArray(x.images)?x.images:[];for(const w of Y){const z=w==null?void 0:w.url;if(!(!z||h.value[z]))try{const ee=await A.platformDownloadFile({url:z}),S=URL.createObjectURL(ee.data);h.value={...h.value,[z]:S}}catch{}}},M=async x=>{var w;if(!x||x.fileType!=="pdf"){v.value="";return}const Y=x.sourceUrl||"";if(!Y){v.value="";return}if(v.value){try{URL.revokeObjectURL(v.value)}catch{}v.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:Y,versionId:x==null?void 0:x.versionId,certNo:x==null?void 0:x.certNo});const z=await A.platformDownloadFile({url:Y});console.log("[CertificatePreview] PDF响应:",{url:Y,status:z==null?void 0:z.status,size:(w=z==null?void 0:z.data)==null?void 0:w.size});const ee=URL.createObjectURL(z.data);v.value=ee;const S=x.certNo?String(x.certNo):"";y.value=S?`${S}.pdf`:"证书附件.pdf"}catch(z){console.error("[CertificatePreview] PDF加载失败:",{url:Y,error:z}),v.value=""}};a.watch(()=>r.visible,async x=>{var w;if(!x){c();return}const Y=(w=r.versions)==null?void 0:w[0];s.value=(Y==null?void 0:Y.versionId)||"",await C(Y),await M(Y)},{immediate:!0}),a.watch(()=>s.value,async()=>{var Y,w;const x=b.value;if(!x){d.value="",v.value="";return}if(x.fileType==="pdf"){d.value="",await M(x);return}v.value="",d.value=((w=(Y=x.images)==null?void 0:Y[0])==null?void 0:w.url)||"",await C(x)},{immediate:!0});const L=()=>{t("update:visible",!1),c()};return a.onBeforeUnmount(()=>{c()}),(x,Y)=>{const w=a.resolveComponent("el-empty"),z=a.resolveComponent("el-tab-pane"),ee=a.resolveComponent("el-tabs"),S=a.resolveComponent("el-button"),$=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock($,{"model-value":x.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:L},{footer:a.withCtx(()=>[a.createVNode(S,{id:"themeBorderButton",onClick:L},{default:a.withCtx(()=>Y[1]||(Y[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[x.versions&&x.versions.length>0?(a.openBlock(),a.createBlock(ee,{key:0,modelValue:s.value,"onUpdate:modelValue":Y[0]||(Y[0]=T=>s.value=T),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.versions,T=>(a.openBlock(),a.createBlock(z,{key:T.versionId,name:T.versionId,label:T.label},{default:a.withCtx(()=>[a.createElementVNode("div",qu,[T.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",Ku,[v.value?(a.openBlock(),a.createBlock(pl.SsFilePreview,{key:1,fileName:y.value,blobUrl:v.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(w,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",Wu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.images||[],k=>(a.openBlock(),a.createElementBlock("div",{key:k.url,class:a.normalizeClass(["thumb",{active:k.url===d.value}]),onClick:g=>d.value=k.url},[a.createElementVNode("div",Ju,[h.value[k.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:h.value[k.url]},null,8,Gu)):(a.openBlock(),a.createElementBlock("div",Xu,"加载中"))]),a.createElementVNode("div",Zu,a.toDisplayString(k.name),1)],10,Yu))),128))]),a.createElementVNode("div",Qu,[d.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[h.value[d.value]?(a.openBlock(),a.createElementBlock("div",ed,[a.createElementVNode("img",{class:"viewer-img",src:h.value[d.value]},null,8,ad)])):(a.openBlock(),a.createElementBlock("div",ld,"加载中"))],64)):(a.openBlock(),a.createBlock(w,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(w,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),nd=Kl._export_sfc(rd,[["__scopeId","data-v-220703c0"]]),td={class:"ocr-candidate-wrap"},od={class:"ocr-candidate-left"},id={key:1},sd={key:0},cd={key:1},ud={key:2},dd={key:3},pd={key:0,class:"ocr-candidate-right"},fd={class:"ocr-candidate-actions"},hd={key:1},vd={class:"dialog-footer"},md={__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(l,{emit:n}){const r=(g=[])=>{const j=[],q=J=>{(J||[]).forEach(me=>{if(!me)return;const ze=me.children||me.childrens||me.columns;Array.isArray(ze)&&ze.length>0?q(ze):j.push(me)})};return q(g),j},t=l,s=n,d=a.computed(()=>{var g;return((g=M.value)==null?void 0:g.allowAdd)!==!1}),b=a.computed(()=>{var g;return((g=M.value)==null?void 0:g.allowReplace)!==!1}),h=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const j=JSON.parse(g);return Array.isArray(j)?j:[]}catch{return[]}return[]},v=g=>{s("preview-file",g)},y=a.ref([]),c=a.ref(0),C=a.ref("");a.watch(()=>t.candidates,g=>{var j,q;y.value=(g||[]).map(J=>({...J,...(J==null?void 0:J.ocrRow)||{},selectedTargetId:(J==null?void 0:J.selectedTargetId)||"",__decision:J==null?void 0:J.__decision})),c.value=0,C.value=((q=(j=y.value)==null?void 0:j[0])==null?void 0:q.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>t.visible,g=>{var j,q;g&&(c.value=0,C.value=((q=(j=y.value)==null?void 0:j[0])==null?void 0:q.selectedTargetId)||"")});const M=a.computed(()=>{var j;const g=Number(c.value||0);return((j=y.value||[])==null?void 0:j[g])||null}),L=a.computed(()=>(r(t.columns||[])||[]).filter(q=>q&&q.prop).filter(q=>q.type!=="operate"&&q.label!=="操作"&&q.prop!=="operate")),x=a.computed(()=>L.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),Y=g=>{if(!g)return;const j=(y.value||[]).findIndex(q=>(q==null?void 0:q.idx)===(g==null?void 0:g.idx));j>-1&&(c.value=j,C.value=(g==null?void 0:g.selectedTargetId)||"")},w=g=>{if(!g){C.value="";return}C.value=String((g==null?void 0:g.id)??"")},z=(g,j="")=>{const q=Number(c.value||0),J=y.value||[],me=J[q];me&&(me.__decision=g,me.selectedTargetId=j,C.value=j,y.value=[...J])},ee=()=>z("skip",""),S=()=>z("add",""),$=()=>{if(!C.value){Qa.ElMessage.warning("请先选择要替换的目标记录");return}z("replace",C.value)},T=()=>{s("update:visible",!1)},k=()=>{const g=y.value||[];if(g.find(q=>(q==null?void 0:q.__decision)==="replace"&&!(q!=null&&q.selectedTargetId))){Qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",g),s("update:visible",!1)};return(g,j)=>{const q=a.resolveComponent("el-table-column"),J=a.resolveComponent("svg-icon"),me=a.resolveComponent("el-table"),ze=a.resolveComponent("el-button"),xe=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(yr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:T},{default:a.withCtx(()=>{var te,be;return[a.createElementVNode("div",td,[a.createElementVNode("div",od,[j[0]||(j[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(me,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:Y},{default:a.withCtx(()=>[a.createVNode(q,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,Q=>(a.openBlock(),a.createBlock(q,{key:Q.prop,label:Q.label,prop:Q.prop,"min-width":Q.minWidth||160},{default:a.withCtx(({row:de})=>[Q.label==="证书附件"||Q.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Q.prop]).length>0?(a.openBlock(),a.createBlock(J,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Q.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",id,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Q.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode(q,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:Q})=>[a.createTextVNode(a.toDisplayString(((Q==null?void 0:Q.candidates)||[]).length),1)]),_:1}),a.createVNode(q,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:Q})=>[(Q==null?void 0:Q.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",sd,"替换")):(Q==null?void 0:Q.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",cd,"新增")):(Q==null?void 0:Q.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",ud,"跳过")):(a.openBlock(),a.createElementBlock("span",dd,"未处理"))]),_:1})]),_:1},8,["data"])]),y.value&&y.value.length>0?(a.openBlock(),a.createElementBlock("div",pd,[j[4]||(j[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",fd,[a.createVNode(ze,{id:"themeBorderButton",onClick:ee},{default:a.withCtx(()=>j[1]||(j[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(ze,{id:"themeBorderButton",onClick:S,disabled:!d.value},{default:a.withCtx(()=>j[2]||(j[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:$,disabled:!b.value||!C.value},{default:a.withCtx(()=>j[3]||(j[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((te=M.value)==null?void 0:te.candidates)||[]).length===0?(a.openBlock(),a.createBlock(xe,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(me,{data:((be=M.value)==null?void 0:be.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:w,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(q,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(L.value,Q=>(a.openBlock(),a.createBlock(q,{key:Q.prop,label:Q.label,prop:Q.prop,"min-width":Q.minWidth||160},{default:a.withCtx(({row:de})=>[Q.label==="证书附件"||Q.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Q.prop]).length>0?(a.openBlock(),a.createBlock(J,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Q.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",hd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Q.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",vd,[a.createVNode(ze,{id:"themeBorderButton",onClick:T},{default:a.withCtx(()=>j[5]||(j[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:k},{default:a.withCtx(()=>j[6]||(j[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},yd=Kl._export_sfc(md,[["__scopeId","data-v-89e0489c"]]),gd={class:"ocr-preview-content"},bd={class:"ocr-preview-tip"},kd={class:"ocr-preview-table"},xd={style:{display:"flex","align-items":"center",gap:"8px"}},_d={class:"dialog-footer"},wd={__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(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref([]),b=a.ref([]);a.watch(()=>r.visible,L=>{L&&(s.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),d.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),b.value=[...r.ocrSelectedFields])});const h=(L,x)=>{const Y=[...b.value];if(x)Y.includes(L)||Y.push(L);else{const w=Y.indexOf(L);w>-1&&Y.splice(w,1)}b.value=Y,t("update:ocrSelectedFields",Y)},v=(L,x,Y)=>{t("fieldChange",{rowIndex:L,prop:x,value:Y})},y=()=>{t("update:ocrPreviewData",s.value),t("confirm",s.value),t("update:visible",!1)},c=()=>{t("update:visible",!1)},C=L=>typeof L!="number"?"-":`${(L*100).toFixed(1)}%`,M=L=>typeof L!="number"?"#606266":L>=.9?"#67c23a":L>=.7?"#e6a23c":"#f56c6c";return(L,x)=>{const Y=a.resolveComponent("el-alert"),w=a.resolveComponent("el-table-column"),z=a.resolveComponent("el-checkbox"),ee=a.resolveComponent("el-input"),S=a.resolveComponent("el-table"),$=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(yr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:c,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",gd,[a.createElementVNode("div",bd,[a.createVNode(Y,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",kd,[a.createVNode(S,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(w,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,T=>(a.openBlock(),a.createBlock(w,{key:T.prop,prop:T.prop,"min-width":T.minWidth||230,"class-name":T.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",xd,[T.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(z,{key:0,"model-value":b.value.includes(T.prop),onChange:k=>h(T.prop,k),onClick:x[0]||(x[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(T.label),1)])]),default:a.withCtx(({row:k,$index:g})=>[T.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:M(k[T.prop]),fontWeight:500})},a.toDisplayString(C(k[T.prop])),5)):(a.openBlock(),a.createBlock(ee,{key:1,modelValue:k[T.prop],"onUpdate:modelValue":j=>k[T.prop]=j,size:"small",placeholder:"请输入"+T.label,onChange:j=>v(g,T.prop,j)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",_d,[a.createVNode($,{onClick:c,id:"themeBorderButton"},{default:a.withCtx(()=>x[1]||(x[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode($,{class:"ok-button",onClick:y,id:"themeButton"},{default:a.withCtx(()=>x[2]||(x[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Cd=Kl._export_sfc(wd,[["__scopeId","data-v-df66eb1f"]]),kt=l=>{var t;let n=l;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let r=(t=Ta.analyzeSplitToContent(n,","))==null?void 0:t.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),oi(s)));return r=r==null?void 0:r.join(","),r};let ja="$R",qs="[Any]";const Ed=l=>{var b,h;let n={},r=l==null?void 0:l[0],t=(h=(b=r==null?void 0:r.replace("{",ja))==null?void 0:b.split(ja))==null?void 0:h[0];(t==null?void 0:t[0])==="*"&&(t=t==null?void 0:t.slice(1,t==null?void 0:t.length)),t=t==null?void 0:t.split(":"),n.group=t;let s=l==null?void 0:l[1],d=s==null?void 0:s.replaceAll(qs,"");return(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),n.filter=d,n},Sd=l=>{var c,C,M,L,x,Y,w;let n=[],r=[],t=l==null?void 0:l.map(z=>{var S;let ee=(S=Ta.analyzeSplitToContent(z,"@"))==null?void 0:S[0];return(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])==="@"&&(ee=ee==null?void 0:ee.slice(0,(ee==null?void 0:ee.length)-1)),ee}),s="",d=Ta.analyzeSplitToContent(t==null?void 0:t[0],":");r=(c=d==null?void 0:d.filter(z=>!(z!=null&&z.includes("{"))&&!(z!=null&&z.includes("["))))==null?void 0:c.join(""),(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==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":");let b=d==null?void 0:d.filter(z=>(z==null?void 0:z.includes("{"))||(z==null?void 0:z.includes("["))),h=(M=b==null?void 0:b[0])==null?void 0:M.slice(1,((C=b==null?void 0:b[0])==null?void 0:C.length)-1);h=(L=Ta.analyzeSplitToContent(h,","))==null?void 0:L.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));let v="@"+((x=Ta.analyzeSplitToContent(l==null?void 0:l[0],"@"))==null?void 0:x[1]);((Y=Ta.analyzeSplitToContent(v,":"))==null?void 0:Y.length)>1&&(n=wt((w=Ta.analyzeSplitToContent(v,":"))==null?void 0:w[1]),n=[n]);let y=[];return h==null||h.forEach((z,ee)=>{var ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe;let S=(ze=z==null?void 0:z.split("=="))==null?void 0:ze[0],$=(xe=z==null?void 0:z.split("=="))==null?void 0:xe[1],T=[],k=[],g=[],j=[],q="Input",J=[],me=[];if((z==null?void 0:z[0])!=="{"){if(($==null?void 0:$[0])==="$")$=$==null?void 0:$.slice(1,$==null?void 0:$.length),T=(be=(te=$==null?void 0:$.split("*"))==null?void 0:te[0])==null?void 0:be.split(":"),k=(D=(oe=(wa=(Ke=(de=(Q=$==null?void 0:$.split("*"))==null?void 0:Q[1])==null?void 0:de.replace("{",ja))==null?void 0:Ke.split(ja))==null?void 0:wa[0])==null?void 0:oe.split(":"))==null?void 0:D.filter(ka=>ka!==""),g=(ge=(ne=$==null?void 0:$.replace("{",ja))==null?void 0:ne.split(ja))==null?void 0:ge[1],g=g==null?void 0:g.replaceAll("}",""),g=g==null?void 0:g.split(":"),q="Select";else if(((se=Ta.analyzeSplitToContent(z,"="))==null?void 0:se.length)>1){let ka=(we=S==null?void 0:S.split("="))==null?void 0:we[1];if(S=(la=S==null?void 0:S.split("="))==null?void 0:la[0],q="Select",!(z!=null&&z.includes("||")))ka=(ya=ka==null?void 0:ka.split("/"))==null?void 0:ya.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)),j=ka==null?void 0:ka.map(Fe=>({label:Fe==null?void 0:Fe.replaceAll("'",""),value:Fe==null?void 0:Fe.replaceAll("'","")}));else{let Fe=[];(Re=(ea=(ae=(Va=z==null?void 0:z.replace("=",ja))==null?void 0:Va.split(ja))==null?void 0:ae[1])==null?void 0:ea.split("||"))==null||Re.forEach($a=>{var Na,Ye,Oe;J.push((Ye=(Na=$a==null?void 0:$a.split("@Filter"))==null?void 0:Na[0])==null?void 0:Ye.split("/")),Fe.push((Oe=$a==null?void 0:$a.split("@Filter"))==null?void 0:Oe[1])}),me=Fe==null?void 0:Fe.map($a=>($a=$a==null?void 0:$a.slice(1,($a==null?void 0:$a.length)-1),$a))}}else if(z!=null&&z.includes("@")&&!(z!=null&&z.includes("||"))){S=(We=(Le=(Ee=(Pe=(ma=S==null?void 0:S.replace("(@",ja))==null?void 0:ma.split(ja))==null?void 0:Pe[0])==null?void 0:Ee.replace("@",ja))==null?void 0:Le.split(ja))==null?void 0:We[0];let ka=z!=null&&z.includes("(@")?"(@"+((Oa=(Ua=z==null?void 0:z.replace("(@",ja))==null?void 0:Ua.split(ja))==null?void 0:Oa[1]):"@"+((F=(P=z==null?void 0:z.replace("@",ja))==null?void 0:P.split(ja))==null?void 0:F[1]);if(ka=(X=kt(ka))==null?void 0:X.split(","),ka!=null&&ka.find(Fe=>Fe==null?void 0:Fe.includes("@Type"))){let Fe=(R=ka==null?void 0:ka.find($a=>$a==null?void 0:$a.includes("@Type")))==null?void 0:R.split("=");Fe!=null&&Fe.includes("File")&&(q="Upload"),Fe!=null&&Fe.includes("Date")&&(q="Date"),Fe!=null&&Fe.includes("DateTime")&&(q="DateTime"),Fe!=null&&Fe.includes("Time")&&(q="Time")}}y.push({prop:S,label:S,value:"",menuPath:T,groups:k,columns:g,width:h==null?void 0:h.length,options:j,type:q,allContents:J,filterContents:me})}else{s=s+"@"+((W=Ta.analyzeSplitToContent(z,"@"))==null?void 0:W[1]);let ka=(Ie=Ta.analyzeSplitToContent(z,"@"))==null?void 0:Ie[0];(ka==null?void 0:ka[(ka==null?void 0:ka.length)-1])==="@"&&(ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1));let Fe=(Ne=ka==null?void 0:ka.split("=="))==null?void 0:Ne[0],$a=(Ce=ka==null?void 0:ka.split("=="))==null?void 0:Ce[1],Na=(He=(K=$a==null?void 0:$a.split("*"))==null?void 0:K[0])==null?void 0:He.replace(qs,"");(Na==null?void 0:Na[0])==="$"&&(Na=Na==null?void 0:Na.slice(1,Na==null?void 0:Na.length)),Na=Ta.analyzeSplitToContent(Na,"$"),Na=(Ve=Na==null?void 0:Na.map((Ye,Oe)=>{var ue;return Oe===0&&(Na==null?void 0:Na.length)>1&&(Ye=(ue=Ye==null?void 0:Ye.split(":"))==null?void 0:ue[0]),(Na==null?void 0:Na.length)>1&&Oe===(Na==null?void 0:Na.length)-1&&(Ye=Ye+":"),Ye}))==null?void 0:Ve.join(":"),T=Na==null?void 0:Na.split(":"),k=(fa=(Te=(ba=($e=(va=(ra=$a==null?void 0:$a.split("*"))==null?void 0:ra[1])==null?void 0:va.replace("{",ja))==null?void 0:$e.split(ja))==null?void 0:ba[0])==null?void 0:Te.split(":"))==null?void 0:fa.filter(Ye=>Ye!==""),g=(ga=(Ue=$a==null?void 0:$a.replace("{",ja))==null?void 0:Ue.split(ja))==null?void 0:ga[1],g=g==null?void 0:g.replaceAll("}",""),Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1),g=g==null?void 0:g.split(","),q="Select",(fe=Fe==null?void 0:Fe.split(","))==null||fe.forEach((Ye,Oe)=>{var ue,ie;y.push({prop:Ye,label:Ye,value:"",menuPath:T,groups:k,columns:(ue=g==null?void 0:g[Oe])==null?void 0:ue.split(":"),width:(ie=Fe==null?void 0:Fe.split(","))==null?void 0:ie.length,type:q})})}}),{groupName:r,formContents:y,contents:n,filter:s}},wt=l=>{var t,s;let n=[],r=l.slice(1,(l==null?void 0:l.length)-1);if((r==null?void 0:r[0])!=="[")(t=Ta.analyzeSplitToContent(r,","))==null||t.forEach(d=>{(d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d.slice(0,(d==null?void 0:d.length)-1)),n.push(d??"")});else{let d=[];(s=Ta.analyzeSplitToContent(r,","))==null||s.forEach(b=>{(b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),d.push(wt(b))}),n=d}return n},ti=(l,n)=>{var Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye;let r,t=[],s=[],d=[],b=[],h=[],v=[],y="Input",c,C="",M="",L=[],x="";if(l!=null&&l.includes("@Pam")||l!=null&&l.includes("==")||l!=null&&l.includes("="))if(l!=null&&l.includes("@Pam")){let Oe=Ta.analyzeSplitToContent(l,"=");if((Oe==null?void 0:Oe.length)>1){l=Oe==null?void 0:Oe[0],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1);let na=Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1];(na==null?void 0:na[0])==="&"&&(na=na==null?void 0:na.slice(1,na==null?void 0:na.length)),M=(w=(Y=na==null?void 0:na.replace("(",ja))==null?void 0:Y.split(ja))==null?void 0:w[0];let qa=(ee=(z=na==null?void 0:na.replace(")",ja))==null?void 0:z.split(ja))==null?void 0:ee[0];qa=($=(S=qa==null?void 0:qa.replace("(",ja))==null?void 0:S.split(ja))==null?void 0:$[1],(qa==null?void 0:qa[0])==="{"&&(qa=qa==null?void 0:qa.slice(1,qa==null?void 0:qa.length)),(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])==="}"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),L=qa==null?void 0:qa.split(",");let rl=(k=(T=na==null?void 0:na.replace(")",ja))==null?void 0:T.split(ja))==null?void 0:k[1];rl&&rl!==""&&(x=kt(rl))}r=(j=(g=l==null?void 0:l.replace("@Pam",ja))==null?void 0:g.split(ja))==null?void 0:j[0];let ue=(J=(q=l==null?void 0:l.replace("@Pam",ja))==null?void 0:q.split(ja))==null?void 0:J[1];ue=ue==null?void 0:ue.slice(1,(ue==null?void 0:ue.length)-1),ue=(me=Ta.analyzeSplitToContent(ue,","))==null?void 0:me.map(na=>(na="@"+na,na));let ie=ue==null?void 0:ue.find(na=>na==null?void 0:na.includes("@Type"));ie!=null&&ie.includes("File")&&(y="Upload"),ie!=null&&ie.includes("Date")&&(y="Date"),ie!=null&&ie.includes("DateTime")&&(y="DateTime"),ie!=null&&ie.includes("Time")&&(y="Time"),c=ue==null?void 0:ue.find(na=>na==null?void 0:na.includes("@IdentName")),c=c?(xe=(ze=c==null?void 0:c.replace("=",ja))==null?void 0:ze.split(ja))==null?void 0:xe[1]:r}else{if(r=(te=l==null?void 0:l.split("=="))==null?void 0:te[0],c=(be=l==null?void 0:l.split("=="))==null?void 0:be[0],l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((Ke=(de=(Q=l==null?void 0:l.replace("=",ja))==null?void 0:Q.split(ja))==null?void 0:de[1])!=null&&Ke.includes("||")))if(r=(wa=l==null?void 0:l.split("="))==null?void 0:wa[0],c=r,l!=null&&l.includes("(@")||l!=null&&l.includes("@")){if(l!=null&&l.includes("(@")){let ue=(oe=l==null?void 0:l.split("(@"))==null?void 0:oe[1];ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),ue=(ne=(D=ue==null?void 0:ue.replace("(",ja))==null?void 0:D.split(ja))==null?void 0:ne[1],ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),d==null||d.push(ue),l=(ge=l==null?void 0:l.split("(@"))==null?void 0:ge[0]}else{let ue=(se=l==null?void 0:l.split("@"))==null?void 0:se[1];ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),ue=(la=(we=ue==null?void 0:ue.replace("(",ja))==null?void 0:we.split(ja))==null?void 0:la[1],ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),d==null||d.push(ue),l=(ya=l==null?void 0:l.split("@"))==null?void 0:ya[0]}let Oe=(ae=(Va=l==null?void 0:l.split("="))==null?void 0:Va[1])==null?void 0:ae.split("/");s.push(Oe)}else t=(Re=Ta.analyzeSplitToContent((ea=l==null?void 0:l.split("="))==null?void 0:ea[1],"/"))==null?void 0:Re.map(Oe=>((Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])==="/"&&(Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1)),Oe)),t=t==null?void 0:t.map(Oe=>({label:Oe==null?void 0:Oe.replaceAll("'",""),value:Oe==null?void 0:Oe.replaceAll("'","")}));else if((Ee=(Pe=(ma=l==null?void 0:l.replace("=",ja))==null?void 0:ma.split(ja))==null?void 0:Pe[1])!=null&&Ee.includes("||")){r=(Le=l==null?void 0:l.split("="))==null?void 0:Le[0],c=(We=l==null?void 0:l.split("="))==null?void 0:We[0];let Oe=[];(F=(P=(Oa=(Ua=l==null?void 0:l.replace("=",ja))==null?void 0:Ua.split(ja))==null?void 0:Oa[1])==null?void 0:P.split("||"))==null||F.forEach(ue=>{var ie,na,qa;s.push((na=(ie=ue==null?void 0:ue.split("@Filter"))==null?void 0:ie[0])==null?void 0:na.split("/")),Oe.push((qa=ue==null?void 0:ue.split("@Filter"))==null?void 0:qa[1])}),d=Oe==null?void 0:Oe.map(ue=>(ue=ue==null?void 0:ue.slice(1,(ue==null?void 0:ue.length)-1),ue))}else{let Oe=l==null?void 0:l.split("=="),ue=(X=Oe==null?void 0:Oe.filter(ie=>(ie==null?void 0:ie[0])==="$"))==null?void 0:X[0];if(!(ue!=null&&ue.includes("&"))){let ie=(R=ue==null?void 0:ue.replace("*",ja))==null?void 0:R.split(ja),na=(ie==null?void 0:ie[0])===""?n==null?void 0:n.value:ie==null?void 0:ie[0];na=na==null?void 0:na.replaceAll("[Any]",""),(na==null?void 0:na[0])==="$"&&(na=(W=na==null?void 0:na.slice(1,na==null?void 0:na.length))==null?void 0:W.replaceAll(":","/")),b=na==null?void 0:na.split("/");let qa=(Ne=(Ie=ie==null?void 0:ie[1])==null?void 0:Ie.replace("{",ja))==null?void 0:Ne.split(ja),rl=qa==null?void 0:qa[0];(rl==null?void 0:rl[(rl==null?void 0:rl.length)-1])===":"&&(rl=rl==null?void 0:rl.slice(0,(rl==null?void 0:rl.length)-1)),h=rl==null?void 0:rl.split(":"),v=(Ve=(He=(K=(Ce=qa==null?void 0:qa[1])==null?void 0:Ce.replace("}",ja))==null?void 0:K.split(ja))==null?void 0:He[0])==null?void 0:Ve.split(":");let Ml=($e=(va=(ra=qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])==null?void 0:ra.replace("}",ja))==null?void 0:va.split(ja))==null?void 0:$e[1];Ml&&Ml!==""&&(C=kt(Ml))}if(Oe!=null&&Oe.some(ie=>(ie==null?void 0:ie[0])==="&")){let ie=(ba=Oe==null?void 0:Oe.filter(rl=>(rl==null?void 0:rl[0])==="&"))==null?void 0:ba[0];(ie==null?void 0:ie[0])==="&"&&(ie=ie==null?void 0:ie.slice(1,ie==null?void 0:ie.length)),M=(fa=(Te=ie==null?void 0:ie.replace("(",ja))==null?void 0:Te.split(ja))==null?void 0:fa[0];let na=(ga=(Ue=ie==null?void 0:ie.replace(")",ja))==null?void 0:Ue.split(ja))==null?void 0:ga[0];na=(ka=(fe=na==null?void 0:na.replace("(",ja))==null?void 0:fe.split(ja))==null?void 0:ka[1],(na==null?void 0:na[0])==="{"&&(na=na==null?void 0:na.slice(1,na==null?void 0:na.length)),(na==null?void 0:na[(na==null?void 0:na.length)-1])==="}"&&(na=na==null?void 0:na.slice(0,(na==null?void 0:na.length)-1)),L=na==null?void 0:na.split(",");let qa=($a=(Fe=ie==null?void 0:ie.replace(")",ja))==null?void 0:Fe.split(ja))==null?void 0:$a[1];qa&&qa!==""&&(x=kt(qa))}}y="Select"}else r=l,c=l;return r!=null&&r.includes("@Pam")&&(r=(Ye=(Na=l==null?void 0:l.replace("@Pam",ja))==null?void 0:Na.split(ja))==null?void 0:Ye[0],c=r),{label:r,prop:c,options:t,allContents:s,filterContents:d,menus:b,groups:h,words:v,align:"center",formType:y,filter:C,functionName:M,functionRelatedWords:L,calculatorFilter:x}},xo=(l,n)=>{var t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be;let r=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((b=(d=(s=(t=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:t.replace(":",ja))==null?void 0:s.split(ja))==null?void 0:d[0])!=null&&b.includes(","))){let Q=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),de=(h=Q==null?void 0:Q.replace(":",ja))==null?void 0:h.split(ja);if(((v=Ta.analyzeSplitToContent(de==null?void 0:de[1],"="))==null?void 0:v.length)===1){let Ke=de==null?void 0:de[0],wa=[];(C=Ta.analyzeSplitToContent((c=de==null?void 0:de[1])==null?void 0:c.slice(1,((y=de==null?void 0:de[1])==null?void 0:y.length)-1),","))==null||C.forEach(oe=>{var D,ne;((D=Ta.analyzeSplitToContent(oe,"="))==null?void 0:D.length)>1?((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),wa=[...wa,...xo(oe,n)]):((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),wa.push((ne=xo(oe,n))==null?void 0:ne[0]))}),r==null||r.push({label:Ke,prop:Ke,children:wa,align:"center"})}else{let Ke=[];if(((M=Ta.analyzeSplitToContent(Q,"="))==null?void 0:M.length)>=2){let oe=(L=Ta.analyzeSplitToContent(Q,"="))==null?void 0:L[1],D=(x=Ta.analyzeSplitToContent(oe,"/"))==null?void 0:x.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));Ke=D==null?void 0:D.map(ne=>(ne=wt(ne),ne))}let wa=($=(S=(ee=(z=(w=(Y=Q==null?void 0:Q.replace("{",ja))==null?void 0:Y.split(ja))==null?void 0:w[1])==null?void 0:z.replace("}",ja))==null?void 0:ee.split(ja))==null?void 0:S[0])==null?void 0:$.split(",");wa==null||wa.forEach((oe,D)=>{(Ke==null?void 0:Ke.length)>0&&D===0?r==null||r.push({label:oe,prop:oe,align:"center",formType:"Select",relatedContents:Ke==null?void 0:Ke.map(ne=>{let ge={};return wa==null||wa.forEach((se,we)=>{ge[se]=ne==null?void 0:ne[we]}),ge}),options:Ke==null?void 0:Ke.map(ne=>({label:ne==null?void 0:ne[0],value:ne==null?void 0:ne[0]})),mainKey:!0}):r==null||r.push({label:oe,prop:oe,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((T=Ta.analyzeSplitToContent(l,"="))==null?void 0:T.length)===2&&((g=(k=Ta.analyzeSplitToContent(l,"="))==null?void 0:k[1])==null?void 0:g[0])==="["){let Q=[];if(((j=Ta.analyzeSplitToContent(l,"="))==null?void 0:j.length)>=2){let Ke=(q=Ta.analyzeSplitToContent(l,"="))==null?void 0:q[1],wa=(J=Ta.analyzeSplitToContent(Ke,"/"))==null?void 0:J.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])==="/"&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe));Q=wa==null?void 0:wa.map(oe=>(oe=wt(oe),oe))}let de=(ze=(me=l==null?void 0:l.replace("}",ja))==null?void 0:me.split(ja))==null?void 0:ze[0];de=(xe=de==null?void 0:de.slice(1,de==null?void 0:de.length))==null?void 0:xe.split(","),de==null||de.forEach((Ke,wa)=>{(Q==null?void 0:Q.length)>0&&wa===0?r==null||r.push({label:Ke,prop:Ke,align:"center",formType:"Select",relatedContents:Q==null?void 0:Q.map(oe=>{let D={};return de==null||de.forEach((ne,ge)=>{D[ne]=oe==null?void 0:oe[ge]}),D}),options:Q==null?void 0:Q.map(oe=>({label:oe==null?void 0:oe[0],value:oe==null?void 0:oe[0]})),mainKey:!0}):r==null||r.push({label:Ke,prop:Ke,align:"center"})})}else(te=Ta.analyzeSplitToContent(l,","))==null||te.forEach(Q=>{var de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if((Q==null?void 0:Q[(Q==null?void 0:Q.length)-1])===","&&(Q=Q==null?void 0:Q.slice(0,(Q==null?void 0:Q.length)-1)),(Q==null?void 0:Q[0])==="{"){let fe=Ta.analyzeSplitToContent(Q,"="),ka=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1],Fe=[],$a=[],Na=[],Ye=[],Oe=[],ue=(de=ka==null?void 0:ka.replace("*",ja))==null?void 0:de.split(ja),ie=(ue==null?void 0:ue[0])===""?n==null?void 0:n.value:ue==null?void 0:ue[0];if(ie=ie==null?void 0:ie.replaceAll("[Any]",""),(ie==null?void 0:ie[(ie==null?void 0:ie.length)-1])===":"&&(ie=ie!=null&&ie.includes("(@")?((Ke=ie==null?void 0:ie.split("(@"))==null?void 0:Ke[0])+":":((wa=ie==null?void 0:ie.split("@"))==null?void 0:wa[0])+":"),(ie==null?void 0:ie[0])==="$"&&(ie=(oe=ie==null?void 0:ie.slice(1,ie==null?void 0:ie.length))==null?void 0:oe.replaceAll(":","/")),ie!=null&&ie.includes("$")){let nl=(D=ie==null?void 0:ie.split("$"))==null?void 0:D[0];nl=(ne=nl==null?void 0:nl.split("/"))==null?void 0:ne[0],ie=nl+"/"+((ge=ie==null?void 0:ie.split("$"))==null?void 0:ge[1])+"/"}(ie==null?void 0:ie[(ie==null?void 0:ie.length)-1])==="/"&&(ie==null?void 0:ie[(ie==null?void 0:ie.length)-2])==="/"&&(ie=ie==null?void 0:ie.slice(0,(ie==null?void 0:ie.length)-1)),Fe=ie==null?void 0:ie.split("/");let na=(we=(se=ue==null?void 0:ue[1])==null?void 0:se.replace("{",ja))==null?void 0:we.split(ja);if((Va=(ya=(la=ue==null?void 0:ue[1])==null?void 0:la.split("(@"))==null?void 0:ya[0])!=null&&Va.includes("&&")||(Re=(ea=(ae=ue==null?void 0:ue[1])==null?void 0:ae.split("@"))==null?void 0:ea[0])!=null&&Re.includes("&&")){let nl=(ma=ue==null?void 0:ue[1])!=null&&ma.includes("(@")?(Le=(Ee=(Pe=ue==null?void 0:ue[1])==null?void 0:Pe.split("(@"))==null?void 0:Ee[0])==null?void 0:Le.split("&&"):(Oa=(Ua=(We=ue==null?void 0:ue[1])==null?void 0:We.split("@"))==null?void 0:Ua[0])==null?void 0:Oa.split("&&");Ye=nl==null?void 0:nl.map(aa=>{var Se,Xa;return(aa==null?void 0:aa[0])==="*"&&(aa=aa==null?void 0:aa.slice(1,aa==null?void 0:aa.length)),aa=(Xa=(Se=aa==null?void 0:aa.replace("{",ja))==null?void 0:Se.split(ja))==null?void 0:Xa[0],(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=aa==null?void 0:aa.split(":"),aa});let Ca=[];nl==null||nl.forEach((aa,Se)=>{var Xa,Ya;(aa==null?void 0:aa[0])==="*"&&(aa=aa==null?void 0:aa.slice(1,aa==null?void 0:aa.length)),aa=(Ya=(Xa=aa==null?void 0:aa.replace("{",ja))==null?void 0:Xa.split(ja))==null?void 0:Ya[1],(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=aa==null?void 0:aa.split(","),Ca.push(Se===0?(aa==null?void 0:aa.length)-1:aa==null?void 0:aa.length),Oe=[...Oe,...aa]}),Ca=(P=Ta.prefixSum(Ca))==null?void 0:P.map(aa=>aa==null?void 0:aa.total),Ye=Ye==null?void 0:Ye.map((aa,Se)=>({number:Ca==null?void 0:Ca[Se],contents:aa}))}let qa=na==null?void 0:na[0];(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])===":"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),$a=qa==null?void 0:qa.split(":"),Na=(W=(R=(X=(F=na==null?void 0:na[1])==null?void 0:F.replace("}",ja))==null?void 0:X.split(ja))==null?void 0:R[0])==null?void 0:W.split(",");let rl=(Ne=fe==null?void 0:fe[0])==null?void 0:Ne.slice(1,((Ie=fe==null?void 0:fe[0])==null?void 0:Ie.length)-2),Ml="",Fa="";if((Ce=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])!=null&&Ce.includes("(@")?(Fa=(Ve=(He=(K=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])==null?void 0:K.replace("(@",ja))==null?void 0:He.split(ja))==null?void 0:Ve[1],Fa="(@"+Fa):(ra=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])!=null&&ra.includes("@")&&(Fa=(ba=($e=(va=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])==null?void 0:va.replace("@",ja))==null?void 0:$e.split(ja))==null?void 0:ba[1],Fa="@"+Fa),((Te=Ta.analyzeSplitToContent(Fa,"&"))==null?void 0:Te.length)>1){let nl=(Ue=(fa=Ta.analyzeSplitToContent(Fa,"}"))==null?void 0:fa.map(Ca=>{var aa;return Ca!=null&&Ca.includes("@")||(Ca=""),Ca!=null&&Ca.includes("@")&&(Ca=(aa=Ta.analyzeSplitToContent(Ca,":"))==null?void 0:aa[0],(Ca==null?void 0:Ca[(Ca==null?void 0:Ca.length)-1])===":"&&(Ca=Ca==null?void 0:Ca.slice(0,(Ca==null?void 0:Ca.length)-1)),(Ca==null?void 0:Ca[0])==="("&&(Ca=Ca==null?void 0:Ca.slice(1,(Ca==null?void 0:Ca.length)-1))),Ca}))==null?void 0:Ue.filter(Ca=>Ca!=="");Fa=(Fa==null?void 0:Fa.length)===1?nl:"("+(nl==null?void 0:nl.join(","))+")"}Fa&&Fa!==""&&(Ml=kt(Fa)),(ga=rl==null?void 0:rl.split(","))==null||ga.forEach((nl,Ca)=>{var aa,Se,Xa;r.push({label:nl,prop:nl,align:"center",menus:Fe,groups:(Ye==null?void 0:Ye.length)===0?$a:(aa=Ye==null?void 0:Ye.find(Ya=>(Ya==null?void 0:Ya.number)>=Ca))==null?void 0:aa.contents,words:(Oe==null?void 0:Oe.length)===0?(Se=Na==null?void 0:Na[Ca])==null?void 0:Se.split(":"):(Xa=Oe==null?void 0:Oe[Ca])==null?void 0:Xa.split(":"),formType:(Fe==null?void 0:Fe.length)>0?"Select":"Input",mainKey:Ca===0,filter:Ml,isMainPath:(Ye==null?void 0:Ye.findIndex(Ya=>(Ya==null?void 0:Ya.number)>=Ca))===0})})}else r.push({label:Q,prop:Q,align:"center"})});else{let Q=(be=Ta.analyzeSplitToContent(l,","))==null?void 0:be.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));Q==null||Q.forEach(de=>{r.push(ti(de,n))})}return r},Dd=(l,n)=>{var b,h,v,y,c;let r=l;if(!l)return;let t="";((b=Ta.analyzeSplitToContent(l,"}"))==null?void 0:b.length)>1&&(r=(h=Ta.analyzeSplitToContent(l,"}"))==null?void 0:h[0],t=(v=Ta.analyzeSplitToContent(l,"}"))==null?void 0:v[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let s=[],d=[];return s.push({label:"排序",prop:"sort"}),(y=Ta.analyzeSplitToContent(r,","))==null||y.forEach(C=>{var M;(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)),(C==null?void 0:C[0])==="{"?(M=xo(C,n))==null||M.forEach(L=>{s.push(L)}):s.push(ti(C,n))}),t!==""&&((t==null?void 0:t[0])=="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),(c=Ta.analyzeSplitToContent(t,","))==null||c.forEach(C=>{var M;(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)),(C==null?void 0:C[0])==="{"?(M=xo(C,n))==null||M.forEach(L=>{d.push(L)}):d.push(ti(C,n))})),{columns:s,secondColumns:d}},oi=l=>{var n,r,t;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition"))return l;{let s=(r=(n=l==null?void 0:l.replace("(",ja))==null?void 0:n.split(ja))==null?void 0:r[1];return s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1),s=(t=Ta.analyzeSplitToContent(s,","))==null?void 0:t.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)),s=s==null?void 0:s.join(","),l!=null&&l.includes("@Quote")&&(s!=null&&s.includes("@Type")||(s=s===""?s+"@Type=Manual":s+",@Type=Manual"),s!=null&&s.includes("@SonSync")||(s=s===""?s+"@SonSync=No":s+",@SonSync=No"),s!=null&&s.includes("@FatherSync")||(s=s===""?s+"@FatherSync=Yes":s+",@FatherSync=Yes")),s}},Xi=l=>{let n=l==null?void 0:l.map(r=>{var t,s;return{menus:r==null?void 0:r.menus,content:((t=r==null?void 0:r.menus)==null?void 0:t.join("/"))+ja+((s=r==null?void 0:r.groups)==null?void 0:s.join("/"))}});return n=n==null?void 0:n.filter(r=>{var t;return(r==null?void 0:r.menus)&&((t=r==null?void 0:r.menus)==null?void 0:t.length)>0}),n=n==null?void 0:n.map(r=>r==null?void 0:r.content),n=[...new Set(n)],n=n==null?void 0:n.map(r=>{var t,s;return{menus:(t=r==null?void 0:r.split(ja))==null?void 0:t[0],groups:((s=r==null?void 0:r.split(ja))==null?void 0:s[1])??[]}}),n},Bd=(l,n,r="")=>{var z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X;let t=[];if(((z=l==null?void 0:l[0])==null?void 0:z[0])!=="*"&&((ee=l==null?void 0:l[0])==null?void 0:ee[0])!=="$")return;let s=Ta.analyzeSplitToContent(l==null?void 0:l[0],":"),d=s==null?void 0:s.filter(R=>!((R==null?void 0:R[0])!=="{"&&(R==null?void 0:R[0])!=="["));t=(S=s==null?void 0:s.filter(R=>(R==null?void 0:R[0])!=="{"&&(R==null?void 0:R[0])!=="["))==null?void 0:S.join("");let b="",h="";if((t==null?void 0:t[(t==null?void 0:t.length)-1])===":"&&(t=t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1)),t!=null&&t.includes("(@")&&(t==null?void 0:t[0])==="*"&&(b="(@"+(($=t==null?void 0:t.split("(@"))==null?void 0:$[1]),t=(T=t==null?void 0:t.split("(@"))==null?void 0:T[0]),t!=null&&t.includes("@")&&(t==null?void 0:t[0])==="*"&&(b="@"+((g=(k=t==null?void 0:t.replace("@",ja))==null?void 0:k.split(ja))==null?void 0:g[1]),t=(q=(j=t==null?void 0:t.replace("@",ja))==null?void 0:j.split(ja))==null?void 0:q[0]),(t==null?void 0:t[0])==="*"?(t=t==null?void 0:t.slice(1,t==null?void 0:t.length),t=t==null?void 0:t.split(":")):(h=A.cloneDeep(t)+":",t=[]),h=h+((d==null?void 0:d[0])??""),(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)),b!==""&&h!=="")if((h==null?void 0:h[(h==null?void 0:h.length)-1])===")")if(h!=null&&h.includes("(@")){let R=(J=h==null?void 0:h.split("(@"))==null?void 0:J[0],W=(me=h==null?void 0:h.split("(@"))==null?void 0:me[1];W="(@"+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1))+b,h=R+W}else{let R=(xe=(ze=h==null?void 0:h.replace("@",ja))==null?void 0:ze.split(ja))==null?void 0:xe[0],W=(be=(te=h==null?void 0:h.replace("@",ja))==null?void 0:te.split(ja))==null?void 0:be[1];W="(@"+W+b,h=R+W}else h=h+b;let v=d==null?void 0:d[1];(h==null?void 0:h[0])==="["&&(v=A.cloneDeep(h)+(v??""),h="");let y=v?wt(v):[];!(y!=null&&y.every(R=>Array.isArray(R)))&&(y==null?void 0:y.length)>0&&(y=[y]);let c=(Q=Ta.analyzeSplitToContent(h,"@"))!=null&&Q[1]?"@"+((de=Ta.analyzeSplitToContent(h,"@"))==null?void 0:de[1]):"";if(h=(Ke=Ta.analyzeSplitToContent(h,"@"))==null?void 0:Ke[0],(h==null?void 0:h[0])==="$"&&(c=A.cloneDeep(h)+(c??""),h=""),r!==""&&(b!==""?c=(r==null?void 0:r[(r==null?void 0:r.length)-1])!==")"?r+b:(r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1))+","+b:c=r),c!==""){(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),(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));let R="";if(c!=null&&c.includes("(@")){R=(oe=(wa=c==null?void 0:c.replace("(@",ja))==null?void 0:wa.split(ja))==null?void 0:oe[0];let W=(ne=(D=c==null?void 0:c.replace("(@",ja))==null?void 0:D.split(ja))==null?void 0:ne[1];W="@"+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1));let Ie=(ge=Ta.analyzeSplitToContent(W,","))==null?void 0:ge.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==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])!==")"&&(Ne=Ne+")"),oi(Ne)));c=R+"("+(Ie==null?void 0:Ie.join(","))+")"}else{R=(we=(se=c==null?void 0:c.replace("@",ja))==null?void 0:se.split(ja))==null?void 0:we[0];let W=(ya=(la=c==null?void 0:c.replace("@",ja))==null?void 0:la.split(ja))==null?void 0:ya[1];if(W){W="@"+W;let Ie=(Va=Ta.analyzeSplitToContent(W,","))==null?void 0:Va.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])!==")"&&(Ne=Ne+")"),oi(Ne)));c=R+"("+(Ie==null?void 0:Ie.join(","))+")"}else c=R}}(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));let C=Dd(h,n),M=h===""?[]:(C==null?void 0:C.columns)??[],L=ua.getColumnChild(M),x=L;x=x==null?void 0:x.filter(R=>{var W,Ie;return(R==null?void 0:R.filter)&&(R==null?void 0:R.filter)!==""&&(((W=R==null?void 0:R.filter)==null?void 0:W.includes("@SonSync"))||((Ie=R==null?void 0:R.filter)==null?void 0:Ie.includes("@FatherSync")))});let Y=x==null?void 0:x.filter(R=>{var W,Ie,Ne;return((W=R==null?void 0:R.filter)==null?void 0:W.includes("@SonSync"))&&((Ne=(Ie=R==null?void 0:R.filter)==null?void 0:Ie.split(","))==null?void 0:Ne.find(Ce=>(Ce==null?void 0:Ce.includes("@SonSync"))&&(Ce==null?void 0:Ce.includes("Yes"))))}),w=x==null?void 0:x.filter(R=>{var W,Ie,Ne;return((W=R==null?void 0:R.filter)==null?void 0:W.includes("@FatherSync"))&&((Ne=(Ie=R==null?void 0:R.filter)==null?void 0:Ie.split(","))==null?void 0:Ne.find(Ce=>(Ce==null?void 0:Ce.includes("@FatherSync"))&&(Ce==null?void 0:Ce.includes("Yes"))))});if(L=L==null?void 0:L.map(R=>{var W,Ie;return{menus:R==null?void 0:R.menus,content:((W=R==null?void 0:R.menus)==null?void 0:W.join("/"))+ja+((Ie=R==null?void 0:R.groups)==null?void 0:Ie.join("/"))}}),w=Xi(w),Y=Xi(Y),L=L==null?void 0:L.filter(R=>{var W;return(R==null?void 0:R.menus)&&((W=R==null?void 0:R.menus)==null?void 0:W.length)>0}),L=L==null?void 0:L.map(R=>R==null?void 0:R.content),L=[...new Set(L)],L=L==null?void 0:L.map(R=>{var W,Ie;return{menus:(W=R==null?void 0:R.split(ja))==null?void 0:W[0],groups:((Ie=R==null?void 0:R.split(ja))==null?void 0:Ie[1])??[]}}),M!=null&&M.some(R=>{var W;return Array.isArray(R==null?void 0:R.children)&&((W=R==null?void 0:R.children)==null?void 0:W.length)>0})&&(M=[M]),(y==null?void 0:y.length)>0&&(Array.isArray(y==null?void 0:y[0])&&((ae=y==null?void 0:y[0])!=null&&ae.every(R=>Array.isArray(R)))?y=y==null?void 0:y.map((R,W)=>(R=R.map((Ie,Ne)=>(Ie.unshift((Ne+1).toString()),Ie)),R)):y=y==null?void 0:y.map((R,W)=>(R.unshift((W+1).toString()),R))),C!=null&&C.secondColumns&&((ea=C==null?void 0:C.secondColumns)==null?void 0:ea.length)>0&&((y==null?void 0:y.length)>0?y=y==null?void 0:y.map((R,W)=>{var Ie,Ne;return Array.isArray(R==null?void 0:R[0])?R=R==null?void 0:R.map((Ce,K)=>{var He,Ve;return Ce.unshift((Ve=(He=C==null?void 0:C.secondColumns)==null?void 0:He[K])==null?void 0:Ve.prop),Ce}):R.unshift((Ne=(Ie=C==null?void 0:C.secondColumns)==null?void 0:Ie[W])==null?void 0:Ne.prop),R}):y=(Re=C==null?void 0:C.secondColumns)==null?void 0:Re.map((R,W)=>(R=[R==null?void 0:R.label],R.push(W),R)),M.unshift({label:"",prop:"disabled",sortable:!1})),(M==null?void 0:M.length)>0){let R=A.cloneDeep(M);Array.isArray(R==null?void 0:R[0])&&(R=R==null?void 0:R[0]);let W=ua.getColumnChild(R);W=W==null?void 0:W.map(Ie=>Ie==null?void 0:Ie.filter),W=W==null?void 0:W.filter(Ie=>Ie&&Ie!==""),W=[...new Set(W)],(W==null?void 0:W.length)>0&&(c=ja+(c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1))+(c!=null&&c.slice(1,(c==null?void 0:c.length)-1)?",":"")+((ma=A.cloneDeep(W))==null?void 0:ma.join(";")))}if((c==null?void 0:c[0])!=="("&&(c!=null&&c.includes("(@"))){let R=(Ee=(Pe=c==null?void 0:c.replace("(",ja))==null?void 0:Pe.split(ja))==null?void 0:Ee[0],W=[{menus:(We=(Le=R==null?void 0:R.split("*"))==null?void 0:Le[0])==null?void 0:We.replaceAll(":","/"),groups:(Ua=R==null?void 0:R.split("*"))==null?void 0:Ua[1]}],Ie=(P=(Oa=c==null?void 0:c.replace("(",ja))==null?void 0:Oa.split(ja))==null?void 0:P[1];(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)),Ie=Ta.analyzeSplitToContent(Ie,","),(F=Ie==null?void 0:Ie.find(Ne=>Ne==null?void 0:Ne.includes("@FatherSync")))!=null&&F.includes("Yes")&&(w=[...w,...W]),(X=Ie==null?void 0:Ie.find(Ne=>Ne==null?void 0:Ne.includes("@SonSync")))!=null&&X.includes("Yes")&&(Y=[...Y,...W])}return{groupName:t,tableColumns:M,tableFilter:c,tableContents:y,columns:(C==null?void 0:C.secondColumns)??[],relatedQuotes:L,fatherSyncContents:w,sonSyncContents:Y}},Ks=(l,n)=>(l=l==null?void 0:l.map((r,t)=>{var s,d,b,h;if(Array.isArray(r))r=r==null?void 0:r.map(v=>{var y,c,C,M;return v!=null&&v.isMainPath||(((y=v==null?void 0:v.children)==null?void 0:y.length)>0?v.children=Ks(v.children,n):((c=v==null?void 0:v.menus)==null?void 0:c.length)>0&&!((C=r==null?void 0:r[0])!=null&&C.isMainPath)&&(v.menus=(M=v.menus)==null?void 0:M.map((L,x)=>{var Y,w;return((Y=v.menus)==null?void 0:Y.length)-1===x&&L===""&&(n==null?void 0:n.parentContent)+"/"!==((w=v.menus)==null?void 0:w.join("/"))&&(L=n==null?void 0:n.value),v}),v.bindMenus=v.menus)),v});else{if(t===0&&((s=r.menus)==null?void 0:s.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((d=r.menus)==null?void 0:d.length)>0&&!((b=l==null?void 0:l[0])!=null&&b.isMainPath)&&(r.menus=(h=r.menus)==null?void 0:h.map((v,y)=>{var c,C;return((c=r.menus)==null?void 0:c.length)-1===y&&v===""&&(n==null?void 0:n.parentContent)+"/"!==((C=r.menus)==null?void 0:C.join("/"))&&(v=n==null?void 0:n.value),v}),r.bindMenus=r.menus)}return r}),l),Nd=(l,n)=>(l=l==null?void 0:l.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=Ks(r.contents,n)),r)),l),ii=(l,n)=>{let r=l;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(t=>(t=ii(t,n),t)):r=r==null?void 0:r.map(t=>{var s,d;return t!=null&&t.children&&((s=t==null?void 0:t.children)==null?void 0:s.length)>0?t.children=ii(t==null?void 0:t.children,n):t!=null&&t.words&&((d=t==null?void 0:t.words)==null?void 0:d.length)>0&&(n!=null&&n.find(b=>{var h,v,y,c;return((c=(h=t==null?void 0:t.prop)==null?void 0:h.split("."))==null?void 0:c[((y=(v=t==null?void 0:t.prop)==null?void 0:v.split("."))==null?void 0:y.length)-1])===b}))&&(t.mainKey=!0),t}),r};let tr="$R";const Td=A.useUnit(A.pinia),{selectTitle:cn}=A.storeToRefs(Td),un=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1}];var Zn=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(Zn||{});const Ad=l=>{var r;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.key)==="tableContents"&&(t.contents=(s=t.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),t})},Md=async l=>{var n,r,t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te;if((l==null?void 0:l.filter)==="Random")return(n=l==null?void 0:l.contents)==null?void 0:n.map(Q=>((Q==null?void 0:Q.key)==="tableContents"&&(Q.contents=Ta.shuffle(Q.contents)),Q));if((l==null?void 0:l.filter)==="Ordin"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:1}),(l==null?void 0:l.filter)==="Block"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:2}),(l==null?void 0:l.filter)==="Auto"){let be=(t=(r=l==null?void 0:l.contents)==null?void 0:r.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:t.contents;Array.isArray(be==null?void 0:be[0])&&(be=be==null?void 0:be[0]),be=ua.getColumnChild(be);let Q=be==null?void 0:be.filter(se=>(se==null?void 0:se.filter)&&(se==null?void 0:se.filter)!==""),de=new Map,Ke=[];Q==null||Q.forEach(se=>{var we,la;de.get((we=se==null?void 0:se.menus)==null?void 0:we.join("/"))||(de.set((la=se==null?void 0:se.menus)==null?void 0:la.join("/"),se),Ke.push(se))});let wa=(d=(s=cn==null?void 0:cn.value)==null?void 0:s.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:d.value,oe=Ke==null?void 0:Ke.map(se=>{var we,la,ya;return se=(we=se==null?void 0:se.menus)==null?void 0:we.join("/"),(se==null?void 0:se[(se==null?void 0:se.length)-1])==="/"&&((ya=(la=cn==null?void 0:cn.value)==null?void 0:la.find(Va=>(Va==null?void 0:Va.condition)==="child"))==null?void 0:ya.parentContent)+"/"!==se?se=se+wa:(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}),D=Ke==null?void 0:Ke.map(se=>se==null?void 0:se.groups),ne=oe==null?void 0:oe.map(async se=>{let we=await Pr(se,!1);return{path:se,contents:we}});ne=await Promise.all(ne);let ge=ne==null?void 0:ne.map((se,we)=>{var ya,Va,ae,ea,Re,ma,Pe;let la=(ya=se==null?void 0:se.contents)==null?void 0:ya.filter(Ee=>{var Le,We;return(Ee==null?void 0:Ee.name)===((We=D==null?void 0:D[we])==null?void 0:We[((Le=D==null?void 0:D[we])==null?void 0:Le.length)-1])});return la=(ea=(ae=(Va=la==null?void 0:la[0])==null?void 0:Va.compData)==null?void 0:ae.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:ea.contents,(se==null?void 0:se.path)===((ma=(Re=cn==null?void 0:cn.value)==null?void 0:Re.find(Ee=>(Ee==null?void 0:Ee.condition)==="child"))==null?void 0:ma.parentContent)&&(la=((Pe=la==null?void 0:la.map(Ee=>{for(let Le in Ee)if(Ee[Le]===wa)return Ee}))==null?void 0:Pe.filter(Ee=>Ee))??[]),la??[]});if(ge=ge==null?void 0:ge.map(se=>(se=se==null?void 0:se.map(we=>{var ya;let la={};for(let Va in we)if(Q!=null&&Q.find(ae=>{var ea,Re;return((Re=(ea=ae==null?void 0:ae.words)==null?void 0:ea[0])==null?void 0:Re.replaceAll("'",""))===Va})){let ae=(ya=Q==null?void 0:Q.find(ea=>{var Re,ma;return((ma=(Re=ea==null?void 0:ea.words)==null?void 0:Re[0])==null?void 0:ma.replaceAll("'",""))===Va}))==null?void 0:ya.prop;la[ae]=we==null?void 0:we[Va]}return la}),se)),ge=Ta.cartesianProduct(ge),Array.isArray(ge==null?void 0:ge[0])&&(ge=ge==null?void 0:ge[0]),(ge==null?void 0:ge.length)>0&&((C=(h=(b=Q==null?void 0:Q[0])==null?void 0:b.menus)==null?void 0:h.join("/"))==null?void 0:C[((c=(y=(v=Q==null?void 0:Q[0])==null?void 0:v.menus)==null?void 0:y.join("/"))==null?void 0:c.length)-1])==="/")return(M=l==null?void 0:l.contents)==null?void 0:M.map(we=>{var la;return(we==null?void 0:we.key)==="tableContents"&&(ge==null?void 0:ge.length)>0&&(we.contents=((la=we.contents)==null?void 0:la.length)>0?we.contents:ge),we})}if((l==null?void 0:l.filter)==="Text"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:3}),(l==null?void 0:l.filter)==="Manual"){let be=[],Q=[],de=(x=(L=l==null?void 0:l.contents)==null?void 0:L.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:x.contents;(de==null?void 0:de[(de==null?void 0:de.length)-1])===")"?de=(w=(Y=de==null?void 0:de.replace("(",tr))==null?void 0:Y.split(tr))==null?void 0:w[0]:de="",de!==""&&(be=((ee=(z=de==null?void 0:de.split("*"))==null?void 0:z[0])==null?void 0:ee.split(":"))??[],Q=((g=(k=(T=($=(S=de==null?void 0:de.split("*"))==null?void 0:S[1])==null?void 0:$.replace("{",tr))==null?void 0:T.split(tr))==null?void 0:k[0])==null?void 0:g.split(":"))??[]);let Ke=(q=(j=l==null?void 0:l.contents)==null?void 0:j.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:q.contents;Ke=(me=(J=Ke==null?void 0:Ke.replace("(",tr))==null?void 0:J.split(tr))==null?void 0:me[1],Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1);let wa=(ze=l==null?void 0:l.contents)==null?void 0:ze.map(D=>{var ne,ge,se,we,la,ya,Va,ae,ea;return(D==null?void 0:D.key)==="header"&&((ne=D==null?void 0:D.contents)!=null&&ne.every(Re=>(Re==null?void 0:Re.mainKey)!==!0)&&Array.isArray(D==null?void 0:D.contents)&&!Array.isArray((ge=D==null?void 0:D.contents)==null?void 0:ge[0])?D.contents=(se=D==null?void 0:D.contents)==null?void 0:se.map((Re,ma)=>{var Pe,Ee,Le;return Re!=null&&Re.isMainPath||(ma===0?(Re.mainKey=!0,Re.formType="Select",Re.bindMenus=be,Re.groups=((Pe=Re.groups)==null?void 0:Pe.length)===0?Q:Re.groups,Re.words=((Ee=Re.words)==null?void 0:Ee.length)===0?[Re==null?void 0:Re.prop]:Re.words,Re.filter=Ke,(!(Re!=null&&Re.menus)||((Le=Re==null?void 0:Re.menus)==null?void 0:Le.length)===0)&&(Re.menus=be)):(Re.mainKey=!1,Re.bindMenus=be)),Re}):Array.isArray((we=D==null?void 0:D.contents)==null?void 0:we[0])&&((Va=(ya=(la=D==null?void 0:D.contents)==null?void 0:la[0])==null?void 0:ya.filter(()=>(be==null?void 0:be.length)>0))==null?void 0:Va.length)>0&&(D.contents[0]=(ea=(ae=D==null?void 0:D.contents)==null?void 0:ae[0])==null?void 0:ea.map((Re,ma)=>{var Pe,Ee,Le;return Re!=null&&Re.isMainPath||(ma===0?(Re.mainKey=!0,Re.formType="Select",Re.bindMenus=be,Re.groups=((Pe=Re.groups)==null?void 0:Pe.length)===0?Q:Re.groups,Re.words=((Ee=Re.words)==null?void 0:Ee.length)===0?[Re==null?void 0:Re.prop]:Re.words,Re.filter=Ke,(!(Re!=null&&Re.menus)||Array.isArray(Re==null?void 0:Re.menus)&&((Le=Re==null?void 0:Re.menus)==null?void 0:Le.length)===0)&&(be==null?void 0:be.length)>0&&(Re.menus=be)):(Re.mainKey=!1,Re.bindMenus=be)),Re}))),D}),oe=(xe=wa==null?void 0:wa.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:xe.contents;if(Array.isArray(oe==null?void 0:oe[0])&&(oe=oe==null?void 0:oe[0]),oe=ua.getColumnChild(oe),oe!=null&&oe.some(D=>{var ne,ge;return((ge=D==null?void 0:D.menus)==null?void 0:ge[((ne=D==null?void 0:D.menus)==null?void 0:ne.length)-1])===""})){let D=(te=cn==null?void 0:cn.value)==null?void 0:te.find(ne=>(ne==null?void 0:ne.condition)==="child");wa=Nd(wa,D)}return wa}return l==null?void 0:l.contents},zd=l=>{var t,s,d,b;let n=l==null?void 0:l.filter;if(n!=null&&n.includes("*")&&(n="({"+((s=(t=n==null?void 0:n.replace("{",tr))==null?void 0:t.split(tr))==null?void 0:s[1])),n=(d=n==null?void 0:n.replaceAll("{",""))==null?void 0:d.replaceAll("}",""),(n==null?void 0:n[0])!=="("&&(n="("+n+")"),n.slice(1,(n==null?void 0:n.length)-1)==="undefined")return l==null?void 0:l.contents;let r=ua.calculatorAndToOr(n);if((r==null?void 0:r.length)>0){let h=[];return r==null||r.forEach(y=>{let c={};for(let C in y){let M=C;M!=null&&M.includes("[")||(c[M]=y[C])}h.push(c)}),(b=l==null?void 0:l.contents)==null?void 0:b.map(y=>{var C,M,L;let c=(M=(C=l==null?void 0:l.contents)==null?void 0:C.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:M.contents;if(c=(L=ua.getEqualChild(c))==null?void 0:L.filter(x=>(x==null?void 0:x.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let Y=ua.tableToForm(y==null?void 0:y.contents,c);h==null||h.forEach(w=>{var z,ee;for(let S in w)!((z=Y==null?void 0:Y[0])!=null&&z.find($=>{var T;return($==null?void 0:$.key)===S||((T=$==null?void 0:$.key)==null?void 0:T.includes(S))}))&&!(Y!=null&&Y.find($=>{var T;return($==null?void 0:$.key)===S||((T=$==null?void 0:$.key)==null?void 0:T.includes(S))}))||(((ee=w[S])==null?void 0:ee[0])!=="!"?Y=Y==null?void 0:Y.filter($=>{var T,k;return((T=$==null?void 0:$.find(g=>{var j;return(g==null?void 0:g.key)===S||((j=g==null?void 0:g.key)==null?void 0:j.includes(S))}))==null?void 0:T.value)===w[S]||Array.isArray(w==null?void 0:w[S])&&((k=w==null?void 0:w[S])==null?void 0:k.find(g=>{var j;return((j=$==null?void 0:$.find(q=>{var J;return(q==null?void 0:q.key)===S||((J=q==null?void 0:q.key)==null?void 0:J.includes(S))}))==null?void 0:j.value)===g}))}):Y=Y==null?void 0:Y.filter($=>{var T;return((T=$==null?void 0:$.find(k=>{var g;return(k==null?void 0:k.key)===S||((g=k==null?void 0:k.key)==null?void 0:g.includes(S))}))==null?void 0:T.value)!==w[S]}))}),(Y==null?void 0:Y.length)===0?y.contents=[]:y.contents=Y==null?void 0:Y.map(w=>{let z={};return w==null||w.forEach(ee=>{z[ee==null?void 0:ee.key]=ee==null?void 0:ee.value}),z})}return y})}return l==null?void 0:l.contents},Od=l=>l==null?void 0:l.contents,Id=l=>l==null?void 0:l.contents,Ld=l=>{var n,r,t,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let d=(t=(r=l==null?void 0:l.filter)==null?void 0:r.slice(1,((n=l==null?void 0:l.filter)==null?void 0:n.length)-1))==null?void 0:t.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>((h==null?void 0:h.key)==="header"&&(h.contents=ii(h.contents,d)),h))}return l==null?void 0:l.contents},Vd=l=>{var r;let n=(l==null?void 0:l.filter)??"";return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""?(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(d=n==null?void 0:n.split(","))==null?void 0:d.map(b=>({label:b,prop:b}))),s}):l==null?void 0:l.contents},Rd=l=>l==null?void 0:l.contents,$d=l=>{var r;let n=(l==null?void 0:l.filter)??"";return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""?(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(d=n==null?void 0:n.split(","))==null?void 0:d.map(b=>({label:b,prop:b}))),s}):l==null?void 0:l.contents},Pd=l=>{var r;let n=(l==null?void 0:l.filter)??"";if((n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""){let t=l==null?void 0:l.contents,s=(r=n==null?void 0:n.split(","))==null?void 0:r.map(d=>({label:d,prop:d}));return t.push({key:"bottomButton",contents:s}),t}return l==null?void 0:l.contents},Fd=l=>{var n,r,t,s;if(((n=l==null?void 0:l.filter)==null?void 0:n[0])!=="["){const d=parseInt(l==null?void 0:l.filter);return!d||Number.isNaN(d)?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(h=>{var v;return(h==null?void 0:h.key)==="formContent"&&(h.contents=(v=h.contents)==null?void 0:v.map(y=>(y.width=d,y))),h})}if(((t=l==null?void 0:l.filter)==null?void 0:t[0])==="["){let d=wt(l==null?void 0:l.filter),b=Array.isArray(d)?d.map(v=>parseInt(v)).filter(v=>!!v&&!Number.isNaN(v)):[];return b.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(v=>{if((v==null?void 0:v.key)==="formContent"){const y=v.contents??[];v.contents=y.map((c,C)=>{const M=C+1;let L=0,x=0;for(let w=0;w<b.length;w++){if(x+=b[w],M<=x){L=w;break}w===b.length-1&&(L=b.length-1)}const Y=b[L]||b[b.length-1]||1;return c.width=Y,c})}return v}):l==null?void 0:l.contents}return l==null?void 0:l.contents},jd=l=>{var n;if((l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.filter;return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(","),(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var d,b,h;return(s==null?void 0:s.key)==="header"&&(Array.isArray((d=s==null?void 0:s.contents)==null?void 0:d[0])?s.contents[0]=(h=s.contents[0])==null?void 0:h.map(v=>(r!=null&&r.find(y=>y===(v==null?void 0:v.prop))&&(v.fixed="left"),v)):s.contents=(b=s.contents)==null?void 0:b.map(v=>(r!=null&&r.find(y=>y===(v==null?void 0:v.prop))&&(v.fixed="left"),v))),s})}return l==null?void 0:l.contents},Hd=l=>{var n;if((l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.filter;(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const t=d=>(r!=null&&r.find(b=>b===(d==null?void 0:d.prop))&&(d.required=!0),d!=null&&d.children&&Array.isArray(d.children)&&(d.children=d.children.map(b=>t(b))),d);return(n=l==null?void 0:l.contents)==null?void 0:n.map(d=>{var b,h,v;return(d==null?void 0:d.key)==="header"&&(Array.isArray((b=d==null?void 0:d.contents)==null?void 0:b[0])?d.contents[0]=(v=d.contents[0])==null?void 0:v.map(y=>t(y)):d.contents=(h=d.contents)==null?void 0:h.map(y=>t(y))),d})}return l==null?void 0:l.contents},Ud=async l=>{var t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S;const n=A.useUnit(A.pinia),{chooseTitle:r}=A.storeToRefs(n);if((l==null?void 0:l.filter)==="true"){let $=await Pr(((s=(t=r==null?void 0:r.value)==null?void 0:t[0])==null?void 0:s.parentContent)??((b=(d=r==null?void 0:r.value)==null?void 0:d[0])==null?void 0:b.relatedContent),!1),T=(v=(h=r==null?void 0:r.value)==null?void 0:h[0])==null?void 0:v.value;(c=(y=$==null?void 0:$[0])==null?void 0:y.compData)!=null&&c.find(q=>(q==null?void 0:q.key)==="header")?$=(C=$==null?void 0:$[0])==null?void 0:C.compData:$=(L=(M=$==null?void 0:$.filter(q=>{var J;return(J=q==null?void 0:q.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header")}))==null?void 0:M[0])==null?void 0:L.compData;let k=(x=$==null?void 0:$.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:x.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((Y=k==null?void 0:k.find(q=>q==null?void 0:q.isMainKey))==null?void 0:Y.prop)??((w=k==null?void 0:k[0])==null?void 0:w.prop);let g=(ee=(z=$==null?void 0:$.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:z.contents)==null?void 0:ee.find(q=>(q==null?void 0:q[k])===T);return(S=l==null?void 0:l.contents)==null?void 0:S.map(q=>{var J;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(J=q.contents)==null?void 0:J.map(me=>(me.value=g==null?void 0:g[me==null?void 0:me.prop],me))),q})}return l==null?void 0:l.contents},qd=l=>{var n,r,t,s,d;if((n=l==null?void 0:l.extra)!=null&&n.row){let b=l==null?void 0:l.filter;if(b!=null&&b.includes("*")&&(b="({"+((t=(r=b==null?void 0:b.replace("{",tr))==null?void 0:r.split(tr))==null?void 0:t[1])),b=(s=b==null?void 0:b.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(b==null?void 0:b[0])!=="("&&(b="("+b+")"),b.slice(1,(b==null?void 0:b.length)-1)==="undefined")return l==null?void 0:l.contents;let h=ua.calculatorAndToOr(b),v=h==null?void 0:h[0],y=(d=l==null?void 0:l.extra)==null?void 0:d.row,c=[];for(let C in v)(v==null?void 0:v[C])===(y==null?void 0:y[C])?c.push(!0):c.push(!1);return c!=null&&c.every(C=>C===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},Kd=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"tab",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Wd=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"choice",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Ws={onNumSlice:Ad,onRandomContents:Md,onConditionContents:zd,onFatherPaceContents:Od,onPaceContents:Id,onMainTagContents:Ld,onButtonContents:Vd,onPamButtonContents:Rd,onRowButtonContents:$d,onRelated:Ud,onRowNum:Fd,onFixRow:jd,onReqItem:Hd,onBottomButtonContents:Pd,onConditionContent:qd,onTabs:Kd,onSinChoice:Wd},Yd=async(l,n)=>{var d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g;let r="";if(((d=l==null?void 0:l.find(j=>(j==null?void 0:j.key)==="filter"))==null?void 0:d.contents)!==""&&(r=(b=l==null?void 0:l.find(j=>(j==null?void 0:j.key)==="filter"))==null?void 0:b.contents),r===""||!r)return l;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(h=r==null?void 0:r.replace("(",tr))==null?void 0:h.split(tr))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let t=(y=Ta.analyzeSplitToContent(r,","))==null?void 0:y.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j!=null&&j.includes("(")||(j=j==null?void 0:j.replaceAll(":","=")),j)),s=l;for(let j in t){let q,J="";(c=t==null?void 0:t[j])!=null&&c.includes("(")?(q=(L=(M=(C=t==null?void 0:t[j])==null?void 0:C.replace("(",tr))==null?void 0:M.split(tr))==null?void 0:L[0],J="("+((w=(Y=(x=t==null?void 0:t[j])==null?void 0:x.replace("(",tr))==null?void 0:Y.split(tr))==null?void 0:w[1])):(q=(S=(ee=(z=t==null?void 0:t[j])==null?void 0:z.replace("=",tr))==null?void 0:ee.split(tr))==null?void 0:S[0],J=(k=(T=($=t==null?void 0:t[j])==null?void 0:$.replace("=",tr))==null?void 0:T.split(tr))==null?void 0:k[1]);let me=(g=un==null?void 0:un.find(ze=>(ze==null?void 0:ze.key)===q))==null?void 0:g.value;if(me){const ze=Ws[me];s=await ze({contents:s,filter:J})}}return s},si=async(l,n)=>{var b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q;let r="";if(((b=l==null?void 0:l.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:b.contents)!==""&&(r=(h=l==null?void 0:l.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:h.contents),r===""||!r)return l;(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=(y=(v=r==null?void 0:r.replace("(",tr))==null?void 0:v.split(tr))==null?void 0:y[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let t=(c=Ta.analyzeSplitToContent(r,","))==null?void 0:c.map(J=>((J==null?void 0:J[(J==null?void 0:J.length)-1])===","&&(J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1)),J!=null&&J.includes("(")||(J=J==null?void 0:J.replaceAll(":","=")),J)),s=l,d=new Map;t==null||t.forEach(J=>{var ze,xe,te;let me=(ze=J==null?void 0:J.split("="))==null?void 0:ze[0];if(me==="@MainPam"&&d.get(me)){let be=d.get(me);be=be==null?void 0:be.slice(0,(be==null?void 0:be.length)-1);let Q=(te=(xe=J==null?void 0:J.replace("{",tr))==null?void 0:xe.split(tr))==null?void 0:te[1];Q=be+","+Q,d.set(me,Q)}else d.set(me,J)}),t=Array.from(d.values()),t=t==null?void 0:t.sort((J,me)=>{var ze,xe;return((ze=un==null?void 0:un.find(te=>me==null?void 0:me.includes(te==null?void 0:te.key)))==null?void 0:ze.order)-((xe=un==null?void 0:un.find(te=>J==null?void 0:J.includes(te==null?void 0:te.key)))==null?void 0:xe.order)});for(let J in t){let me,ze="";(C=t==null?void 0:t[J])!=null&&C.includes("(")&&((M=t==null?void 0:t[J])!=null&&M.includes("@Filter"))?(me=(Y=(x=(L=t==null?void 0:t[J])==null?void 0:L.replace("(",tr))==null?void 0:x.split(tr))==null?void 0:Y[0],ze="("+((ee=(z=(w=t==null?void 0:t[J])==null?void 0:w.replace("(",tr))==null?void 0:z.split(tr))==null?void 0:ee[1])):(me=(T=($=(S=t==null?void 0:t[J])==null?void 0:S.replace("=",tr))==null?void 0:$.split(tr))==null?void 0:T[0],ze=(j=(g=(k=t==null?void 0:t[J])==null?void 0:k.replace("=",tr))==null?void 0:g.split(tr))==null?void 0:j[1]);let xe=(q=un==null?void 0:un.find(te=>(te==null?void 0:te.key)===me))==null?void 0:q.value;if(xe){const te=Ws[xe];s=await te({contents:s,filter:ze,extra:n})}}return s};let oo="$R";const Jd=A.useUnit(A.pinia),{selectTitle:Gd}=A.storeToRefs(Jd);let Xd=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Zd=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Qd=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],ep=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const Zi=async(l,n)=>{let r=[],t=l==null?void 0:l.map(async s=>{var c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na;let d=(L=(M=(C=(c=s==null?void 0:s.contents)==null?void 0:c.find(Ye=>{var Oe;return(Oe=Ye==null?void 0:Ye.key)==null?void 0:Oe.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:L.类型,b=Object.values(s==null?void 0:s.name);b=b==null?void 0:b.reverse();let h=(x=s==null?void 0:s.contents)==null?void 0:x.map(Ye=>Ye==null?void 0:Ye.key),v={comp:d,isShow:s==null?void 0:s.is_show,name:b==null?void 0:b[0],id:s==null?void 0:s.object_id,relatedTables:h,menuFilter:(Y=s==null?void 0:s.filter)==null?void 0:Y.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(w=s==null?void 0:s.filter)==null?void 0:w.fatherSyncs,relatedQuotes:(z=s==null?void 0:s.filter)==null?void 0:z.quotes,sonSyncContents:(ee=s==null?void 0:s.filter)==null?void 0:ee.sonSyncs};for(let Ye in b)parseInt(Ye)>=1&&(v[`name${parseInt(Ye)-1}`]=b[Ye]);let y=($=(S=s==null?void 0:s.filter)==null?void 0:S.menuFilter)==null?void 0:$.split(",");if(((T=y==null?void 0:y.filter(Ye=>Ye==null?void 0:Ye.includes("@Filter")))==null?void 0:T.length)>0){let Ye=y==null?void 0:y.filter(rl=>rl==null?void 0:rl.includes("@Filter"));Ye=Ye==null?void 0:Ye[0],Ye=(g=(k=Ye==null?void 0:Ye.replace("(",oo))==null?void 0:k.split(oo))==null?void 0:g[1],Ye=Ye==null?void 0:Ye.slice(0,(Ye==null?void 0:Ye.length)-1),Ye!=null&&Ye.includes("*")&&(Ye=(q=(j=Ye==null?void 0:Ye.replace("{",oo))==null?void 0:j.split(oo))==null?void 0:q[1],Ye=Ye==null?void 0:Ye.replace("}","")),Ye=ua.calculatorAndToOr(Ye);let Oe=(n==null?void 0:n.originPath)??"";(Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])==="/"&&(Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1));let ue=await Pr(Oe,!1),ie=(J=ue==null?void 0:ue.filter(rl=>(rl==null?void 0:rl.comp)==="Table"))==null?void 0:J[0];ie=(ze=(me=ie==null?void 0:ie.compData)==null?void 0:me.find(rl=>(rl==null?void 0:rl.key)==="tableContents"))==null?void 0:ze.contents;let na=(te=(xe=Gd.value)==null?void 0:xe.find(rl=>(rl==null?void 0:rl.condition)==="child"))==null?void 0:te.value;ie=(be=ie==null?void 0:ie.map(rl=>{for(let Ml in rl)if((rl==null?void 0:rl[Ml])===na)return rl}))==null?void 0:be.filter(rl=>rl),ie=ie==null?void 0:ie[0],Ye=Ye==null?void 0:Ye[0];let qa=[];for(let rl in Ye){let Ml="";Qa.isObject(ie)&&(Ml=(de=(Q=Object.keys(ie))==null?void 0:Q.filter(Fa=>Fa==null?void 0:Fa.includes("."+rl)))==null?void 0:de[0]),Ml!==""&&(ie!=null&&ie[Ml])&&(Ye==null?void 0:Ye[rl])===(ie==null?void 0:ie[Ml])||ie!=null&&ie[rl]&&(Ye==null?void 0:Ye[rl])===(ie==null?void 0:ie[rl])?qa.push(!0):qa.push(!1)}if(qa!=null&&qa.some(rl=>rl===!1)&&((wa=n==null?void 0:n.originPath)==null?void 0:wa[((Ke=n==null?void 0:n.originPath)==null?void 0:Ke.length)-1])!=="/")return}if(d==="Table"||d==="Method"){let Ye=((oe=s==null?void 0:s.contents)==null?void 0:oe.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("content")}))||[],Oe=[];v.comp="Table",Ye.value=(D=Ye==null?void 0:Ye.value)==null?void 0:D.sort((Fa,nl)=>parseInt(Fa==null?void 0:Fa.id)-parseInt(nl==null?void 0:nl.id)),Ye.value=(ne=Ye==null?void 0:Ye.value)==null?void 0:ne.map(Fa=>{let nl={};for(let Ca in Fa)JSON.stringify(Fa==null?void 0:Fa[Ca])==="{}"?nl[Ca]="":nl[Ca]=Fa==null?void 0:Fa[Ca];return nl}),Oe.push({key:"tableContents",contents:Ye==null?void 0:Ye.value});let ue=(ya=(la=(we=(se=(ge=s==null?void 0:s.contents)==null?void 0:ge.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("struct")}))==null?void 0:se.value)==null?void 0:we[0])==null?void 0:la.结构)==null?void 0:ya.contents;Array.isArray(ue==null?void 0:ue[0])?ue[0]=(Va=ue==null?void 0:ue[0])==null?void 0:Va.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="sort"):ue=ue==null?void 0:ue.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="sort"),Oe.push({key:"header",contents:ue}),Oe.push({key:"filter",contents:(Pe=(ma=(Re=(ea=(ae=s==null?void 0:s.contents)==null?void 0:ae.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("struct")}))==null?void 0:ea.value)==null?void 0:Re[0])==null?void 0:ma.引用)==null?void 0:Pe.contents});let ie=Xd,na=A.cloneDeep(Zd);d==="Method"&&na.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ue==null?void 0:ue[0])&&((Ee=ue==null?void 0:ue[0])==null?void 0:Ee.prop)==="disabled"&&(ie=Qd,na=ep);const qa=["推力","真空","压力","温度","流量"],rl=v.name;rl&&qa.includes(rl)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let Ml=[];if(!Array.isArray(ue==null?void 0:ue[0])&&(ue!=null&&ue.some(Fa=>{var nl;return(Fa==null?void 0:Fa.calculatorFilter)&&((nl=Fa==null?void 0:Fa.calculatorFilter)==null?void 0:nl.includes("Manual"))}))){let Fa=(Le=ue==null?void 0:ue.map(nl=>nl==null?void 0:nl.calculatorFilter))==null?void 0:Le.filter(nl=>nl&&(nl==null?void 0:nl.includes("Manual")));Fa==null||Fa.forEach(nl=>{var aa;let Ca=Ta.analyzeSplitToContent(nl,",");if(Ca=Ca==null?void 0:Ca.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)),Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Extent"))&&(Se==null?void 0:Se.includes("Row")))&&(Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Button"))&&(Se==null?void 0:Se.includes(","))))){let Se=Ca==null?void 0:Ca.find(Xa=>Xa==null?void 0:Xa.includes("@Button"));Se=(aa=Se==null?void 0:Se.split("="))==null?void 0:aa[1],Se=Se==null?void 0:Se.slice(1,(Se==null?void 0:Se.length)-1),Se=Se==null?void 0:Se.split(","),Se=Se==null?void 0:Se[(Se==null?void 0:Se.length)-1],Ml.push(Se)}}),Ml=[...new Set(Ml)],Ml=Ml==null?void 0:Ml.map(nl=>({label:nl,prop:nl,type:"methodButton"}))}else if(Array.isArray(ue==null?void 0:ue[0])&&((We=ua.getColumnChild(ue==null?void 0:ue[0]))!=null&&We.some(Fa=>{var nl;return(Fa==null?void 0:Fa.calculatorFilter)&&((nl=Fa==null?void 0:Fa.calculatorFilter)==null?void 0:nl.includes("Manual"))}))){let Fa=(Oa=(Ua=ua.getColumnChild(ue==null?void 0:ue[0]))==null?void 0:Ua.map(nl=>nl==null?void 0:nl.calculatorFilter))==null?void 0:Oa.filter(nl=>nl&&(nl==null?void 0:nl.includes("Manual")));Fa==null||Fa.forEach(nl=>{var aa;let Ca=Ta.analyzeSplitToContent(nl,",");if(Ca=Ca==null?void 0:Ca.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)),Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Extent"))&&(Se==null?void 0:Se.includes("Row")))&&(Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Button"))&&(Se==null?void 0:Se.includes(","))))){let Se=Ca==null?void 0:Ca.find(Xa=>Xa==null?void 0:Xa.includes("@Button"));Se=(aa=Se==null?void 0:Se.split("="))==null?void 0:aa[1],Se=Se==null?void 0:Se.slice(1,(Se==null?void 0:Se.length)-1),Se=Se==null?void 0:Se.split(","),Se=Se==null?void 0:Se[(Se==null?void 0:Se.length)-1],Ml.push(Se)}}),Ml=[...new Set(Ml)],Ml=Ml==null?void 0:Ml.map(nl=>({label:nl,prop:nl,type:"methodButton"}))}Oe.push({key:"extraButton",contents:ie}),Oe.push({key:"rowButton",contents:[...na,...Ml]}),v.compData=await si(Oe,n),(P=v.compData)!=null&&P.find(Fa=>(Fa==null?void 0:Fa.key)==="tab")&&(v.tab=(X=(F=v.compData)==null?void 0:F.find(Fa=>(Fa==null?void 0:Fa.key)==="tab"))==null?void 0:X.contents),(R=v.compData)!=null&&R.find(Fa=>(Fa==null?void 0:Fa.key)==="choice")&&(v.choice=(Ie=(W=v.compData)==null?void 0:W.find(Fa=>(Fa==null?void 0:Fa.key)==="choice"))==null?void 0:Ie.contents)}else if(d==="Form"){let Ye=[],Oe=(K=(Ce=(Ne=s==null?void 0:s.contents)==null?void 0:Ne.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("content")}))==null?void 0:Ce.value)==null?void 0:K[0],ue=(Te=(ba=($e=(va=(ra=(Ve=(He=s==null?void 0:s.contents)==null?void 0:He.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("struct")}))==null?void 0:Ve.value)==null?void 0:ra[0])==null?void 0:va.结构)==null?void 0:$e.contents)==null?void 0:ba.map(ie=>(ie.value=Oe==null?void 0:Oe[ie==null?void 0:ie.prop],ie)))==null?void 0:Te.filter(ie=>(ie==null?void 0:ie.prop)!=="sort");Ye.push({key:"filter",contents:(ka=(fe=(ga=(Ue=(fa=s==null?void 0:s.contents)==null?void 0:fa.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("struct")}))==null?void 0:Ue.value)==null?void 0:ga[0])==null?void 0:fe.引用)==null?void 0:ka.contents}),Ye.push({key:"formContent",contents:ue}),v.compData=await Yd(Ye),(Fe=v.compData)!=null&&Fe.find(ie=>(ie==null?void 0:ie.key)==="tab")&&(v.tab=(Na=($a=v.compData)==null?void 0:$a.find(ie=>(ie==null?void 0:ie.key)==="tab"))==null?void 0:Na.contents)}return v});return r=await Promise.all(t),r},ap=A.useLoginState(A.pinia),{loginUserInfo:yt}=A.storeToRefs(ap),ci=async(l,n,r="Manual",t=[])=>{var v;let s=l,d;Array.isArray(n==null?void 0:n[0])?d=ua.getColumnChild(n==null?void 0:n[0]):d=n;let b=(v=d==null?void 0:d.filter(y=>{var c;return(y==null?void 0:y.calculatorFilter)&&((c=y==null?void 0:y.calculatorFilter)==null?void 0:c.includes(r))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:v.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords})),h=s==null?void 0:s.map(async y=>(y=await ip(y,b,d,r,s,t),y));return h=await Promise.all(h),h},lp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d;return Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(b=>{var h;if(n!=null&&n[b]){let v=n==null?void 0:n[b];d=d?v?Ta.isEqual(v.toString(),d.toString()):void 0:v}else{let v=(h=s==null?void 0:s.find(c=>(c==null?void 0:c.label)===b))==null?void 0:h.prop,y=(n==null?void 0:n[v])??0;d=d?y?Ta.isEqual(y.toString(),d.toString()):void 0:y}}),n[t]=d===void 0?void 0:d?1:0,n},mr=l=>{const[n,r,t]=A.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(n??0)*3600+(r??0)*60+(t??0)},Rn=l=>{const n=d=>d.toString().padStart(2,"0"),r=Math.floor(l/3600),t=Math.floor(l%3600/60),s=l%60;return`${n(r)}:${n(t)}:${parseInt(n(s))}`},rp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y,w,z;if(n!=null&&n[v]){if(d==="Row")if(!((c=((y=n==null?void 0:n[v])==null?void 0:y.toString())??"")!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let ee=+(n==null?void 0:n[v]);h=h+ee}else h=mr(h.toString())+mr((M=n==null?void 0:n[v])==null?void 0:M.toString()),h=Rn(h)}else if(d==="Row"){let ee=(L=s==null?void 0:s.find(S=>(S==null?void 0:S.label)===v))==null?void 0:L.prop;if(!((Y=Number.isNaN(n==null?void 0:n[ee])?"":(x=n==null?void 0:n[ee])==null?void 0:x.toString())!=null&&Y.includes(":"))&&!((w=h==null?void 0:h.toString())!=null&&w.includes(":"))){let S=+((n==null?void 0:n[ee])??0);h=h+S}else h=mr(h==null?void 0:h.toString())+mr((z=(n==null?void 0:n[ee])??0)==null?void 0:z.toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C+M},0)}return n[t]=h,n},np=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h-w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())-mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h-z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())-mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C-M},0)}return n[t]=h,n},tp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h*w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())*mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!(n!=null&&n[w]))h=void 0;else if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h*z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())*mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C*M},0)}return n[t]=h,n},op=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h/w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())/mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h/z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())/mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C/M},0)}return n[t]=h.toFixed(2),n},io={Sum:rp,Substract:np,Multiple:tp,Divide:op,Compare:lp},ip=async(l,n,r,t="Auto",s,d=[])=>{var c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te;let b=l,h=[],v=await A.getPageDataApi({platId:parseInt((c=yt==null?void 0:yt.value)==null?void 0:c.plat_id),pageName:"menu"});v=(L=(M=(C=v==null?void 0:v.data)==null?void 0:C.result)==null?void 0:M.filter(be=>(be==null?void 0:be.property_name)===""))==null?void 0:L[0];let y=[];if(v!=null&&v.object_name){v=v==null?void 0:v.object_name;let be=await A.getPageDataApi({platId:parseInt((x=yt==null?void 0:yt.value)==null?void 0:x.plat_id),pageName:v});be=(S=(ee=(z=(w=(Y=be==null?void 0:be.data)==null?void 0:Y.result)==null?void 0:w[0])==null?void 0:z.contents)==null?void 0:ee.find(Q=>{var de;return(de=Q==null?void 0:Q.key)==null?void 0:de.includes("content")}))==null?void 0:S.value,h=($=be==null?void 0:be.map(Q=>({functionName:Q==null?void 0:Q.函数名称,functionContent:Q==null?void 0:Q.输出值})))==null?void 0:$.filter(Q=>(Q==null?void 0:Q.functionContent)!==""),h==null||h.forEach(Q=>{y.push(Q.functionName),io[Q.functionName]=new Function("return "+Q.functionContent)()})}if((n==null?void 0:n.length)===0)return b;for(let be in n){let Q=(T=n==null?void 0:n[be])==null?void 0:T.functionName;const de=io==null?void 0:io[Q];let Ke=(k=n==null?void 0:n[be])==null?void 0:k.methods;if(Ke=Ta.analyzeSplitToContent(Ke,","),(g=Ke==null?void 0:Ke.find(wa=>wa==null?void 0:wa.includes("@Type")))!=null&&g.includes(t)||(Ke==null?void 0:Ke.length)===0){let wa=((J=(q=(j=Ke==null?void 0:Ke.find(oe=>oe==null?void 0:oe.includes("@Extent")))==null?void 0:j.replace(":","="))==null?void 0:q.split("="))==null?void 0:J[1])??[];if(await new Function("return ")(),(y==null?void 0:y.length)>0&&y.find(oe=>oe===Q)){let oe="";try{let ne=(me=n==null?void 0:n[be])==null?void 0:me.functionRelatedWords,ge=d==null?void 0:d.map(we=>{var la;return we==null?void 0:we[(la=n==null?void 0:n[be])==null?void 0:la.prop]});ge=ge==null?void 0:ge.map(we=>we==null?void 0:we.slice((we==null?void 0:we.length)-5,we==null?void 0:we.length)),ge=ge==null?void 0:ge.map(we=>Ta.isNumber(parseInt(we))&&parseInt(we)?parseInt(we):0);let se=Math.max(...ge);ne=ne==null?void 0:ne.map(we=>{if(we!=null&&we.includes("'"))return we==null?void 0:we.replaceAll("'","");if(we!=null&&we.includes("@"))return se+1;{let la=Object.keys(b);return we=(b==null?void 0:b[we])??(b==null?void 0:b[la==null?void 0:la.find(ya=>ya==null?void 0:ya.includes("."+we))]),we}}),oe=de(...ne)}catch(ne){Qa.ElMessage.warning("关联数据出现错误,"+ne.message)}let D=(ze=n==null?void 0:n[be])==null?void 0:ze.prop;b[D]=oe}else b=de({contents:b,valueString:(xe=n==null?void 0:n[be])==null?void 0:xe.functionRelatedWords,prop:(te=n==null?void 0:n[be])==null?void 0:te.prop,headers:r,typeString:wa,allContents:s})}}return b},sp=A.useLoginState(A.pinia),{loginUserInfo:Ur}=A.storeToRefs(sp),cp=A.useMenuState(A.pinia),{activeMenuPath:Qi,currentMenuPath:so}=A.storeToRefs(cp),Ys=A.useUnit(A.pinia);let es="$R";const{selectTitle:xt}=A.storeToRefs(Ys),Js=async(l,n)=>{var b,h,v,y,c,C,M,L,x,Y,w,z,ee;let r=Qi.value,t="",s=((b=xt==null?void 0:xt.value)==null?void 0:b.find(S=>(S==null?void 0:S.condition)==="child"&&!(S!=null&&S.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(r=n?r:(h=l==null?void 0:l[0])==null?void 0:h.object_name,t=(v=l==null?void 0:l[0])==null?void 0:v.father_name);let d=[];if(t!==""){let S=t;(S==null?void 0:S[(S==null?void 0:S.length)-1])==="/"&&(S=S==null?void 0:S.slice(0,(S==null?void 0:S.length)-1));let $=await Pr(S,!1);$=(y=$==null?void 0:$[0])==null?void 0:y.compData;let T=(c=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:c.contents;T=((C=T==null?void 0:T.find(g=>g==null?void 0:g.isMainKey))==null?void 0:C.prop)??((M=T==null?void 0:T[0])==null?void 0:M.prop);let k=(x=(L=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:L.contents)==null?void 0:x.map(g=>({label:g==null?void 0:g[T],value:g==null?void 0:g[T]}));d=(Y=t==null?void 0:t.split("/"))==null?void 0:Y.map(g=>(g===""?s?(s.isShow=!0,g=s):g={value:g,condition:"child",options:k,parentContent:(t==null?void 0:t[(t==null?void 0:t.length)-1])==="/"?t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1):t,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(r!==""){let S=(w=r==null?void 0:r.split("/"))==null?void 0:w.map($=>($={condition:"normal",value:$.trim(),isShow:!0},$));((z=S==null?void 0:S[0])==null?void 0:z.value)===((ee=d==null?void 0:d[0])==null?void 0:ee.value)&&(S=S==null?void 0:S.filter(($,T)=>T!==0)),d=[...d??[],...S??[]]}t===""&&s&&((s==null?void 0:s.parentContent)!==Qi.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&d.push(s)),Ys.setSelectTitle(d)},up=async l=>{var d,b,h,v,y,c,C,M,L;let n=await A.getPageDataApi({platId:parseInt((d=Ur==null?void 0:Ur.value)==null?void 0:d.plat_id),pageName:"menu"}),r=(b=n==null?void 0:n.data)==null?void 0:b.result,t=(c=(y=(v=(h=l==null?void 0:l.filter(x=>(x==null?void 0:x.comp)==="Table"))==null?void 0:h[0])==null?void 0:v.compData)==null?void 0:y.find(x=>(x==null?void 0:x.key)==="filter"))==null?void 0:c.contents;t=(L=(M=(C=t==null?void 0:t.replace("(",es))==null?void 0:C.split(es))==null?void 0:M[0])==null?void 0:L.replaceAll(":","/");let s=r==null?void 0:r.filter(x=>{var Y;return(x==null?void 0:x.object_name)===so.value+"/"||((Y=so.value)==null?void 0:Y.includes(t))&&t+"/"===(x==null?void 0:x.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(x=>{var Y;return(x==null?void 0:x.comp)==="Table"&&(x.compData=(Y=x==null?void 0:x.compData)==null?void 0:Y.map(w=>{var z,ee,S;return(w==null?void 0:w.key)==="header"&&(Array.isArray((z=w.contents)==null?void 0:z[0])?w.contents[0]=(S=w.contents[0])==null?void 0:S.map(($,T)=>{var k;return T===0&&($.isExistChild=!0,(k=so.value)!=null&&k.includes(t)&&($.fatherPath=t)),$}):w.contents=(ee=w.contents)==null?void 0:ee.map(($,T)=>{var k;return T===0&&($.isExistChild=!0,(k=so.value)!=null&&k.includes(t)&&($.fatherPath=t)),$})),w})),x})),l},Pr=async(l,n,r={})=>{var b,h,v,y,c,C,M,L,x,Y,w,z;let t=await A.getPageDataApi({platId:parseInt((b=Ur==null?void 0:Ur.value)==null?void 0:b.plat_id),pageName:l}),s=(h=t==null?void 0:t.data)==null?void 0:h.result;if((s==null?void 0:s.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==l){let ee=await A.getPageDataApi({platId:parseInt((v=Ur==null?void 0:Ur.value)==null?void 0:v.plat_id),pageName:r==null?void 0:r.originPath});if(((c=(y=ee==null?void 0:ee.data)==null?void 0:y.result)==null?void 0:c.length)>0){let S=await Zi((C=ee==null?void 0:ee.data)==null?void 0:C.result,r);S=S==null?void 0:S.map(async k=>{var q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa;let g=[],j=(q=Object.keys(k))==null?void 0:q.filter(P=>P==null?void 0:P.includes("name"));for(let P in k)j!=null&&j.find(F=>F===P)&&g.push(k==null?void 0:k[P]);if(g=g.reverse(),(k==null?void 0:k.comp)==="Table"){let P=(ze=(me=(J=k==null?void 0:k.compData)==null?void 0:J.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:me.contents)==null?void 0:ze.map(X=>{let R={};for(let W in X)W!=="id"&&W!=="create_time"&&W!=="update_time"&&W!=="sort"&&W!=="create_user_id"&&W!=="update_user_id"&&W!=="department_id"&&(R[W]=X==null?void 0:X[W]);return X=Object.values(R),X}),F=(te=(xe=k==null?void 0:k.compData)==null?void 0:xe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:te.contents;if(Array.isArray(F==null?void 0:F[0])?(F[0].push({label:"排序",prop:"sort"}),(be=F[0])!=null&&be.find(X=>(X==null?void 0:X.prop)==="disabled")&&(F[0]=(Q=F[0])==null?void 0:Q.filter(X=>(X==null?void 0:X.prop)!=="disabled"),F[0].unshift({label:"",prop:"disabled",sortable:!1}))):(F.push({label:"排序",prop:"sort"}),F!=null&&F.find(X=>(X==null?void 0:X.prop)==="disabled")&&(F=F==null?void 0:F.filter(X=>(X==null?void 0:X.prop)!=="disabled"),F.unshift({label:"",prop:"disabled",sortable:!1}))),F!=null&&F.some(X=>{var R;return(X==null?void 0:X.calculatorFilter)&&((R=X==null?void 0:X.calculatorFilter)==null?void 0:R.includes("Auto"))})&&(P=await ci(P,F,"Auto"),P=P==null?void 0:P.map(X=>Object.values(X))),k!=null&&k.fatherSyncContents){Array.isArray((de=k==null?void 0:k.fatherSyncContents)==null?void 0:de[0])&&(k.fatherSyncContents=(Ke=k==null?void 0:k.fatherSyncContents)==null?void 0:Ke[0]);let X=(wa=xt.value)==null?void 0:wa.find(R=>(R==null?void 0:R.condition)==="child");k.fatherSyncContents=(oe=k==null?void 0:k.fatherSyncContents)==null?void 0:oe.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}if(k!=null&&k.sonSyncContents){Array.isArray((D=k==null?void 0:k.sonSyncContents)==null?void 0:D[0])&&(k.sonSyncContents=(ne=k==null?void 0:k.sonSyncContents)==null?void 0:ne[0]);let X=(ge=xt.value)==null?void 0:ge.find(R=>(R==null?void 0:R.condition)==="child");k.sonSyncContents=(se=k==null?void 0:k.sonSyncContents)==null?void 0:se.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}if(k!=null&&k.relatedQuotes){Array.isArray((we=k==null?void 0:k.relatedQuotes)==null?void 0:we[0])&&(k.relatedQuotes=(la=k==null?void 0:k.relatedQuotes)==null?void 0:la[0]);let X=(ya=xt.value)==null?void 0:ya.find(R=>(R==null?void 0:R.condition)==="child");k.relatedQuotes=(Va=k==null?void 0:k.relatedQuotes)==null?void 0:Va.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}k={filter:(ea=(ae=k==null?void 0:k.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:ea.contents,key:k==null?void 0:k.comp,name:g,tableColumns:F,tableContents:P,menuFilter:k==null?void 0:k.menuFilter,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}else{let P=(Pe=(ma=(Re=k==null?void 0:k.compData)==null?void 0:Re.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ma.contents)==null?void 0:Pe.map(X=>(X==null?void 0:X.value)??"");P=[P];let F=(We=(Le=(Ee=k==null?void 0:k.compData)==null?void 0:Ee.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Le.contents)==null?void 0:We.map(X=>(X.value="",X));k={contents:P,filter:(Oa=(Ua=k==null?void 0:k.compData)==null?void 0:Ua.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Oa.contents,key:k==null?void 0:k.comp,name:g,value:F,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}return k.isShow=!1,k}),S=await Promise.all(S);let $=[{key:"menuPath",contents:[{path:l,fatherPath:(x=(L=(M=ee==null?void 0:ee.data)==null?void 0:M.result)==null?void 0:L[0])==null?void 0:x.father_name,isShow:!1}]},{key:l,contents:S}];await A.createPlatFormDataApi({platId:parseInt((Y=Ur==null?void 0:Ur.value)==null?void 0:Y.plat_id),changeData:$});let T=await A.getPageDataApi({platId:parseInt((w=Ur==null?void 0:Ur.value)==null?void 0:w.plat_id),pageName:l});s=(z=T==null?void 0:T.data)==null?void 0:z.result}}n&&await Js(s,!!(r!=null&&r.originPath));let d=await Zi(s,r);return n&&(d=await up(d)),d},as=async l=>{var t,s,d,b,h,v,y,c,C,M,L;let n=(t=l==null?void 0:l.menus)==null?void 0:t.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"&&(n=n+(l==null?void 0:l.endChildMenu)),(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"&&(n=n+((d=(s=l.value)==null?void 0:s.split(" "))==null?void 0:d[0]));let r=await Pr(n,!1);if(r=(b=r==null?void 0:r.filter(x=>{var Y,w;return(x==null?void 0:x.name)===((w=l==null?void 0:l.groups)==null?void 0:w[((Y=l==null?void 0:l.groups)==null?void 0:Y.length)-1])}))==null?void 0:b[0],(v=(h=r==null?void 0:r.compData)==null?void 0:h.find(x=>(x==null?void 0:x.key)==="tableContents"))!=null&&v.contents){r=(c=(y=r==null?void 0:r.compData)==null?void 0:y.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:c.contents;let x=((C=l==null?void 0:l.words)==null?void 0:C[0])??(l==null?void 0:l.prop);return r=r==null?void 0:r.filter(Y=>{var w,z,ee;return(Y==null?void 0:Y[l!=null&&l.endChildMenu?x:l==null?void 0:l.prop])===(l!=null&&l.relatedWords&&((w=l==null?void 0:l.relatedWords)==null?void 0:w.length)>0?(ee=(z=l.value)==null?void 0:z.split(" "))==null?void 0:ee[0]:l.value)}),r==null?void 0:r[0]}else{let x=(L=(M=r==null?void 0:r.compData)==null?void 0:M.find(w=>(w==null?void 0:w.key)==="formContent"))==null?void 0:L.contents,Y={};return x==null||x.forEach(w=>{Y[w.prop]=w.value}),Y}},dp={key:0,class:"extra-button-content"},pp={class:"table-operator-wrap"},fp={key:0,class:"extra-button-filter"},hp={key:1,class:"extra-header"},vp=["onClick"],mp={class:"table-op-text"},yp={class:"table-op-text"},gp={class:"drop-menu",style:{width:"120px"}},bp=["onClick"],kp={key:0},xp={key:1},_p=["onClick"],wp={class:"table-op-text"},Cp={key:1,class:"extra-button-content tabs-button-wrapper"},Ep={class:"table-operator-wrap"},Sp={class:"extra-button-filter"},Dp={key:0,class:"extra-header"},Bp={class:"table-op-action"},Np={class:"table-op-text"},Tp={class:"drop-menu",style:{width:"120px"}},Ap={key:0},Mp={key:1},zp=["onClick"],Op={class:"table-op-text"},Ip={__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:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(l,{emit:n}){const r=n,t=l,s=a.ref(""),d=a.ref(!1),b=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),v=[{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 y(k,g){return k.map(j=>{const q={...j};return g.forEach(J=>{delete q[J]}),q})}function c(k){if(!k||k.t!=="n")return(k==null?void 0:k.v)??"";const g=k.v;if(k.z){const j=String(k.z).toLowerCase(),q=["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 ze of q)if(j.includes(ze))return C(g);const J=/[ymdhms]/.test(j),me=/^[0#\.\,\s]+$/.test(j.replace(/[\\\/\-:]/g,""));if(J&&!me)return C(g)}if(g>=1&&g<=73050){if(g<5e3)return g;if(g>=5e3&&g<4e4){const j=Math.floor((g-25569)/365.25)+1970;return j>=1970&&j<=2e3&&k.z&&/[ymd]/.test(String(k.z).toLowerCase())?C(g):g}if(g>=4e4)return C(g)}return g}function C(k){if(typeof k!="number")return k;try{const g=new Date((k-25569)*86400*1e3);if(isNaN(g.getTime()))return k;const j=g.getFullYear(),q=String(g.getMonth()+1).padStart(2,"0"),J=String(g.getDate()).padStart(2,"0");return`${j}-${q}-${J}`}catch{return k}}const M=k=>{const g=k.raw;if(!g)return;const j=new FileReader;j.onload=q=>{try{const J=new Uint8Array(q.target.result),me=Ta.readSync(J,{type:"array"}),ze=me.SheetNames[0],xe=me.Sheets[ze],be=Ta.utils.decode_range(xe["!ref"]).e.c+1,Q=new Array(be).fill(""),de=[];for(const ne in xe){if(ne[0]==="!")continue;const{r:ge,c:se}=Ta.utils.decode_cell(ne),we=xe[ne];let la=c(we);if((la==null||la==="")&&(la=""),ge===0)Q[se]=la;else{if(!de[ge-1]){de[ge-1]={};for(let ya=0;ya<be;ya++)de[ge-1][`col_${ya}`]=""}de[ge-1][`col_${se}`]=la}}for(let ne=0;ne<be;ne++)Q[ne]===void 0&&(Q[ne]="");const Ke=[];for(let ne=0;ne<Q.length;ne++)(!Q[ne]||Q[ne].toString().trim()==="")&&Ke.push(ne);let wa,oe;(Ke==null?void 0:Ke.length)>0?(Qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),wa=Q.filter((ne,ge)=>!Ke.includes(ge)),oe=y(de,Ke==null?void 0:Ke.map(ne=>`col_${ne}`))):(wa=Q,oe=de);const D=de==null?void 0:de[0];if(!(D!=null&&D.hasOwnProperty("col_0")))return Qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",wa,oe)}catch(J){throw Qa.ElMessage.error(J.message),new Error(J.message)}},j.readAsArrayBuffer(g)},L=k=>{var j;const g=(j=b.value)==null?void 0:j.reduce((q,J,me)=>(me===0?q[J.label]=k:q[J.label]=J==null?void 0:J.value,q),{});r("filter",g,k,!0)},x=(k,g={})=>{r("buttonClick",k,"",g)},Y=k=>{var g,j;b.value=(j=(g=ua.getColumnChild(A.cloneDeep(k)))==null?void 0:g.filter(q=>(q==null?void 0:q.label)!==""&&(q==null?void 0:q.label)!=="操作"))==null?void 0:j.map(q=>({label:(q==null?void 0:q.label)??"",value:"",name:(q==null?void 0:q.prop)??"",isFormColHidden:q==null?void 0:q.isTableColHidden,width:2,prop:(q==null?void 0:q.prop)??""}))},w=a.ref(!1),z=k=>{var g;if((k==null?void 0:k.buttonName)==="确认"&&(r("filter",k==null?void 0:k.content),w.value=(k==null?void 0:k.content)&&Object.values(k==null?void 0:k.content).length>0),(k==null?void 0:k.buttonName)==="清空"){const j=A.cloneDeep(k==null?void 0:k.content);for(const q in j)j[q]="";b.value=(g=b.value)==null?void 0:g.map(q=>({...q,value:""})),r("filter",j),w.value=!1}d.value=!1},ee=()=>{d.value=!d.value},S=()=>{var g,j;b.value=(g=b.value)==null?void 0:g.map(q=>({...q,value:""}));const k=(j=b.value)==null?void 0:j.reduce((q,J)=>(q[J.label]=J.value,q),{});r("filter",k)},$=a.ref(null);let T;return T=k=>{var J;if(!d.value)return;const g=(J=$==null?void 0:$.value)==null?void 0:J.$el,j=g==null?void 0:g.contains(k.target);let q=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(me=>{me.contains(k.target)&&(q=!0)}),!j&&!q&&(d.value=!1)},a.onMounted(()=>{document.addEventListener("click",T),Y(t.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",T)}),a.watch(()=>t.columns,()=>{Y(t.columns)},{deep:!0,immediate:!0}),(k,g)=>{var xe,te,be,Q,de,Ke,wa,oe;const j=a.resolveComponent("el-icon"),q=a.resolveComponent("svg-icon"),J=a.resolveComponent("el-input"),me=a.resolveComponent("el-upload"),ze=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",dp,[a.createElementVNode("div",{class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(t==null?void 0:t.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((t==null?void 0:t.level)-1)*12+"px",fontWeight:600-((t==null?void 0:t.level)-1)*100>=400?600-((t==null?void 0:t.level)-1)*100:400,fontSize:17-(t==null?void 0:t.level)>=14?17-(t==null?void 0:t.level)+"px":"14px"})},a.toDisplayString(l.compName),7),a.createElementVNode("div",pp,[t!=null&&t.filterShow?(a.openBlock(),a.createElementBlock("div",fp,[a.createVNode(_u,{trigger:"contextmenu",ref_key:"popOverRef",ref:$,title:"",width:800,placement:"bottom-start",isVisible:d.value,"onUpdate:isVisible":g[4]||(g[4]=D=>d.value=D)},{reference:a.withCtx(()=>{var D,ne,ge,se;return[a.createVNode(J,{modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=we=>s.value=we),style:{"min-width":"80px"},placeholder:w.value?(ge=(ne=(D=l.filterValues)==null?void 0:D.filter(we=>we))==null?void 0:ne.slice(0,3))==null?void 0:ge.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((se=b.value)==null?void 0:se.length)===0},{suffix:a.withCtx(()=>{var we,la;return[!s.value&&((la=(we=l.filterValues)==null?void 0:we.filter(ya=>ya))!=null&&la.join("/"))?(a.openBlock(),a.createBlock(j,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(ee,["stop"])},[a.createVNode(q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:g[1]||(g[1]=a.withModifiers(()=>{},["stop"])),onKeyup:g[2]||(g[2]=a.withModifiers(()=>{},["stop"])),onKeypress:g[3]||(g[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((xe=l.buttons)==null?void 0:xe.length)>0?(a.openBlock(),a.createElementBlock("div",hp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((te=l.buttons)==null?void 0:te.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,ne)=>{var ge;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(me,{key:0,class:"upload-button-wrap","on-change":M,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var se;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:we=>x(D==null?void 0:D.label)},[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",mp,a.toDisplayString(D==null?void 0:D.label),1)],10,vp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var se;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",yp,a.toDisplayString(D==null?void 0:D.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",gp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,se=>{var we,la;return a.openBlock(),a.createElementBlock("div",{key:se==null?void 0:se.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:ya=>!l.lockingPage&&x(se==null?void 0:se.label)},[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1),(we=se==null?void 0:se.label)!=null&&we.includes("选中")?(a.openBlock(),a.createElementBlock("span",kp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(la=se==null?void 0:se.label)!=null&&la.includes("全部")?(a.openBlock(),a.createElementBlock("span",xp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,bp)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:se=>!l.lockingPage&&x(D==null?void 0:D.label,D)},[a.createVNode(q,{class:"table-op-icon",name:(ge=v==null?void 0:v.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label)))==null?void 0:ge.icon},null,8,["name"]),a.createElementVNode("span",wp,a.toDisplayString(D==null?void 0:D.label),1)],10,_p)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",Cp,[a.createElementVNode("div",Ep,[a.createElementVNode("div",Sp,[a.createVNode(J,{modelValue:s.value,"onUpdate:modelValue":g[5]||(g[5]=D=>s.value=D),style:{"min-width":"80px"},placeholder:w.value?(de=(Q=(be=l.filterValues)==null?void 0:be.filter(D=>D))==null?void 0:Q.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((Ke=b.value)==null?void 0:Ke.length)===0},{suffix:a.withCtx(()=>{var D,ne;return[!s.value&&((ne=(D=l.filterValues)==null?void 0:D.filter(ge=>ge))!=null&&ne.join("/"))?(a.openBlock(),a.createBlock(j,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(ee,["stop"])},[a.createVNode(q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((wa=l.buttons)==null?void 0:wa.length)>0?(a.openBlock(),a.createElementBlock("div",Dp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((oe=l.buttons)==null?void 0:oe.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,ne)=>{var ge;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(me,{key:0,class:"upload-button-wrap","on-change":M,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var se;return[a.createElementVNode("div",Bp,[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",Np,a.toDisplayString(D==null?void 0:D.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(ze,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var se;return[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(D==null?void 0:D.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Tp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,se=>(a.openBlock(),a.createBlock(ze,{key:se==null?void 0:se.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:we=>x(se==null?void 0:se.label)},{default:a.withCtx(()=>{var we,la;return[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1),(we=se==null?void 0:se.label)!=null&&we.includes("选中")?(a.openBlock(),a.createElementBlock("span",Ap,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(la=se==null?void 0:se.label)!=null&&la.includes("全部")?(a.openBlock(),a.createElementBlock("span",Mp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:se=>!l.lockingPage&&x(D==null?void 0:D.label,D)},[a.createVNode(q,{class:"table-op-icon",name:(ge=v==null?void 0:v.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label)))==null?void 0:ge.icon},null,8,["name"]),a.createElementVNode("span",Op,a.toDisplayString(D==null?void 0:D.label),1)],10,zp)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},Lp=Kl._export_sfc(Ip,[["__scopeId","data-v-3a44c010"]]),Vp={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(n,r)=>{const t=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,d=>{var b;return a.openBlock(),a.createBlock(t,{key:d==null?void 0:d.prop,label:d==null?void 0:d.label,prop:d==null?void 0:d.prop,fixed:(d==null?void 0:d.prop)==="operate"?"right":d==null?void 0:d.fixed,align:(d==null?void 0:d.align)??"left","show-overflow-tooltip":(d==null?void 0:d.showOverflowTooltip)??!0,width:d==null?void 0:d.width,"min-width":(d==null?void 0:d.minWidth)||((d==null?void 0:d.prop)==="operate"?80:(((b=d==null?void 0:d.label)==null?void 0:b.length)*2||4)*27)},{default:a.withCtx(h=>[a.renderSlot(n.$slots,"content",{row:h.row,column:h.column,$index:h.$index,scope:h}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.children,(v,y)=>(a.openBlock(),a.createBlock(pl._sfc_main$2,{key:y,column:v,tableData:l.tableData},a.createSlots({_:2},[a.renderList(n.$slots,(c,C)=>({name:C,fn:a.withCtx(({row:M,slotData:L,item:x,column:Y})=>[a.renderSlot(n.$slots,C,a.mergeProps({ref_for:!0},L??M,{item:x??v,slotData:L??M,row:M,column:Y,columnProp:v}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Rp extends Ta.Loader{constructor(n){super(n),this.littleEndian=!0}load(n,r,t,s){const d=this,b=new Ta.FileLoader(d.manager);b.setPath(d.path),b.setResponseType("arraybuffer"),b.setRequestHeader(d.requestHeader),b.setWithCredentials(d.withCredentials),b.load(n,function(h){try{r(d.parse(h))}catch(v){s?s(v):console.error(v),d.manager.itemError(n)}},t,s)}_getDataView(n,r,t,s){switch(t){case"F":return s===8?n.getFloat64(r,this.littleEndian):n.getFloat32(r,this.littleEndian);case"I":return s===1?n.getInt8(r):s===2?n.getInt16(r,this.littleEndian):n.getInt32(r,this.littleEndian);case"U":return s===1?n.getUint8(r):s===2?n.getUint16(r,this.littleEndian):n.getUint32(r,this.littleEndian)}}parse(n){function r(L,x){const Y=L.length,w=new Uint8Array(x);let z=0,ee=0,S,$,T;do if(S=L[z++],S<32){if(S++,ee+S>x)throw new Error("Output buffer is not large enough");if(z+S>Y)throw new Error("Invalid compressed data");do w[ee++]=L[z++];while(--S)}else{if($=S>>5,T=ee-((S&31)<<8)-1,z>=Y)throw new Error("Invalid compressed data");if($===7&&($+=L[z++],z>=Y))throw new Error("Invalid compressed data");if(T-=L[z++],ee+$+2>x)throw new Error("Output buffer is not large enough");if(T<0)throw new Error("Invalid compressed data");if(T>=ee)throw new Error("Invalid compressed data");do w[ee++]=w[T++];while(--$+2)}while(z<Y);return w}function t(L){const x={},Y=new Uint8Array(L);let w="",z="",ee=0,S=!1;const $=Y.length;for(;ee<$&&S===!1;){const j=String.fromCharCode(Y[ee++]);j===`
|
|
1
|
+
"use strict";var vu=Object.defineProperty;var mu=(l,n,r)=>n in l?vu(l,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[n]=r;var Vr=(l,n,r)=>mu(l,typeof n!="symbol"?n+"":n,r);const a=require("vue"),Qa=require("./request-BBDPqFah.cjs"),A=require("./index-jU-5AL6b.cjs"),pl=require("./index-DgroST_b.cjs"),Kl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ta=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyjUeBm.cjs"),yr=require("./index-CUw6nGTo.cjs"),bo=require("./threeViewerHost-CtuY-X_d.cjs"),ua=require("./index-Bb7RsNv1.cjs"),br=require("./index-CDIharql.cjs"),Yi=require("./index-DsTdVkqf.cjs");require("./index-C2veg6vn.cjs");const Fs=require("./index-BzcWcIFK.cjs");;/* empty css */const ko=require("./isString-Jc6FCt92.cjs"),Ji=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),js=require("./index-BVaHwt5f.cjs"),yu=require("./index-CuXU0jDA.cjs"),Dn=require("./MTLLoader-Di_vHXvU.cjs"),gu=require("./URDFLoader-BbO2ANmG.cjs");var bu="[object Boolean]";function Hs(l){return l===!0||l===!1||Qa.isObjectLike(l)&&Qa.baseGetTag(l)==bu}function ku(l){return l===void 0}const xu=l=>l.match(/\((.*)\)/)[1],_u={__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(l){const n=l,r=a.ref(null),t=a.ref(!1),s=a.ref(null);return a.watch(()=>n==null?void 0:n.isVisible,()=>{t.value=n==null?void 0:n.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var d,b;(b=(d=r.value)==null?void 0:d.updatePopper)==null||b.call(d)})},{deep:!0,immediate:!0}),(d,b)=>{const h=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(h,{visible:t.value,"onUpdate:visible":b[0]||(b[0]=v=>t.value=v),trigger:n.trigger,title:n==null?void 0:n.title,placement:n==null?void 0:n.placement,width:n==null?void 0:n.width,ref_key:"popOverRef",ref:r,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(d.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(d.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},wu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const n=l,r=a.computed(()=>{const t=String(n.value??"");return t==="已完成"?"task-status-completed":t==="进行中"?"task-status-running":t==="终止"||t==="暂停"?"task-status-stopped":""});return(t,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",r.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Us=Kl._export_sfc(wu,[["__scopeId","data-v-d81f59b4"]]);function Cu(l,n,r,t={}){if(!l||!n||!r||r.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:d="rgba(255, 235, 59, 0.3)",strokeWidth:b=2,fillOpacity:h=.2}=t,v=l.getBoundingClientRect(),y=n.getBoundingClientRect(),c=n.naturalWidth,C=n.naturalHeight,M=y.width/c,L=y.height/C,x=Math.min(M,L),Y=c*x,w=C*x,z=(v.width-Y)/2,ee=(v.height-w)/2,S=r.map(([T,k])=>{const g=z+T*Y,j=ee+k*w;return{x:g,y:j}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(S[0].x,S[0].y);for(let T=1;T<S.length;T++)s.lineTo(S[T].x,S[T].y);s.closePath();const $=d.replace(/[\d.]+\)$/,`${h})`);s.fillStyle=$,s.fill(),s.strokeStyle=d.replace(/[\d.]+\)$/,"1)"),s.lineWidth=b,s.stroke()}function mt(l){if(!l)return;const n=l.getContext("2d");n&&n.clearRect(0,0,l.width,l.height)}function Gi(l,n){if(!l||!n)return null;const r=l[n];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const Eu={key:0,class:"ocr-img-preview-root"},Su={class:"ocr-img-preview-window"},Du={key:0,class:"img-preview-body"},Bu={class:"img-preview-header"},Nu={class:"img-header-left"},Tu={class:"img-name"},Au={key:0,class:"img-header-right"},Mu={class:"img-index"},zu={key:0,class:"img-thumb-list"},Ou=["onClick"],Iu={key:1,class:"thumb-placeholder"},Lu={class:"thumb-name"},Vu={class:"img-preview-container"},Ru={key:0,class:"img-placeholder"},$u={key:2,class:"img-placeholder"},Pu={key:0},Fu={key:1},ju={key:1,class:"img-placeholder"},Hu=a.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(l,{emit:n}){const r=l,t=n,s=a.computed({get:()=>r.visible,set:D=>t("update:visible",D)});let d=!1,b="",h=0,v=0,y=0,c=0,C=0,M=0,L=null;const x=D=>{var ge,se;const ne=(se=(ge=D==null?void 0:D.target)==null?void 0:ge.closest)==null?void 0:se.call(ge,".ocr-img-preview-window");return ne||document.querySelector(".ocr-img-preview-window")},Y=D=>{if(!D||D==="none")return{tx:0,ty:0};let ne=D.match(/matrix\(([^)]+)\)/);if(ne){const ge=ne[1].split(",").map(se=>Number(se.trim()));return{tx:(ge==null?void 0:ge[4])||0,ty:(ge==null?void 0:ge[5])||0}}if(ne=D.match(/matrix3d\(([^)]+)\)/),ne){const ge=ne[1].split(",").map(se=>Number(se.trim()));return{tx:(ge==null?void 0:ge[12])||0,ty:(ge==null?void 0:ge[13])||0}}return ne=D.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),ne?{tx:Number(ne[1])||0,ty:Number(ne[2])||0}:{tx:0,ty:0}},w=(D,ne,ge)=>{D.style.transform=`translate(${ne}px, ${ge}px)`},z=D=>{const ne=x(D);if(!ne)return;d=!0,L=ne,b="move",h=D.clientX,v=D.clientY;const ge=window.getComputedStyle(ne),{tx:se,ty:we}=Y(ge.transform);C=se,M=we,document.addEventListener("mousemove",S),document.addEventListener("mouseup",$)},ee=(D,ne)=>{const ge=x(D);if(!ge)return;d=!0,L=ge,b=ne,h=D.clientX,v=D.clientY;const se=ge.getBoundingClientRect();y=se.width,c=se.height;const we=window.getComputedStyle(ge),{tx:la,ty:ya}=Y(we.transform);C=la,M=ya,document.addEventListener("mousemove",S),document.addEventListener("mouseup",$)},S=D=>{if(!d||!L)return;const ne=D.clientX-h,ge=D.clientY-v,se=360,we=420;let la=y,ya=c,Va=C,ae=M;if(b==="move"){Va=C+ne,ae=M+ge,w(L,Va,ae);return}if(b.includes("right")&&(la=Math.max(se,y+ne)),b.includes("bottom")&&(ya=Math.max(we,c+ge)),b.includes("left")){const ea=y-ne;ea<se?(la=se,Va=C+(y-se)):(la=ea,Va=C+ne)}if(b.includes("top")){const ea=c-ge;ea<we?(ya=we,ae=M+(c-we)):(ya=ea,ae=M+ge)}L.style.width=`${la}px`,L.style.height=`${ya}px`,w(L,Va,ae)},$=()=>{d=!1,b="",L=null,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",$)},T=a.ref([]),k=a.ref(!1);a.watch(()=>r.images,async D=>{if(!Array.isArray(D)||D.length===0){T.value=[];return}k.value=!0;const ne=[];for(const ge of D)if(ge.url&&!ge.url.startsWith("blob:")&&!ge.url.startsWith("http"))try{const se=await Ta.downloadFile(ge.url),we=URL.createObjectURL(se);ne.push({...ge,blobUrl:we})}catch(se){console.error(`Failed to load image for preview: ${ge.url}`,se),ne.push({...ge,blobUrl:""})}else ne.push({...ge,blobUrl:ge.url});T.value=ne,k.value=!1},{deep:!0,immediate:!0});const g=a.ref(0),j=a.ref(null),q=a.ref(null),J=a.computed(()=>T.value[g.value]||null),me=()=>{if(!T.value.length){g.value=0;return}if(r.defaultImageName){const D=T.value.findIndex(ne=>(ne==null?void 0:ne.name)===r.defaultImageName);g.value=D>=0?D:0}else g.value=0},ze=D=>{if(!T.value.length)return;const ne=Math.max(0,Math.min(D,T.value.length-1));g.value=ne},xe=()=>ze(g.value-1),te=()=>ze(g.value+1),be=D=>{if(!D)return;const ne=T.value.findIndex(ge=>(ge==null?void 0:ge.name)===D);ne>=0&&(g.value=ne)},Q=()=>{if(!q.value)return;const D=q.value.parentElement;if(!D)return;const ne=D.getBoundingClientRect();q.value.width=ne.width,q.value.height=ne.height},de=()=>{var se,we;if(!q.value||!j.value||!r.focusedFieldName){q.value&&mt(q.value);return}const D=(se=j.value.$el)==null?void 0:se.querySelector("img");if(!D)return;if(!D.complete||D.naturalWidth===0){D.onload=()=>{a.nextTick(()=>{de()})};return}const ne=((we=J.value)==null?void 0:we.name)||"",ge=Gi(r.fieldMeta,r.focusedFieldName);if(!ge){mt(q.value);return}if(ge.imageName!==ne){mt(q.value);return}Q(),Cu(q.value,D,ge.bboxNorm)},Ke=()=>{a.nextTick(()=>{Q(),de()})};a.watch(()=>r.focusedFieldName,()=>{if(!s.value)return;const D=Gi(r.fieldMeta,r.focusedFieldName);D!=null&&D.imageName&&be(D.imageName),a.nextTick(()=>{de()})}),a.watch(()=>{var D;return(D=J.value)==null?void 0:D.name},()=>{s.value&&a.nextTick(()=>{q.value&&mt(q.value),de()})}),a.watch(()=>r.visible,D=>{D?(me(),a.nextTick(()=>{Q(),de()})):q.value&&mt(q.value)}),a.watch(()=>r.defaultImageName,()=>{s.value&&me()});let wa=null;a.onMounted(()=>{var D;typeof ResizeObserver<"u"&&(wa=new ResizeObserver(()=>{Q(),a.nextTick(()=>{de()})}),(D=q.value)!=null&&D.parentElement&&wa.observe(q.value.parentElement))}),a.onUnmounted(()=>{wa&&(wa.disconnect(),wa=null),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",$)});const oe=()=>{q.value&&mt(q.value),t("update:visible",!1),t("close")};return(D,ne)=>{var ya,Va;const ge=a.resolveComponent("el-button"),se=a.resolveComponent("el-image"),we=a.resolveComponent("Loading"),la=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Eu,[ne[12]||(ne[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Su,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(z,["stop"])},[ne[8]||(ne[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:oe},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:ne[0]||(ne[0]=a.withModifiers(ae=>ee(ae,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:ne[1]||(ne[1]=a.withModifiers(ae=>ee(ae,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:ne[2]||(ne[2]=a.withModifiers(ae=>ee(ae,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:ne[3]||(ne[3]=a.withModifiers(ae=>ee(ae,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:ne[4]||(ne[4]=a.withModifiers(ae=>ee(ae,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:ne[5]||(ne[5]=a.withModifiers(ae=>ee(ae,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:ne[6]||(ne[6]=a.withModifiers(ae=>ee(ae,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:ne[7]||(ne[7]=a.withModifiers(ae=>ee(ae,"bottom-right"),["stop"]))},null,32),J.value?(a.openBlock(),a.createElementBlock("div",Du,[a.createElementVNode("div",Bu,[a.createElementVNode("div",Nu,[a.createElementVNode("span",Tu,a.toDisplayString(J.value.name?J.value.name+(J.value.url&&J.value.url.lastIndexOf(".")!==-1?J.value.url.substring(J.value.url.lastIndexOf(".")):""):""),1)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Au,[a.createVNode(ge,{size:"small",disabled:g.value===0,onClick:xe},{default:a.withCtx(()=>ne[9]||(ne[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Mu,a.toDisplayString(g.value+1)+" / "+a.toDisplayString(T.value.length),1),a.createVNode(ge,{size:"small",disabled:g.value===T.value.length-1,onClick:te},{default:a.withCtx(()=>ne[10]||(ne[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",zu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.value,(ae,ea)=>(a.openBlock(),a.createElementBlock("div",{key:(ae.name||"")+"-"+ea,class:a.normalizeClass(["img-thumb-item",{active:ea===g.value}]),onClick:Re=>ze(ea)},[ae!=null&&ae.blobUrl?(a.openBlock(),a.createBlock(se,{key:0,src:ae.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ae.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Iu,"加载失败")),a.createElementVNode("div",Lu,a.toDisplayString(ae.name||"-"),1)],10,Ou))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",Vu,[k.value?(a.openBlock(),a.createElementBlock("div",Ru,[a.createVNode(la,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(we)]),_:1}),ne[11]||(ne[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(ya=J.value)!=null&&ya.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(se,{ref_key:"imageRef",ref:j,src:J.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[J.value.blobUrl],onLoad:Ke},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:q,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",$u,[(Va=J.value)!=null&&Va.url?(a.openBlock(),a.createElementBlock("span",Pu,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",Fu,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",ju,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),Uu=Kl._export_sfc(Hu,[["__scopeId","data-v-48a4ecb1"]]),qu={class:"cert-preview-body"},Ku={key:0,class:"pdf-preview-container"},Wu={class:"thumbs"},Yu=["onClick"],Ju={class:"thumb-img"},Gu=["src"],Xu={key:1,class:"thumb-loading"},Zu={class:"thumb-title"},Qu={class:"viewer"},ed={key:0,class:"viewer-img-wrap"},ad=["src"],ld={key:1,class:"viewer-loading"},rd=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(""),d=a.ref(""),b=a.computed(()=>(r.versions||[]).find(x=>String(x.versionId)===String(s.value))),h=a.ref({}),v=a.ref(""),y=a.ref("证书附件.pdf"),c=()=>{try{Object.values(h.value||{}).forEach(x=>{x&&URL.revokeObjectURL(x)}),v.value&&URL.revokeObjectURL(v.value)}catch{}h.value={},v.value=""},C=async x=>{if(!x||x.fileType==="pdf")return;const Y=Array.isArray(x.images)?x.images:[];for(const w of Y){const z=w==null?void 0:w.url;if(!(!z||h.value[z]))try{const ee=await A.platformDownloadFile({url:z}),S=URL.createObjectURL(ee.data);h.value={...h.value,[z]:S}}catch{}}},M=async x=>{var w;if(!x||x.fileType!=="pdf"){v.value="";return}const Y=x.sourceUrl||"";if(!Y){v.value="";return}if(v.value){try{URL.revokeObjectURL(v.value)}catch{}v.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:Y,versionId:x==null?void 0:x.versionId,certNo:x==null?void 0:x.certNo});const z=await A.platformDownloadFile({url:Y});console.log("[CertificatePreview] PDF响应:",{url:Y,status:z==null?void 0:z.status,size:(w=z==null?void 0:z.data)==null?void 0:w.size});const ee=URL.createObjectURL(z.data);v.value=ee;const S=x.certNo?String(x.certNo):"";y.value=S?`${S}.pdf`:"证书附件.pdf"}catch(z){console.error("[CertificatePreview] PDF加载失败:",{url:Y,error:z}),v.value=""}};a.watch(()=>r.visible,async x=>{var w;if(!x){c();return}const Y=(w=r.versions)==null?void 0:w[0];s.value=(Y==null?void 0:Y.versionId)||"",await C(Y),await M(Y)},{immediate:!0}),a.watch(()=>s.value,async()=>{var Y,w;const x=b.value;if(!x){d.value="",v.value="";return}if(x.fileType==="pdf"){d.value="",await M(x);return}v.value="",d.value=((w=(Y=x.images)==null?void 0:Y[0])==null?void 0:w.url)||"",await C(x)},{immediate:!0});const L=()=>{t("update:visible",!1),c()};return a.onBeforeUnmount(()=>{c()}),(x,Y)=>{const w=a.resolveComponent("el-empty"),z=a.resolveComponent("el-tab-pane"),ee=a.resolveComponent("el-tabs"),S=a.resolveComponent("el-button"),$=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock($,{"model-value":x.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:L},{footer:a.withCtx(()=>[a.createVNode(S,{id:"themeBorderButton",onClick:L},{default:a.withCtx(()=>Y[1]||(Y[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[x.versions&&x.versions.length>0?(a.openBlock(),a.createBlock(ee,{key:0,modelValue:s.value,"onUpdate:modelValue":Y[0]||(Y[0]=T=>s.value=T),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.versions,T=>(a.openBlock(),a.createBlock(z,{key:T.versionId,name:T.versionId,label:T.label},{default:a.withCtx(()=>[a.createElementVNode("div",qu,[T.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",Ku,[v.value?(a.openBlock(),a.createBlock(pl.SsFilePreview,{key:1,fileName:y.value,blobUrl:v.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(w,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",Wu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.images||[],k=>(a.openBlock(),a.createElementBlock("div",{key:k.url,class:a.normalizeClass(["thumb",{active:k.url===d.value}]),onClick:g=>d.value=k.url},[a.createElementVNode("div",Ju,[h.value[k.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:h.value[k.url]},null,8,Gu)):(a.openBlock(),a.createElementBlock("div",Xu,"加载中"))]),a.createElementVNode("div",Zu,a.toDisplayString(k.name),1)],10,Yu))),128))]),a.createElementVNode("div",Qu,[d.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[h.value[d.value]?(a.openBlock(),a.createElementBlock("div",ed,[a.createElementVNode("img",{class:"viewer-img",src:h.value[d.value]},null,8,ad)])):(a.openBlock(),a.createElementBlock("div",ld,"加载中"))],64)):(a.openBlock(),a.createBlock(w,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(w,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),nd=Kl._export_sfc(rd,[["__scopeId","data-v-220703c0"]]),td={class:"ocr-candidate-wrap"},od={class:"ocr-candidate-left"},id={key:1},sd={key:0},cd={key:1},ud={key:2},dd={key:3},pd={key:0,class:"ocr-candidate-right"},fd={class:"ocr-candidate-actions"},hd={key:1},vd={class:"dialog-footer"},md={__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(l,{emit:n}){const r=(g=[])=>{const j=[],q=J=>{(J||[]).forEach(me=>{if(!me)return;const ze=me.children||me.childrens||me.columns;Array.isArray(ze)&&ze.length>0?q(ze):j.push(me)})};return q(g),j},t=l,s=n,d=a.computed(()=>{var g;return((g=M.value)==null?void 0:g.allowAdd)!==!1}),b=a.computed(()=>{var g;return((g=M.value)==null?void 0:g.allowReplace)!==!1}),h=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const j=JSON.parse(g);return Array.isArray(j)?j:[]}catch{return[]}return[]},v=g=>{s("preview-file",g)},y=a.ref([]),c=a.ref(0),C=a.ref("");a.watch(()=>t.candidates,g=>{var j,q;y.value=(g||[]).map(J=>({...J,...(J==null?void 0:J.ocrRow)||{},selectedTargetId:(J==null?void 0:J.selectedTargetId)||"",__decision:J==null?void 0:J.__decision})),c.value=0,C.value=((q=(j=y.value)==null?void 0:j[0])==null?void 0:q.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>t.visible,g=>{var j,q;g&&(c.value=0,C.value=((q=(j=y.value)==null?void 0:j[0])==null?void 0:q.selectedTargetId)||"")});const M=a.computed(()=>{var j;const g=Number(c.value||0);return((j=y.value||[])==null?void 0:j[g])||null}),L=a.computed(()=>(r(t.columns||[])||[]).filter(q=>q&&q.prop).filter(q=>q.type!=="operate"&&q.label!=="操作"&&q.prop!=="operate")),x=a.computed(()=>L.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),Y=g=>{if(!g)return;const j=(y.value||[]).findIndex(q=>(q==null?void 0:q.idx)===(g==null?void 0:g.idx));j>-1&&(c.value=j,C.value=(g==null?void 0:g.selectedTargetId)||"")},w=g=>{if(!g){C.value="";return}C.value=String((g==null?void 0:g.id)??"")},z=(g,j="")=>{const q=Number(c.value||0),J=y.value||[],me=J[q];me&&(me.__decision=g,me.selectedTargetId=j,C.value=j,y.value=[...J])},ee=()=>z("skip",""),S=()=>z("add",""),$=()=>{if(!C.value){Qa.ElMessage.warning("请先选择要替换的目标记录");return}z("replace",C.value)},T=()=>{s("update:visible",!1)},k=()=>{const g=y.value||[];if(g.find(q=>(q==null?void 0:q.__decision)==="replace"&&!(q!=null&&q.selectedTargetId))){Qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",g),s("update:visible",!1)};return(g,j)=>{const q=a.resolveComponent("el-table-column"),J=a.resolveComponent("svg-icon"),me=a.resolveComponent("el-table"),ze=a.resolveComponent("el-button"),xe=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(yr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:T},{default:a.withCtx(()=>{var te,be;return[a.createElementVNode("div",td,[a.createElementVNode("div",od,[j[0]||(j[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(me,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:Y},{default:a.withCtx(()=>[a.createVNode(q,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,Q=>(a.openBlock(),a.createBlock(q,{key:Q.prop,label:Q.label,prop:Q.prop,"min-width":Q.minWidth||160},{default:a.withCtx(({row:de})=>[Q.label==="证书附件"||Q.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Q.prop]).length>0?(a.openBlock(),a.createBlock(J,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Q.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",id,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Q.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode(q,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:Q})=>[a.createTextVNode(a.toDisplayString(((Q==null?void 0:Q.candidates)||[]).length),1)]),_:1}),a.createVNode(q,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:Q})=>[(Q==null?void 0:Q.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",sd,"替换")):(Q==null?void 0:Q.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",cd,"新增")):(Q==null?void 0:Q.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",ud,"跳过")):(a.openBlock(),a.createElementBlock("span",dd,"未处理"))]),_:1})]),_:1},8,["data"])]),y.value&&y.value.length>0?(a.openBlock(),a.createElementBlock("div",pd,[j[4]||(j[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",fd,[a.createVNode(ze,{id:"themeBorderButton",onClick:ee},{default:a.withCtx(()=>j[1]||(j[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(ze,{id:"themeBorderButton",onClick:S,disabled:!d.value},{default:a.withCtx(()=>j[2]||(j[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:$,disabled:!b.value||!C.value},{default:a.withCtx(()=>j[3]||(j[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((te=M.value)==null?void 0:te.candidates)||[]).length===0?(a.openBlock(),a.createBlock(xe,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(me,{data:((be=M.value)==null?void 0:be.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:w,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(q,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(L.value,Q=>(a.openBlock(),a.createBlock(q,{key:Q.prop,label:Q.label,prop:Q.prop,"min-width":Q.minWidth||160},{default:a.withCtx(({row:de})=>[Q.label==="证书附件"||Q.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Q.prop]).length>0?(a.openBlock(),a.createBlock(J,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Q.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",hd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Q.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",vd,[a.createVNode(ze,{id:"themeBorderButton",onClick:T},{default:a.withCtx(()=>j[5]||(j[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:k},{default:a.withCtx(()=>j[6]||(j[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},yd=Kl._export_sfc(md,[["__scopeId","data-v-89e0489c"]]),gd={class:"ocr-preview-content"},bd={class:"ocr-preview-tip"},kd={class:"ocr-preview-table"},xd={style:{display:"flex","align-items":"center",gap:"8px"}},_d={class:"dialog-footer"},wd={__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(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref([]),b=a.ref([]);a.watch(()=>r.visible,L=>{L&&(s.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),d.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),b.value=[...r.ocrSelectedFields])});const h=(L,x)=>{const Y=[...b.value];if(x)Y.includes(L)||Y.push(L);else{const w=Y.indexOf(L);w>-1&&Y.splice(w,1)}b.value=Y,t("update:ocrSelectedFields",Y)},v=(L,x,Y)=>{t("fieldChange",{rowIndex:L,prop:x,value:Y})},y=()=>{t("update:ocrPreviewData",s.value),t("confirm",s.value),t("update:visible",!1)},c=()=>{t("update:visible",!1)},C=L=>typeof L!="number"?"-":`${(L*100).toFixed(1)}%`,M=L=>typeof L!="number"?"#606266":L>=.9?"#67c23a":L>=.7?"#e6a23c":"#f56c6c";return(L,x)=>{const Y=a.resolveComponent("el-alert"),w=a.resolveComponent("el-table-column"),z=a.resolveComponent("el-checkbox"),ee=a.resolveComponent("el-input"),S=a.resolveComponent("el-table"),$=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(yr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:c,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",gd,[a.createElementVNode("div",bd,[a.createVNode(Y,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",kd,[a.createVNode(S,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(w,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,T=>(a.openBlock(),a.createBlock(w,{key:T.prop,prop:T.prop,"min-width":T.minWidth||230,"class-name":T.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",xd,[T.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(z,{key:0,"model-value":b.value.includes(T.prop),onChange:k=>h(T.prop,k),onClick:x[0]||(x[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(T.label),1)])]),default:a.withCtx(({row:k,$index:g})=>[T.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:M(k[T.prop]),fontWeight:500})},a.toDisplayString(C(k[T.prop])),5)):(a.openBlock(),a.createBlock(ee,{key:1,modelValue:k[T.prop],"onUpdate:modelValue":j=>k[T.prop]=j,size:"small",placeholder:"请输入"+T.label,onChange:j=>v(g,T.prop,j)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",_d,[a.createVNode($,{onClick:c,id:"themeBorderButton"},{default:a.withCtx(()=>x[1]||(x[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode($,{class:"ok-button",onClick:y,id:"themeButton"},{default:a.withCtx(()=>x[2]||(x[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Cd=Kl._export_sfc(wd,[["__scopeId","data-v-df66eb1f"]]),kt=l=>{var t;let n=l;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let r=(t=Ta.analyzeSplitToContent(n,","))==null?void 0:t.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),oi(s)));return r=r==null?void 0:r.join(","),r};let ja="$R",qs="[Any]";const Ed=l=>{var b,h;let n={},r=l==null?void 0:l[0],t=(h=(b=r==null?void 0:r.replace("{",ja))==null?void 0:b.split(ja))==null?void 0:h[0];(t==null?void 0:t[0])==="*"&&(t=t==null?void 0:t.slice(1,t==null?void 0:t.length)),t=t==null?void 0:t.split(":"),n.group=t;let s=l==null?void 0:l[1],d=s==null?void 0:s.replaceAll(qs,"");return(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),n.filter=d,n},Sd=l=>{var c,C,M,L,x,Y,w;let n=[],r=[],t=l==null?void 0:l.map(z=>{var S;let ee=(S=Ta.analyzeSplitToContent(z,"@"))==null?void 0:S[0];return(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])==="@"&&(ee=ee==null?void 0:ee.slice(0,(ee==null?void 0:ee.length)-1)),ee}),s="",d=Ta.analyzeSplitToContent(t==null?void 0:t[0],":");r=(c=d==null?void 0:d.filter(z=>!(z!=null&&z.includes("{"))&&!(z!=null&&z.includes("["))))==null?void 0:c.join(""),(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==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":");let b=d==null?void 0:d.filter(z=>(z==null?void 0:z.includes("{"))||(z==null?void 0:z.includes("["))),h=(M=b==null?void 0:b[0])==null?void 0:M.slice(1,((C=b==null?void 0:b[0])==null?void 0:C.length)-1);h=(L=Ta.analyzeSplitToContent(h,","))==null?void 0:L.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));let v="@"+((x=Ta.analyzeSplitToContent(l==null?void 0:l[0],"@"))==null?void 0:x[1]);((Y=Ta.analyzeSplitToContent(v,":"))==null?void 0:Y.length)>1&&(n=wt((w=Ta.analyzeSplitToContent(v,":"))==null?void 0:w[1]),n=[n]);let y=[];return h==null||h.forEach((z,ee)=>{var ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe;let S=(ze=z==null?void 0:z.split("=="))==null?void 0:ze[0],$=(xe=z==null?void 0:z.split("=="))==null?void 0:xe[1],T=[],k=[],g=[],j=[],q="Input",J=[],me=[];if((z==null?void 0:z[0])!=="{"){if(($==null?void 0:$[0])==="$")$=$==null?void 0:$.slice(1,$==null?void 0:$.length),T=(be=(te=$==null?void 0:$.split("*"))==null?void 0:te[0])==null?void 0:be.split(":"),k=(D=(oe=(wa=(Ke=(de=(Q=$==null?void 0:$.split("*"))==null?void 0:Q[1])==null?void 0:de.replace("{",ja))==null?void 0:Ke.split(ja))==null?void 0:wa[0])==null?void 0:oe.split(":"))==null?void 0:D.filter(ka=>ka!==""),g=(ge=(ne=$==null?void 0:$.replace("{",ja))==null?void 0:ne.split(ja))==null?void 0:ge[1],g=g==null?void 0:g.replaceAll("}",""),g=g==null?void 0:g.split(":"),q="Select";else if(((se=Ta.analyzeSplitToContent(z,"="))==null?void 0:se.length)>1){let ka=(we=S==null?void 0:S.split("="))==null?void 0:we[1];if(S=(la=S==null?void 0:S.split("="))==null?void 0:la[0],q="Select",!(z!=null&&z.includes("||")))ka=(ya=ka==null?void 0:ka.split("/"))==null?void 0:ya.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)),j=ka==null?void 0:ka.map(Fe=>({label:Fe==null?void 0:Fe.replaceAll("'",""),value:Fe==null?void 0:Fe.replaceAll("'","")}));else{let Fe=[];(Re=(ea=(ae=(Va=z==null?void 0:z.replace("=",ja))==null?void 0:Va.split(ja))==null?void 0:ae[1])==null?void 0:ea.split("||"))==null||Re.forEach($a=>{var Na,Ye,Oe;J.push((Ye=(Na=$a==null?void 0:$a.split("@Filter"))==null?void 0:Na[0])==null?void 0:Ye.split("/")),Fe.push((Oe=$a==null?void 0:$a.split("@Filter"))==null?void 0:Oe[1])}),me=Fe==null?void 0:Fe.map($a=>($a=$a==null?void 0:$a.slice(1,($a==null?void 0:$a.length)-1),$a))}}else if(z!=null&&z.includes("@")&&!(z!=null&&z.includes("||"))){S=(We=(Le=(Ee=(Pe=(ma=S==null?void 0:S.replace("(@",ja))==null?void 0:ma.split(ja))==null?void 0:Pe[0])==null?void 0:Ee.replace("@",ja))==null?void 0:Le.split(ja))==null?void 0:We[0];let ka=z!=null&&z.includes("(@")?"(@"+((Oa=(Ua=z==null?void 0:z.replace("(@",ja))==null?void 0:Ua.split(ja))==null?void 0:Oa[1]):"@"+((F=(P=z==null?void 0:z.replace("@",ja))==null?void 0:P.split(ja))==null?void 0:F[1]);if(ka=(X=kt(ka))==null?void 0:X.split(","),ka!=null&&ka.find(Fe=>Fe==null?void 0:Fe.includes("@Type"))){let Fe=(R=ka==null?void 0:ka.find($a=>$a==null?void 0:$a.includes("@Type")))==null?void 0:R.split("=");Fe!=null&&Fe.includes("File")&&(q="Upload"),Fe!=null&&Fe.includes("Date")&&(q="Date"),Fe!=null&&Fe.includes("DateTime")&&(q="DateTime"),Fe!=null&&Fe.includes("Time")&&(q="Time")}}y.push({prop:S,label:S,value:"",menuPath:T,groups:k,columns:g,width:h==null?void 0:h.length,options:j,type:q,allContents:J,filterContents:me})}else{s=s+"@"+((W=Ta.analyzeSplitToContent(z,"@"))==null?void 0:W[1]);let ka=(Ie=Ta.analyzeSplitToContent(z,"@"))==null?void 0:Ie[0];(ka==null?void 0:ka[(ka==null?void 0:ka.length)-1])==="@"&&(ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1));let Fe=(Ne=ka==null?void 0:ka.split("=="))==null?void 0:Ne[0],$a=(Ce=ka==null?void 0:ka.split("=="))==null?void 0:Ce[1],Na=(He=(K=$a==null?void 0:$a.split("*"))==null?void 0:K[0])==null?void 0:He.replace(qs,"");(Na==null?void 0:Na[0])==="$"&&(Na=Na==null?void 0:Na.slice(1,Na==null?void 0:Na.length)),Na=Ta.analyzeSplitToContent(Na,"$"),Na=(Ve=Na==null?void 0:Na.map((Ye,Oe)=>{var ue;return Oe===0&&(Na==null?void 0:Na.length)>1&&(Ye=(ue=Ye==null?void 0:Ye.split(":"))==null?void 0:ue[0]),(Na==null?void 0:Na.length)>1&&Oe===(Na==null?void 0:Na.length)-1&&(Ye=Ye+":"),Ye}))==null?void 0:Ve.join(":"),T=Na==null?void 0:Na.split(":"),k=(fa=(Te=(ba=($e=(va=(ra=$a==null?void 0:$a.split("*"))==null?void 0:ra[1])==null?void 0:va.replace("{",ja))==null?void 0:$e.split(ja))==null?void 0:ba[0])==null?void 0:Te.split(":"))==null?void 0:fa.filter(Ye=>Ye!==""),g=(ga=(Ue=$a==null?void 0:$a.replace("{",ja))==null?void 0:Ue.split(ja))==null?void 0:ga[1],g=g==null?void 0:g.replaceAll("}",""),Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1),g=g==null?void 0:g.split(","),q="Select",(fe=Fe==null?void 0:Fe.split(","))==null||fe.forEach((Ye,Oe)=>{var ue,ie;y.push({prop:Ye,label:Ye,value:"",menuPath:T,groups:k,columns:(ue=g==null?void 0:g[Oe])==null?void 0:ue.split(":"),width:(ie=Fe==null?void 0:Fe.split(","))==null?void 0:ie.length,type:q})})}}),{groupName:r,formContents:y,contents:n,filter:s}},wt=l=>{var t,s;let n=[],r=l.slice(1,(l==null?void 0:l.length)-1);if((r==null?void 0:r[0])!=="[")(t=Ta.analyzeSplitToContent(r,","))==null||t.forEach(d=>{(d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d.slice(0,(d==null?void 0:d.length)-1)),n.push(d??"")});else{let d=[];(s=Ta.analyzeSplitToContent(r,","))==null||s.forEach(b=>{(b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),d.push(wt(b))}),n=d}return n},ti=(l,n)=>{var Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye;let r,t=[],s=[],d=[],b=[],h=[],v=[],y="Input",c,C="",M="",L=[],x="";if(l!=null&&l.includes("@Pam")||l!=null&&l.includes("==")||l!=null&&l.includes("="))if(l!=null&&l.includes("@Pam")){let Oe=Ta.analyzeSplitToContent(l,"=");if((Oe==null?void 0:Oe.length)>1){l=Oe==null?void 0:Oe[0],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1);let na=Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1];(na==null?void 0:na[0])==="&"&&(na=na==null?void 0:na.slice(1,na==null?void 0:na.length)),M=(w=(Y=na==null?void 0:na.replace("(",ja))==null?void 0:Y.split(ja))==null?void 0:w[0];let qa=(ee=(z=na==null?void 0:na.replace(")",ja))==null?void 0:z.split(ja))==null?void 0:ee[0];qa=($=(S=qa==null?void 0:qa.replace("(",ja))==null?void 0:S.split(ja))==null?void 0:$[1],(qa==null?void 0:qa[0])==="{"&&(qa=qa==null?void 0:qa.slice(1,qa==null?void 0:qa.length)),(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])==="}"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),L=qa==null?void 0:qa.split(",");let rl=(k=(T=na==null?void 0:na.replace(")",ja))==null?void 0:T.split(ja))==null?void 0:k[1];rl&&rl!==""&&(x=kt(rl))}r=(j=(g=l==null?void 0:l.replace("@Pam",ja))==null?void 0:g.split(ja))==null?void 0:j[0];let ue=(J=(q=l==null?void 0:l.replace("@Pam",ja))==null?void 0:q.split(ja))==null?void 0:J[1];ue=ue==null?void 0:ue.slice(1,(ue==null?void 0:ue.length)-1),ue=(me=Ta.analyzeSplitToContent(ue,","))==null?void 0:me.map(na=>(na="@"+na,na));let ie=ue==null?void 0:ue.find(na=>na==null?void 0:na.includes("@Type"));ie!=null&&ie.includes("File")&&(y="Upload"),ie!=null&&ie.includes("Date")&&(y="Date"),ie!=null&&ie.includes("DateTime")&&(y="DateTime"),ie!=null&&ie.includes("Time")&&(y="Time"),c=ue==null?void 0:ue.find(na=>na==null?void 0:na.includes("@IdentName")),c=c?(xe=(ze=c==null?void 0:c.replace("=",ja))==null?void 0:ze.split(ja))==null?void 0:xe[1]:r}else{if(r=(te=l==null?void 0:l.split("=="))==null?void 0:te[0],c=(be=l==null?void 0:l.split("=="))==null?void 0:be[0],l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((Ke=(de=(Q=l==null?void 0:l.replace("=",ja))==null?void 0:Q.split(ja))==null?void 0:de[1])!=null&&Ke.includes("||")))if(r=(wa=l==null?void 0:l.split("="))==null?void 0:wa[0],c=r,l!=null&&l.includes("(@")||l!=null&&l.includes("@")){if(l!=null&&l.includes("(@")){let ue=(oe=l==null?void 0:l.split("(@"))==null?void 0:oe[1];ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),ue=(ne=(D=ue==null?void 0:ue.replace("(",ja))==null?void 0:D.split(ja))==null?void 0:ne[1],ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),d==null||d.push(ue),l=(ge=l==null?void 0:l.split("(@"))==null?void 0:ge[0]}else{let ue=(se=l==null?void 0:l.split("@"))==null?void 0:se[1];ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),ue=(la=(we=ue==null?void 0:ue.replace("(",ja))==null?void 0:we.split(ja))==null?void 0:la[1],ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1),d==null||d.push(ue),l=(ya=l==null?void 0:l.split("@"))==null?void 0:ya[0]}let Oe=(ae=(Va=l==null?void 0:l.split("="))==null?void 0:Va[1])==null?void 0:ae.split("/");s.push(Oe)}else t=(Re=Ta.analyzeSplitToContent((ea=l==null?void 0:l.split("="))==null?void 0:ea[1],"/"))==null?void 0:Re.map(Oe=>((Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])==="/"&&(Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1)),Oe)),t=t==null?void 0:t.map(Oe=>({label:Oe==null?void 0:Oe.replaceAll("'",""),value:Oe==null?void 0:Oe.replaceAll("'","")}));else if((Ee=(Pe=(ma=l==null?void 0:l.replace("=",ja))==null?void 0:ma.split(ja))==null?void 0:Pe[1])!=null&&Ee.includes("||")){r=(Le=l==null?void 0:l.split("="))==null?void 0:Le[0],c=(We=l==null?void 0:l.split("="))==null?void 0:We[0];let Oe=[];(F=(P=(Oa=(Ua=l==null?void 0:l.replace("=",ja))==null?void 0:Ua.split(ja))==null?void 0:Oa[1])==null?void 0:P.split("||"))==null||F.forEach(ue=>{var ie,na,qa;s.push((na=(ie=ue==null?void 0:ue.split("@Filter"))==null?void 0:ie[0])==null?void 0:na.split("/")),Oe.push((qa=ue==null?void 0:ue.split("@Filter"))==null?void 0:qa[1])}),d=Oe==null?void 0:Oe.map(ue=>(ue=ue==null?void 0:ue.slice(1,(ue==null?void 0:ue.length)-1),ue))}else{let Oe=l==null?void 0:l.split("=="),ue=(X=Oe==null?void 0:Oe.filter(ie=>(ie==null?void 0:ie[0])==="$"))==null?void 0:X[0];if(!(ue!=null&&ue.includes("&"))){let ie=(R=ue==null?void 0:ue.replace("*",ja))==null?void 0:R.split(ja),na=(ie==null?void 0:ie[0])===""?n==null?void 0:n.value:ie==null?void 0:ie[0];na=na==null?void 0:na.replaceAll("[Any]",""),(na==null?void 0:na[0])==="$"&&(na=(W=na==null?void 0:na.slice(1,na==null?void 0:na.length))==null?void 0:W.replaceAll(":","/")),b=na==null?void 0:na.split("/");let qa=(Ne=(Ie=ie==null?void 0:ie[1])==null?void 0:Ie.replace("{",ja))==null?void 0:Ne.split(ja),rl=qa==null?void 0:qa[0];(rl==null?void 0:rl[(rl==null?void 0:rl.length)-1])===":"&&(rl=rl==null?void 0:rl.slice(0,(rl==null?void 0:rl.length)-1)),h=rl==null?void 0:rl.split(":"),v=(Ve=(He=(K=(Ce=qa==null?void 0:qa[1])==null?void 0:Ce.replace("}",ja))==null?void 0:K.split(ja))==null?void 0:He[0])==null?void 0:Ve.split(":");let Ml=($e=(va=(ra=qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])==null?void 0:ra.replace("}",ja))==null?void 0:va.split(ja))==null?void 0:$e[1];Ml&&Ml!==""&&(C=kt(Ml))}if(Oe!=null&&Oe.some(ie=>(ie==null?void 0:ie[0])==="&")){let ie=(ba=Oe==null?void 0:Oe.filter(rl=>(rl==null?void 0:rl[0])==="&"))==null?void 0:ba[0];(ie==null?void 0:ie[0])==="&"&&(ie=ie==null?void 0:ie.slice(1,ie==null?void 0:ie.length)),M=(fa=(Te=ie==null?void 0:ie.replace("(",ja))==null?void 0:Te.split(ja))==null?void 0:fa[0];let na=(ga=(Ue=ie==null?void 0:ie.replace(")",ja))==null?void 0:Ue.split(ja))==null?void 0:ga[0];na=(ka=(fe=na==null?void 0:na.replace("(",ja))==null?void 0:fe.split(ja))==null?void 0:ka[1],(na==null?void 0:na[0])==="{"&&(na=na==null?void 0:na.slice(1,na==null?void 0:na.length)),(na==null?void 0:na[(na==null?void 0:na.length)-1])==="}"&&(na=na==null?void 0:na.slice(0,(na==null?void 0:na.length)-1)),L=na==null?void 0:na.split(",");let qa=($a=(Fe=ie==null?void 0:ie.replace(")",ja))==null?void 0:Fe.split(ja))==null?void 0:$a[1];qa&&qa!==""&&(x=kt(qa))}}y="Select"}else r=l,c=l;return r!=null&&r.includes("@Pam")&&(r=(Ye=(Na=l==null?void 0:l.replace("@Pam",ja))==null?void 0:Na.split(ja))==null?void 0:Ye[0],c=r),{label:r,prop:c,options:t,allContents:s,filterContents:d,menus:b,groups:h,words:v,align:"center",formType:y,filter:C,functionName:M,functionRelatedWords:L,calculatorFilter:x}},xo=(l,n)=>{var t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be;let r=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((b=(d=(s=(t=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:t.replace(":",ja))==null?void 0:s.split(ja))==null?void 0:d[0])!=null&&b.includes(","))){let Q=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),de=(h=Q==null?void 0:Q.replace(":",ja))==null?void 0:h.split(ja);if(((v=Ta.analyzeSplitToContent(de==null?void 0:de[1],"="))==null?void 0:v.length)===1){let Ke=de==null?void 0:de[0],wa=[];(C=Ta.analyzeSplitToContent((c=de==null?void 0:de[1])==null?void 0:c.slice(1,((y=de==null?void 0:de[1])==null?void 0:y.length)-1),","))==null||C.forEach(oe=>{var D,ne;((D=Ta.analyzeSplitToContent(oe,"="))==null?void 0:D.length)>1?((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),wa=[...wa,...xo(oe,n)]):((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),wa.push((ne=xo(oe,n))==null?void 0:ne[0]))}),r==null||r.push({label:Ke,prop:Ke,children:wa,align:"center"})}else{let Ke=[];if(((M=Ta.analyzeSplitToContent(Q,"="))==null?void 0:M.length)>=2){let oe=(L=Ta.analyzeSplitToContent(Q,"="))==null?void 0:L[1],D=(x=Ta.analyzeSplitToContent(oe,"/"))==null?void 0:x.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));Ke=D==null?void 0:D.map(ne=>(ne=wt(ne),ne))}let wa=($=(S=(ee=(z=(w=(Y=Q==null?void 0:Q.replace("{",ja))==null?void 0:Y.split(ja))==null?void 0:w[1])==null?void 0:z.replace("}",ja))==null?void 0:ee.split(ja))==null?void 0:S[0])==null?void 0:$.split(",");wa==null||wa.forEach((oe,D)=>{(Ke==null?void 0:Ke.length)>0&&D===0?r==null||r.push({label:oe,prop:oe,align:"center",formType:"Select",relatedContents:Ke==null?void 0:Ke.map(ne=>{let ge={};return wa==null||wa.forEach((se,we)=>{ge[se]=ne==null?void 0:ne[we]}),ge}),options:Ke==null?void 0:Ke.map(ne=>({label:ne==null?void 0:ne[0],value:ne==null?void 0:ne[0]})),mainKey:!0}):r==null||r.push({label:oe,prop:oe,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((T=Ta.analyzeSplitToContent(l,"="))==null?void 0:T.length)===2&&((g=(k=Ta.analyzeSplitToContent(l,"="))==null?void 0:k[1])==null?void 0:g[0])==="["){let Q=[];if(((j=Ta.analyzeSplitToContent(l,"="))==null?void 0:j.length)>=2){let Ke=(q=Ta.analyzeSplitToContent(l,"="))==null?void 0:q[1],wa=(J=Ta.analyzeSplitToContent(Ke,"/"))==null?void 0:J.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])==="/"&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe));Q=wa==null?void 0:wa.map(oe=>(oe=wt(oe),oe))}let de=(ze=(me=l==null?void 0:l.replace("}",ja))==null?void 0:me.split(ja))==null?void 0:ze[0];de=(xe=de==null?void 0:de.slice(1,de==null?void 0:de.length))==null?void 0:xe.split(","),de==null||de.forEach((Ke,wa)=>{(Q==null?void 0:Q.length)>0&&wa===0?r==null||r.push({label:Ke,prop:Ke,align:"center",formType:"Select",relatedContents:Q==null?void 0:Q.map(oe=>{let D={};return de==null||de.forEach((ne,ge)=>{D[ne]=oe==null?void 0:oe[ge]}),D}),options:Q==null?void 0:Q.map(oe=>({label:oe==null?void 0:oe[0],value:oe==null?void 0:oe[0]})),mainKey:!0}):r==null||r.push({label:Ke,prop:Ke,align:"center"})})}else(te=Ta.analyzeSplitToContent(l,","))==null||te.forEach(Q=>{var de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if((Q==null?void 0:Q[(Q==null?void 0:Q.length)-1])===","&&(Q=Q==null?void 0:Q.slice(0,(Q==null?void 0:Q.length)-1)),(Q==null?void 0:Q[0])==="{"){let fe=Ta.analyzeSplitToContent(Q,"="),ka=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1],Fe=[],$a=[],Na=[],Ye=[],Oe=[],ue=(de=ka==null?void 0:ka.replace("*",ja))==null?void 0:de.split(ja),ie=(ue==null?void 0:ue[0])===""?n==null?void 0:n.value:ue==null?void 0:ue[0];if(ie=ie==null?void 0:ie.replaceAll("[Any]",""),(ie==null?void 0:ie[(ie==null?void 0:ie.length)-1])===":"&&(ie=ie!=null&&ie.includes("(@")?((Ke=ie==null?void 0:ie.split("(@"))==null?void 0:Ke[0])+":":((wa=ie==null?void 0:ie.split("@"))==null?void 0:wa[0])+":"),(ie==null?void 0:ie[0])==="$"&&(ie=(oe=ie==null?void 0:ie.slice(1,ie==null?void 0:ie.length))==null?void 0:oe.replaceAll(":","/")),ie!=null&&ie.includes("$")){let nl=(D=ie==null?void 0:ie.split("$"))==null?void 0:D[0];nl=(ne=nl==null?void 0:nl.split("/"))==null?void 0:ne[0],ie=nl+"/"+((ge=ie==null?void 0:ie.split("$"))==null?void 0:ge[1])+"/"}(ie==null?void 0:ie[(ie==null?void 0:ie.length)-1])==="/"&&(ie==null?void 0:ie[(ie==null?void 0:ie.length)-2])==="/"&&(ie=ie==null?void 0:ie.slice(0,(ie==null?void 0:ie.length)-1)),Fe=ie==null?void 0:ie.split("/");let na=(we=(se=ue==null?void 0:ue[1])==null?void 0:se.replace("{",ja))==null?void 0:we.split(ja);if((Va=(ya=(la=ue==null?void 0:ue[1])==null?void 0:la.split("(@"))==null?void 0:ya[0])!=null&&Va.includes("&&")||(Re=(ea=(ae=ue==null?void 0:ue[1])==null?void 0:ae.split("@"))==null?void 0:ea[0])!=null&&Re.includes("&&")){let nl=(ma=ue==null?void 0:ue[1])!=null&&ma.includes("(@")?(Le=(Ee=(Pe=ue==null?void 0:ue[1])==null?void 0:Pe.split("(@"))==null?void 0:Ee[0])==null?void 0:Le.split("&&"):(Oa=(Ua=(We=ue==null?void 0:ue[1])==null?void 0:We.split("@"))==null?void 0:Ua[0])==null?void 0:Oa.split("&&");Ye=nl==null?void 0:nl.map(aa=>{var Se,Xa;return(aa==null?void 0:aa[0])==="*"&&(aa=aa==null?void 0:aa.slice(1,aa==null?void 0:aa.length)),aa=(Xa=(Se=aa==null?void 0:aa.replace("{",ja))==null?void 0:Se.split(ja))==null?void 0:Xa[0],(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=aa==null?void 0:aa.split(":"),aa});let Ca=[];nl==null||nl.forEach((aa,Se)=>{var Xa,Ya;(aa==null?void 0:aa[0])==="*"&&(aa=aa==null?void 0:aa.slice(1,aa==null?void 0:aa.length)),aa=(Ya=(Xa=aa==null?void 0:aa.replace("{",ja))==null?void 0:Xa.split(ja))==null?void 0:Ya[1],(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=aa==null?void 0:aa.split(","),Ca.push(Se===0?(aa==null?void 0:aa.length)-1:aa==null?void 0:aa.length),Oe=[...Oe,...aa]}),Ca=(P=Ta.prefixSum(Ca))==null?void 0:P.map(aa=>aa==null?void 0:aa.total),Ye=Ye==null?void 0:Ye.map((aa,Se)=>({number:Ca==null?void 0:Ca[Se],contents:aa}))}let qa=na==null?void 0:na[0];(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])===":"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),$a=qa==null?void 0:qa.split(":"),Na=(W=(R=(X=(F=na==null?void 0:na[1])==null?void 0:F.replace("}",ja))==null?void 0:X.split(ja))==null?void 0:R[0])==null?void 0:W.split(",");let rl=(Ne=fe==null?void 0:fe[0])==null?void 0:Ne.slice(1,((Ie=fe==null?void 0:fe[0])==null?void 0:Ie.length)-2),Ml="",Fa="";if((Ce=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])!=null&&Ce.includes("(@")?(Fa=(Ve=(He=(K=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])==null?void 0:K.replace("(@",ja))==null?void 0:He.split(ja))==null?void 0:Ve[1],Fa="(@"+Fa):(ra=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])!=null&&ra.includes("@")&&(Fa=(ba=($e=(va=fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])==null?void 0:va.replace("@",ja))==null?void 0:$e.split(ja))==null?void 0:ba[1],Fa="@"+Fa),((Te=Ta.analyzeSplitToContent(Fa,"&"))==null?void 0:Te.length)>1){let nl=(Ue=(fa=Ta.analyzeSplitToContent(Fa,"}"))==null?void 0:fa.map(Ca=>{var aa;return Ca!=null&&Ca.includes("@")||(Ca=""),Ca!=null&&Ca.includes("@")&&(Ca=(aa=Ta.analyzeSplitToContent(Ca,":"))==null?void 0:aa[0],(Ca==null?void 0:Ca[(Ca==null?void 0:Ca.length)-1])===":"&&(Ca=Ca==null?void 0:Ca.slice(0,(Ca==null?void 0:Ca.length)-1)),(Ca==null?void 0:Ca[0])==="("&&(Ca=Ca==null?void 0:Ca.slice(1,(Ca==null?void 0:Ca.length)-1))),Ca}))==null?void 0:Ue.filter(Ca=>Ca!=="");Fa=(Fa==null?void 0:Fa.length)===1?nl:"("+(nl==null?void 0:nl.join(","))+")"}Fa&&Fa!==""&&(Ml=kt(Fa)),(ga=rl==null?void 0:rl.split(","))==null||ga.forEach((nl,Ca)=>{var aa,Se,Xa;r.push({label:nl,prop:nl,align:"center",menus:Fe,groups:(Ye==null?void 0:Ye.length)===0?$a:(aa=Ye==null?void 0:Ye.find(Ya=>(Ya==null?void 0:Ya.number)>=Ca))==null?void 0:aa.contents,words:(Oe==null?void 0:Oe.length)===0?(Se=Na==null?void 0:Na[Ca])==null?void 0:Se.split(":"):(Xa=Oe==null?void 0:Oe[Ca])==null?void 0:Xa.split(":"),formType:(Fe==null?void 0:Fe.length)>0?"Select":"Input",mainKey:Ca===0,filter:Ml,isMainPath:(Ye==null?void 0:Ye.findIndex(Ya=>(Ya==null?void 0:Ya.number)>=Ca))===0})})}else r.push({label:Q,prop:Q,align:"center"})});else{let Q=(be=Ta.analyzeSplitToContent(l,","))==null?void 0:be.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));Q==null||Q.forEach(de=>{r.push(ti(de,n))})}return r},Dd=(l,n)=>{var b,h,v,y,c;let r=l;if(!l)return;let t="";((b=Ta.analyzeSplitToContent(l,"}"))==null?void 0:b.length)>1&&(r=(h=Ta.analyzeSplitToContent(l,"}"))==null?void 0:h[0],t=(v=Ta.analyzeSplitToContent(l,"}"))==null?void 0:v[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let s=[],d=[];return s.push({label:"排序",prop:"sort"}),(y=Ta.analyzeSplitToContent(r,","))==null||y.forEach(C=>{var M;(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)),(C==null?void 0:C[0])==="{"?(M=xo(C,n))==null||M.forEach(L=>{s.push(L)}):s.push(ti(C,n))}),t!==""&&((t==null?void 0:t[0])=="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),(c=Ta.analyzeSplitToContent(t,","))==null||c.forEach(C=>{var M;(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)),(C==null?void 0:C[0])==="{"?(M=xo(C,n))==null||M.forEach(L=>{d.push(L)}):d.push(ti(C,n))})),{columns:s,secondColumns:d}},oi=l=>{var n,r,t;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition"))return l;{let s=(r=(n=l==null?void 0:l.replace("(",ja))==null?void 0:n.split(ja))==null?void 0:r[1];return s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1),s=(t=Ta.analyzeSplitToContent(s,","))==null?void 0:t.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)),s=s==null?void 0:s.join(","),l!=null&&l.includes("@Quote")&&(s!=null&&s.includes("@Type")||(s=s===""?s+"@Type=Manual":s+",@Type=Manual"),s!=null&&s.includes("@SonSync")||(s=s===""?s+"@SonSync=No":s+",@SonSync=No"),s!=null&&s.includes("@FatherSync")||(s=s===""?s+"@FatherSync=Yes":s+",@FatherSync=Yes")),s}},Xi=l=>{let n=l==null?void 0:l.map(r=>{var t,s;return{menus:r==null?void 0:r.menus,content:((t=r==null?void 0:r.menus)==null?void 0:t.join("/"))+ja+((s=r==null?void 0:r.groups)==null?void 0:s.join("/"))}});return n=n==null?void 0:n.filter(r=>{var t;return(r==null?void 0:r.menus)&&((t=r==null?void 0:r.menus)==null?void 0:t.length)>0}),n=n==null?void 0:n.map(r=>r==null?void 0:r.content),n=[...new Set(n)],n=n==null?void 0:n.map(r=>{var t,s;return{menus:(t=r==null?void 0:r.split(ja))==null?void 0:t[0],groups:((s=r==null?void 0:r.split(ja))==null?void 0:s[1])??[]}}),n},Bd=(l,n,r="")=>{var z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X;let t=[];if(((z=l==null?void 0:l[0])==null?void 0:z[0])!=="*"&&((ee=l==null?void 0:l[0])==null?void 0:ee[0])!=="$")return;let s=Ta.analyzeSplitToContent(l==null?void 0:l[0],":"),d=s==null?void 0:s.filter(R=>!((R==null?void 0:R[0])!=="{"&&(R==null?void 0:R[0])!=="["));t=(S=s==null?void 0:s.filter(R=>(R==null?void 0:R[0])!=="{"&&(R==null?void 0:R[0])!=="["))==null?void 0:S.join("");let b="",h="";if((t==null?void 0:t[(t==null?void 0:t.length)-1])===":"&&(t=t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1)),t!=null&&t.includes("(@")&&(t==null?void 0:t[0])==="*"&&(b="(@"+(($=t==null?void 0:t.split("(@"))==null?void 0:$[1]),t=(T=t==null?void 0:t.split("(@"))==null?void 0:T[0]),t!=null&&t.includes("@")&&(t==null?void 0:t[0])==="*"&&(b="@"+((g=(k=t==null?void 0:t.replace("@",ja))==null?void 0:k.split(ja))==null?void 0:g[1]),t=(q=(j=t==null?void 0:t.replace("@",ja))==null?void 0:j.split(ja))==null?void 0:q[0]),(t==null?void 0:t[0])==="*"?(t=t==null?void 0:t.slice(1,t==null?void 0:t.length),t=t==null?void 0:t.split(":")):(h=A.cloneDeep(t)+":",t=[]),h=h+((d==null?void 0:d[0])??""),(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)),b!==""&&h!=="")if((h==null?void 0:h[(h==null?void 0:h.length)-1])===")")if(h!=null&&h.includes("(@")){let R=(J=h==null?void 0:h.split("(@"))==null?void 0:J[0],W=(me=h==null?void 0:h.split("(@"))==null?void 0:me[1];W="(@"+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1))+b,h=R+W}else{let R=(xe=(ze=h==null?void 0:h.replace("@",ja))==null?void 0:ze.split(ja))==null?void 0:xe[0],W=(be=(te=h==null?void 0:h.replace("@",ja))==null?void 0:te.split(ja))==null?void 0:be[1];W="(@"+W+b,h=R+W}else h=h+b;let v=d==null?void 0:d[1];(h==null?void 0:h[0])==="["&&(v=A.cloneDeep(h)+(v??""),h="");let y=v?wt(v):[];!(y!=null&&y.every(R=>Array.isArray(R)))&&(y==null?void 0:y.length)>0&&(y=[y]);let c=(Q=Ta.analyzeSplitToContent(h,"@"))!=null&&Q[1]?"@"+((de=Ta.analyzeSplitToContent(h,"@"))==null?void 0:de[1]):"";if(h=(Ke=Ta.analyzeSplitToContent(h,"@"))==null?void 0:Ke[0],(h==null?void 0:h[0])==="$"&&(c=A.cloneDeep(h)+(c??""),h=""),r!==""&&(b!==""?c=(r==null?void 0:r[(r==null?void 0:r.length)-1])!==")"?r+b:(r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1))+","+b:c=r),c!==""){(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),(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));let R="";if(c!=null&&c.includes("(@")){R=(oe=(wa=c==null?void 0:c.replace("(@",ja))==null?void 0:wa.split(ja))==null?void 0:oe[0];let W=(ne=(D=c==null?void 0:c.replace("(@",ja))==null?void 0:D.split(ja))==null?void 0:ne[1];W="@"+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1));let Ie=(ge=Ta.analyzeSplitToContent(W,","))==null?void 0:ge.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==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])!==")"&&(Ne=Ne+")"),oi(Ne)));c=R+"("+(Ie==null?void 0:Ie.join(","))+")"}else{R=(we=(se=c==null?void 0:c.replace("@",ja))==null?void 0:se.split(ja))==null?void 0:we[0];let W=(ya=(la=c==null?void 0:c.replace("@",ja))==null?void 0:la.split(ja))==null?void 0:ya[1];if(W){W="@"+W;let Ie=(Va=Ta.analyzeSplitToContent(W,","))==null?void 0:Va.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])!==")"&&(Ne=Ne+")"),oi(Ne)));c=R+"("+(Ie==null?void 0:Ie.join(","))+")"}else c=R}}(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));let C=Dd(h,n),M=h===""?[]:(C==null?void 0:C.columns)??[],L=ua.getColumnChild(M),x=L;x=x==null?void 0:x.filter(R=>{var W,Ie;return(R==null?void 0:R.filter)&&(R==null?void 0:R.filter)!==""&&(((W=R==null?void 0:R.filter)==null?void 0:W.includes("@SonSync"))||((Ie=R==null?void 0:R.filter)==null?void 0:Ie.includes("@FatherSync")))});let Y=x==null?void 0:x.filter(R=>{var W,Ie,Ne;return((W=R==null?void 0:R.filter)==null?void 0:W.includes("@SonSync"))&&((Ne=(Ie=R==null?void 0:R.filter)==null?void 0:Ie.split(","))==null?void 0:Ne.find(Ce=>(Ce==null?void 0:Ce.includes("@SonSync"))&&(Ce==null?void 0:Ce.includes("Yes"))))}),w=x==null?void 0:x.filter(R=>{var W,Ie,Ne;return((W=R==null?void 0:R.filter)==null?void 0:W.includes("@FatherSync"))&&((Ne=(Ie=R==null?void 0:R.filter)==null?void 0:Ie.split(","))==null?void 0:Ne.find(Ce=>(Ce==null?void 0:Ce.includes("@FatherSync"))&&(Ce==null?void 0:Ce.includes("Yes"))))});if(L=L==null?void 0:L.map(R=>{var W,Ie;return{menus:R==null?void 0:R.menus,content:((W=R==null?void 0:R.menus)==null?void 0:W.join("/"))+ja+((Ie=R==null?void 0:R.groups)==null?void 0:Ie.join("/"))}}),w=Xi(w),Y=Xi(Y),L=L==null?void 0:L.filter(R=>{var W;return(R==null?void 0:R.menus)&&((W=R==null?void 0:R.menus)==null?void 0:W.length)>0}),L=L==null?void 0:L.map(R=>R==null?void 0:R.content),L=[...new Set(L)],L=L==null?void 0:L.map(R=>{var W,Ie;return{menus:(W=R==null?void 0:R.split(ja))==null?void 0:W[0],groups:((Ie=R==null?void 0:R.split(ja))==null?void 0:Ie[1])??[]}}),M!=null&&M.some(R=>{var W;return Array.isArray(R==null?void 0:R.children)&&((W=R==null?void 0:R.children)==null?void 0:W.length)>0})&&(M=[M]),(y==null?void 0:y.length)>0&&(Array.isArray(y==null?void 0:y[0])&&((ae=y==null?void 0:y[0])!=null&&ae.every(R=>Array.isArray(R)))?y=y==null?void 0:y.map((R,W)=>(R=R.map((Ie,Ne)=>(Ie.unshift((Ne+1).toString()),Ie)),R)):y=y==null?void 0:y.map((R,W)=>(R.unshift((W+1).toString()),R))),C!=null&&C.secondColumns&&((ea=C==null?void 0:C.secondColumns)==null?void 0:ea.length)>0&&((y==null?void 0:y.length)>0?y=y==null?void 0:y.map((R,W)=>{var Ie,Ne;return Array.isArray(R==null?void 0:R[0])?R=R==null?void 0:R.map((Ce,K)=>{var He,Ve;return Ce.unshift((Ve=(He=C==null?void 0:C.secondColumns)==null?void 0:He[K])==null?void 0:Ve.prop),Ce}):R.unshift((Ne=(Ie=C==null?void 0:C.secondColumns)==null?void 0:Ie[W])==null?void 0:Ne.prop),R}):y=(Re=C==null?void 0:C.secondColumns)==null?void 0:Re.map((R,W)=>(R=[R==null?void 0:R.label],R.push(W),R)),M.unshift({label:"",prop:"disabled",sortable:!1})),(M==null?void 0:M.length)>0){let R=A.cloneDeep(M);Array.isArray(R==null?void 0:R[0])&&(R=R==null?void 0:R[0]);let W=ua.getColumnChild(R);W=W==null?void 0:W.map(Ie=>Ie==null?void 0:Ie.filter),W=W==null?void 0:W.filter(Ie=>Ie&&Ie!==""),W=[...new Set(W)],(W==null?void 0:W.length)>0&&(c=ja+(c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1))+(c!=null&&c.slice(1,(c==null?void 0:c.length)-1)?",":"")+((ma=A.cloneDeep(W))==null?void 0:ma.join(";")))}if((c==null?void 0:c[0])!=="("&&(c!=null&&c.includes("(@"))){let R=(Ee=(Pe=c==null?void 0:c.replace("(",ja))==null?void 0:Pe.split(ja))==null?void 0:Ee[0],W=[{menus:(We=(Le=R==null?void 0:R.split("*"))==null?void 0:Le[0])==null?void 0:We.replaceAll(":","/"),groups:(Ua=R==null?void 0:R.split("*"))==null?void 0:Ua[1]}],Ie=(P=(Oa=c==null?void 0:c.replace("(",ja))==null?void 0:Oa.split(ja))==null?void 0:P[1];(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)),Ie=Ta.analyzeSplitToContent(Ie,","),(F=Ie==null?void 0:Ie.find(Ne=>Ne==null?void 0:Ne.includes("@FatherSync")))!=null&&F.includes("Yes")&&(w=[...w,...W]),(X=Ie==null?void 0:Ie.find(Ne=>Ne==null?void 0:Ne.includes("@SonSync")))!=null&&X.includes("Yes")&&(Y=[...Y,...W])}return{groupName:t,tableColumns:M,tableFilter:c,tableContents:y,columns:(C==null?void 0:C.secondColumns)??[],relatedQuotes:L,fatherSyncContents:w,sonSyncContents:Y}},Ks=(l,n)=>(l=l==null?void 0:l.map((r,t)=>{var s,d,b,h;if(Array.isArray(r))r=r==null?void 0:r.map(v=>{var y,c,C,M;return v!=null&&v.isMainPath||(((y=v==null?void 0:v.children)==null?void 0:y.length)>0?v.children=Ks(v.children,n):((c=v==null?void 0:v.menus)==null?void 0:c.length)>0&&!((C=r==null?void 0:r[0])!=null&&C.isMainPath)&&(v.menus=(M=v.menus)==null?void 0:M.map((L,x)=>{var Y,w;return((Y=v.menus)==null?void 0:Y.length)-1===x&&L===""&&(n==null?void 0:n.parentContent)+"/"!==((w=v.menus)==null?void 0:w.join("/"))&&(L=n==null?void 0:n.value),v}),v.bindMenus=v.menus)),v});else{if(t===0&&((s=r.menus)==null?void 0:s.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((d=r.menus)==null?void 0:d.length)>0&&!((b=l==null?void 0:l[0])!=null&&b.isMainPath)&&(r.menus=(h=r.menus)==null?void 0:h.map((v,y)=>{var c,C;return((c=r.menus)==null?void 0:c.length)-1===y&&v===""&&(n==null?void 0:n.parentContent)+"/"!==((C=r.menus)==null?void 0:C.join("/"))&&(v=n==null?void 0:n.value),v}),r.bindMenus=r.menus)}return r}),l),Nd=(l,n)=>(l=l==null?void 0:l.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=Ks(r.contents,n)),r)),l),ii=(l,n)=>{let r=l;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(t=>(t=ii(t,n),t)):r=r==null?void 0:r.map(t=>{var s,d;return t!=null&&t.children&&((s=t==null?void 0:t.children)==null?void 0:s.length)>0?t.children=ii(t==null?void 0:t.children,n):t!=null&&t.words&&((d=t==null?void 0:t.words)==null?void 0:d.length)>0&&(n!=null&&n.find(b=>{var h,v,y,c;return((c=(h=t==null?void 0:t.prop)==null?void 0:h.split("."))==null?void 0:c[((y=(v=t==null?void 0:t.prop)==null?void 0:v.split("."))==null?void 0:y.length)-1])===b}))&&(t.mainKey=!0),t}),r};let tr="$R";const Td=A.useUnit(A.pinia),{selectTitle:cn}=A.storeToRefs(Td),un=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1}];var Zn=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(Zn||{});const Ad=l=>{var r;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.key)==="tableContents"&&(t.contents=(s=t.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),t})},Md=async l=>{var n,r,t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te;if((l==null?void 0:l.filter)==="Random")return(n=l==null?void 0:l.contents)==null?void 0:n.map(Q=>((Q==null?void 0:Q.key)==="tableContents"&&(Q.contents=Ta.shuffle(Q.contents)),Q));if((l==null?void 0:l.filter)==="Ordin"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:1}),(l==null?void 0:l.filter)==="Block"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:2}),(l==null?void 0:l.filter)==="Auto"){let be=(t=(r=l==null?void 0:l.contents)==null?void 0:r.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:t.contents;Array.isArray(be==null?void 0:be[0])&&(be=be==null?void 0:be[0]),be=ua.getColumnChild(be);let Q=be==null?void 0:be.filter(se=>(se==null?void 0:se.filter)&&(se==null?void 0:se.filter)!==""),de=new Map,Ke=[];Q==null||Q.forEach(se=>{var we,la;de.get((we=se==null?void 0:se.menus)==null?void 0:we.join("/"))||(de.set((la=se==null?void 0:se.menus)==null?void 0:la.join("/"),se),Ke.push(se))});let wa=(d=(s=cn==null?void 0:cn.value)==null?void 0:s.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:d.value,oe=Ke==null?void 0:Ke.map(se=>{var we,la,ya;return se=(we=se==null?void 0:se.menus)==null?void 0:we.join("/"),(se==null?void 0:se[(se==null?void 0:se.length)-1])==="/"&&((ya=(la=cn==null?void 0:cn.value)==null?void 0:la.find(Va=>(Va==null?void 0:Va.condition)==="child"))==null?void 0:ya.parentContent)+"/"!==se?se=se+wa:(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}),D=Ke==null?void 0:Ke.map(se=>se==null?void 0:se.groups),ne=oe==null?void 0:oe.map(async se=>{let we=await Pr(se,!1);return{path:se,contents:we}});ne=await Promise.all(ne);let ge=ne==null?void 0:ne.map((se,we)=>{var ya,Va,ae,ea,Re,ma,Pe;let la=(ya=se==null?void 0:se.contents)==null?void 0:ya.filter(Ee=>{var Le,We;return(Ee==null?void 0:Ee.name)===((We=D==null?void 0:D[we])==null?void 0:We[((Le=D==null?void 0:D[we])==null?void 0:Le.length)-1])});return la=(ea=(ae=(Va=la==null?void 0:la[0])==null?void 0:Va.compData)==null?void 0:ae.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:ea.contents,(se==null?void 0:se.path)===((ma=(Re=cn==null?void 0:cn.value)==null?void 0:Re.find(Ee=>(Ee==null?void 0:Ee.condition)==="child"))==null?void 0:ma.parentContent)&&(la=((Pe=la==null?void 0:la.map(Ee=>{for(let Le in Ee)if(Ee[Le]===wa)return Ee}))==null?void 0:Pe.filter(Ee=>Ee))??[]),la??[]});if(ge=ge==null?void 0:ge.map(se=>(se=se==null?void 0:se.map(we=>{var ya;let la={};for(let Va in we)if(Q!=null&&Q.find(ae=>{var ea,Re;return((Re=(ea=ae==null?void 0:ae.words)==null?void 0:ea[0])==null?void 0:Re.replaceAll("'",""))===Va})){let ae=(ya=Q==null?void 0:Q.find(ea=>{var Re,ma;return((ma=(Re=ea==null?void 0:ea.words)==null?void 0:Re[0])==null?void 0:ma.replaceAll("'",""))===Va}))==null?void 0:ya.prop;la[ae]=we==null?void 0:we[Va]}return la}),se)),ge=Ta.cartesianProduct(ge),Array.isArray(ge==null?void 0:ge[0])&&(ge=ge==null?void 0:ge[0]),(ge==null?void 0:ge.length)>0&&((C=(h=(b=Q==null?void 0:Q[0])==null?void 0:b.menus)==null?void 0:h.join("/"))==null?void 0:C[((c=(y=(v=Q==null?void 0:Q[0])==null?void 0:v.menus)==null?void 0:y.join("/"))==null?void 0:c.length)-1])==="/")return(M=l==null?void 0:l.contents)==null?void 0:M.map(we=>{var la;return(we==null?void 0:we.key)==="tableContents"&&(ge==null?void 0:ge.length)>0&&(we.contents=((la=we.contents)==null?void 0:la.length)>0?we.contents:ge),we})}if((l==null?void 0:l.filter)==="Text"&&(l==null?void 0:l.contents).push({key:"enableWrap",contents:3}),(l==null?void 0:l.filter)==="Manual"){let be=[],Q=[],de=(x=(L=l==null?void 0:l.contents)==null?void 0:L.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:x.contents;(de==null?void 0:de[(de==null?void 0:de.length)-1])===")"?de=(w=(Y=de==null?void 0:de.replace("(",tr))==null?void 0:Y.split(tr))==null?void 0:w[0]:de="",de!==""&&(be=((ee=(z=de==null?void 0:de.split("*"))==null?void 0:z[0])==null?void 0:ee.split(":"))??[],Q=((g=(k=(T=($=(S=de==null?void 0:de.split("*"))==null?void 0:S[1])==null?void 0:$.replace("{",tr))==null?void 0:T.split(tr))==null?void 0:k[0])==null?void 0:g.split(":"))??[]);let Ke=(q=(j=l==null?void 0:l.contents)==null?void 0:j.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:q.contents;Ke=(me=(J=Ke==null?void 0:Ke.replace("(",tr))==null?void 0:J.split(tr))==null?void 0:me[1],Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1);let wa=(ze=l==null?void 0:l.contents)==null?void 0:ze.map(D=>{var ne,ge,se,we,la,ya,Va,ae,ea;return(D==null?void 0:D.key)==="header"&&((ne=D==null?void 0:D.contents)!=null&&ne.every(Re=>(Re==null?void 0:Re.mainKey)!==!0)&&Array.isArray(D==null?void 0:D.contents)&&!Array.isArray((ge=D==null?void 0:D.contents)==null?void 0:ge[0])?D.contents=(se=D==null?void 0:D.contents)==null?void 0:se.map((Re,ma)=>{var Pe,Ee,Le;return Re!=null&&Re.isMainPath||(ma===0?(Re.mainKey=!0,Re.formType="Select",Re.bindMenus=be,Re.groups=((Pe=Re.groups)==null?void 0:Pe.length)===0?Q:Re.groups,Re.words=((Ee=Re.words)==null?void 0:Ee.length)===0?[Re==null?void 0:Re.prop]:Re.words,Re.filter=Ke,(!(Re!=null&&Re.menus)||((Le=Re==null?void 0:Re.menus)==null?void 0:Le.length)===0)&&(Re.menus=be)):(Re.mainKey=!1,Re.bindMenus=be)),Re}):Array.isArray((we=D==null?void 0:D.contents)==null?void 0:we[0])&&((Va=(ya=(la=D==null?void 0:D.contents)==null?void 0:la[0])==null?void 0:ya.filter(()=>(be==null?void 0:be.length)>0))==null?void 0:Va.length)>0&&(D.contents[0]=(ea=(ae=D==null?void 0:D.contents)==null?void 0:ae[0])==null?void 0:ea.map((Re,ma)=>{var Pe,Ee,Le;return Re!=null&&Re.isMainPath||(ma===0?(Re.mainKey=!0,Re.formType="Select",Re.bindMenus=be,Re.groups=((Pe=Re.groups)==null?void 0:Pe.length)===0?Q:Re.groups,Re.words=((Ee=Re.words)==null?void 0:Ee.length)===0?[Re==null?void 0:Re.prop]:Re.words,Re.filter=Ke,(!(Re!=null&&Re.menus)||Array.isArray(Re==null?void 0:Re.menus)&&((Le=Re==null?void 0:Re.menus)==null?void 0:Le.length)===0)&&(be==null?void 0:be.length)>0&&(Re.menus=be)):(Re.mainKey=!1,Re.bindMenus=be)),Re}))),D}),oe=(xe=wa==null?void 0:wa.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:xe.contents;if(Array.isArray(oe==null?void 0:oe[0])&&(oe=oe==null?void 0:oe[0]),oe=ua.getColumnChild(oe),oe!=null&&oe.some(D=>{var ne,ge;return((ge=D==null?void 0:D.menus)==null?void 0:ge[((ne=D==null?void 0:D.menus)==null?void 0:ne.length)-1])===""})){let D=(te=cn==null?void 0:cn.value)==null?void 0:te.find(ne=>(ne==null?void 0:ne.condition)==="child");wa=Nd(wa,D)}return wa}return l==null?void 0:l.contents},zd=l=>{var t,s,d,b;let n=l==null?void 0:l.filter;if(n!=null&&n.includes("*")&&(n="({"+((s=(t=n==null?void 0:n.replace("{",tr))==null?void 0:t.split(tr))==null?void 0:s[1])),n=(d=n==null?void 0:n.replaceAll("{",""))==null?void 0:d.replaceAll("}",""),(n==null?void 0:n[0])!=="("&&(n="("+n+")"),n.slice(1,(n==null?void 0:n.length)-1)==="undefined")return l==null?void 0:l.contents;let r=ua.calculatorAndToOr(n);if((r==null?void 0:r.length)>0){let h=[];return r==null||r.forEach(y=>{let c={};for(let C in y){let M=C;M!=null&&M.includes("[")||(c[M]=y[C])}h.push(c)}),(b=l==null?void 0:l.contents)==null?void 0:b.map(y=>{var C,M,L;let c=(M=(C=l==null?void 0:l.contents)==null?void 0:C.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:M.contents;if(c=(L=ua.getEqualChild(c))==null?void 0:L.filter(x=>(x==null?void 0:x.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let Y=ua.tableToForm(y==null?void 0:y.contents,c);h==null||h.forEach(w=>{var z,ee;for(let S in w)!((z=Y==null?void 0:Y[0])!=null&&z.find($=>{var T;return($==null?void 0:$.key)===S||((T=$==null?void 0:$.key)==null?void 0:T.includes(S))}))&&!(Y!=null&&Y.find($=>{var T;return($==null?void 0:$.key)===S||((T=$==null?void 0:$.key)==null?void 0:T.includes(S))}))||(((ee=w[S])==null?void 0:ee[0])!=="!"?Y=Y==null?void 0:Y.filter($=>{var T,k;return((T=$==null?void 0:$.find(g=>{var j;return(g==null?void 0:g.key)===S||((j=g==null?void 0:g.key)==null?void 0:j.includes(S))}))==null?void 0:T.value)===w[S]||Array.isArray(w==null?void 0:w[S])&&((k=w==null?void 0:w[S])==null?void 0:k.find(g=>{var j;return((j=$==null?void 0:$.find(q=>{var J;return(q==null?void 0:q.key)===S||((J=q==null?void 0:q.key)==null?void 0:J.includes(S))}))==null?void 0:j.value)===g}))}):Y=Y==null?void 0:Y.filter($=>{var T;return((T=$==null?void 0:$.find(k=>{var g;return(k==null?void 0:k.key)===S||((g=k==null?void 0:k.key)==null?void 0:g.includes(S))}))==null?void 0:T.value)!==w[S]}))}),(Y==null?void 0:Y.length)===0?y.contents=[]:y.contents=Y==null?void 0:Y.map(w=>{let z={};return w==null||w.forEach(ee=>{z[ee==null?void 0:ee.key]=ee==null?void 0:ee.value}),z})}return y})}return l==null?void 0:l.contents},Od=l=>l==null?void 0:l.contents,Id=l=>l==null?void 0:l.contents,Ld=l=>{var n,r,t,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let d=(t=(r=l==null?void 0:l.filter)==null?void 0:r.slice(1,((n=l==null?void 0:l.filter)==null?void 0:n.length)-1))==null?void 0:t.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>((h==null?void 0:h.key)==="header"&&(h.contents=ii(h.contents,d)),h))}return l==null?void 0:l.contents},Vd=l=>{var r;let n=(l==null?void 0:l.filter)??"";return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""?(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(d=n==null?void 0:n.split(","))==null?void 0:d.map(b=>({label:b,prop:b}))),s}):l==null?void 0:l.contents},Rd=l=>l==null?void 0:l.contents,$d=l=>{var r;let n=(l==null?void 0:l.filter)??"";return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""?(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(d=n==null?void 0:n.split(","))==null?void 0:d.map(b=>({label:b,prop:b}))),s}):l==null?void 0:l.contents},Pd=l=>{var r;let n=(l==null?void 0:l.filter)??"";if((n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n!==""){let t=l==null?void 0:l.contents,s=(r=n==null?void 0:n.split(","))==null?void 0:r.map(d=>({label:d,prop:d}));return t.push({key:"bottomButton",contents:s}),t}return l==null?void 0:l.contents},Fd=l=>{var n,r,t,s;if(((n=l==null?void 0:l.filter)==null?void 0:n[0])!=="["){const d=parseInt(l==null?void 0:l.filter);return!d||Number.isNaN(d)?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(h=>{var v;return(h==null?void 0:h.key)==="formContent"&&(h.contents=(v=h.contents)==null?void 0:v.map(y=>(y.width=d,y))),h})}if(((t=l==null?void 0:l.filter)==null?void 0:t[0])==="["){let d=wt(l==null?void 0:l.filter),b=Array.isArray(d)?d.map(v=>parseInt(v)).filter(v=>!!v&&!Number.isNaN(v)):[];return b.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(v=>{if((v==null?void 0:v.key)==="formContent"){const y=v.contents??[];v.contents=y.map((c,C)=>{const M=C+1;let L=0,x=0;for(let w=0;w<b.length;w++){if(x+=b[w],M<=x){L=w;break}w===b.length-1&&(L=b.length-1)}const Y=b[L]||b[b.length-1]||1;return c.width=Y,c})}return v}):l==null?void 0:l.contents}return l==null?void 0:l.contents},jd=l=>{var n;if((l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.filter;return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(","),(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var d,b,h;return(s==null?void 0:s.key)==="header"&&(Array.isArray((d=s==null?void 0:s.contents)==null?void 0:d[0])?s.contents[0]=(h=s.contents[0])==null?void 0:h.map(v=>(r!=null&&r.find(y=>y===(v==null?void 0:v.prop))&&(v.fixed="left"),v)):s.contents=(b=s.contents)==null?void 0:b.map(v=>(r!=null&&r.find(y=>y===(v==null?void 0:v.prop))&&(v.fixed="left"),v))),s})}return l==null?void 0:l.contents},Hd=l=>{var n;if((l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.filter;(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const t=d=>(r!=null&&r.find(b=>b===(d==null?void 0:d.prop))&&(d.required=!0),d!=null&&d.children&&Array.isArray(d.children)&&(d.children=d.children.map(b=>t(b))),d);return(n=l==null?void 0:l.contents)==null?void 0:n.map(d=>{var b,h,v;return(d==null?void 0:d.key)==="header"&&(Array.isArray((b=d==null?void 0:d.contents)==null?void 0:b[0])?d.contents[0]=(v=d.contents[0])==null?void 0:v.map(y=>t(y)):d.contents=(h=d.contents)==null?void 0:h.map(y=>t(y))),d})}return l==null?void 0:l.contents},Ud=async l=>{var t,s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S;const n=A.useUnit(A.pinia),{chooseTitle:r}=A.storeToRefs(n);if((l==null?void 0:l.filter)==="true"){let $=await Pr(((s=(t=r==null?void 0:r.value)==null?void 0:t[0])==null?void 0:s.parentContent)??((b=(d=r==null?void 0:r.value)==null?void 0:d[0])==null?void 0:b.relatedContent),!1),T=(v=(h=r==null?void 0:r.value)==null?void 0:h[0])==null?void 0:v.value;(c=(y=$==null?void 0:$[0])==null?void 0:y.compData)!=null&&c.find(q=>(q==null?void 0:q.key)==="header")?$=(C=$==null?void 0:$[0])==null?void 0:C.compData:$=(L=(M=$==null?void 0:$.filter(q=>{var J;return(J=q==null?void 0:q.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header")}))==null?void 0:M[0])==null?void 0:L.compData;let k=(x=$==null?void 0:$.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:x.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((Y=k==null?void 0:k.find(q=>q==null?void 0:q.isMainKey))==null?void 0:Y.prop)??((w=k==null?void 0:k[0])==null?void 0:w.prop);let g=(ee=(z=$==null?void 0:$.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:z.contents)==null?void 0:ee.find(q=>(q==null?void 0:q[k])===T);return(S=l==null?void 0:l.contents)==null?void 0:S.map(q=>{var J;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(J=q.contents)==null?void 0:J.map(me=>(me.value=g==null?void 0:g[me==null?void 0:me.prop],me))),q})}return l==null?void 0:l.contents},qd=l=>{var n,r,t,s,d;if((n=l==null?void 0:l.extra)!=null&&n.row){let b=l==null?void 0:l.filter;if(b!=null&&b.includes("*")&&(b="({"+((t=(r=b==null?void 0:b.replace("{",tr))==null?void 0:r.split(tr))==null?void 0:t[1])),b=(s=b==null?void 0:b.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(b==null?void 0:b[0])!=="("&&(b="("+b+")"),b.slice(1,(b==null?void 0:b.length)-1)==="undefined")return l==null?void 0:l.contents;let h=ua.calculatorAndToOr(b),v=h==null?void 0:h[0],y=(d=l==null?void 0:l.extra)==null?void 0:d.row,c=[];for(let C in v)(v==null?void 0:v[C])===(y==null?void 0:y[C])?c.push(!0):c.push(!1);return c!=null&&c.every(C=>C===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},Kd=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"tab",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Wd=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"choice",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Ws={onNumSlice:Ad,onRandomContents:Md,onConditionContents:zd,onFatherPaceContents:Od,onPaceContents:Id,onMainTagContents:Ld,onButtonContents:Vd,onPamButtonContents:Rd,onRowButtonContents:$d,onRelated:Ud,onRowNum:Fd,onFixRow:jd,onReqItem:Hd,onBottomButtonContents:Pd,onConditionContent:qd,onTabs:Kd,onSinChoice:Wd},Yd=async(l,n)=>{var d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g;let r="";if(((d=l==null?void 0:l.find(j=>(j==null?void 0:j.key)==="filter"))==null?void 0:d.contents)!==""&&(r=(b=l==null?void 0:l.find(j=>(j==null?void 0:j.key)==="filter"))==null?void 0:b.contents),r===""||!r)return l;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(h=r==null?void 0:r.replace("(",tr))==null?void 0:h.split(tr))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let t=(y=Ta.analyzeSplitToContent(r,","))==null?void 0:y.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j!=null&&j.includes("(")||(j=j==null?void 0:j.replaceAll(":","=")),j)),s=l;for(let j in t){let q,J="";(c=t==null?void 0:t[j])!=null&&c.includes("(")?(q=(L=(M=(C=t==null?void 0:t[j])==null?void 0:C.replace("(",tr))==null?void 0:M.split(tr))==null?void 0:L[0],J="("+((w=(Y=(x=t==null?void 0:t[j])==null?void 0:x.replace("(",tr))==null?void 0:Y.split(tr))==null?void 0:w[1])):(q=(S=(ee=(z=t==null?void 0:t[j])==null?void 0:z.replace("=",tr))==null?void 0:ee.split(tr))==null?void 0:S[0],J=(k=(T=($=t==null?void 0:t[j])==null?void 0:$.replace("=",tr))==null?void 0:T.split(tr))==null?void 0:k[1]);let me=(g=un==null?void 0:un.find(ze=>(ze==null?void 0:ze.key)===q))==null?void 0:g.value;if(me){const ze=Ws[me];s=await ze({contents:s,filter:J})}}return s},si=async(l,n)=>{var b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q;let r="";if(((b=l==null?void 0:l.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:b.contents)!==""&&(r=(h=l==null?void 0:l.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:h.contents),r===""||!r)return l;(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=(y=(v=r==null?void 0:r.replace("(",tr))==null?void 0:v.split(tr))==null?void 0:y[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let t=(c=Ta.analyzeSplitToContent(r,","))==null?void 0:c.map(J=>((J==null?void 0:J[(J==null?void 0:J.length)-1])===","&&(J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1)),J!=null&&J.includes("(")||(J=J==null?void 0:J.replaceAll(":","=")),J)),s=l,d=new Map;t==null||t.forEach(J=>{var ze,xe,te;let me=(ze=J==null?void 0:J.split("="))==null?void 0:ze[0];if(me==="@MainPam"&&d.get(me)){let be=d.get(me);be=be==null?void 0:be.slice(0,(be==null?void 0:be.length)-1);let Q=(te=(xe=J==null?void 0:J.replace("{",tr))==null?void 0:xe.split(tr))==null?void 0:te[1];Q=be+","+Q,d.set(me,Q)}else d.set(me,J)}),t=Array.from(d.values()),t=t==null?void 0:t.sort((J,me)=>{var ze,xe;return((ze=un==null?void 0:un.find(te=>me==null?void 0:me.includes(te==null?void 0:te.key)))==null?void 0:ze.order)-((xe=un==null?void 0:un.find(te=>J==null?void 0:J.includes(te==null?void 0:te.key)))==null?void 0:xe.order)});for(let J in t){let me,ze="";(C=t==null?void 0:t[J])!=null&&C.includes("(")&&((M=t==null?void 0:t[J])!=null&&M.includes("@Filter"))?(me=(Y=(x=(L=t==null?void 0:t[J])==null?void 0:L.replace("(",tr))==null?void 0:x.split(tr))==null?void 0:Y[0],ze="("+((ee=(z=(w=t==null?void 0:t[J])==null?void 0:w.replace("(",tr))==null?void 0:z.split(tr))==null?void 0:ee[1])):(me=(T=($=(S=t==null?void 0:t[J])==null?void 0:S.replace("=",tr))==null?void 0:$.split(tr))==null?void 0:T[0],ze=(j=(g=(k=t==null?void 0:t[J])==null?void 0:k.replace("=",tr))==null?void 0:g.split(tr))==null?void 0:j[1]);let xe=(q=un==null?void 0:un.find(te=>(te==null?void 0:te.key)===me))==null?void 0:q.value;if(xe){const te=Ws[xe];s=await te({contents:s,filter:ze,extra:n})}}return s};let oo="$R";const Jd=A.useUnit(A.pinia),{selectTitle:Gd}=A.storeToRefs(Jd);let Xd=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Zd=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Qd=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],ep=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const Zi=async(l,n)=>{let r=[],t=l==null?void 0:l.map(async s=>{var c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na;let d=(L=(M=(C=(c=s==null?void 0:s.contents)==null?void 0:c.find(Ye=>{var Oe;return(Oe=Ye==null?void 0:Ye.key)==null?void 0:Oe.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:L.类型,b=Object.values(s==null?void 0:s.name);b=b==null?void 0:b.reverse();let h=(x=s==null?void 0:s.contents)==null?void 0:x.map(Ye=>Ye==null?void 0:Ye.key),v={comp:d,isShow:s==null?void 0:s.is_show,name:b==null?void 0:b[0],id:s==null?void 0:s.object_id,relatedTables:h,menuFilter:(Y=s==null?void 0:s.filter)==null?void 0:Y.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(w=s==null?void 0:s.filter)==null?void 0:w.fatherSyncs,relatedQuotes:(z=s==null?void 0:s.filter)==null?void 0:z.quotes,sonSyncContents:(ee=s==null?void 0:s.filter)==null?void 0:ee.sonSyncs};for(let Ye in b)parseInt(Ye)>=1&&(v[`name${parseInt(Ye)-1}`]=b[Ye]);let y=($=(S=s==null?void 0:s.filter)==null?void 0:S.menuFilter)==null?void 0:$.split(",");if(((T=y==null?void 0:y.filter(Ye=>Ye==null?void 0:Ye.includes("@Filter")))==null?void 0:T.length)>0){let Ye=y==null?void 0:y.filter(rl=>rl==null?void 0:rl.includes("@Filter"));Ye=Ye==null?void 0:Ye[0],Ye=(g=(k=Ye==null?void 0:Ye.replace("(",oo))==null?void 0:k.split(oo))==null?void 0:g[1],Ye=Ye==null?void 0:Ye.slice(0,(Ye==null?void 0:Ye.length)-1),Ye!=null&&Ye.includes("*")&&(Ye=(q=(j=Ye==null?void 0:Ye.replace("{",oo))==null?void 0:j.split(oo))==null?void 0:q[1],Ye=Ye==null?void 0:Ye.replace("}","")),Ye=ua.calculatorAndToOr(Ye);let Oe=(n==null?void 0:n.originPath)??"";(Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])==="/"&&(Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1));let ue=await Pr(Oe,!1),ie=(J=ue==null?void 0:ue.filter(rl=>(rl==null?void 0:rl.comp)==="Table"))==null?void 0:J[0];ie=(ze=(me=ie==null?void 0:ie.compData)==null?void 0:me.find(rl=>(rl==null?void 0:rl.key)==="tableContents"))==null?void 0:ze.contents;let na=(te=(xe=Gd.value)==null?void 0:xe.find(rl=>(rl==null?void 0:rl.condition)==="child"))==null?void 0:te.value;ie=(be=ie==null?void 0:ie.map(rl=>{for(let Ml in rl)if((rl==null?void 0:rl[Ml])===na)return rl}))==null?void 0:be.filter(rl=>rl),ie=ie==null?void 0:ie[0],Ye=Ye==null?void 0:Ye[0];let qa=[];for(let rl in Ye){let Ml="";Qa.isObject(ie)&&(Ml=(de=(Q=Object.keys(ie))==null?void 0:Q.filter(Fa=>Fa==null?void 0:Fa.includes("."+rl)))==null?void 0:de[0]),Ml!==""&&(ie!=null&&ie[Ml])&&(Ye==null?void 0:Ye[rl])===(ie==null?void 0:ie[Ml])||ie!=null&&ie[rl]&&(Ye==null?void 0:Ye[rl])===(ie==null?void 0:ie[rl])?qa.push(!0):qa.push(!1)}if(qa!=null&&qa.some(rl=>rl===!1)&&((wa=n==null?void 0:n.originPath)==null?void 0:wa[((Ke=n==null?void 0:n.originPath)==null?void 0:Ke.length)-1])!=="/")return}if(d==="Table"||d==="Method"){let Ye=((oe=s==null?void 0:s.contents)==null?void 0:oe.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("content")}))||[],Oe=[];v.comp="Table",Ye.value=(D=Ye==null?void 0:Ye.value)==null?void 0:D.sort((Fa,nl)=>parseInt(Fa==null?void 0:Fa.id)-parseInt(nl==null?void 0:nl.id)),Ye.value=(ne=Ye==null?void 0:Ye.value)==null?void 0:ne.map(Fa=>{let nl={};for(let Ca in Fa)JSON.stringify(Fa==null?void 0:Fa[Ca])==="{}"?nl[Ca]="":nl[Ca]=Fa==null?void 0:Fa[Ca];return nl}),Oe.push({key:"tableContents",contents:Ye==null?void 0:Ye.value});let ue=(ya=(la=(we=(se=(ge=s==null?void 0:s.contents)==null?void 0:ge.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("struct")}))==null?void 0:se.value)==null?void 0:we[0])==null?void 0:la.结构)==null?void 0:ya.contents;Array.isArray(ue==null?void 0:ue[0])?ue[0]=(Va=ue==null?void 0:ue[0])==null?void 0:Va.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="sort"):ue=ue==null?void 0:ue.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="sort"),Oe.push({key:"header",contents:ue}),Oe.push({key:"filter",contents:(Pe=(ma=(Re=(ea=(ae=s==null?void 0:s.contents)==null?void 0:ae.find(Fa=>{var nl;return(nl=Fa==null?void 0:Fa.key)==null?void 0:nl.includes("struct")}))==null?void 0:ea.value)==null?void 0:Re[0])==null?void 0:ma.引用)==null?void 0:Pe.contents});let ie=Xd,na=A.cloneDeep(Zd);d==="Method"&&na.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ue==null?void 0:ue[0])&&((Ee=ue==null?void 0:ue[0])==null?void 0:Ee.prop)==="disabled"&&(ie=Qd,na=ep);const qa=["推力","真空","压力","温度","流量"],rl=v.name;rl&&qa.includes(rl)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let Ml=[];if(!Array.isArray(ue==null?void 0:ue[0])&&(ue!=null&&ue.some(Fa=>{var nl;return(Fa==null?void 0:Fa.calculatorFilter)&&((nl=Fa==null?void 0:Fa.calculatorFilter)==null?void 0:nl.includes("Manual"))}))){let Fa=(Le=ue==null?void 0:ue.map(nl=>nl==null?void 0:nl.calculatorFilter))==null?void 0:Le.filter(nl=>nl&&(nl==null?void 0:nl.includes("Manual")));Fa==null||Fa.forEach(nl=>{var aa;let Ca=Ta.analyzeSplitToContent(nl,",");if(Ca=Ca==null?void 0:Ca.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)),Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Extent"))&&(Se==null?void 0:Se.includes("Row")))&&(Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Button"))&&(Se==null?void 0:Se.includes(","))))){let Se=Ca==null?void 0:Ca.find(Xa=>Xa==null?void 0:Xa.includes("@Button"));Se=(aa=Se==null?void 0:Se.split("="))==null?void 0:aa[1],Se=Se==null?void 0:Se.slice(1,(Se==null?void 0:Se.length)-1),Se=Se==null?void 0:Se.split(","),Se=Se==null?void 0:Se[(Se==null?void 0:Se.length)-1],Ml.push(Se)}}),Ml=[...new Set(Ml)],Ml=Ml==null?void 0:Ml.map(nl=>({label:nl,prop:nl,type:"methodButton"}))}else if(Array.isArray(ue==null?void 0:ue[0])&&((We=ua.getColumnChild(ue==null?void 0:ue[0]))!=null&&We.some(Fa=>{var nl;return(Fa==null?void 0:Fa.calculatorFilter)&&((nl=Fa==null?void 0:Fa.calculatorFilter)==null?void 0:nl.includes("Manual"))}))){let Fa=(Oa=(Ua=ua.getColumnChild(ue==null?void 0:ue[0]))==null?void 0:Ua.map(nl=>nl==null?void 0:nl.calculatorFilter))==null?void 0:Oa.filter(nl=>nl&&(nl==null?void 0:nl.includes("Manual")));Fa==null||Fa.forEach(nl=>{var aa;let Ca=Ta.analyzeSplitToContent(nl,",");if(Ca=Ca==null?void 0:Ca.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)),Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Extent"))&&(Se==null?void 0:Se.includes("Row")))&&(Ca!=null&&Ca.find(Se=>(Se==null?void 0:Se.includes("Button"))&&(Se==null?void 0:Se.includes(","))))){let Se=Ca==null?void 0:Ca.find(Xa=>Xa==null?void 0:Xa.includes("@Button"));Se=(aa=Se==null?void 0:Se.split("="))==null?void 0:aa[1],Se=Se==null?void 0:Se.slice(1,(Se==null?void 0:Se.length)-1),Se=Se==null?void 0:Se.split(","),Se=Se==null?void 0:Se[(Se==null?void 0:Se.length)-1],Ml.push(Se)}}),Ml=[...new Set(Ml)],Ml=Ml==null?void 0:Ml.map(nl=>({label:nl,prop:nl,type:"methodButton"}))}Oe.push({key:"extraButton",contents:ie}),Oe.push({key:"rowButton",contents:[...na,...Ml]}),v.compData=await si(Oe,n),(P=v.compData)!=null&&P.find(Fa=>(Fa==null?void 0:Fa.key)==="tab")&&(v.tab=(X=(F=v.compData)==null?void 0:F.find(Fa=>(Fa==null?void 0:Fa.key)==="tab"))==null?void 0:X.contents),(R=v.compData)!=null&&R.find(Fa=>(Fa==null?void 0:Fa.key)==="choice")&&(v.choice=(Ie=(W=v.compData)==null?void 0:W.find(Fa=>(Fa==null?void 0:Fa.key)==="choice"))==null?void 0:Ie.contents)}else if(d==="Form"){let Ye=[],Oe=(K=(Ce=(Ne=s==null?void 0:s.contents)==null?void 0:Ne.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("content")}))==null?void 0:Ce.value)==null?void 0:K[0],ue=(Te=(ba=($e=(va=(ra=(Ve=(He=s==null?void 0:s.contents)==null?void 0:He.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("struct")}))==null?void 0:Ve.value)==null?void 0:ra[0])==null?void 0:va.结构)==null?void 0:$e.contents)==null?void 0:ba.map(ie=>(ie.value=Oe==null?void 0:Oe[ie==null?void 0:ie.prop],ie)))==null?void 0:Te.filter(ie=>(ie==null?void 0:ie.prop)!=="sort");Ye.push({key:"filter",contents:(ka=(fe=(ga=(Ue=(fa=s==null?void 0:s.contents)==null?void 0:fa.find(ie=>{var na;return(na=ie==null?void 0:ie.key)==null?void 0:na.includes("struct")}))==null?void 0:Ue.value)==null?void 0:ga[0])==null?void 0:fe.引用)==null?void 0:ka.contents}),Ye.push({key:"formContent",contents:ue}),v.compData=await Yd(Ye),(Fe=v.compData)!=null&&Fe.find(ie=>(ie==null?void 0:ie.key)==="tab")&&(v.tab=(Na=($a=v.compData)==null?void 0:$a.find(ie=>(ie==null?void 0:ie.key)==="tab"))==null?void 0:Na.contents)}return v});return r=await Promise.all(t),r},ap=A.useLoginState(A.pinia),{loginUserInfo:yt}=A.storeToRefs(ap),ci=async(l,n,r="Manual",t=[])=>{var v;let s=l,d;Array.isArray(n==null?void 0:n[0])?d=ua.getColumnChild(n==null?void 0:n[0]):d=n;let b=(v=d==null?void 0:d.filter(y=>{var c;return(y==null?void 0:y.calculatorFilter)&&((c=y==null?void 0:y.calculatorFilter)==null?void 0:c.includes(r))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:v.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords})),h=s==null?void 0:s.map(async y=>(y=await ip(y,b,d,r,s,t),y));return h=await Promise.all(h),h},lp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d;return Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(b=>{var h;if(n!=null&&n[b]){let v=n==null?void 0:n[b];d=d?v?Ta.isEqual(v.toString(),d.toString()):void 0:v}else{let v=(h=s==null?void 0:s.find(c=>(c==null?void 0:c.label)===b))==null?void 0:h.prop,y=(n==null?void 0:n[v])??0;d=d?y?Ta.isEqual(y.toString(),d.toString()):void 0:y}}),n[t]=d===void 0?void 0:d?1:0,n},mr=l=>{const[n,r,t]=A.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(n??0)*3600+(r??0)*60+(t??0)},Rn=l=>{const n=d=>d.toString().padStart(2,"0"),r=Math.floor(l/3600),t=Math.floor(l%3600/60),s=l%60;return`${n(r)}:${n(t)}:${parseInt(n(s))}`},rp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y,w,z;if(n!=null&&n[v]){if(d==="Row")if(!((c=((y=n==null?void 0:n[v])==null?void 0:y.toString())??"")!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let ee=+(n==null?void 0:n[v]);h=h+ee}else h=mr(h.toString())+mr((M=n==null?void 0:n[v])==null?void 0:M.toString()),h=Rn(h)}else if(d==="Row"){let ee=(L=s==null?void 0:s.find(S=>(S==null?void 0:S.label)===v))==null?void 0:L.prop;if(!((Y=Number.isNaN(n==null?void 0:n[ee])?"":(x=n==null?void 0:n[ee])==null?void 0:x.toString())!=null&&Y.includes(":"))&&!((w=h==null?void 0:h.toString())!=null&&w.includes(":"))){let S=+((n==null?void 0:n[ee])??0);h=h+S}else h=mr(h==null?void 0:h.toString())+mr((z=(n==null?void 0:n[ee])??0)==null?void 0:z.toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C+M},0)}return n[t]=h,n},np=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h-w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())-mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h-z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())-mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C-M},0)}return n[t]=h,n},tp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h*w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())*mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!(n!=null&&n[w]))h=void 0;else if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h*z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())*mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C*M},0)}return n[t]=h,n},op=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,d=l==null?void 0:l.typeString,b=l==null?void 0:l.allContents,h=0;if(Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(v=>{var y,c,C,M,L,x,Y;if(n!=null&&n[v]){if(d==="Row")if(!((c=(y=n==null?void 0:n[v])==null?void 0:y.toString())!=null&&c.includes(":"))&&!((C=h==null?void 0:h.toString())!=null&&C.includes(":"))){let w=+(n==null?void 0:n[v]);h=h===0?h+w:h/w}else h=h===0?mr(h.toString())+mr(n==null?void 0:n[v].toString()):mr(h.toString())/mr(n==null?void 0:n[v].toString()),h=Rn(h)}else if(d==="Row"){let w=(M=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===v))==null?void 0:M.prop;if(!((x=Number.isNaN(n==null?void 0:n[w])?"":(L=n==null?void 0:n[w])==null?void 0:L.toString())!=null&&x.includes(":"))&&!((Y=h==null?void 0:h.toString())!=null&&Y.includes(":"))){let z=+((n==null?void 0:n[w])??0);h=h===0?h+z:h/z}else h=h===0?mr(h.toString())+mr(((n==null?void 0:n[w])??0).toString()):mr(h.toString())/mr(((n==null?void 0:n[w])??0).toString()),h=Rn(h)}}),d==="Column"){let v=[];r==null||r.forEach(y=>{let c=b==null?void 0:b.map(C=>{var M;return(C==null?void 0:C[y])??(C==null?void 0:C[(M=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===y))==null?void 0:M.prop])});v=[...v,...c]}),h=v.reduce((y,c)=>{let C=0;Number.isNaN(y)||(C=+y);let M=0;return Number.isNaN(c)||(M=+c),C/M},0)}return n[t]=h.toFixed(2),n},io={Sum:rp,Substract:np,Multiple:tp,Divide:op,Compare:lp},ip=async(l,n,r,t="Auto",s,d=[])=>{var c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te;let b=l,h=[],v=await A.getPageDataApi({platId:parseInt((c=yt==null?void 0:yt.value)==null?void 0:c.plat_id),pageName:"menu"});v=(L=(M=(C=v==null?void 0:v.data)==null?void 0:C.result)==null?void 0:M.filter(be=>(be==null?void 0:be.property_name)===""))==null?void 0:L[0];let y=[];if(v!=null&&v.object_name){v=v==null?void 0:v.object_name;let be=await A.getPageDataApi({platId:parseInt((x=yt==null?void 0:yt.value)==null?void 0:x.plat_id),pageName:v});be=(S=(ee=(z=(w=(Y=be==null?void 0:be.data)==null?void 0:Y.result)==null?void 0:w[0])==null?void 0:z.contents)==null?void 0:ee.find(Q=>{var de;return(de=Q==null?void 0:Q.key)==null?void 0:de.includes("content")}))==null?void 0:S.value,h=($=be==null?void 0:be.map(Q=>({functionName:Q==null?void 0:Q.函数名称,functionContent:Q==null?void 0:Q.输出值})))==null?void 0:$.filter(Q=>(Q==null?void 0:Q.functionContent)!==""),h==null||h.forEach(Q=>{y.push(Q.functionName),io[Q.functionName]=new Function("return "+Q.functionContent)()})}if((n==null?void 0:n.length)===0)return b;for(let be in n){let Q=(T=n==null?void 0:n[be])==null?void 0:T.functionName;const de=io==null?void 0:io[Q];let Ke=(k=n==null?void 0:n[be])==null?void 0:k.methods;if(Ke=Ta.analyzeSplitToContent(Ke,","),(g=Ke==null?void 0:Ke.find(wa=>wa==null?void 0:wa.includes("@Type")))!=null&&g.includes(t)||(Ke==null?void 0:Ke.length)===0){let wa=((J=(q=(j=Ke==null?void 0:Ke.find(oe=>oe==null?void 0:oe.includes("@Extent")))==null?void 0:j.replace(":","="))==null?void 0:q.split("="))==null?void 0:J[1])??[];if(await new Function("return ")(),(y==null?void 0:y.length)>0&&y.find(oe=>oe===Q)){let oe="";try{let ne=(me=n==null?void 0:n[be])==null?void 0:me.functionRelatedWords,ge=d==null?void 0:d.map(we=>{var la;return we==null?void 0:we[(la=n==null?void 0:n[be])==null?void 0:la.prop]});ge=ge==null?void 0:ge.map(we=>we==null?void 0:we.slice((we==null?void 0:we.length)-5,we==null?void 0:we.length)),ge=ge==null?void 0:ge.map(we=>Ta.isNumber(parseInt(we))&&parseInt(we)?parseInt(we):0);let se=Math.max(...ge);ne=ne==null?void 0:ne.map(we=>{if(we!=null&&we.includes("'"))return we==null?void 0:we.replaceAll("'","");if(we!=null&&we.includes("@"))return se+1;{let la=Object.keys(b);return we=(b==null?void 0:b[we])??(b==null?void 0:b[la==null?void 0:la.find(ya=>ya==null?void 0:ya.includes("."+we))]),we}}),oe=de(...ne)}catch(ne){Qa.ElMessage.warning("关联数据出现错误,"+ne.message)}let D=(ze=n==null?void 0:n[be])==null?void 0:ze.prop;b[D]=oe}else b=de({contents:b,valueString:(xe=n==null?void 0:n[be])==null?void 0:xe.functionRelatedWords,prop:(te=n==null?void 0:n[be])==null?void 0:te.prop,headers:r,typeString:wa,allContents:s})}}return b},sp=A.useLoginState(A.pinia),{loginUserInfo:Ur}=A.storeToRefs(sp),cp=A.useMenuState(A.pinia),{activeMenuPath:Qi,currentMenuPath:so}=A.storeToRefs(cp),Ys=A.useUnit(A.pinia);let es="$R";const{selectTitle:xt}=A.storeToRefs(Ys),Js=async(l,n)=>{var b,h,v,y,c,C,M,L,x,Y,w,z,ee;let r=Qi.value,t="",s=((b=xt==null?void 0:xt.value)==null?void 0:b.find(S=>(S==null?void 0:S.condition)==="child"&&!(S!=null&&S.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(r=n?r:(h=l==null?void 0:l[0])==null?void 0:h.object_name,t=(v=l==null?void 0:l[0])==null?void 0:v.father_name);let d=[];if(t!==""){let S=t;(S==null?void 0:S[(S==null?void 0:S.length)-1])==="/"&&(S=S==null?void 0:S.slice(0,(S==null?void 0:S.length)-1));let $=await Pr(S,!1);$=(y=$==null?void 0:$[0])==null?void 0:y.compData;let T=(c=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:c.contents;T=((C=T==null?void 0:T.find(g=>g==null?void 0:g.isMainKey))==null?void 0:C.prop)??((M=T==null?void 0:T[0])==null?void 0:M.prop);let k=(x=(L=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:L.contents)==null?void 0:x.map(g=>({label:g==null?void 0:g[T],value:g==null?void 0:g[T]}));d=(Y=t==null?void 0:t.split("/"))==null?void 0:Y.map(g=>(g===""?s?(s.isShow=!0,g=s):g={value:g,condition:"child",options:k,parentContent:(t==null?void 0:t[(t==null?void 0:t.length)-1])==="/"?t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1):t,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(r!==""){let S=(w=r==null?void 0:r.split("/"))==null?void 0:w.map($=>($={condition:"normal",value:$.trim(),isShow:!0},$));((z=S==null?void 0:S[0])==null?void 0:z.value)===((ee=d==null?void 0:d[0])==null?void 0:ee.value)&&(S=S==null?void 0:S.filter(($,T)=>T!==0)),d=[...d??[],...S??[]]}t===""&&s&&((s==null?void 0:s.parentContent)!==Qi.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&d.push(s)),Ys.setSelectTitle(d)},up=async l=>{var d,b,h,v,y,c,C,M,L;let n=await A.getPageDataApi({platId:parseInt((d=Ur==null?void 0:Ur.value)==null?void 0:d.plat_id),pageName:"menu"}),r=(b=n==null?void 0:n.data)==null?void 0:b.result,t=(c=(y=(v=(h=l==null?void 0:l.filter(x=>(x==null?void 0:x.comp)==="Table"))==null?void 0:h[0])==null?void 0:v.compData)==null?void 0:y.find(x=>(x==null?void 0:x.key)==="filter"))==null?void 0:c.contents;t=(L=(M=(C=t==null?void 0:t.replace("(",es))==null?void 0:C.split(es))==null?void 0:M[0])==null?void 0:L.replaceAll(":","/");let s=r==null?void 0:r.filter(x=>{var Y;return(x==null?void 0:x.object_name)===so.value+"/"||((Y=so.value)==null?void 0:Y.includes(t))&&t+"/"===(x==null?void 0:x.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(x=>{var Y;return(x==null?void 0:x.comp)==="Table"&&(x.compData=(Y=x==null?void 0:x.compData)==null?void 0:Y.map(w=>{var z,ee,S;return(w==null?void 0:w.key)==="header"&&(Array.isArray((z=w.contents)==null?void 0:z[0])?w.contents[0]=(S=w.contents[0])==null?void 0:S.map(($,T)=>{var k;return T===0&&($.isExistChild=!0,(k=so.value)!=null&&k.includes(t)&&($.fatherPath=t)),$}):w.contents=(ee=w.contents)==null?void 0:ee.map(($,T)=>{var k;return T===0&&($.isExistChild=!0,(k=so.value)!=null&&k.includes(t)&&($.fatherPath=t)),$})),w})),x})),l},Pr=async(l,n,r={})=>{var b,h,v,y,c,C,M,L,x,Y,w,z;let t=await A.getPageDataApi({platId:parseInt((b=Ur==null?void 0:Ur.value)==null?void 0:b.plat_id),pageName:l}),s=(h=t==null?void 0:t.data)==null?void 0:h.result;if((s==null?void 0:s.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==l){let ee=await A.getPageDataApi({platId:parseInt((v=Ur==null?void 0:Ur.value)==null?void 0:v.plat_id),pageName:r==null?void 0:r.originPath});if(((c=(y=ee==null?void 0:ee.data)==null?void 0:y.result)==null?void 0:c.length)>0){let S=await Zi((C=ee==null?void 0:ee.data)==null?void 0:C.result,r);S=S==null?void 0:S.map(async k=>{var q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa;let g=[],j=(q=Object.keys(k))==null?void 0:q.filter(P=>P==null?void 0:P.includes("name"));for(let P in k)j!=null&&j.find(F=>F===P)&&g.push(k==null?void 0:k[P]);if(g=g.reverse(),(k==null?void 0:k.comp)==="Table"){let P=(ze=(me=(J=k==null?void 0:k.compData)==null?void 0:J.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:me.contents)==null?void 0:ze.map(X=>{let R={};for(let W in X)W!=="id"&&W!=="create_time"&&W!=="update_time"&&W!=="sort"&&W!=="create_user_id"&&W!=="update_user_id"&&W!=="department_id"&&(R[W]=X==null?void 0:X[W]);return X=Object.values(R),X}),F=(te=(xe=k==null?void 0:k.compData)==null?void 0:xe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:te.contents;if(Array.isArray(F==null?void 0:F[0])?(F[0].push({label:"排序",prop:"sort"}),(be=F[0])!=null&&be.find(X=>(X==null?void 0:X.prop)==="disabled")&&(F[0]=(Q=F[0])==null?void 0:Q.filter(X=>(X==null?void 0:X.prop)!=="disabled"),F[0].unshift({label:"",prop:"disabled",sortable:!1}))):(F.push({label:"排序",prop:"sort"}),F!=null&&F.find(X=>(X==null?void 0:X.prop)==="disabled")&&(F=F==null?void 0:F.filter(X=>(X==null?void 0:X.prop)!=="disabled"),F.unshift({label:"",prop:"disabled",sortable:!1}))),F!=null&&F.some(X=>{var R;return(X==null?void 0:X.calculatorFilter)&&((R=X==null?void 0:X.calculatorFilter)==null?void 0:R.includes("Auto"))})&&(P=await ci(P,F,"Auto"),P=P==null?void 0:P.map(X=>Object.values(X))),k!=null&&k.fatherSyncContents){Array.isArray((de=k==null?void 0:k.fatherSyncContents)==null?void 0:de[0])&&(k.fatherSyncContents=(Ke=k==null?void 0:k.fatherSyncContents)==null?void 0:Ke[0]);let X=(wa=xt.value)==null?void 0:wa.find(R=>(R==null?void 0:R.condition)==="child");k.fatherSyncContents=(oe=k==null?void 0:k.fatherSyncContents)==null?void 0:oe.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}if(k!=null&&k.sonSyncContents){Array.isArray((D=k==null?void 0:k.sonSyncContents)==null?void 0:D[0])&&(k.sonSyncContents=(ne=k==null?void 0:k.sonSyncContents)==null?void 0:ne[0]);let X=(ge=xt.value)==null?void 0:ge.find(R=>(R==null?void 0:R.condition)==="child");k.sonSyncContents=(se=k==null?void 0:k.sonSyncContents)==null?void 0:se.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}if(k!=null&&k.relatedQuotes){Array.isArray((we=k==null?void 0:k.relatedQuotes)==null?void 0:we[0])&&(k.relatedQuotes=(la=k==null?void 0:k.relatedQuotes)==null?void 0:la[0]);let X=(ya=xt.value)==null?void 0:ya.find(R=>(R==null?void 0:R.condition)==="child");k.relatedQuotes=(Va=k==null?void 0:k.relatedQuotes)==null?void 0:Va.map(R=>{var W,Ie,Ne,Ce,K,He;return((Ie=R==null?void 0:R.menus)==null?void 0:Ie[((W=R==null?void 0:R.menus)==null?void 0:W.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(R==null?void 0:R.menus)?R.menus=(R==null?void 0:R.menus)+(X==null?void 0:X.value):((Ce=R==null?void 0:R.menus)==null?void 0:Ce[((Ne=R==null?void 0:R.menus)==null?void 0:Ne.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(R==null?void 0:R.menus)&&(R.menus=(He=R.menus)==null?void 0:He.slice(0,((K=R.menus)==null?void 0:K.length)-1)),R})}k={filter:(ea=(ae=k==null?void 0:k.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:ea.contents,key:k==null?void 0:k.comp,name:g,tableColumns:F,tableContents:P,menuFilter:k==null?void 0:k.menuFilter,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}else{let P=(Pe=(ma=(Re=k==null?void 0:k.compData)==null?void 0:Re.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ma.contents)==null?void 0:Pe.map(X=>(X==null?void 0:X.value)??"");P=[P];let F=(We=(Le=(Ee=k==null?void 0:k.compData)==null?void 0:Ee.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Le.contents)==null?void 0:We.map(X=>(X.value="",X));k={contents:P,filter:(Oa=(Ua=k==null?void 0:k.compData)==null?void 0:Ua.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Oa.contents,key:k==null?void 0:k.comp,name:g,value:F,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}return k.isShow=!1,k}),S=await Promise.all(S);let $=[{key:"menuPath",contents:[{path:l,fatherPath:(x=(L=(M=ee==null?void 0:ee.data)==null?void 0:M.result)==null?void 0:L[0])==null?void 0:x.father_name,isShow:!1}]},{key:l,contents:S}];await A.createPlatFormDataApi({platId:parseInt((Y=Ur==null?void 0:Ur.value)==null?void 0:Y.plat_id),changeData:$});let T=await A.getPageDataApi({platId:parseInt((w=Ur==null?void 0:Ur.value)==null?void 0:w.plat_id),pageName:l});s=(z=T==null?void 0:T.data)==null?void 0:z.result}}n&&await Js(s,!!(r!=null&&r.originPath));let d=await Zi(s,r);return n&&(d=await up(d)),d},as=async l=>{var t,s,d,b,h,v,y,c,C,M,L;let n=(t=l==null?void 0:l.menus)==null?void 0:t.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"&&(n=n+(l==null?void 0:l.endChildMenu)),(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"&&(n=n+((d=(s=l.value)==null?void 0:s.split(" "))==null?void 0:d[0]));let r=await Pr(n,!1);if(r=(b=r==null?void 0:r.filter(x=>{var Y,w;return(x==null?void 0:x.name)===((w=l==null?void 0:l.groups)==null?void 0:w[((Y=l==null?void 0:l.groups)==null?void 0:Y.length)-1])}))==null?void 0:b[0],(v=(h=r==null?void 0:r.compData)==null?void 0:h.find(x=>(x==null?void 0:x.key)==="tableContents"))!=null&&v.contents){r=(c=(y=r==null?void 0:r.compData)==null?void 0:y.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:c.contents;let x=((C=l==null?void 0:l.words)==null?void 0:C[0])??(l==null?void 0:l.prop);return r=r==null?void 0:r.filter(Y=>{var w,z,ee;return(Y==null?void 0:Y[l!=null&&l.endChildMenu?x:l==null?void 0:l.prop])===(l!=null&&l.relatedWords&&((w=l==null?void 0:l.relatedWords)==null?void 0:w.length)>0?(ee=(z=l.value)==null?void 0:z.split(" "))==null?void 0:ee[0]:l.value)}),r==null?void 0:r[0]}else{let x=(L=(M=r==null?void 0:r.compData)==null?void 0:M.find(w=>(w==null?void 0:w.key)==="formContent"))==null?void 0:L.contents,Y={};return x==null||x.forEach(w=>{Y[w.prop]=w.value}),Y}},dp={key:0,class:"extra-button-content"},pp={class:"table-operator-wrap"},fp={key:0,class:"extra-button-filter"},hp={key:1,class:"extra-header"},vp=["onClick"],mp={class:"table-op-text"},yp={class:"table-op-text"},gp={class:"drop-menu",style:{width:"120px"}},bp=["onClick"],kp={key:0},xp={key:1},_p=["onClick"],wp={class:"table-op-text"},Cp={key:1,class:"extra-button-content tabs-button-wrapper"},Ep={class:"table-operator-wrap"},Sp={class:"extra-button-filter"},Dp={key:0,class:"extra-header"},Bp={class:"table-op-action"},Np={class:"table-op-text"},Tp={class:"drop-menu",style:{width:"120px"}},Ap={key:0},Mp={key:1},zp=["onClick"],Op={class:"table-op-text"},Ip={__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:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(l,{emit:n}){const r=n,t=l,s=a.ref(""),d=a.ref(!1),b=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),v=[{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 y(k,g){return k.map(j=>{const q={...j};return g.forEach(J=>{delete q[J]}),q})}function c(k){if(!k||k.t!=="n")return(k==null?void 0:k.v)??"";const g=k.v;if(k.z){const j=String(k.z).toLowerCase(),q=["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 ze of q)if(j.includes(ze))return C(g);const J=/[ymdhms]/.test(j),me=/^[0#\.\,\s]+$/.test(j.replace(/[\\\/\-:]/g,""));if(J&&!me)return C(g)}if(g>=1&&g<=73050){if(g<5e3)return g;if(g>=5e3&&g<4e4){const j=Math.floor((g-25569)/365.25)+1970;return j>=1970&&j<=2e3&&k.z&&/[ymd]/.test(String(k.z).toLowerCase())?C(g):g}if(g>=4e4)return C(g)}return g}function C(k){if(typeof k!="number")return k;try{const g=new Date((k-25569)*86400*1e3);if(isNaN(g.getTime()))return k;const j=g.getFullYear(),q=String(g.getMonth()+1).padStart(2,"0"),J=String(g.getDate()).padStart(2,"0");return`${j}-${q}-${J}`}catch{return k}}const M=k=>{const g=k.raw;if(!g)return;const j=new FileReader;j.onload=q=>{try{const J=new Uint8Array(q.target.result),me=Ta.readSync(J,{type:"array"}),ze=me.SheetNames[0],xe=me.Sheets[ze],be=Ta.utils.decode_range(xe["!ref"]).e.c+1,Q=new Array(be).fill(""),de=[];for(const ne in xe){if(ne[0]==="!")continue;const{r:ge,c:se}=Ta.utils.decode_cell(ne),we=xe[ne];let la=c(we);if((la==null||la==="")&&(la=""),ge===0)Q[se]=la;else{if(!de[ge-1]){de[ge-1]={};for(let ya=0;ya<be;ya++)de[ge-1][`col_${ya}`]=""}de[ge-1][`col_${se}`]=la}}for(let ne=0;ne<be;ne++)Q[ne]===void 0&&(Q[ne]="");const Ke=[];for(let ne=0;ne<Q.length;ne++)(!Q[ne]||Q[ne].toString().trim()==="")&&Ke.push(ne);let wa,oe;(Ke==null?void 0:Ke.length)>0?(Qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),wa=Q.filter((ne,ge)=>!Ke.includes(ge)),oe=y(de,Ke==null?void 0:Ke.map(ne=>`col_${ne}`))):(wa=Q,oe=de);const D=de==null?void 0:de[0];if(!(D!=null&&D.hasOwnProperty("col_0")))return Qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",wa,oe)}catch(J){throw Qa.ElMessage.error(J.message),new Error(J.message)}},j.readAsArrayBuffer(g)},L=k=>{var j;const g=(j=b.value)==null?void 0:j.reduce((q,J,me)=>(me===0?q[J.label]=k:q[J.label]=J==null?void 0:J.value,q),{});r("filter",g,k,!0)},x=(k,g={})=>{r("buttonClick",k,"",g)},Y=k=>{var g,j;b.value=(j=(g=ua.getColumnChild(A.cloneDeep(k)))==null?void 0:g.filter(q=>(q==null?void 0:q.label)!==""&&(q==null?void 0:q.label)!=="操作"))==null?void 0:j.map(q=>({label:(q==null?void 0:q.label)??"",value:"",name:(q==null?void 0:q.prop)??"",isFormColHidden:q==null?void 0:q.isTableColHidden,width:2,prop:(q==null?void 0:q.prop)??""}))},w=a.ref(!1),z=k=>{var g;if((k==null?void 0:k.buttonName)==="确认"&&(r("filter",k==null?void 0:k.content),w.value=(k==null?void 0:k.content)&&Object.values(k==null?void 0:k.content).length>0),(k==null?void 0:k.buttonName)==="清空"){const j=A.cloneDeep(k==null?void 0:k.content);for(const q in j)j[q]="";b.value=(g=b.value)==null?void 0:g.map(q=>({...q,value:""})),r("filter",j),w.value=!1}d.value=!1},ee=()=>{d.value=!d.value},S=()=>{var g,j;b.value=(g=b.value)==null?void 0:g.map(q=>({...q,value:""}));const k=(j=b.value)==null?void 0:j.reduce((q,J)=>(q[J.label]=J.value,q),{});r("filter",k)},$=a.ref(null);let T;return T=k=>{var J;if(!d.value)return;const g=(J=$==null?void 0:$.value)==null?void 0:J.$el,j=g==null?void 0:g.contains(k.target);let q=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(me=>{me.contains(k.target)&&(q=!0)}),!j&&!q&&(d.value=!1)},a.onMounted(()=>{document.addEventListener("click",T),Y(t.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",T)}),a.watch(()=>t.columns,()=>{Y(t.columns)},{deep:!0,immediate:!0}),(k,g)=>{var xe,te,be,Q,de,Ke,wa,oe;const j=a.resolveComponent("el-icon"),q=a.resolveComponent("svg-icon"),J=a.resolveComponent("el-input"),me=a.resolveComponent("el-upload"),ze=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",dp,[a.createElementVNode("div",{class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(t==null?void 0:t.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((t==null?void 0:t.level)-1)*12+"px",fontWeight:600-((t==null?void 0:t.level)-1)*100>=400?600-((t==null?void 0:t.level)-1)*100:400,fontSize:17-(t==null?void 0:t.level)>=14?17-(t==null?void 0:t.level)+"px":"14px"})},a.toDisplayString(l.compName),7),a.createElementVNode("div",pp,[t!=null&&t.filterShow?(a.openBlock(),a.createElementBlock("div",fp,[a.createVNode(_u,{trigger:"contextmenu",ref_key:"popOverRef",ref:$,title:"",width:800,placement:"bottom-start",isVisible:d.value,"onUpdate:isVisible":g[4]||(g[4]=D=>d.value=D)},{reference:a.withCtx(()=>{var D,ne,ge,se;return[a.createVNode(J,{modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=we=>s.value=we),style:{"min-width":"80px"},placeholder:w.value?(ge=(ne=(D=l.filterValues)==null?void 0:D.filter(we=>we))==null?void 0:ne.slice(0,3))==null?void 0:ge.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((se=b.value)==null?void 0:se.length)===0},{suffix:a.withCtx(()=>{var we,la;return[!s.value&&((la=(we=l.filterValues)==null?void 0:we.filter(ya=>ya))!=null&&la.join("/"))?(a.openBlock(),a.createBlock(j,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(ee,["stop"])},[a.createVNode(q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:g[1]||(g[1]=a.withModifiers(()=>{},["stop"])),onKeyup:g[2]||(g[2]=a.withModifiers(()=>{},["stop"])),onKeypress:g[3]||(g[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((xe=l.buttons)==null?void 0:xe.length)>0?(a.openBlock(),a.createElementBlock("div",hp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((te=l.buttons)==null?void 0:te.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,ne)=>{var ge;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(me,{key:0,class:"upload-button-wrap","on-change":M,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var se;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:we=>x(D==null?void 0:D.label)},[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",mp,a.toDisplayString(D==null?void 0:D.label),1)],10,vp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var se;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",yp,a.toDisplayString(D==null?void 0:D.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",gp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,se=>{var we,la;return a.openBlock(),a.createElementBlock("div",{key:se==null?void 0:se.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:ya=>!l.lockingPage&&x(se==null?void 0:se.label)},[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1),(we=se==null?void 0:se.label)!=null&&we.includes("选中")?(a.openBlock(),a.createElementBlock("span",kp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(la=se==null?void 0:se.label)!=null&&la.includes("全部")?(a.openBlock(),a.createElementBlock("span",xp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,bp)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:se=>!l.lockingPage&&x(D==null?void 0:D.label,D)},[a.createVNode(q,{class:"table-op-icon",name:(ge=v==null?void 0:v.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label)))==null?void 0:ge.icon},null,8,["name"]),a.createElementVNode("span",wp,a.toDisplayString(D==null?void 0:D.label),1)],10,_p)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",Cp,[a.createElementVNode("div",Ep,[a.createElementVNode("div",Sp,[a.createVNode(J,{modelValue:s.value,"onUpdate:modelValue":g[5]||(g[5]=D=>s.value=D),style:{"min-width":"80px"},placeholder:w.value?(de=(Q=(be=l.filterValues)==null?void 0:be.filter(D=>D))==null?void 0:Q.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((Ke=b.value)==null?void 0:Ke.length)===0},{suffix:a.withCtx(()=>{var D,ne;return[!s.value&&((ne=(D=l.filterValues)==null?void 0:D.filter(ge=>ge))!=null&&ne.join("/"))?(a.openBlock(),a.createBlock(j,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(ee,["stop"])},[a.createVNode(q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((wa=l.buttons)==null?void 0:wa.length)>0?(a.openBlock(),a.createElementBlock("div",Dp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((oe=l.buttons)==null?void 0:oe.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,ne)=>{var ge;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(me,{key:0,class:"upload-button-wrap","on-change":M,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var se;return[a.createElementVNode("div",Bp,[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"]),a.createElementVNode("span",Np,a.toDisplayString(D==null?void 0:D.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(ze,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var se;return[a.createVNode(q,{class:"table-op-icon",name:(se=v==null?void 0:v.find(we=>(we==null?void 0:we.label)===(D==null?void 0:D.label)))==null?void 0:se.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(D==null?void 0:D.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Tp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,se=>(a.openBlock(),a.createBlock(ze,{key:se==null?void 0:se.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:we=>x(se==null?void 0:se.label)},{default:a.withCtx(()=>{var we,la;return[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1),(we=se==null?void 0:se.label)!=null&&we.includes("选中")?(a.openBlock(),a.createElementBlock("span",Ap,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(la=se==null?void 0:se.label)!=null&&la.includes("全部")?(a.openBlock(),a.createElementBlock("span",Mp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:se=>!l.lockingPage&&x(D==null?void 0:D.label,D)},[a.createVNode(q,{class:"table-op-icon",name:(ge=v==null?void 0:v.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label)))==null?void 0:ge.icon},null,8,["name"]),a.createElementVNode("span",Op,a.toDisplayString(D==null?void 0:D.label),1)],10,zp)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},Lp=Kl._export_sfc(Ip,[["__scopeId","data-v-3a44c010"]]),Vp={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(n,r)=>{const t=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,d=>{var b;return a.openBlock(),a.createBlock(t,{key:d==null?void 0:d.prop,label:d==null?void 0:d.label,prop:d==null?void 0:d.prop,fixed:(d==null?void 0:d.prop)==="operate"?"right":d==null?void 0:d.fixed,align:(d==null?void 0:d.align)??"left","show-overflow-tooltip":(d==null?void 0:d.showOverflowTooltip)??!0,width:d==null?void 0:d.width,"min-width":(d==null?void 0:d.minWidth)||((d==null?void 0:d.prop)==="operate"?80:(((b=d==null?void 0:d.label)==null?void 0:b.length)*2||4)*27)},{default:a.withCtx(h=>[a.renderSlot(n.$slots,"content",{row:h.row,column:h.column,$index:h.$index,scope:h}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.children,(v,y)=>(a.openBlock(),a.createBlock(pl._sfc_main$2,{key:y,column:v,tableData:l.tableData},a.createSlots({_:2},[a.renderList(n.$slots,(c,C)=>({name:C,fn:a.withCtx(({row:M,slotData:L,item:x,column:Y})=>[a.renderSlot(n.$slots,C,a.mergeProps({ref_for:!0},L??M,{item:x??v,slotData:L??M,row:M,column:Y,columnProp:v}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Rp extends Ta.Loader{constructor(n){super(n),this.littleEndian=!0}load(n,r,t,s){const d=this,b=new Ta.FileLoader(d.manager);b.setPath(d.path),b.setResponseType("arraybuffer"),b.setRequestHeader(d.requestHeader),b.setWithCredentials(d.withCredentials),b.load(n,function(h){try{r(d.parse(h))}catch(v){s?s(v):console.error(v),d.manager.itemError(n)}},t,s)}_getDataView(n,r,t,s){switch(t){case"F":return s===8?n.getFloat64(r,this.littleEndian):n.getFloat32(r,this.littleEndian);case"I":return s===1?n.getInt8(r):s===2?n.getInt16(r,this.littleEndian):n.getInt32(r,this.littleEndian);case"U":return s===1?n.getUint8(r):s===2?n.getUint16(r,this.littleEndian):n.getUint32(r,this.littleEndian)}}parse(n){function r(L,x){const Y=L.length,w=new Uint8Array(x);let z=0,ee=0,S,$,T;do if(S=L[z++],S<32){if(S++,ee+S>x)throw new Error("Output buffer is not large enough");if(z+S>Y)throw new Error("Invalid compressed data");do w[ee++]=L[z++];while(--S)}else{if($=S>>5,T=ee-((S&31)<<8)-1,z>=Y)throw new Error("Invalid compressed data");if($===7&&($+=L[z++],z>=Y))throw new Error("Invalid compressed data");if(T-=L[z++],ee+$+2>x)throw new Error("Output buffer is not large enough");if(T<0)throw new Error("Invalid compressed data");if(T>=ee)throw new Error("Invalid compressed data");do w[ee++]=w[T++];while(--$+2)}while(z<Y);return w}function t(L){const x={},Y=new Uint8Array(L);let w="",z="",ee=0,S=!1;const $=Y.length;for(;ee<$&&S===!1;){const j=String.fromCharCode(Y[ee++]);j===`
|
|
2
2
|
`||j==="\r"?(z.trim().toLowerCase().startsWith("data")&&(S=!0),z=""):z+=j,w+=j}const T=w.search(/[\r\n]DATA\s(\S*)\s/i),k=/[\r\n]DATA\s(\S*)\s/i.exec(w.slice(T-1));if(x.data=k[1],x.headerLen=k[0].length+T,x.str=w.slice(0,x.headerLen),x.str=x.str.replace(/#.*/gi,""),x.version=/^VERSION (.*)/im.exec(x.str),x.fields=/^FIELDS (.*)/im.exec(x.str),x.size=/^SIZE (.*)/im.exec(x.str),x.type=/^TYPE (.*)/im.exec(x.str),x.count=/^COUNT (.*)/im.exec(x.str),x.width=/^WIDTH (.*)/im.exec(x.str),x.height=/^HEIGHT (.*)/im.exec(x.str),x.viewpoint=/^VIEWPOINT (.*)/im.exec(x.str),x.points=/^POINTS (.*)/im.exec(x.str),x.version!==null&&(x.version=parseFloat(x.version[1])),x.fields=x.fields!==null?x.fields[1].split(" "):[],x.type!==null&&(x.type=x.type[1].split(" ")),x.width!==null&&(x.width=parseInt(x.width[1])),x.height!==null&&(x.height=parseInt(x.height[1])),x.viewpoint!==null&&(x.viewpoint=x.viewpoint[1]),x.points!==null&&(x.points=parseInt(x.points[1],10)),x.points===null&&(x.points=x.width*x.height),x.size!==null&&(x.size=x.size[1].split(" ").map(function(j){return parseInt(j,10)})),x.count!==null)x.count=x.count[1].split(" ").map(function(j){return parseInt(j,10)});else{x.count=[];for(let j=0,q=x.fields.length;j<q;j++)x.count.push(1)}x.offset={};let g=0;for(let j=0,q=x.fields.length;j<q;j++)x.data==="ascii"?x.offset[x.fields[j]]=j:(x.offset[x.fields[j]]=g,g+=x.size[j]*x.count[j]);return x.rowSize=g,x}const s=t(n),d=[],b=[],h=[],v=[],y=[],c=new Ta.Color;if(s.data==="ascii"){const L=s.offset,w=new TextDecoder().decode(n).slice(s.headerLen).split(`
|
|
3
3
|
`);for(let z=0,ee=w.length;z<ee;z++){if(w[z]==="")continue;const S=w[z].split(" ");if(L.x!==void 0&&(d.push(parseFloat(S[L.x])),d.push(parseFloat(S[L.y])),d.push(parseFloat(S[L.z]))),L.rgb!==void 0){const $=s.fields.findIndex(me=>me==="rgb"),T=s.type[$],k=parseFloat(S[L.rgb]);let g=k;if(T==="F"){const me=new Float32Array(1);me[0]=k,g=new Int32Array(me.buffer)[0]}const j=(g>>16&255)/255,q=(g>>8&255)/255,J=(g>>0&255)/255;c.setRGB(j,q,J,Ta.SRGBColorSpace),h.push(c.r,c.g,c.b)}L.normal_x!==void 0&&(b.push(parseFloat(S[L.normal_x])),b.push(parseFloat(S[L.normal_y])),b.push(parseFloat(S[L.normal_z]))),L.intensity!==void 0&&v.push(parseFloat(S[L.intensity])),L.label!==void 0&&y.push(parseInt(S[L.label]))}}if(s.data==="binary_compressed"){const L=new Uint32Array(n.slice(s.headerLen,s.headerLen+8)),x=L[0],Y=L[1],w=r(new Uint8Array(n,s.headerLen+8,x),Y),z=new DataView(w.buffer),ee=s.offset;for(let S=0;S<s.points;S++){if(ee.x!==void 0){const $=s.fields.indexOf("x"),T=s.fields.indexOf("y"),k=s.fields.indexOf("z");d.push(this._getDataView(z,s.points*ee.x+s.size[$]*S,s.type[$],s.size[$])),d.push(this._getDataView(z,s.points*ee.y+s.size[T]*S,s.type[T],s.size[T])),d.push(this._getDataView(z,s.points*ee.z+s.size[k]*S,s.type[k],s.size[k]))}if(ee.rgb!==void 0){const $=s.fields.indexOf("rgb"),T=z.getUint8(s.points*ee.rgb+s.size[$]*S+2)/255,k=z.getUint8(s.points*ee.rgb+s.size[$]*S+1)/255,g=z.getUint8(s.points*ee.rgb+s.size[$]*S+0)/255;c.setRGB(T,k,g,Ta.SRGBColorSpace),h.push(c.r,c.g,c.b)}if(ee.normal_x!==void 0){const $=s.fields.indexOf("normal_x"),T=s.fields.indexOf("normal_y"),k=s.fields.indexOf("normal_z");b.push(this._getDataView(z,s.points*ee.normal_x+s.size[$]*S,s.type[$],s.size[$])),b.push(this._getDataView(z,s.points*ee.normal_y+s.size[T]*S,s.type[T],s.size[T])),b.push(this._getDataView(z,s.points*ee.normal_z+s.size[k]*S,s.type[k],s.size[k]))}if(ee.intensity!==void 0){const $=s.fields.indexOf("intensity");v.push(this._getDataView(z,s.points*ee.intensity+s.size[$]*S,s.type[$],s.size[$]))}if(ee.label!==void 0){const $=s.fields.indexOf("label");y.push(z.getInt32(s.points*ee.label+s.size[$]*S,this.littleEndian))}}}if(s.data==="binary"){const L=new DataView(n,s.headerLen),x=s.offset;for(let Y=0,w=0;Y<s.points;Y++,w+=s.rowSize){if(x.x!==void 0){const z=s.fields.indexOf("x"),ee=s.fields.indexOf("y"),S=s.fields.indexOf("z");d.push(this._getDataView(L,w+x.x,s.type[z],s.size[z])),d.push(this._getDataView(L,w+x.y,s.type[ee],s.size[ee])),d.push(this._getDataView(L,w+x.z,s.type[S],s.size[S]))}if(x.rgb!==void 0){const z=L.getUint8(w+x.rgb+2)/255,ee=L.getUint8(w+x.rgb+1)/255,S=L.getUint8(w+x.rgb+0)/255;c.setRGB(z,ee,S,Ta.SRGBColorSpace),h.push(c.r,c.g,c.b)}if(x.normal_x!==void 0){const z=s.fields.indexOf("normal_x"),ee=s.fields.indexOf("normal_y"),S=s.fields.indexOf("normal_z");b.push(this._getDataView(L,w+x.normal_x,s.type[z],s.size[z])),b.push(this._getDataView(L,w+x.normal_y,s.type[ee],s.size[ee])),b.push(this._getDataView(L,w+x.normal_z,s.type[S],s.size[S]))}if(x.intensity!==void 0){const z=s.fields.indexOf("intensity");v.push(this._getDataView(L,w+x.intensity,s.type[z],s.size[z]))}x.label!==void 0&&y.push(L.getInt32(w+x.label,this.littleEndian))}}const C=new Ta.BufferGeometry;d.length>0&&C.setAttribute("position",new Ta.Float32BufferAttribute(d,3)),b.length>0&&C.setAttribute("normal",new Ta.Float32BufferAttribute(b,3)),h.length>0&&C.setAttribute("color",new Ta.Float32BufferAttribute(h,3)),v.length>0&&C.setAttribute("intensity",new Ta.Float32BufferAttribute(v,1)),y.length>0&&C.setAttribute("label",new Ta.Int32BufferAttribute(y,1)),C.computeBoundingSphere();const M=new Ta.PointsMaterial({size:.005});return h.length>0&&(M.vertexColors=!0),new Ta.Points(C,M)}}const $p=A.useModelComp(A.pinia),{systemPath:ls}=A.storeToRefs($p),co=a.ref(),rs=new WeakMap;function Pp(l,n,r,t,s){const d=async M=>{try{const L=await A.platformDownloadFile({url:M});if(L.status!==200)throw new Error(`下载失败: ${L.status}`);return L.data}catch(L){throw console.error("addModelFromUrl失败:",L),L}},b=M=>new Promise((L,x)=>{const Y=new FileReader;Y.onload=w=>{try{const z=w.target.result,S=new Dn.MTLLoader().parse(z);S.preload(),L(S)}catch(z){x(z)}},Y.onerror=()=>{x(new Error("MTL文件读取失败"))},Y.readAsText(M)}),h=async M=>{const L={materials:{},create:function(x){return this.materials[x]?this.materials[x]:(console.warn(`Material '${x}' not found, using default material`),new Ta.MeshPhongMaterial({color:8947848,side:Ta.DoubleSide}))},getAsArray:function(){const x=[];for(const Y in this.materials)x.push(this.materials[Y]);return x},preload:function(){for(const x in this.materials)this.materials[x].map&&(this.materials[x].map.needsUpdate=!0)}};for(const x of M){const Y=await b(x);Object.assign(L.materials,Y.materials)}return L.preload(),L},v=async(M,L=[])=>new Promise((x,Y)=>{const w=new FileReader;w.onload=async z=>{try{const ee=z.target.result;let S=null;L&&L.length>0&&(L.length===1?S=await b(L[0]):S=await h(L));const $=new Dn.OBJLoader;S&&$.setMaterials(S);const T=$.parse(ee);S||T.traverse(k=>{k.isMesh&&(k.material=new Ta.MeshPhongMaterial({color:8947848,side:Ta.DoubleSide}))}),x(T)}catch(ee){Y(ee)}},w.onerror=()=>{Y(new Error("OBJ文件读取失败"))},w.readAsText(M)}),y=async M=>{var L;try{r.value=!0;const{scene:x}=l();if(!x)throw new Error("Scene not initialized");s();const Y=[];for(let w=0;w<M.length;w++){const z=M[w];t.value=`正在加载模型 ${w+1}/${M.length}...`;const ee=await d(z.objUrl),S=((L=z.objUrl)==null?void 0:L.split("/").pop())||`model_${w}.obj`,$=new File([ee],S,{type:ee.type});let T=[];if(z.mtlUrls){const g=Array.isArray(z.mtlUrls)?z.mtlUrls:[z.mtlUrls];for(let j=0;j<g.length;j++){const q=g[j],J=await d(q),me=(q==null?void 0:q.split("/").pop())||`material_${w}_${j}.mtl`,ze=new File([J],me,{type:J.type});T.push(ze)}}const k=await v($,T);x.add(k),n.value.push(k),Y.push(k)}return r.value=!1,Y}catch(x){throw console.error("加载模型失败:",x),r.value=!1,x}},c=async(M,L,x=[],Y=[])=>{let w;const z=M.toLowerCase();switch(z){case".txt":case".cpt":case".obj":const ee=await L.text();if(z===".txt"||z===".cpt"){const ae=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Re=[...ee.matchAll(ae)].map(Ee=>({x:parseFloat(Ee[1]),y:parseFloat(Ee[2]),z:parseFloat(Ee[3])})),ma=new Ta.BufferGeometry,Pe=Re.flatMap(Ee=>[Ee.x,Ee.y,Ee.z]);if(ma.setAttribute("position",new Ta.Float32BufferAttribute(Pe,3)),z===".txt"){const Ee=new Ta.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});w=new Ta.Points(ma,Ee)}else if(z===".cpt"){const Ee=new Ta.LineBasicMaterial({color:"#5B5C99",linewidth:100});w=new Ta.Line(ma,Ee)}}else if(z===".obj"){const ae=new Dn.OBJLoader;if(x&&x.length>0){const ea=new Dn.MTLLoader;for(const Re of x){const ma=await Re.text(),Pe=ea.parse(ma);Pe.preload(),ae.setMaterials(Pe);break}}w=ae.parse(ee),(!x||x.length===0)&&w.traverse(ea=>{ea.isMesh&&(ea.material=new Ta.MeshPhongMaterial({color:"#B3B3D4"})),ea instanceof Ta.Mesh&&(ea.material.side=Ta.DoubleSide)})}break;case".stl":const S=await L.arrayBuffer(),T=new Dn.STLLoader().parse(S),k=new Ta.MeshPhongMaterial({color:"#B3B3D4",side:Ta.DoubleSide});w=new Ta.Mesh(T,k);break;case".nc":const g=["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"],j={"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)"},q=new Ta.Group,J=g.map(ae=>new Promise((ea,Re)=>{new Dn.STLLoader().load(ls.value===""?`/model/${ae}`:`${ls.value}\\${ae}`,Pe=>{const Ee=new Ta.MeshPhongMaterial({color:j[ae]||"#B3B3D4",side:Ta.DoubleSide}),Le=new Ta.Mesh(Pe,Ee);ea(Le)},void 0,Re)}));try{(await Promise.all(J)).forEach(ea=>q.add(ea)),w=q}catch(ae){throw console.error("加载NC文件对应的STL文件失败:",ae),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const me=new Rp,ze=new Ta.Group;try{const ae=await Qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ea=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"}),Re=await Qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ma=new Blob([Re.data],{type:"application/octet-stream;charset=UTF-8"}),Pe=await new Promise((Le,We)=>{const Ua=URL.createObjectURL(ea);me.load(Ua,Oa=>{const P=new Float32Array(Oa.geometry.attributes.position.count*3);for(let F=0;F<Oa.geometry.attributes.position.count;F++)P[F*3]=1,P[F*3+1]=0,P[F*3+2]=0;Oa.geometry.setAttribute("color",new Ta.BufferAttribute(P,3)),Oa.material.vertexColors=!0,Oa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ua),Le(Oa)},void 0,We)}),Ee=await new Promise((Le,We)=>{const Ua=URL.createObjectURL(ma);me.load(Ua,Oa=>{const P=new Float32Array(Oa.geometry.attributes.position.count*3);for(let F=0;F<Oa.geometry.attributes.position.count;F++)P[F*3]=0,P[F*3+1]=1,P[F*3+2]=0;Oa.geometry.setAttribute("color",new Ta.BufferAttribute(P,3)),Oa.material.vertexColors=!0,Oa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ua),Le(Oa)},void 0,We)});ze.add(Pe),ze.add(Ee),w=ze}catch(ae){throw console.error("PCD文件加载失败:",ae),new Error("无法加载PCD文件")}break;case".urdf":const xe=URL.createObjectURL(L),te=new gu.URDFLoader,be="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",Q={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},de=new WeakMap,Ke=new WeakMap,wa=new WeakMap,oe=async ae=>{if(de.has(ae))return console.log(`从缓存加载: ${ae}`),de.get(ae);try{const ea=await Qa.axios.get(`${be}/${ae}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Re=new Blob([ea.data],{type:"application/octet-stream;charset=UTF-8"});return Q.enableCache&&de.set(ae,Re),Re}catch(ea){throw console.error(`加载文件失败: ${ae}`,ea),new Error(`无法加载文件: ${ae}`)}},D=(ae="default")=>{if(Ke.has(ae))return Ke.get(ae);const ea=new Ta.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Ta.FrontSide});return Ke.set(ae,ea),ea},ne=ae=>{try{ae.isBufferGeometry&&ae.mergeVertices&&ae.mergeVertices(),ae.computeVertexNormals&&ae.computeVertexNormals(),ae.computeBoundingSphere&&ae.computeBoundingSphere(),ae.deleteAttribute&&ae.deleteAttribute("uv2")}catch(ea){console.warn("几何体优化失败,使用原始几何体:",ea)}return ae},ge=async(ae,ea,Re)=>{const ma=`stl_${ea}`;if(wa.has(ma)){const We=wa.get(ma);return new Ta.Mesh(We,D())}const Pe=await ae.arrayBuffer();let Le=new Dn.STLLoader(Re).parse(Pe);return Le=ne(Le),wa.set(ma,Le),new Ta.Mesh(Le,D())},se=async(ae,ea,Re)=>{const ma=`obj_${ea}`;if(de.has(ma))return de.get(ma).clone();const Pe=await ae.text(),Ee=new Dn.OBJLoader(Re),Le=ea.replace(".obj",".mtl");try{const Oa=await(await oe(Le)).text(),F=new Dn.MTLLoader(Re).parse(Oa);F.preload(),Ee.setMaterials(F)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Le}`)}const We=Ee.parse(Pe);return We.traverse(Ua=>{Ua.isMesh&&(Ua.geometry=ne(Ua.geometry),Ua.castShadow=!0,Ua.receiveShadow=!0,Ua.renderOrder=1)}),de.set(ma,We),We},we=(ae,ea)=>{const Re=new Ta.LOD;if(Re.addLevel(ae,0),ae.geometry){const ma=ae.geometry.clone(),Pe=new Ta.Mesh(ma,ae.material);Re.addLevel(Pe,50)}return Re};let la=0,ya=0;const Va=[];te.loadMeshCb=async(ae,ea,Re,ma,Pe)=>{const Ee=ae.split("/").pop(),Le=Re||(()=>{});la++;const We=new Promise(async(Ua,Oa)=>{try{const P=await oe(Ee);if(!P||P.size===0)throw new Error(`文件为空: ${Ee}`);const F=Ee.split(".").pop().toLowerCase();let X;switch(F){case"stl":X=await ge(P,Ee,ea);break;case"obj":X=await se(P,Ee,ea);break;default:throw new Error(`不支持的文件格式: ${F}`)}Q.enableLOD&&X.isMesh&&(X=we(X,Ee)),Le(X),ya++,ma&&ma({loaded:ya,total:la,progress:ya/la}),Ua(X)}catch(P){console.error(`mesh文件加载失败: ${Ee}`,P);const F=new Ta.Group;Le(F),Ua(F);const X=new Ta.BoxGeometry(.1,.1,.1),R=new Ta.MeshStandardMaterial({color:16711680,wireframe:!0});return new Ta.Mesh(X,R)}});Va.push(We)};try{if(!xe){co.value=void 0;break}if(w=await te.loadAsync(xe),console.log(`URDF文件加载完成,等待${la}个mesh文件加载...`),Va.length>0)try{await Promise.allSettled(Va),console.log(`所有mesh文件处理完成,成功加载: ${ya}/${la}`)}catch(Re){console.warn("部分mesh文件加载失败,但继续显示模型",Re)}w.traverse(Re=>{Re.isMesh&&(Re.castShadow=!0,Re.receiveShadow=!0,Re.renderOrder=1,Re.material&&(Re.material.needsUpdate=!0))}),console.time("计算包围盒");const ae=new Ta.Box3;ae.expandByObject(w);const ea=`urdf_${Date.now()}`;w.userData.boundingBox=ae.clone(),w.userData.modelId=ea,rs.set(ea,{box:ae.clone(),center:ae.getCenter(new Ta.Vector3),size:ae.getSize(new Ta.Vector3),maxSize:Math.max(...ae.getSize(new Ta.Vector3).toArray())}),co.value=w,console.log("URDF模型加载完成并优化")}catch(ae){console.error("URDF加载失败:",ae),co.value=void 0}finally{xe&&URL.revokeObjectURL(xe)}break;default:throw new Error(`不支持的文件格式: ${M}`)}return w};return{addModelsFromUrls:y,loadModelByDefaultPath:async M=>{console.log(M);try{r.value=!0,t.value="正在加载模型...";const{scene:L}=l();if(!L)throw new Error("Scene not initialized");s(),await new Promise(Y=>setTimeout(Y,100));const x=[];for(let Y=0;Y<M.length;Y++){const w=M[Y],z=await c(w.suffix,w.blob,w.mtlBlobs||[],w.meshFiles||[]);z&&(L.add(z),n.value.push(z),x.push(z))}return r.value=!1,t.value="",x}catch(L){throw console.error("加载模型失败:",L),r.value=!1,t.value="",L}},urdfModel:co,modelBoundingBoxes:rs}}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>',(l=>{var n=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var t,s,d,b,h,v=function(C,M){M.parentNode.insertBefore(C,M)};if(n&&!l.__iconfont__svg__cssinject__){l.__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(C){console&&console.log(C)}}t=function(){var C,M=document.createElement("div");M.innerHTML=l._iconfont_svg_string_4827314,(M=M.getElementsByTagName("svg")[0])&&(M.setAttribute("aria-hidden","true"),M.style.position="absolute",M.style.width=0,M.style.height=0,M.style.overflow="hidden",M=M,(C=document.body).firstChild?v(M,C.firstChild):C.appendChild(M))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),t()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(d=t,b=l.document,h=!1,c(),b.onreadystatechange=function(){b.readyState=="complete"&&(b.onreadystatechange=null,y())})}function y(){h||(h=!0,d())}function c(){try{b.documentElement.doScroll("left")}catch{return void setTimeout(c,50)}y()}})(window);const Fp={class:"statistics-cards-container"},jp={class:"statistics-label"},Hp=["onClick"],Up=a.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1}},setup(l){const n=l,r=a.ref(null),t=y=>pl.getComponent(y),s=y=>{if(!y)return;const c=y.querySelector("input, textarea, .el-input__inner");c&&typeof c.focus=="function"&&c.focus()},d=(y,c,C)=>{n.disabled||y.field&&(r.value=c,a.nextTick(()=>{s(C.currentTarget)}))},b=()=>{r.value=null},h=y=>{var C;const c=((C=y==null?void 0:y.field)==null?void 0:C.value)??(y==null?void 0:y.value);return c==null||c===""?"-":c},v=y=>{const c=y!=null&&y.width&&y.width>0?y.width:1,M=`calc((100% - ${(c-1)*16}px) / ${c})`;return{flex:`0 0 ${M}`,maxWidth:M,minWidth:"140px",boxSizing:"border-box"}};return(y,c)=>(a.openBlock(),a.createElementBlock("div",Fp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.items,(C,M)=>{var L,x,Y,w,z,ee,S,$;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:M,style:a.normalizeStyle(v(C))},[a.createElementVNode("div",jp,a.toDisplayString(C==null?void 0:C.label),1),a.createElementVNode("div",{class:"statistics-value",onClick:T=>d(C,M,T)},[r.value===M&&C.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t(((L=C.field)==null?void 0:L.type)??"Input")),{key:0,modelValue:C.field.value,"onUpdate:modelValue":T=>C.field.value=T,isEdit:!0,disabled:(x=C.field)==null?void 0:x.disabled,content:((Y=C.field)==null?void 0:Y.contents)??[],optionUrl:C.field,originalValue:(w=C.field)==null?void 0:w.value,config:(z=C.field)==null?void 0:z.config,configModel:((ee=C.field)==null?void 0:ee.prop)??((S=C.field)==null?void 0:S.name),selectedTagList:(($=C.field)==null?void 0:$.selectValue)??[],onBlur:b,onBlurChange:b},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(h(C)),1)],64))],8,Hp)],4)}),128))]))}}),qp=Kl._export_sfc(Up,[["__scopeId","data-v-5df1828e"]]),Gs=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),Kp={class:"calculator-content"},Wp={class:"calculator-child"},Yp={class:"calculator-child"},Jp=a.defineComponent({__name:"calculator",setup(l){const n=a.ref(),r=a.ref();return a.onMounted(()=>{n.value=[{type:"Upload",label:"输入",name:"input"}],r.value=[{type:"Upload",label:"输出",name:"output"}]}),(t,s)=>(a.openBlock(),a.createElementBlock("div",Kp,[a.createElementVNode("div",Wp,[a.createVNode(pl.ssForm,{rowContents:n.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Yp,[a.createVNode(pl.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Gp=Kl._export_sfc(Jp,[["__scopeId","data-v-73db0fe7"]]),ui=(l,n)=>{let r=l,t=n;return Array.isArray(r)&&(r=r==null?void 0:r.map((s,d)=>{if(Array.isArray(s)){let b={};return s=s==null?void 0:s.forEach((h,v)=>{var y;(y=t==null?void 0:t[v])!=null&&y.prop?b[t[v].prop]=h:Array.isArray(h)&&(b.children=ui(h,t))}),Object.assign(b,{id:d})}else return s})),r},Xs=(l,n,r)=>{let t=l,s=n;return t=t==null?void 0:t.map((d,b)=>{var h,v;return!Array.isArray(d)||!((h=s==null?void 0:s[b])!=null&&h.label)&&!r||(d.unshift(((v=s==null?void 0:s[b])==null?void 0:v.label)??""),d.some(y=>Array.isArray(y))&&(d=d==null?void 0:d.map(y=>{var c;return Array.isArray(y)&&(y=Xs(y,(c=s==null?void 0:s[b])==null?void 0:c.children,r)),y}))),d}),t},Xp=(l,n,r)=>{if(n==="")return l==null?void 0:l.filter(t=>(t==null?void 0:t.id)!==r);{const t=n.split("-");return Zp(l,t,r)}},Zp=(l,n,r)=>{let t=l,s=n;return(s==null?void 0:s.length)===0?t=t==null?void 0:t.filter(d=>d.id!==r):t=t==null?void 0:t.map(d=>(d.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),d=Zs(d,s,r)),d)),t},Zs=(l,n,r)=>{var d,b;let t=l,s=n;return(s==null?void 0:s.length)===0?t.children=(d=t.children)==null?void 0:d.filter(h=>h.id!==r):t.children=(b=t.children)==null?void 0:b.map(h=>(h.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),h=Zs(h,s,r)),h)),t},Qp=(l,n,r)=>{if(n==="")return r;{const t=n.split("-");return ef(l,t,r)}},ef=(l,n,r)=>{let t=l,s=n;return(s==null?void 0:s.length)===0?t=r:t=t==null?void 0:t.map(d=>(d.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),d=Qs(d,s,r)),d)),t},Qs=(l,n,r)=>{var d;let t=l,s=n;return(s==null?void 0:s.length)===0?t.children=r:t.children=(d=t.children)==null?void 0:d.map(b=>(b.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),b=Qs(b,s,r)),b)),t};class af{constructor(n={}){Vr(this,"url");Vr(this,"heartbeatInterval");Vr(this,"socket",null);Vr(this,"isConnected",!1);Vr(this,"heartTimer",null);Vr(this,"canvas",null);Vr(this,"ctx",null);Vr(this,"mainCamCutMode",0);Vr(this,"pMainShowStartX",0);Vr(this,"pMainShowStartY",0);Vr(this,"onLog");Vr(this,"onDevCount");Vr(this,"onResolution");Vr(this,"onCameraStatus");Vr(this,"onPhoto");this.url=n.url??"ws://127.0.0.1:22225",this.heartbeatInterval=n.heartbeatInterval??3e3}init(n,r,t){var b;(b=this.canvas)!=null&&b.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const s=document.createElement("canvas");s.style.border="solid 1px #A0A0A0",s.id="MainCamCanvas",s.width=r,s.height=t;const d=s.getContext("2d");if(!d)throw new Error("无法获取 CanvasRenderingContext2D");n.appendChild(s),this.canvas=s,this.ctx=d}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((n,r)=>{const t=new WebSocket(this.url);t.binaryType="arraybuffer",t.onopen=()=>{this.socket=t,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),n()},t.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),r(s)},t.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},t.onmessage=s=>{this.handleMessage(s)}})}destroy(){var n;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,(n=this.canvas)!=null&&n.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(n=0){this.sendBytes(new Uint8Array([119,136,81,n]))}chooseResolution(n){if(!Array.isArray(n)||n.length===0)return null;const r=n.find(s=>s.width===2592&&s.height===1944);return r||[...n].sort((s,d)=>d.width*d.height-s.width*s.height)[0]||null}openCamera(n=0,r=1280,t=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=1,s[3]=n,s[4]=this.canvas.width>>8&255,s[5]=this.canvas.width&255,s[6]=this.canvas.height>>8&255,s[7]=this.canvas.height&255,s[8]=r>>8&255,s[9]=r&255,s[10]=t>>8&255,s[11]=t&255,this.sendBytes(s)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=16,s[3]=0,s[4]=0,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=0,this.sendBytes(s)}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(n){var r;(r=this.onLog)==null||r.call(this,n)}sendBytes(n){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(n.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(n){var s,d,b,h,v,y;const r=new Uint8Array(n.data);if(r.length<=0)return;if(r[0]===17&&r[1]===17&&r[2]===17){this.log("heart socket!!!!");return}if(r[0]!==85||r[1]!==102)return;const t=r[2];if(t===80){const c=r[3],C=r.length-4,M=new Uint8Array(C);for(let Y=0;Y<C;Y++)M[Y]=r[4+Y];const x=decodeURIComponent(this.byteToString(M)).split("|");(s=this.onDevCount)==null||s.call(this,c,x);return}if(t===81){const c=r[3]||0,C=[];for(let M=0;M<c;M++){const L=(r[4+M*4+0]||0)*256+(r[4+M*4+1]||0),x=(r[4+M*4+2]||0)*256+(r[4+M*4+3]||0);C.push({width:L,height:x,text:`${L}*${x}`})}(d=this.onResolution)==null||d.call(this,c,C);return}if(t===1){r[3]===1&&((b=this.onCameraStatus)==null||b.call(this,"opened")),r[3]===3&&((h=this.onCameraStatus)==null||h.call(this,"closed"));return}if(t===16){if(r[3]===1){const C=r[4]*256+r[5],M=r[6]*65536+r[7]*256+r[8];let L="";if(C>0){const w=new Uint8Array(C);for(let z=0;z<C;z++)w[z]=r[9+z];L=decodeURIComponent(this.byteToString(w))}const x=new Uint8Array(M);for(let w=0;w<M;w++)x[w]=r[9+C+w];const Y=this.uint8ArrayToString(x);(v=this.onPhoto)==null||v.call(this,{flag:0,imgPath:L,base64:Y})}r[3]===2&&((y=this.onPhoto)==null||y.call(this,{flag:2,imgPath:"",base64:""}));return}if(t===204){if(!this.canvas||!this.ctx)return;const c=r[3]*256+r[4],C=r[5]*256+r[6];this.pMainShowStartX=r[7]*256+r[8],this.pMainShowStartY=r[9]*256+r[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const M=this.ctx.createImageData(c,C);let L=11;for(let x=0;x<M.data.length;x+=4)M.data[x+0]=r[L],M.data[x+1]=r[L+1],M.data[x+2]=r[L+2],M.data[x+3]=255,L+=3;this.ctx.putImageData(M,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(n){let r="";for(let t=0;t<n.length;t++)r+=String.fromCharCode(n[t]);return r}byteToString(n){let r="";for(let t=0;t<n.length;t++)r+=String.fromCharCode(n[t]);return r}}const lf={style:{display:"flex",gap:"16px",height:"100%"}},rf={key:0,style:{color:"var(--el-text-color-secondary)"}},nf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},tf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},of={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"}},sf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},cf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},uf=["src","onClick"],df=["onClick"],pf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},ff={class:"dialog-footer"},hf=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(null),d=a.ref(!1),b=a.ref([]),h=a.ref(""),v=a.ref(!1),y=a.ref([]),c=new af({url:"ws://127.0.0.1:22225"});function C(q,J){var Q;const me=q.split(","),ze=((Q=me[0].match(/:(.*?);/))==null?void 0:Q[1])??"image/jpeg",xe=atob(me[1]);let te=xe.length;const be=new Uint8Array(te);for(;te--;)be[te]=xe.charCodeAt(te);return new File([be],J,{type:ze})}function M(){c.onLog=q=>{console.log("[GPY]",q)},c.onDevCount=(q,J)=>{if(h.value+=`设备数量=${q},设备=${J.join(",")}
|
|
4
4
|
`,q>0){h.value+=`检测到设备,正在获取分辨率...
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
`}},$=()=>{b.value.length>0?t("confirm",b.value.map(q=>q.file)):t("confirm",[])},T=q=>{q<0||q>=b.value.length||(b.value.splice(q,1),h.value+=`已删除一张图片(剩余 ${b.value.length} 张)
|
|
23
23
|
`)},k=q=>{if(!q)return;const J=`gpy-preview-${Date.now()}.jpg`;y.value=[{name:J,blobUrl:q}],v.value=!0},g=()=>{v.value=!1},j=()=>{x(),t("cancel")};return(q,J)=>{const me=a.resolveComponent("el-input"),ze=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(yr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:j,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",lf,[a.createElementVNode("div",{ref_key:"cameraBox",ref:s,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)"}},[d.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",rf,"初始化摄像头..."))],512),a.createElementVNode("div",nf,[a.createElementVNode("div",tf,[J[0]||(J[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",of,[b.value.length===0?(a.openBlock(),a.createElementBlock("div",sf,"暂无图片")):(a.openBlock(),a.createElementBlock("div",cf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(xe,te)=>(a.openBlock(),a.createElementBlock("div",{key:xe.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:xe.url,onClick:be=>k(xe.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,uf),a.createElementVNode("div",{onClick:be=>T(te),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,df)]))),128))]))],512)]),a.createElementVNode("div",pf,[J[1]||(J[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(me,{type:"textarea",value:h.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",ff,[a.createVNode(ze,{onClick:Y,disabled:!d.value,id:"themeBorderButton"},{default:a.withCtx(()=>J[2]||(J[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{onClick:w,disabled:!d.value,id:"themeBorderButton"},{default:a.withCtx(()=>J[3]||(J[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(ze,{onClick:z,disabled:!d.value,id:"themeBorderButton"},{default:a.withCtx(()=>J[4]||(J[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(ze,{onClick:ee,disabled:!d.value,id:"themeBorderButton"},{default:a.withCtx(()=>J[5]||(J[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(ze,{onClick:S,disabled:!d.value,id:"themeButton"},{default:a.withCtx(()=>J[6]||(J[6]=[a.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),J[9]||(J[9]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),a.createVNode(ze,{onClick:$,disabled:b.value.length===0,id:"themeButton"},{default:a.withCtx(()=>J[7]||(J[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(ze,{onClick:j,id:"themeBorderButton"},{default:a.withCtx(()=>J[8]||(J[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),v.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:g},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),vf=Kl._export_sfc(hf,[["__scopeId","data-v-24a2050a"]]);function ec(l){return Qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function mf(l){return Qa.axios.get(l,{responseType:"blob"})}const ns=A.useMenuState(A.pinia),yf=async l=>{var d,b,h,v,y,c;let n=l==null?void 0:l.导入文件,r=l==null?void 0:l.函数参数,t=(d=n==null?void 0:n[0])==null?void 0:d.url,s="";if(!(t!=null&&t.includes("http"))||!(t!=null&&t.includes("https"))){ns.setContentLoading(!0);const C=await A.platformDownloadFile({url:t});let M=C==null?void 0:C.data;const L=new FormData;L.append("file",M,((b=n==null?void 0:n[0])==null?void 0:b.name)+"."+((h=t==null?void 0:t.split("."))==null?void 0:h[1])),L.append("query",r);let x=await ec(L);x=(c=(y=(v=x==null?void 0:x.data)==null?void 0:v.data)==null?void 0:y.response)==null?void 0:c.replace("generateResult",l==null?void 0:l.函数名称),s=x,ns.setContentLoading(!1)}return s},bi=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),_o={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},ts={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:"http://139.196.154.85:20015/api/public/paddleOCR"};class gf{constructor(n){Vr(this,"config");this.config={...ts,...n}}updateConfig(n){this.config={...this.config,...n}}getConfig(){return{...this.config}}validateFileSize(n){const r=this.config.maxSize*1024*1024;return n.size<=r}validateFileType(n){return n.type.startsWith("image/")||n.type==="application/pdf"}getAuthorizationToken(){const n=Qa.Local.get(Qa.accessTokenKey);return n?`Bearer ${n}`:""}buildOCRRequest(n,r){return{title:r,form:{OCR图片文件:n}}}async recognize(n,r){const t=this.getAuthorizationToken(),s=this.buildOCRRequest(n,r),d=this.config.apiUrl||ts.apiUrl;return(await Qa.axios.post(d,s,{headers:{"Content-Type":"application/json",Authorization:t}})).data}getFieldAliases(n){return _o[n]?_o[n]:[n]}extractTableHeaders(n){const r=[],t=new Set,s=b=>{const h=b==null?void 0:b.label;return!(!h||h==="操作"||h===this.config.columnName||(b==null?void 0:b.type)==="operate"||(b==null?void 0:b.prop)==="operate")},d=b=>{(b||[]).forEach(h=>{if(!h)return;const v=(h==null?void 0:h.children)||(h==null?void 0:h.child)||(h==null?void 0:h.columns);if(Array.isArray(v)&&v.length>0){d(v);return}if(s(h)){const y=h.label;if(!t.has(y)){t.add(y);const c=this.getFieldAliases(y);r.push(c)}}})};return d(n||[]),r}}function ac(l){return new gf(l)}ac();const di=async(l,n)=>{var b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k;let r=(h=(b=A.cloneDeep(l))==null?void 0:b.optionUrl)==null?void 0:h.menuSelect,t=[];r==null||r.forEach(g=>{});let s="",d=await ua.menuToParent(r);if(d==null||d.forEach(g=>{var j,q,J,me;(g==null?void 0:g.name)===(((me=(J=(q=(j=A.cloneDeep(l))==null?void 0:j.optionUrl)==null?void 0:q.groupSelect)==null?void 0:J[0])==null?void 0:me.replaceAll("'",""))??"")&&(s=g==null?void 0:g.id)}),n){s=n;const g=await br.getInsofDataApi({id:s}),j=(C=(c=(y=(v=g==null?void 0:g.data)==null?void 0:v.result)==null?void 0:y[0])==null?void 0:c.key)==null?void 0:C.pageKey;d=await ua.getItemData(j,sessionStorage.getItem("systemKey"),"")}if(s!==""){let g;n?g=(M=d==null?void 0:d.find(J=>(J==null?void 0:J.id)===n))==null?void 0:M.compData:g=(L=d==null?void 0:d.find(J=>{var me,ze,xe,te;return(J==null?void 0:J.name)===(((ze=(me=l==null?void 0:l.groupSelect)==null?void 0:me.split(":"))==null?void 0:ze[0])||((te=(xe=l==null?void 0:l.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:te[0]))}))==null?void 0:L.compData;let j=(Y=(x=g==null?void 0:g.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:x.contents)==null?void 0:Y.map(J=>J==null?void 0:J.label);(z=(w=g==null?void 0:g.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:w.contents)!=null&&z.every(J=>Array.isArray(J))&&(j=($=ua.getColumnChild((S=(ee=g==null?void 0:g.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:ee.contents)==null?void 0:S[0]))==null?void 0:$.map(J=>J==null?void 0:J.prop));let q=(k=(T=g==null?void 0:g.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:T.contents)==null?void 0:k.map(J=>{if(Array.isArray(J))J=J==null?void 0:J.filter(me=>!(me!=null&&me.id));else{let me={};for(let ze in J)ze!=="id"&&(me[ze]=J==null?void 0:J[ze]);J=me}return J});q==null||q.forEach(J=>{Array.isArray(J)?t.push(ua.getValueToObjectValue(J,j)):t.push(J)})}return t},bf=A.useMenuState(A.pinia),{activeMenuPath:S6}=A.storeToRefs(bf),kf=A.useUnit(A.pinia),{chooseTitle:D6}=A.storeToRefs(kf),xf="col-operate",ki=l=>`${xf}-${l}`,_f=(l,n)=>{const r=new Map;l.forEach(s=>{const{prop:d}=s;r.set(d,s)});const t=s=>{Array.isArray(s)&&s.forEach(d=>{const{prop:b}=d||{},h=r.get(b);wf(h,d),Array.isArray(d==null?void 0:d.children)&&d.children.length>0&&t(d.children)})};return t(n),n},wf=(l,n)=>(l&&(n.sortable=l==null?void 0:l.sortable,n.filterable=l==null?void 0:l.filterable,n.showSummary=l==null?void 0:l.showSummary,n.operable=l==null?void 0:l.operable,n.fixed=l==null?void 0:l.fixed),n),Cf=(l,n)=>{const{sortable:r=!1,filterable:t=!1,showSummary:s=!1,operable:d=!1,fixed:b=!1}=n||{};return{prop:l,sortable:r,filterable:t,showSummary:s,operable:d,fixed:b}},Ef=async l=>{var d,b;if(!l)return;const n=ki(l),r=await br.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n}}),t=(d=r==null?void 0:r.data)==null?void 0:d.code,s=(b=r==null?void 0:r.data)==null?void 0:b.result;if(t==200)return s==null?void 0:s[0]},Sf=async l=>{var d,b,h,v;if(!l)return;const n=ki(l),r=await br.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n}}),t=(d=r==null?void 0:r.data)==null?void 0:d.code,s=(b=r==null?void 0:r.data)==null?void 0:b.result;return t==200?(v=(h=s==null?void 0:s[0])==null?void 0:h.value)==null?void 0:v.columns:[]},Df=async(l,n)=>{if(!l||!n)return;const r=ki(l);return await br.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:n}})},Bf=async(l,n)=>!l||!n?void 0:await br.updateInsofDataApi({id:l,value:{columns:n}}),os=async(l,n)=>{const r=sessionStorage.getItem("systemKey");if(!l||!n||!r)return;const t=await Ef(l);return t?await Bf(t==null?void 0:t.id,n):await Df(l,n)};var mo={exports:{}},Nf=mo.exports,is;function Tf(){return is||(is=1,function(l,n){(function(r,t){t()})(Nf,function(){function r(y,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function t(y,c,C){var M=new XMLHttpRequest;M.open("GET",y),M.responseType="blob",M.onload=function(){v(M.response,c,C)},M.onerror=function(){console.error("could not download file")},M.send()}function s(y){var c=new XMLHttpRequest;c.open("HEAD",y,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function d(y){try{y.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),y.dispatchEvent(c)}}var b=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,h=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),v=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(y,c,C){var M=b.URL||b.webkitURL,L=document.createElement("a");c=c||y.name||"download",L.download=c,L.rel="noopener",typeof y=="string"?(L.href=y,L.origin===location.origin?d(L):s(L.href)?t(y,c,C):d(L,L.target="_blank")):(L.href=M.createObjectURL(y),setTimeout(function(){M.revokeObjectURL(L.href)},4e4),setTimeout(function(){d(L)},0))}:"msSaveOrOpenBlob"in navigator?function(y,c,C){if(c=c||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(r(y,C),c);else if(s(y))t(y,c,C);else{var M=document.createElement("a");M.href=y,M.target="_blank",setTimeout(function(){d(M)})}}:function(y,c,C,M){if(M=M||open("","_blank"),M&&(M.document.title=M.document.body.innerText="downloading..."),typeof y=="string")return t(y,c,C);var L=y.type==="application/octet-stream",x=/constructor/i.test(b.HTMLElement)||b.safari,Y=/CriOS\/[\d]+/.test(navigator.userAgent);if((Y||L&&x||h)&&typeof FileReader<"u"){var w=new FileReader;w.onloadend=function(){var S=w.result;S=Y?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),M?M.location.href=S:location=S,M=null},w.readAsDataURL(y)}else{var z=b.URL||b.webkitURL,ee=z.createObjectURL(y);M?M.location=ee:location.href=ee,M=null,setTimeout(function(){z.revokeObjectURL(ee)},4e4)}});b.saveAs=v.saveAs=v,l.exports=v})}(mo)),mo.exports}Tf();const at=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(l){this.itemData=l},setCurStructureCompIds(l){this.curStructureCompIds=l},setRefreshCurStructure(l){this.isRefreshCurStructure=l},setOriginalData(l){this.originalData=l},setExtraContents(l){this.extraContents=l},setNodeDev(l){this.nodeDev=l},setIsEdit(l){this.isEdit=l},setSelectTab(l){this.selectTab=l}}}),Af=A.useLoginState(A.pinia),{loginUserInfo:ei}=A.storeToRefs(Af),Mf=async l=>{var t,s,d;let n=await A.getAllTables({platId:parseInt((t=ei==null?void 0:ei.value)==null?void 0:t.plat_id),tableNames:[l]});return n=(d=(s=n==null?void 0:n.data)==null?void 0:s.result)==null?void 0:d[0],await Js(n,!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:n}]}]},zf=A.useLoginState(),{loginUserInfo:gl}=A.storeToRefs(zf);let uo="$R";const _r=A.useModelComp(A.pinia),lc=a.ref(!1),{itemData:Of,itemGridData:Xn,curStructureCompIds:ss,isSubmitCurStructure:If,routeToChildPath:Lf,pageMapState:pi,itemExtendData:po,refreshTable:cs}=A.storeToRefs(_r),No=at(A.pinia),Er=A.useMenuState(A.pinia),Xl=a.shallowRef([]),{asideMenus:Vf,activeTopMenuPath:Rf,activeMenuPath:Cl,platform:B6,buttonTriggerType:$f,currentMenuPath:Jr}=A.storeToRefs(Er),rn=A.useUnit(A.pinia),{selectTitle:Vn,chooseTitle:fi}=A.storeToRefs(rn);a.ref();const Ct=a.ref(!0),$n=a.ref(0),hi=a.ref([]);a.ref(!1);const xi=a.ref(!1),Pt=a.ref(),rc=a.ref(),nc=a.ref(),Pf=()=>{_r.setItemGridData([]),_r.setIsEdit("edit"),_r.setSubmitCurStructure(Cl.value!=="/平台管理/菜单管理")},Ff=()=>{_r.setIsEdit("view"),_r.setRefreshCurStructure(!0)},jf=async l=>{var s;let n=Vn.value,r=n==null?void 0:n.findIndex(d=>(d==null?void 0:d.value)===(l==null?void 0:l.value)),t=n==null?void 0:n.filter((d,b)=>b<=r);rn.setSelectTitle(pl.safeClone(t)),t=(s=t==null?void 0:t.map(d=>d==null?void 0:d.value))==null?void 0:s.join("/"),Er.setActiveMenuPath(null),Er.setActiveMenuPath(t)},ai=async(l,n,r,t="contentConfig")=>{var s;try{if(!Array.isArray(l))return;let d,b;n==="create"?(d={dataList:l==null?void 0:l.map(v=>{var y;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:t,parentTable:"",version:1},value:{pageData:{...v,compData:(y=v==null?void 0:v.compData)==null?void 0:y.filter(c=>(c==null?void 0:c.key)!=="tableContents")}}}})},b=br.batchAddInsofDataApi):n==="update"?(d={dataList:l==null?void 0:l.map(v=>{var y;return{id:v==null?void 0:v.id,value:{pageData:{...v,compData:(y=v==null?void 0:v.compData)==null?void 0:y.filter(c=>(c==null?void 0:c.key)!=="tableContents")}}}})},b=br.batchUpdateInsofDataApi):n==="delete"&&(d={ids:l},b=br.batchDeleteInsofDataApi);const h=await b(d);if(((s=h==null?void 0:h.data)==null?void 0:s.code)===200)return h.data.result;throw Qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Qa.ElMessage.error("保存响应失败")}},us=async(l,n,r,t)=>{var s,d,b,h,v,y,c,C,M,L,x;try{const Y=(d=(s=l==null?void 0:l.results)==null?void 0:s.filter(T=>!(T!=null&&T.id)||typeof(T==null?void 0:T.id)=="string"))==null?void 0:d.map(T=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:n,relatedInfo:r},value:{tableData:T}})),w=(h=(b=l==null?void 0:l.results)==null?void 0:b.filter(T=>(T==null?void 0:T.id)&&typeof(T==null?void 0:T.id)=="number"))==null?void 0:h.map(T=>({id:T==null?void 0:T.id,value:{tableData:T}})),z=JSON.parse(JSON.stringify(l)),ee=(v=z==null?void 0:z.results)==null?void 0:v.map(T=>T.id);let S;r?S=(C=(c=(y=pi.value)==null?void 0:y[Cl.value])==null?void 0:c.filter(T=>{var k,g,j;return((k=T==null?void 0:T.key)==null?void 0:k.type)===n&&((j=(g=T==null?void 0:T.key)==null?void 0:g.relatedInfo)==null?void 0:j.target)===t}))==null?void 0:C.map(T=>T==null?void 0:T.id):S=(x=(L=(M=pi.value)==null?void 0:M[Cl.value])==null?void 0:L.filter(T=>{var k;return((k=T==null?void 0:T.key)==null?void 0:k.type)===n}))==null?void 0:x.map(T=>T==null?void 0:T.id);const $=S==null?void 0:S.filter(T=>!(ee!=null&&ee.includes(T))&&typeof T=="number");(Y==null?void 0:Y.length)>0&&await br.batchAddInsofDataApi({dataList:Y}),(w==null?void 0:w.length)>0&&await br.batchUpdateInsofDataApi({dataList:w}),($==null?void 0:$.length)>0&&await br.batchDeleteInsofDataApi({ids:$})}catch(Y){throw new Error(Y)}},Hf=async l=>{var y,c,C,M,L,x,Y,w,z,ee;Er.setContentLoading(!0);const n=JSON.parse(JSON.stringify(Of.value));if(!If.value)return Er.setCacheStructures({key:$f.value,data:n}),Qa.ElMessage.success("已暂存");const r=n==null?void 0:n.map(S=>S.id),t=r.filter(S=>{var $;return!(($=ss.value)!=null&&$.includes(S))}),s=(y=ss.value)==null?void 0:y.filter(S=>!r.includes(S)),d=[...t,...s].filter(S=>typeof S!==null&&typeof S<"u"),b=n==null?void 0:n.filter(S=>!S.id),h=n==null?void 0:n.filter(S=>S.id);let v=[];if(d&&(d==null?void 0:d.length)>0&&v.push(ai(d,"delete",l)),b&&(b==null?void 0:b.length)>0&&v.push(ai(b,"create",l)),h&&(h==null?void 0:h.length)>0&&v.push(ai(h,"update",l)),Xn.value&&((c=Xn.value)!=null&&c.isDelete&&((M=(C=Xn.value)==null?void 0:C.results)==null?void 0:M.length)>0&&((x=(L=Xn.value)==null?void 0:L.results)!=null&&x.every(S=>typeof S=="number"))?await br.batchDeleteInsofDataApi({ids:(Y=Xn.value)==null?void 0:Y.results}):(console.log("itemGridData.value",Xn.value),v.push(await us(Xn.value,"gridLayout")))),po.value)for(const S in po.value)v.push(await us((w=po.value)==null?void 0:w[S],"extend",{target:S,compId:(ee=(z=po.value)==null?void 0:z[S])==null?void 0:ee.compId},S));await Promise.all(v).then(()=>{Qa.ElMessage.success("保存成功"),_r.setRefreshCurStructure(!0)}).catch(S=>{Qa.ElMessage.success(S)}),Er.setContentLoading(!1)},Ft=l=>Et(l),Uf=a.computed(()=>{var l;return(l=Xl.value)==null?void 0:l.filter(n=>(n==null?void 0:n.affix)&&(n==null?void 0:n.affix)!=="default")}),tc=a.computed(()=>{var l;return(l=Xl.value)==null?void 0:l.filter(n=>!(n!=null&&n.affix)||(n==null?void 0:n.affix)==="default")}),oc=a.ref(0),ic=a.ref(null),qf="ocr_committed_temp_ids_v1",Kf=(l,n)=>`${qf}:${String(l??"")}:${String(n??"")}`,Wf=(l,n,r)=>{try{const t=Kf(l,n),s=sessionStorage.getItem(t),d=s?JSON.parse(s):[],b=Array.isArray(d)?d:[],h=Array.from(new Set([...b,...r||[]].map(v=>String(v)))).slice(-200);sessionStorage.setItem(t,JSON.stringify(h))}catch{}},wo=async(l,n="data",r)=>{var s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl,Ca,aa,Se,Xa,Ya,tl;let t=((b=(d=(s=Vn.value)==null?void 0:s.filter(Da=>(Da==null?void 0:Da.condition)==="child"))==null?void 0:d[0])==null?void 0:b.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let Da=(h=l==null?void 0:l.fixContent)==null?void 0:h.map(xa=>{let pa={};for(let Aa in xa)Array.isArray(xa==null?void 0:xa[Aa])?pa[Aa]=JSON.stringify(xa==null?void 0:xa[Aa]):pa[Aa]=xa==null?void 0:xa[Aa];return pa}),sa=await A.quoteApi({platId:parseInt((v=gl==null?void 0:gl.value)==null?void 0:v.plat_id),type:"fatherSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});sa=(y=sa==null?void 0:sa.data)==null?void 0:y.result,sa=sa==null?void 0:sa.filter(xa=>{var pa,Aa;return!((xa==null?void 0:xa.fatherPath)!==""&&((Aa=(pa=xa==null?void 0:xa.quote)==null?void 0:pa[0])==null?void 0:Aa.menus)===(Cl==null?void 0:Cl.value))});let Z=sa==null?void 0:sa.map(xa=>{var ha,La;let pa={},Aa=Da==null?void 0:Da[0],Ze;return Array.isArray((ha=xa==null?void 0:xa.struct)==null?void 0:ha[0])?Ze=ua.getColumnChild((La=xa==null?void 0:xa.struct)==null?void 0:La[0]):Ze=xa==null?void 0:xa.struct,Ze==null||Ze.forEach(Ja=>{var Ol,El;pa[Ja.prop]=((Ol=Ja==null?void 0:Ja.words)!=null&&Ol[0]?Aa==null?void 0:Aa[(El=Ja==null?void 0:Ja.words)==null?void 0:El[0]]:Aa==null?void 0:Aa[Ja==null?void 0:Ja.prop])??""}),pa.id="1",delete pa.sort,{tableName:"content_"+(xa==null?void 0:xa.id),tableContents:[pa]}}),Ea=[{tableName:(c=l==null?void 0:l.relatedContents)==null?void 0:c.find(xa=>xa==null?void 0:xa.includes("content")),tableContents:Da}];Ea=[...Ea,...Z];let Pa=await A.quoteApi({platId:parseInt((C=gl==null?void 0:gl.value)==null?void 0:C.plat_id),type:"sonSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});Pa=(L=(M=Pa==null?void 0:Pa.data)==null?void 0:M.result)==null?void 0:L.filter(xa=>!(Ea!=null&&Ea.find(pa=>(pa==null?void 0:pa.tableName)==="content_"+(xa==null?void 0:xa.id)))),Pa=Pa==null?void 0:Pa.filter(xa=>{var pa,Aa;return!((xa==null?void 0:xa.fatherPath)!==""&&((Aa=(pa=xa==null?void 0:xa.quote)==null?void 0:pa[0])==null?void 0:Aa.menus)===(Cl==null?void 0:Cl.value))});let ul=Pa==null?void 0:Pa.map(xa=>{var ha,La,Ja,Ol,El,Sl,wl;let pa={},Aa=Da==null?void 0:Da[0],Ze;return Array.isArray((ha=xa==null?void 0:xa.struct)==null?void 0:ha[0])?Ze=ua.getColumnChild((La=xa==null?void 0:xa.struct)==null?void 0:La[0]):Ze=xa==null?void 0:xa.struct,((Ol=(Ja=Ze==null?void 0:Ze[0])==null?void 0:Ja.words)!=null&&Ol[0]?Aa!=null&&Aa[(Sl=(El=Ze==null?void 0:Ze[0])==null?void 0:El.words)==null?void 0:Sl[0]]:Aa!=null&&Aa[(wl=Ze==null?void 0:Ze[0])==null?void 0:wl.prop])?(Ze==null||Ze.forEach(fl=>{var cl,kl;pa[fl.prop]=((cl=fl==null?void 0:fl.words)!=null&&cl[0]?Aa==null?void 0:Aa[(kl=fl==null?void 0:fl.words)==null?void 0:kl[0]]:Aa==null?void 0:Aa[fl==null?void 0:fl.prop])??""}),pa.id="1",delete pa.sort):pa=void 0,{tableName:"content_"+(xa==null?void 0:xa.id),tableContents:[pa]}});ul=ul==null?void 0:ul.filter(xa=>{var pa;return!((pa=xa==null?void 0:xa.tableContents)!=null&&pa.every(Aa=>Aa===void 0))}),Ea=[...Ea,...ul],await A.pageBatchAddApi({platId:parseInt((x=gl==null?void 0:gl.value)==null?void 0:x.plat_id),changeContents:Ea});let ol=[];Ea==null||Ea.forEach(xa=>{var pa;(pa=xa==null?void 0:xa.tableContents)==null||pa.forEach(Aa=>{ol.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:xa==null?void 0:xa.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((Y=gl==null?void 0:gl.value)==null?void 0:Y.plat_id),changeContents:[{tableName:"log",tableContents:ol}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const Da=((l==null?void 0:l.ocrRows)||[]).map(Pa=>Pa==null?void 0:Pa.id).filter(Pa=>Pa!=null),sa=((l==null?void 0:l.ocrRows)||[]).map(Pa=>{const ul={...Pa};return delete ul._isOCRRow,delete ul._ocrTableId,Object.keys(ul).forEach(ol=>{/(^|\.)证书附件$/.test(ol)&&Array.isArray(ul[ol])&&(ul[ol]=JSON.stringify(ul[ol].map(xa=>({url:(xa==null?void 0:xa.url)||"",name:(xa==null?void 0:xa.name)||(xa==null?void 0:xa.fileName)||"",fileName:(xa==null?void 0:xa.fileName)||(xa==null?void 0:xa.name)||""})).filter(xa=>xa.url||xa.name)))}),ul});let Z=[{tableName:(w=l==null?void 0:l.relatedContents)==null?void 0:w.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:sa}];await A.pageBatchAddApi({platId:parseInt((z=gl==null?void 0:gl.value)==null?void 0:z.plat_id),changeContents:Z});let Ea=[];Z==null||Z.forEach(Pa=>{var ul;(ul=Pa==null?void 0:Pa.tableContents)==null||ul.forEach(ol=>{Ea.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ol),request_result:"{}",is_delete:!1,request_table:Pa==null?void 0:Pa.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((ee=gl==null?void 0:gl.value)==null?void 0:ee.plat_id),changeContents:[{tableName:"log",tableContents:Ea}]}),Wf(l==null?void 0:l.parentTableId,l==null?void 0:l.index,Da)}if((l==null?void 0:l.buttonName)==="编辑"){const sa=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(ha=>{const La={...ha};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La});let Z=sa==null?void 0:sa.map(ha=>{let La={};for(let Ja in ha)Array.isArray(ha==null?void 0:ha[Ja])?La[Ja]=JSON.stringify(ha==null?void 0:ha[Ja]):La[Ja]=ha==null?void 0:ha[Ja];return La}),Ea=await A.quoteApi({platId:parseInt((S=gl==null?void 0:gl.value)==null?void 0:S.plat_id),type:"fatherSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});Ea=($=Ea==null?void 0:Ea.data)==null?void 0:$.result,Ea=Ea==null?void 0:Ea.filter(ha=>{var La,Ja;return!((ha==null?void 0:ha.fatherPath)!==""&&((Ja=(La=ha==null?void 0:ha.quote)==null?void 0:La[0])==null?void 0:Ja.menus)===(Cl==null?void 0:Cl.value))});let Pa=(k=(T=l==null?void 0:l.columns)==null?void 0:T[0])==null?void 0:k.prop,ul=(g=Z==null?void 0:Z[0])==null?void 0:g[Pa],ol=[{tableName:(j=l==null?void 0:l.relatedContents)==null?void 0:j.find(ha=>ha==null?void 0:ha.includes("content")),tableContents:Z}],xa=(q=Ea==null?void 0:Ea.map(ha=>{var Ja,Ol,El,Sl,wl;let La=(Ja=ha==null?void 0:ha.contents)==null?void 0:Ja.filter(fl=>{var cl;return(cl=Object.values(fl))==null?void 0:cl.find(kl=>kl===ul)});if((La==null?void 0:La.length)>0){let fl=Z==null?void 0:Z[0];fl={...fl,id:(Ol=La==null?void 0:La[0])==null?void 0:Ol.id};let cl={},kl=fl,Dl;return Array.isArray((El=ha==null?void 0:ha.struct)==null?void 0:El[0])?Dl=ua.getColumnChild((Sl=ha==null?void 0:ha.struct)==null?void 0:Sl[0]):Dl=ha==null?void 0:ha.struct,Dl==null||Dl.forEach($l=>{var or,Cr;cl[$l.prop]=((or=$l==null?void 0:$l.words)!=null&&or[0]?kl==null?void 0:kl[(Cr=$l==null?void 0:$l.words)==null?void 0:Cr[0]]:kl==null?void 0:kl[$l==null?void 0:$l.prop])??""}),cl.id=(wl=La==null?void 0:La[0])==null?void 0:wl.id,delete cl.sort,{tableName:"content_"+(ha==null?void 0:ha.id),tableContents:[cl]}}else return}))==null?void 0:q.filter(ha=>ha);ol=[...ol,...xa];let pa=await A.quoteApi({platId:parseInt((J=gl==null?void 0:gl.value)==null?void 0:J.plat_id),type:"sonSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});pa=(ze=(me=pa==null?void 0:pa.data)==null?void 0:me.result)==null?void 0:ze.filter(ha=>!(ol!=null&&ol.find(La=>(La==null?void 0:La.tableName)==="content_"+(ha==null?void 0:ha.id)))),pa=pa==null?void 0:pa.filter(ha=>{var La,Ja;return!((ha==null?void 0:ha.fatherPath)!==""&&((Ja=(La=ha==null?void 0:ha.quote)==null?void 0:La[0])==null?void 0:Ja.menus)===(Cl==null?void 0:Cl.value))});let Aa=(xe=pa==null?void 0:pa.map(ha=>{var Ja,Ol,El,Sl,wl;let La=(Ja=ha==null?void 0:ha.contents)==null?void 0:Ja.filter(fl=>{var cl;return(cl=Object.values(fl))==null?void 0:cl.find(kl=>kl===ul)});if((La==null?void 0:La.length)>0){let fl=Z==null?void 0:Z[0];fl={...fl,id:(Ol=La==null?void 0:La[0])==null?void 0:Ol.id};let cl={},kl=fl,Dl;return Array.isArray((El=ha==null?void 0:ha.struct)==null?void 0:El[0])?Dl=ua.getColumnChild((Sl=ha==null?void 0:ha.struct)==null?void 0:Sl[0]):Dl=ha==null?void 0:ha.struct,Dl==null||Dl.forEach($l=>{var or,Cr;cl[$l.prop]=((or=$l==null?void 0:$l.words)!=null&&or[0]?kl==null?void 0:kl[(Cr=$l==null?void 0:$l.words)==null?void 0:Cr[0]]:kl==null?void 0:kl[$l==null?void 0:$l.prop])??""}),cl.id=(wl=La==null?void 0:La[0])==null?void 0:wl.id,delete cl.sort,{tableName:"content_"+(ha==null?void 0:ha.id),tableContents:[cl]}}else return}))==null?void 0:xe.filter(ha=>ha);ol=[...ol,...Aa],await A.pageBatchUpdateApi({platId:parseInt((te=gl==null?void 0:gl.value)==null?void 0:te.plat_id),changeContents:ol});let Ze=[];ol==null||ol.forEach(ha=>{var La;(La=ha==null?void 0:ha.tableContents)==null||La.forEach(Ja=>{Ze.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Ja),request_result:"{}",is_delete:!1,request_table:ha==null?void 0:ha.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((be=gl==null?void 0:gl.value)==null?void 0:be.plat_id),changeContents:[{tableName:"log",tableContents:Ze}]})}if((l==null?void 0:l.buttonName)==="删除"){let Da=[{tableName:(Q=l==null?void 0:l.relatedContents)==null?void 0:Q.find(pa=>pa==null?void 0:pa.includes("content")),tableContents:l==null?void 0:l.fixContent}],sa=await A.quoteApi({platId:parseInt((de=gl==null?void 0:gl.value)==null?void 0:de.plat_id),type:"fatherSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});sa=(Ke=sa==null?void 0:sa.data)==null?void 0:Ke.result,sa=sa==null?void 0:sa.filter(pa=>{var Aa,Ze;return!((pa==null?void 0:pa.fatherPath)!==""&&((Ze=(Aa=pa==null?void 0:pa.quote)==null?void 0:Aa[0])==null?void 0:Ze.menus)===(Cl==null?void 0:Cl.value))});let Z=(oe=(wa=l==null?void 0:l.columns)==null?void 0:wa[0])==null?void 0:oe.prop,Ea=(ne=(D=l==null?void 0:l.fixContent)==null?void 0:D[0])==null?void 0:ne[Z],Pa=(ge=sa==null?void 0:sa.map(pa=>{var Ze,ha,La,Ja,Ol,El;let Aa=(Ze=pa==null?void 0:pa.contents)==null?void 0:Ze.filter(Sl=>{var wl;return(wl=Object.values(Sl))==null?void 0:wl.find(fl=>fl===Ea)});if((Aa==null?void 0:Aa.length)>0){let Sl=(ha=l==null?void 0:l.fixContent)==null?void 0:ha[0];Sl={...Sl,id:(La=Aa==null?void 0:Aa[0])==null?void 0:La.id};let wl={},fl=Sl,cl;return Array.isArray((Ja=pa==null?void 0:pa.struct)==null?void 0:Ja[0])?cl=ua.getColumnChild((Ol=pa==null?void 0:pa.struct)==null?void 0:Ol[0]):cl=pa==null?void 0:pa.struct,cl==null||cl.forEach(kl=>{var Dl,$l;wl[kl.prop]=((Dl=kl==null?void 0:kl.words)!=null&&Dl[0]?fl==null?void 0:fl[($l=kl==null?void 0:kl.words)==null?void 0:$l[0]]:fl==null?void 0:fl[kl==null?void 0:kl.prop])??""}),wl.id=(El=Aa==null?void 0:Aa[0])==null?void 0:El.id,delete wl.sort,{tableName:"content_"+(pa==null?void 0:pa.id),tableContents:[wl]}}else return}))==null?void 0:ge.filter(pa=>pa);Da=[...Da,...Pa];let ul=await A.quoteApi({platId:parseInt((se=gl==null?void 0:gl.value)==null?void 0:se.plat_id),type:"sonSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});ul=(la=(we=ul==null?void 0:ul.data)==null?void 0:we.result)==null?void 0:la.filter(pa=>!(Da!=null&&Da.find(Aa=>(Aa==null?void 0:Aa.tableName)==="content_"+(pa==null?void 0:pa.id)))),ul=ul==null?void 0:ul.filter(pa=>{var Aa,Ze;return!((pa==null?void 0:pa.fatherPath)!==""&&((Ze=(Aa=pa==null?void 0:pa.quote)==null?void 0:Aa[0])==null?void 0:Ze.menus)===(Cl==null?void 0:Cl.value))});let ol=(ya=ul==null?void 0:ul.map(pa=>{var Ze,ha,La,Ja,Ol,El;let Aa=(Ze=pa==null?void 0:pa.contents)==null?void 0:Ze.filter(Sl=>{var wl;return(wl=Object.values(Sl))==null?void 0:wl.find(fl=>fl===Ea)});if((Aa==null?void 0:Aa.length)>0){let Sl=(ha=l==null?void 0:l.fixContent)==null?void 0:ha[0];Sl={...Sl,id:(La=Aa==null?void 0:Aa[0])==null?void 0:La.id};let wl={},fl=Sl,cl;return Array.isArray((Ja=pa==null?void 0:pa.struct)==null?void 0:Ja[0])?cl=ua.getColumnChild((Ol=pa==null?void 0:pa.struct)==null?void 0:Ol[0]):cl=pa==null?void 0:pa.struct,cl==null||cl.forEach(kl=>{var Dl,$l;wl[kl.prop]=((Dl=kl==null?void 0:kl.words)!=null&&Dl[0]?fl==null?void 0:fl[($l=kl==null?void 0:kl.words)==null?void 0:$l[0]]:fl==null?void 0:fl[kl==null?void 0:kl.prop])??""}),wl.id=(El=Aa==null?void 0:Aa[0])==null?void 0:El.id,delete wl.sort,{tableName:"content_"+(pa==null?void 0:pa.id),tableContents:[wl]}}else return}))==null?void 0:ya.filter(pa=>pa);Da=[...Da,...ol],await A.pageBatchDeleteApi({platId:parseInt((Va=gl==null?void 0:gl.value)==null?void 0:Va.plat_id),changeContents:Da});let xa=[];Da==null||Da.forEach(pa=>{var Aa;(Aa=pa==null?void 0:pa.tableContents)==null||Aa.forEach(Ze=>{xa.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Ze),request_result:"{}",is_delete:!1,request_table:pa==null?void 0:pa.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((ae=gl==null?void 0:gl.value)==null?void 0:ae.plat_id),changeContents:[{tableName:"log",tableContents:xa}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let Da=await A.getPageDataApi({platId:parseInt((ea=gl==null?void 0:gl.value)==null?void 0:ea.plat_id),pageName:"menu"});if(Da=(Re=Da==null?void 0:Da.data)==null?void 0:Re.result,Da!=null&&Da.find(sa=>(sa==null?void 0:sa.father_name)===Cl.value+"/")){nc.value=l,rc.value=Da==null?void 0:Da.filter(Ea=>(Ea==null?void 0:Ea.father_name)===Cl.value+"/");let sa=(Pe=(ma=l==null?void 0:l.columns)==null?void 0:ma.find(Ea=>Ea==null?void 0:Ea.mainKey))==null?void 0:Pe.prop,Z=(Le=(Ee=l==null?void 0:l.fixContent)==null?void 0:Ee[0])==null?void 0:Le[sa];xi.value=!0,Pt.value=[{prop:sa,label:sa,name:sa,value:Z}]}else{let sa=(We=l==null?void 0:l.fixContent)==null?void 0:We.map(Pa=>{let ul={};for(let ol in Pa)Array.isArray(Pa==null?void 0:Pa[ol])?ul[ol]=JSON.stringify(Pa==null?void 0:Pa[ol]):ul[ol]=Pa==null?void 0:Pa[ol];return ul}),Z=[{tableName:(Ua=l==null?void 0:l.relatedContents)==null?void 0:Ua.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:sa}];await A.pageBatchAddApi({platId:parseInt((Oa=gl==null?void 0:gl.value)==null?void 0:Oa.plat_id),changeContents:Z});let Ea=[];Z==null||Z.forEach(Pa=>{var ul;(ul=Pa==null?void 0:Pa.tableContents)==null||ul.forEach(ol=>{Ea.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ol),request_result:"{}",is_delete:!1,request_table:Pa==null?void 0:Pa.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((P=gl==null?void 0:gl.value)==null?void 0:P.plat_id),changeContents:[{tableName:"log",tableContents:Ea}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let Da=((R=(X=(F=l==null?void 0:l.columns)==null?void 0:F.map(Ze=>Ze==null?void 0:Ze.filter))==null?void 0:X.filter(Ze=>Ze!==""))==null?void 0:R[0])??"";Da=Ta.analyzeSplitToContent(Da,","),Da=(Da==null?void 0:Da.find(Ze=>Ze==null?void 0:Ze.includes("@Filter")))??"";let sa=(W=l==null?void 0:l.fixContent)==null?void 0:W.map(Ze=>{let ha={};for(let La in Ze)Array.isArray(Ze==null?void 0:Ze[La])?ha[La]=JSON.stringify(Ze==null?void 0:Ze[La]):ha[La]=Ze==null?void 0:Ze[La];return ha}),Z=await A.quoteApi({platId:parseInt((Ie=gl==null?void 0:gl.value)==null?void 0:Ie.plat_id),type:"fatherSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});Z=(Ne=Z==null?void 0:Z.data)==null?void 0:Ne.result,Z=Z==null?void 0:Z.filter(Ze=>{var ha,La;return!((Ze==null?void 0:Ze.fatherPath)!==""&&((La=(ha=Ze==null?void 0:Ze.quote)==null?void 0:ha[0])==null?void 0:La.menus)===(Cl==null?void 0:Cl.value))});let Ea=(K=(Ce=l==null?void 0:l.columns)==null?void 0:Ce[0])==null?void 0:K.prop,Pa=(He=sa==null?void 0:sa[0])==null?void 0:He[Ea],ul=[{tableName:(Ve=l==null?void 0:l.relatedContents)==null?void 0:Ve.find(Ze=>Ze==null?void 0:Ze.includes("content")),tableContents:sa}],ol=(ra=Z==null?void 0:Z.map(Ze=>{var La,Ja,Ol,El,Sl;let ha=(La=Ze==null?void 0:Ze.contents)==null?void 0:La.filter(wl=>{var fl;return(fl=Object.values(wl))==null?void 0:fl.find(cl=>cl===Pa)});if((ha==null?void 0:ha.length)>0){let wl=sa==null?void 0:sa[0];wl={...wl,id:(Ja=ha==null?void 0:ha[0])==null?void 0:Ja.id};let fl={},cl=wl,kl;return Array.isArray((Ol=Ze==null?void 0:Ze.struct)==null?void 0:Ol[0])?kl=ua.getColumnChild((El=Ze==null?void 0:Ze.struct)==null?void 0:El[0]):kl=Ze==null?void 0:Ze.struct,kl==null||kl.forEach(Dl=>{var $l,or;fl[Dl.prop]=(($l=Dl==null?void 0:Dl.words)!=null&&$l[0]?cl==null?void 0:cl[(or=Dl==null?void 0:Dl.words)==null?void 0:or[0]]:cl==null?void 0:cl[Dl==null?void 0:Dl.prop])??""}),fl.id=(Sl=ha==null?void 0:ha[0])==null?void 0:Sl.id,delete fl.sort,{tableName:"content_"+(Ze==null?void 0:Ze.id),tableContents:[fl]}}else return}))==null?void 0:ra.filter(Ze=>Ze);ul=[...ul,...ol];let xa=await A.quoteApi({platId:parseInt((va=gl==null?void 0:gl.value)==null?void 0:va.plat_id),type:"sonSyncs",related:[{menus:t!==""?Cl.value+"/"+t:Cl.value,groups:l==null?void 0:l.name}]});if(xa=(ba=($e=xa==null?void 0:xa.data)==null?void 0:$e.result)==null?void 0:ba.filter(Ze=>!(ul!=null&&ul.find(ha=>(ha==null?void 0:ha.tableName)==="content_"+(Ze==null?void 0:Ze.id)))),xa=xa==null?void 0:xa.filter(Ze=>{var ha,La;return!((Ze==null?void 0:Ze.fatherPath)!==""&&((La=(ha=Ze==null?void 0:Ze.quote)==null?void 0:ha[0])==null?void 0:La.menus)===(Cl==null?void 0:Cl.value))}),Da&&Da!==""){(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)),Da=(fa=(Te=Da==null?void 0:Da.replace("(",uo))==null?void 0:Te.split(uo))==null?void 0:fa[1],Da=Da==null?void 0:Da.slice(0,(Da==null?void 0:Da.length)-1),(Da==null?void 0:Da[0])==="*"&&(Da="{"+((ga=(Ue=Da==null?void 0:Da.replace("{",uo))==null?void 0:Ue.split(uo))==null?void 0:ga[1])),Da=(fe=Da==null?void 0:Da.replaceAll("{",""))==null?void 0:fe.replaceAll("}","");let Ze=ua.calculatorAndToOr(Da);Ze=Ze==null?void 0:Ze[0];let ha;if((ka=Object.values(Ze))!=null&&ka.some(La=>(La==null?void 0:La[0])==="*")){let La=($a=(Fe=Vn.value)==null?void 0:Fe.find(Ja=>(Ja==null?void 0:Ja.condition)==="child"))!=null&&$a.value?(Jr==null?void 0:Jr.value)+"/"+((Ye=(Na=Vn.value)==null?void 0:Na.find(Ja=>(Ja==null?void 0:Ja.condition)==="child"))==null?void 0:Ye.value):Jr==null?void 0:Jr.value;ha=await Pr(La,!1)}for(let La in Ze)if(((Oe=Ze==null?void 0:Ze[La])==null?void 0:Oe[0])==="*"){let Ja=(qa=(na=(ie=Ze[La])==null?void 0:ie.slice(1,(ue=Ze[La])==null?void 0:ue.length))==null?void 0:na.split(":"))==null?void 0:qa[0],Ol=(Ml=(rl=Ze[La])==null?void 0:rl.split(":"))==null?void 0:Ml[1],El=(Fa=ha==null?void 0:ha.filter(Sl=>(Sl==null?void 0:Sl.name)===Ja))==null?void 0:Fa[0];El=(Ca=(nl=El==null?void 0:El.compData)==null?void 0:nl.find(Sl=>(Sl==null?void 0:Sl.key)==="tableContents"))==null?void 0:Ca.contents,El=(aa=El==null?void 0:El[0])==null?void 0:aa[Ol],Ze[La]=El}Da=((Se=Object.values(Ze))==null?void 0:Se[0])??""}let pa=(Xa=xa==null?void 0:xa.map(Ze=>{var La,Ja,Ol,El,Sl;let ha=(La=Ze==null?void 0:Ze.contents)==null?void 0:La.filter(wl=>{var fl;return(fl=Object.values(wl))==null?void 0:fl.find(cl=>cl===(Da===""?Pa:Da))});if((ha==null?void 0:ha.length)>0){let wl=sa==null?void 0:sa[0];wl={...wl,id:(Ja=ha==null?void 0:ha[0])==null?void 0:Ja.id};let fl={},cl=wl,kl;return Array.isArray((Ol=Ze==null?void 0:Ze.struct)==null?void 0:Ol[0])?kl=ua.getColumnChild((El=Ze==null?void 0:Ze.struct)==null?void 0:El[0]):kl=Ze==null?void 0:Ze.struct,kl==null||kl.forEach(Dl=>{var or,Cr,Gr,Xr;let $l=(or=l==null?void 0:l.columns)==null?void 0:or.find(Rr=>{var nn,qr,rr;return((qr=(nn=Rr==null?void 0:Rr.words)==null?void 0:nn[0])==null?void 0:qr.replaceAll("'",""))===(Dl==null?void 0:Dl.prop)&&((rr=Rr==null?void 0:Rr.functionRelatedWords)==null?void 0:rr.length)>0});$l=(Cr=$l==null?void 0:$l.prop)==null?void 0:Cr.replaceAll("'",""),fl[Dl.prop]=((Gr=Dl==null?void 0:Dl.words)!=null&&Gr[0]?cl==null?void 0:cl[(Xr=Dl==null?void 0:Dl.words)==null?void 0:Xr[0]]:(cl==null?void 0:cl[Dl==null?void 0:Dl.prop])??(cl==null?void 0:cl[$l]))??void 0}),fl.id=(Sl=ha==null?void 0:ha[0])==null?void 0:Sl.id,delete fl.sort,{tableName:"content_"+(Ze==null?void 0:Ze.id),tableContents:[fl]}}else return}))==null?void 0:Xa.filter(Ze=>Ze);ul=[...ul,...pa],await A.pageBatchUpdateApi({platId:parseInt((Ya=gl==null?void 0:gl.value)==null?void 0:Ya.plat_id),changeContents:ul});let Aa=[];ul==null||ul.forEach(Ze=>{var ha;(ha=Ze==null?void 0:Ze.tableContents)==null||ha.forEach(La=>{Aa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(La),request_result:"{}",is_delete:!1,request_table:Ze==null?void 0:Ze.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt((tl=gl==null?void 0:gl.value)==null?void 0:tl.plat_id),changeContents:[{tableName:"log",tableContents:Aa}]})}_r.setRefreshCurStructure(!0),await vi(l)},vi=async l=>{var d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S,$,T,k;let n=(d=l==null?void 0:l.relatedContents)==null?void 0:d.filter(g=>g==null?void 0:g.includes("content_")),r=await A.getAllTables({platId:parseInt((b=gl==null?void 0:gl.value)==null?void 0:b.plat_id),tableNames:n});if(r=(v=(h=r==null?void 0:r.data)==null?void 0:h.result)==null?void 0:v[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(g=>{g==null||delete g.source_table;const j={};for(let q in g){const J=g==null?void 0:g[q],me=J&&Object.prototype.toString.call(J)==="[object Object]"&&Object.keys(J).length===0,ze=Array.isArray(J)&&J.length===0;J==null||J==="{}"||me||ze?j[q]="":j[q]=J}return j});let t=(c=(y=n==null?void 0:n[0])==null?void 0:y.split("_"))==null?void 0:c[1],s=(C=Xl.value)==null?void 0:C.find(g=>(g==null?void 0:g.id)===t);if(s&&(s==null?void 0:s.comp)!=="Tabs"){let g=(M=s.compData)==null?void 0:M.map(j=>{var q;if((j==null?void 0:j.key)==="tableContents"){let J={...j,contents:r};return J.contents=(q=(J==null?void 0:J.contents)??[])==null?void 0:q.map(me=>{let ze={};for(let xe in me)JSON.stringify(me==null?void 0:me[xe])==="{}"?ze[xe]="":ze[xe]=me==null?void 0:me[xe];return ze}),J}return j});s.compData=await si(g,{}),Xl.value=(L=Xl.value)==null?void 0:L.map(j=>((j==null?void 0:j.id)===(s==null?void 0:s.id)&&(j=s),j))}else{let g=(x=Xl.value)==null?void 0:x.filter(j=>(j==null?void 0:j.comp)==="Tabs"||(j==null?void 0:j.comp)==="ParentItem");if(g=(Y=g==null?void 0:g.filter(j=>{var q,J;return((q=j==null?void 0:j.compData)==null?void 0:q.find(me=>(me==null?void 0:me.id)===t))||((J=j==null?void 0:j.children)==null?void 0:J.find(me=>(me==null?void 0:me.id)===t))}))==null?void 0:Y[0],g){const j=((w=g==null?void 0:g.compData)==null?void 0:w.find(q=>(q==null?void 0:q.id)===t))??((z=g==null?void 0:g.children)==null?void 0:z.find(q=>(q==null?void 0:q.id)===t));if(j){let q;j!=null&&j.compData&&((ee=j.compData)==null?void 0:ee.length)>0?q=(S=j.compData)==null?void 0:S.map(J=>(J==null?void 0:J.key)==="tableContents"?{...J,contents:r}:J):q=($=j.children)==null?void 0:$.map(J=>(J==null?void 0:J.key)==="tableContents"?{...J,contents:r}:J),j.compData=await si(q,{}),g.compData=(T=g.compData)==null?void 0:T.map(J=>((J==null?void 0:J.id)===(j==null?void 0:j.id)&&(J=j),J)),Xl.value=(k=Xl.value)==null?void 0:k.map(J=>((g!=null&&g.tabInform?(J==null?void 0:J.tabInform)===(g==null?void 0:g.tabInform):(J==null?void 0:J.name)===(g==null?void 0:g.name))&&(J=g),J))}}}},Yf=l=>{let n=Pt.value;Pt.value=n==null?void 0:n.map(r=>(r.value=l==null?void 0:l[r==null?void 0:r.prop],r))},Jf=async()=>{var M,L,x,Y,w,z,ee,S,$,T;let l=nc.value,n=rc.value,r=(L=(M=l==null?void 0:l.columns)==null?void 0:M.find(k=>k==null?void 0:k.mainKey))==null?void 0:L.prop,t=(Y=(x=Pt.value)==null?void 0:x[0])==null?void 0:Y.value,s=(w=l==null?void 0:l.fixContent)==null?void 0:w.map(k=>{var j;let g={};for(let q in k)Array.isArray(k==null?void 0:k[q])?g[q]=JSON.stringify(k==null?void 0:k[q]):g[q]=k==null?void 0:k[q];return(j=l==null?void 0:l.columns)==null||j.forEach(q=>{(q==null?void 0:q.formType)==="Upload"&&(g==null?void 0:g[q==null?void 0:q.prop])===""&&(g[q==null?void 0:q.prop]="{}")}),g[r]=t,g}),d=[{tableName:(z=l==null?void 0:l.relatedContents)==null?void 0:z.find(k=>k==null?void 0:k.includes("content")),tableContents:s}];await A.pageBatchAddApi({platId:parseInt((ee=gl==null?void 0:gl.value)==null?void 0:ee.plat_id),changeContents:d}),n=n==null?void 0:n.filter(k=>{var g,j,q;return(q=k==null?void 0:k.object_name)==null?void 0:q.includes((j=(g=l==null?void 0:l.fixContent)==null?void 0:g[0])==null?void 0:j[r])});let b=[],h=new Map;n==null||n.forEach(k=>{b.push(`content_${k==null?void 0:k.object_id}`),b.push(`struct_${k==null?void 0:k.object_id}`),h.set(k==null?void 0:k.object_id,k)});let v=await A.getAllTables({platId:parseInt((S=gl==null?void 0:gl.value)==null?void 0:S.plat_id),tableNames:b});v=($=v==null?void 0:v.data)==null?void 0:$.result;let y=[],c=[];v=Ta.chunk(v,2),v==null||v.forEach(k=>{var q,J,me,ze,xe,te,be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va,ae;let g=h.get((ze=(me=(J=(q=k==null?void 0:k[1])==null?void 0:q[0])==null?void 0:J.source_table)==null?void 0:me.split("_"))==null?void 0:ze[1]),j=(be=(te=(xe=g==null?void 0:g.object_name)==null?void 0:xe.split("/"))==null?void 0:te.filter((ea,Re)=>{var ma,Pe;return((Pe=(ma=g==null?void 0:g.object_name)==null?void 0:ma.split("/"))==null?void 0:Pe.length)-1!==Re}))==null?void 0:be.join("/");if(j=j+"/"+t,c!=null&&c.find(ea=>(ea==null?void 0:ea.path)===j)||c.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:j}),((de=(Q=k==null?void 0:k[1])==null?void 0:Q[0])==null?void 0:de.类型)==="Table"){let ea=((oe=(wa=(Ke=k==null?void 0:k[1])==null?void 0:Ke[0])==null?void 0:wa.结构)==null?void 0:oe.contents)??[],Re=pl.safeClone(ea);Array.isArray(Re==null?void 0:Re[0])&&(Re=ua.getColumnChild(Re==null?void 0:Re[0]));let ma=[];if(((D=k==null?void 0:k[0])==null?void 0:D.length)>0&&(ma=(ne=k==null?void 0:k[0])==null?void 0:ne.map(Pe=>Re==null?void 0:Re.map(Le=>(Le=(Pe==null?void 0:Pe[Le==null?void 0:Le.prop])??"",Le)))),y!=null&&y.find(Pe=>(Pe==null?void 0:Pe.key)===j)){let Pe=(ge=y==null?void 0:y.find(Le=>(Le==null?void 0:Le.key)===j))==null?void 0:ge.contents;Pe.push({isShow:g==null?void 0:g.is_show,filter:((la=(we=(se=k==null?void 0:k[1])==null?void 0:se[0])==null?void 0:we.引用)==null?void 0:la.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ea,tableContents:ma});let Ee=y==null?void 0:y.findIndex(Le=>(Le==null?void 0:Le.key)===j);y[Ee].contents=Pe}else y.push({key:j,contents:[{isShow:g==null?void 0:g.is_show,filter:((ae=(Va=(ya=k==null?void 0:k[1])==null?void 0:ya[0])==null?void 0:Va.引用)==null?void 0:ae.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ea,tableContents:ma}]})}});let C=[];C.push({key:"menuPath",contents:c}),C=[...C,...y],await A.createPlatFormDataApi({platId:parseInt((T=gl==null?void 0:gl.value)==null?void 0:T.plat_id),changeData:C}),xi.value=!1,_r.setRefreshTable(!0)},Co=async(l,n)=>{},Eo=async l=>{Xl.value=await ua.getDeepDiffItems(l),_r.setItemData(Xl.value),_r.setOriginalData(Xl.value)};a.ref();const Gf=a.ref(null),Xf=()=>{var l,n;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(n=(l=Cl.value)==null?void 0:l.split("/"))==null?void 0:n[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},sc=a.ref([]),Zf=a.computed(()=>{var l,n;return(n=(l=pi.value)==null?void 0:l[Cl.value])==null?void 0:n.filter(r=>{var t;return((t=r==null?void 0:r.key)==null?void 0:t.type)==="gridLayout"})});a.watch(()=>[Rf.value],()=>{rn.setSelectTitle([]),rn.setChooseTitle([])},{deep:!0});a.watch(()=>fi.value,async(l,n)=>{var t,s,d,b,h;if(JSON.stringify(l)===JSON.stringify(n))return;let r=(t=fi.value)==null?void 0:t.filter(v=>(v==null?void 0:v.condition)==="child"&&(v==null?void 0:v.value)!==""&&(v==null?void 0:v.parentContent)!==Jr.value);if((r==null?void 0:r.length)>0){Er.setContentLoading(!0);let v=((s=r==null?void 0:r[0])==null?void 0:s.relatedContent)??(Cl==null?void 0:Cl.value),y=v+"/"+((d=r==null?void 0:r[0])==null?void 0:d.value),c=!!((b=r==null?void 0:r[0])!=null&&b.parentContent),C=await Pr(y,c,{originPath:v});C=C==null?void 0:C.map(x=>(x.isShow=!0,x)),console.log(C,"loadingContents");let M=await ua.getDeepDiffItems(C),L=M==null?void 0:M.filter(x=>x==null?void 0:x.choice);No.setSelectTab((h=L==null?void 0:L[0])==null?void 0:h.choiceName),M=M==null?void 0:M.filter(x=>{var Y;return!(x!=null&&x.choiceName)||(x==null?void 0:x.choiceName)===((Y=L==null?void 0:L[0])==null?void 0:Y.choiceName)}),Xl.value=M,Er.setContentLoading(!1)}});const Qf=l=>{setTimeout(async()=>{var b,h,v;let n=(b=fi.value)==null?void 0:b.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Jr.value),r=Cl==null?void 0:Cl.value,t=Cl==null?void 0:Cl.value;(n==null?void 0:n.length)>0&&(t=((h=n==null?void 0:n[0])==null?void 0:h.relatedContent)??(Cl==null?void 0:Cl.value),r=t+"/"+((v=n==null?void 0:n[0])==null?void 0:v.value));let s=await Pr(r,!1,{originPath:t});s=s==null?void 0:s.map(y=>(y.isShow=!0,y)),No.setSelectTab(l);let d=await ua.getDeepDiffItems(s);Xl.value=d==null?void 0:d.filter(y=>!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===l)},10)};a.watch(()=>Vf.value,l=>{l!=null&&l.length||(Xl.value=[])},{immediate:!0});a.watch(()=>[Cl.value],async l=>{var d,b,h,v;if(!Cl.value)return;if(Cl.value==="/"){Xl.value=[];return}Er.setCurrentMenuPath(Cl.value),_r.setLockingPage(""),Xl.value=[];let n=a.getCurrentInstance();(d=n==null?void 0:n.scope)==null||d.stop(),n=null,Ct.value=!1,Er.setContentLoading(!0),lc.value=!0;let r=l==null?void 0:l[0],t=r,s=(b=Vn.value)==null?void 0:b.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Cl.value&&!(y!=null&&y.relatedContent));if((s==null?void 0:s.length)>0&&(r=r+"/"+((h=s==null?void 0:s[0])==null?void 0:h.value)),r==="系统管理/日志管理")Xl.value=await Mf("log");else{let y=await Pr(r,!0,{originPath:t});y=y==null?void 0:y.map(M=>(M.isShow=!0,M));let c=await ua.getDeepDiffItems(y),C=c==null?void 0:c.filter(M=>M==null?void 0:M.choice);No.setSelectTab((v=C==null?void 0:C[0])==null?void 0:v.choiceName),Xl.value=c==null?void 0:c.filter(M=>{var L;return!(M!=null&&M.choiceName)||(M==null?void 0:M.choiceName)===((L=C==null?void 0:C[0])==null?void 0:L.choiceName)})}Er.setContentLoading(!1),_r.setExtraContents([]),rn.setSelectIndex(""),rn.setSelectMenu(""),_r.setItemData(Xl.value),_r.setOriginalData(Xl.value),_r.setRefreshTable(!1),a.nextTick(()=>{$n.value=$n.value++,Ct.value=!0})},{immediate:!0});a.watch(()=>[cs.value],async()=>{var l,n,r,t;if(cs.value){Xl.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,Ct.value=!1,Er.setContentLoading(!0),lc.value=!0;let d=Jr==null?void 0:Jr.value,b=d,h=(n=Vn.value)==null?void 0:n.filter(C=>(C==null?void 0:C.condition)==="child"&&(C==null?void 0:C.value)!==""&&(C==null?void 0:C.parentContent)!==(Jr==null?void 0:Jr.value));(h==null?void 0:h.length)>0&&(d=d+"/"+((r=h==null?void 0:h[0])==null?void 0:r.value));let v=await Pr(d,!0,{originPath:b});v=v==null?void 0:v.map(C=>(C.isShow=!0,C));let y=await ua.getDeepDiffItems(v),c=y==null?void 0:y.filter(C=>C==null?void 0:C.choice);if(No.setSelectTab((t=c==null?void 0:c[0])==null?void 0:t.choiceName),Xl.value=y==null?void 0:y.filter(C=>{var M;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((M=c==null?void 0:c[0])==null?void 0:M.choiceName)}),Er.setContentLoading(!1),_r.setExtraContents([]),rn.setSelectIndex(""),rn.setSelectMenu(""),_r.setItemData(Xl.value),_r.setOriginalData(Xl.value),_r.setRefreshTable(!1),(h==null?void 0:h.length)>0){let C=[...Vn.value,...h];rn.setSelectTitle(C)}a.nextTick(()=>{$n.value=$n.value++,Ct.value=!0})}},{immediate:!0,deep:!0});const e0=async()=>{Er.setLinkMenuInfo(null),Er.setActiveMenuPath(Lf.value),Xl.value=null,_r.setRouteToChildPath(""),Er.setChildMenu("")},a0=l=>new RegExp("button","i").test(l),l0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),cc=l=>{if(l0(l)){const n=l==null?void 0:l.split("^");(n==null?void 0:n.length)>0&&(n!=null&&n[0])&&Er.setLinkMenuInfo({path:n==null?void 0:n[0],data:n==null?void 0:n[1]})}},uc=async(l,n,r)=>{var M,L,x,Y,w,z,ee,S,$,T,k,g;let t="",s="";for(let j in n)(n==null?void 0:n[j])===l&&(s=j);r==null||r.forEach(j=>{(j==null?void 0:j.prop)===s&&(t=j==null?void 0:j.fatherPath)});let d=t===""?Cl.value:t;t!==""&&Er.setCurrentMenuPath(d),Er.setCurrentMenuPath(d+"/"+l),Er.setContentLoading(!0),await Pr(d+"/"+l,!0,{originPath:d+"/",row:n});let b=await Pr(d,!1),h=(M=b==null?void 0:b.filter(j=>(j==null?void 0:j.comp)==="Table"))==null?void 0:M[0],v=((w=(Y=(x=(L=h==null?void 0:h.compData)==null?void 0:L.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:x.contents)==null?void 0:Y[0])==null?void 0:w.prop)??((T=($=(S=(ee=(z=h==null?void 0:h.compData)==null?void 0:z.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:ee.contents)==null?void 0:S[0])==null?void 0:$[0])==null?void 0:T.prop),y=(g=(k=h==null?void 0:h.compData)==null?void 0:k.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:g.contents;y=y==null?void 0:y.map(j=>({label:j==null?void 0:j[v],value:j==null?void 0:j[v]}));let c=Vn.value,C={value:l,condition:"child",options:y,relatedContent:d,isShow:!0};c.push(C),rn.setSelectTitle(c),rn.setChooseTitle([C]),Er.setContentLoading(!1),_r.setExtraContents([]),rn.setSelectIndex(""),rn.setSelectMenu(""),_r.setItemData(Xl.value),_r.setOriginalData(Xl.value)},r0=l=>{oc.value=l},bt=a.reactive({index:0,comp:null}),n0=a.computed(()=>{var l;return(l=Xl.value)==null?void 0:l.map((n,r)=>({id:n.id,name:n.name,status:t0(n,r)}))}),dc=(l,n)=>{var v,y,c,C,M;const r=n?l:l-2,t=(v=Xl.value)==null?void 0:v[r],s=(c=(y=t==null?void 0:t.compData)==null?void 0:y.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:c.contents,d=s==null?void 0:s.findIndex(L=>(L==null?void 0:L.isMainKey)&&(L==null?void 0:L.label)!=="操作"),b=d===-1?0:d,h=(M=(C=t==null?void 0:t.compData)==null?void 0:C.find(L=>(L==null?void 0:L.key)==="tableContents"))==null?void 0:M.contents;return{valid:h==null?void 0:h.every(L=>L==null?void 0:L[b+1]),length:(h==null?void 0:h.length)||0}},t0=(l,n)=>{var t;let r="process";if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){const{valid:s,length:d}=dc(n,!0);bt.index===n?r="process":d===0?r="wait":r=s?"success":"error"}return r},pc=l=>{var r,t,s,d,b;const n=l+1;if(n>1&&((s=(t=(r=Xl.value)==null?void 0:r[l])==null?void 0:t.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:h}=dc(n);h?(bt.index=n,bt.comp=(d=Xl.value)==null?void 0:d[l]):Qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else bt.index=n,bt.comp=(b=Xl.value)==null?void 0:b[l]},fc=a.computed(()=>{var l,n;return(n=(l=tc.value)==null?void 0:l[0])==null?void 0:n.isStepLayout});a.watch(()=>fc.value,l=>{l&&pc(0)},{immediate:!0});const o0={class:"table-content"},i0={class:"menu-config-wrap"},s0=["onClick"],c0={key:0,class:"viewport-wrap"},u0=["onClick"],d0={title:"选择显示列信息"},p0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},f0=["title"],h0={class:"col-operate-wrap"},v0={key:0,class:"col-operate-radio-wrapper"},m0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},y0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},g0={class:"pop-view"},b0={class:"pop-wrapper"},k0={class:"file-list-pop"},x0=["title","onClick"],_0=["onClick"],w0=["onClick"],C0={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},E0={class:"form-content"},S0={key:0,class:"dialog-footer"},D0={class:"dialog-footer"},B0={class:"ocr-dialog-content"},N0={class:"ocr-steps"},T0={key:0,class:"ocr-action-buttons"},A0={key:1,class:"ocr-preview-area"},M0={class:"ocr-file-grid"},z0={class:"file-thumbnail"},O0=["src"],I0={key:1,class:"thumbnail-placeholder"},L0={class:"progress-svg",viewBox:"0 0 36 36"},V0=["stroke","stroke-width","stroke-dasharray"],R0={key:0,class:"progress-icon"},$0={key:1,class:"progress-icon"},P0=["onClick"],F0={class:"file-name"},j0={key:0,class:"ocr-recognize-button"},H0={key:2,class:"ocr-progress-section"},U0={key:3,class:"ocr-confirm-area"},q0={class:"ocr-preview-tip"},K0={class:"ocr-preview-table"},W0={style:{display:"flex","align-items":"center",gap:"8px"}},Y0={key:0},J0={key:4,class:"ocr-success-area"},G0={key:0,class:"ocr-dialog-footer"},X0={class:"form-content"},Z0={style:{display:"flex","justify-content":"space-between",gap:"8px"}},Q0={style:{display:"flex"}},ds="ss-ocr-upload-history",e3="ss-ocr-cert-history-v1",a3={__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},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(l,{emit:n}){var zi;const r=a.ref([]),t=bi(A.pinia),s=a.ref(null),d=a.ref(new Set),b=a.ref(new Map),h=a.ref(new Map),v=new Map,y=a.ref(new Map),c=l,C=a.ref((c==null?void 0:c.allowSelect)??!0),M=a.ref(((zi=c==null?void 0:c.config)==null?void 0:zi.showIndex)??!0),L=a.ref(),x=a.ref(!0),Y=a.ref(!1),w=a.ref([]),z={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},ee=a.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"}]}]),S=ua.useOriginalState(A.pinia);let $="$R";const{originalPath:T}=A.storeToRefs(S),k=T.value,g=a.computed(()=>{var f;const u=(f=ua.getAllLeafNodes(xe.value)||[])==null?void 0:f.filter(N=>(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate");return u.length>0?u.every(N=>!!(N!=null&&N.sortable)):!1});a.computed(()=>{var f;return(f=xe.value)==null?void 0:f.every(N=>N==null?void 0:N.filterable)}),a.computed(()=>{var f;return(f=xe.value)==null?void 0:f.every(N=>N==null?void 0:N.operable)});const j=a.ref(!0),q=a.ref([]),J=a.reactive({column:{},status:!1,text:"合计"}),me=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),ze=n,xe=a.ref([]),te=a.ref([]),be=a.ref([]),Q=a.reactive({prop:"",order:null}),de=a.ref([]),Ke=a.ref(!1),wa=a.ref(!1),oe=a.ref(null),{isUseBackdrop:D,initTrackFileType:ne,getFileExtension:ge,setData:se,getFileInfo:we,getFilesInfo:la}=bo.useThreeSystem(),ya=a.ref([]),Va=a.ref(!1),ae=a.ref(),ea=A.useMenuState(),{importLoading:Re,activeMenuPath:ma,contentLoading:Pe,linkMenuInfo:Ee}=A.storeToRefs(ea),Le=ua.useTableComp(A.pinia),We=A.useModelComp(A.pinia),Ua=at(A.pinia),{extraContents:Oa,cacheUpdatingData:P,tableViewContents:F,tableLoading:X,pageMapState:R,lockingPage:W}=A.storeToRefs(We),{selectTab:Ie}=A.storeToRefs(Ua),{compType:Ne,hasEditable:Ce}=Fs.useRole(),K=a.ref([]),He=a.ref([]),Ve=a.ref(new Map);a.ref(!1);const ra=a.ref("");a.ref();const va=a.ref(!0),$e=a.ref(0),ba=a.ref(!0),Te=a.ref(""),fa=a.ref(!1),Ue=a.ref(null);a.ref([]);const ga=a.ref({label:"查看三维模型"}),fe=a.ref(!1),ka=a.ref(),Fe=a.ref([]),$a=a.ref([]),Na=a.ref(!1),Ye=a.ref([]),Oe=a.ref([]),ue=a.ref([]),ie=a.ref([]),na=a.ref([]),qa=()=>{try{const u=localStorage.getItem(ds),f=u?JSON.parse(u):[];na.value=Array.isArray(f)?f:[]}catch{na.value=[]}},rl=()=>{try{localStorage.setItem(ds,JSON.stringify(na.value||[]))}catch{}},Ml=u=>{var re,le,H;if(!u)return;const f=u.url||((re=u==null?void 0:u.uploadResult)==null?void 0:re.url)||"",N=u.name||((le=u==null?void 0:u.uploadResult)==null?void 0:le.name)||((H=u==null?void 0:u.uploadResult)==null?void 0:H.fileName)||"";if(!f&&!N)return;const O={name:N,url:f,ts:Date.now()},V=String(O.name||"").trim().toLowerCase(),B=(na.value||[]).findIndex(ve=>String((ve==null?void 0:ve.name)||"").trim().toLowerCase()===V);B>-1&&na.value.splice(B,1),na.value.unshift(O),na.value.length>20&&(na.value=na.value.slice(0,20)),rl()};qa();const Fa=(u,f)=>`${e3}:${String(u??"")}:${String(f??"")}`,nl=(u,f)=>{try{const N=sessionStorage.getItem(Fa(u,f)),O=N?JSON.parse(N):[];return Array.isArray(O)?O:[]}catch{return[]}},Ca=(u,f,N)=>{try{sessionStorage.setItem(Fa(u,f),JSON.stringify(Array.isArray(N)?N:[]))}catch{}},aa=(u,f,N)=>{if(!f)return;const O=nl(u,f),V=[N,...O||[]].filter(Boolean).slice(0,1);return Ca(u,f,V),V},Se=(u,f,N)=>{if(!f||!N)return;const O=Fa(u,f),V=Fa(u,N);try{const B=sessionStorage.getItem(O);if(!B)return;const re=(()=>{try{const ve=JSON.parse(B);return Array.isArray(ve)?ve:[]}catch{return[]}})(),le=nl(u,N),H=[...re,...le||[]].filter(Boolean).sort((ve,_e)=>Number((_e==null?void 0:_e.ts)||0)-Number((ve==null?void 0:ve.ts)||0)).slice(0,1);sessionStorage.setItem(V,JSON.stringify(H)),sessionStorage.removeItem(O)}catch{}},Xa=a.ref(!1),Ya=a.ref(!1),tl=a.ref([]),Da=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const sa=a.ref(!1),Z=a.ref([]),Ea=a.ref(1),Pa=a.ref(new Map),ul=a.ref(new Map),ol=a.ref(0),xa=a.ref(!1),pa=a.ref([]),Aa=a.ref([]),Ze=u=>{var f;try{const N=(f=ua.getAllLeafNodes(xe.value)||[])==null?void 0:f.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate");return(N==null?void 0:N.find(O=>(O==null?void 0:O.prop)===u||(O==null?void 0:O.label)===u))||null}catch{return null}},ha=u=>{const f=Ze(u),N=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"Input";return pl.getComponent(N)||pl.getComponent("Input")},La=a.ref([]),Ja=a.ref(null),Ol=a.ref([]),El=a.ref(null),Sl=a.ref(""),wl=a.ref(!1),fl=a.ref([]),cl=a.ref(""),kl=a.ref(!1),Dl=a.ref([]),$l=a.ref([]),or=a.ref([]),Cr=a.ref(null),Gr=a.ref([]),Xr=a.ref("");a.computed(()=>{var u;try{const f=(u=ua.getAllLeafNodes(xe.value)||[])==null?void 0:u.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("编号")||""}catch{return""}});const Rr=a.computed(()=>{var u;try{const f=(u=ua.getAllLeafNodes(xe.value)||[])==null?void 0:u.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("名称")||""}catch{return""}}),nn=a.computed(()=>{var u;try{const f=(u=ua.getAllLeafNodes(xe.value)||[])==null?void 0:u.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("制造厂")||""}catch{return""}}),qr=()=>{kl.value=!1,Dl.value=[],$l.value=[],or.value=[],Cr.value=null,Gr.value=[],Xr.value=""},rr=u=>u==null?!1:typeof u=="string"?u.trim()!=="":Array.isArray(u)?u.length>0:!0,Nr=(u,f)=>{const N=(u==null?void 0:u.ocrRow)||{};for(const V of Object.keys(N))V==="id"||V==="_isOCRRow"||V==="_ocrTableId"||rr(N[V])&&(f[V]=N[V]);const O=He.value.find(V=>V.id===f.id);if(O)for(const V of Object.keys(N))V==="id"||V==="_isOCRRow"||V==="_ocrTableId"||rr(N[V])&&(O[V]=N[V]);Ve.value&&Ve.value.set(f.id,f),aa(c==null?void 0:c.index,f.id,u==null?void 0:u.versionItem),$l.value=[...$l.value||[],JSON.parse(JSON.stringify(f))]},Fr=async(u,f=null)=>{var N,O,V,B,re,le,H;try{const ve=(N=ua.getAllLeafNodes(xe.value)||[])==null?void 0:N.filter(ca=>(ca==null?void 0:ca.type)!=="operate"&&(ca==null?void 0:ca.label)!=="操作"&&(ca==null?void 0:ca.prop)!=="operate"),_e=new Map;ve==null||ve.forEach(ca=>{ca!=null&&ca.label&&(ca!=null&&ca.prop)&&_e.set(ca.label,ca.prop)});const De=_e.get("系统编号")||_e.get("编号");if(!De){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Be=f||Cr.value;if((Array.isArray(Be==null?void 0:Be.result)?Be.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ca=0;ca<u.length;ca++){const Ha=u[ca],Sa=Ha[De];if(!Sa){console.warn(`第 ${ca+1} 条匹配行缺少系统编号,跳过`);continue}const Xe=`设备管理/试验设备/${Sa}`,Ra=await A.getPageDataApi({platId:parseInt((O=Fl.value)==null?void 0:O.plat_id),pageName:Xe});if(!((V=Ra==null?void 0:Ra.data)!=null&&V.result)||!Array.isArray(Ra.data.result)){console.warn(`未找到详情页数据: ${Xe}`);continue}const Ge=Ra.data.result.find(Qe=>(Qe==null?void 0:Qe.property_name)==="校检记录");if(!Ge){console.warn(`详情页 ${Xe} 中未找到校检记录表`);continue}const Ia=(B=Ge.contents)==null?void 0:B.find(Qe=>(Qe==null?void 0:Qe.key)&&Qe.key.startsWith("content_"));if(!Ia||!Ia.key){console.warn("校检记录表中未找到 content item");continue}const za=Ia.key,ke=Array.isArray(Ia.value)?Ia.value:[];if(ke.length>=5){const ta=[...ke].sort((da,Ma)=>{const dl=Number((da==null?void 0:da.create_time)||0),Ga=Number((Ma==null?void 0:Ma.create_time)||0);return dl-Ga})[0];ta!=null&&ta.id&&await A.pageBatchDeleteApi({platId:parseInt((re=Fl.value)==null?void 0:re.plat_id),changeContents:[{tableName:za,tableContents:[{id:ta.id}]}]})}const _a=(le=ve==null?void 0:ve.find(Qe=>(Qe==null?void 0:Qe.label)==="证书附件"))==null?void 0:le.prop,oa=String(Date.now()),ce={id:oa},E=ke[0]||{},Me=new Date().toISOString().split("T")[0];if(Object.keys(E||{}).forEach(Qe=>{if(Qe!=="id"){if(Qe==="证书附件"){ce[Qe]="";return}if(Qe==="校检日期"||Qe==="检校日期"){ce[Qe]=Ha[Qe]||Ha.校检日期||Ha.检校日期||Me;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(Qe)){ce[Qe]=Ha[Qe]??"";return}ce[Qe]=Ha[Qe]??""}}),_a&&Ha[_a]){const Qe=Ha[_a];if(Array.isArray(Qe)&&Qe.length>0)ce.证书附件=JSON.stringify(Qe.map(ta=>({url:(ta==null?void 0:ta.url)||"",name:(ta==null?void 0:ta.name)||(ta==null?void 0:ta.fileName)||"",fileName:(ta==null?void 0:ta.fileName)||(ta==null?void 0:ta.name)||""})).filter(ta=>ta.url||ta.name));else if(typeof Qe=="string")try{const ta=JSON.parse(Qe);ce.证书附件=Qe}catch{ce.证书附件=JSON.stringify([{url:Qe,name:Qe,fileName:Qe}])}}console.log(za,"tableName","inspectionRecordRow",ce),await A.pageBatchAddApi({platId:parseInt((H=Fl.value)==null?void 0:H.plat_id),changeContents:[{tableName:za,tableContents:[ce]}]});const ye=Ge==null?void 0:Ge.object_id;if(ye&&oa){const Qe=_a&&Ha[_a]?Ha[_a]:null;let ta=[],da="",Ma=!1;if(Array.isArray(Qe)&&Qe.length>0){ta=Qe.map(yl=>({name:(yl==null?void 0:yl.name)||(yl==null?void 0:yl.fileName)||"",url:(yl==null?void 0:yl.url)||""})).filter(yl=>yl.url||yl.name);const Ga=Qe[0];da=(Ga==null?void 0:Ga.url)||"";const ml=(Ga==null?void 0:Ga.name)||(Ga==null?void 0:Ga.fileName)||"";Ma=String(ml).toLowerCase().endsWith(".pdf")||String(da).toLowerCase().endsWith(".pdf")}else if(typeof Qe=="string")try{const Ga=JSON.parse(Qe);Array.isArray(Ga)?(ta=Ga.map(ml=>({name:(ml==null?void 0:ml.name)||(ml==null?void 0:ml.fileName)||"",url:(ml==null?void 0:ml.url)||""})).filter(ml=>ml.url||ml.name),ta.length>0&&(da=ta[0].url||"",Ma=String(ta[0].name).toLowerCase().endsWith(".pdf")||String(da).toLowerCase().endsWith(".pdf"))):(da=Qe,Ma=String(Qe).toLowerCase().endsWith(".pdf"))}catch{da=Qe,Ma=String(Qe).toLowerCase().endsWith(".pdf")}const dl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ca),label:new Date().toLocaleString(),certType:Ha.证书类型||"",certNo:Ha.证书编号||"",fileType:Ma?"pdf":"image",sourceUrl:Ma?da:"",images:ta};aa(ye,oa,dl)}}}catch(ve){console.error("向校检记录表插入OCR识别结果失败:",ve),Qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},_n=u=>{const f=Array.isArray(u)?u:Dl.value||[];if(f.length===0){qr();return}if(f.find(B=>(B==null?void 0:B.__decision)==="replace"&&!(B!=null&&B.selectedTargetId))){Qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}f.forEach(B=>{var le;const re=B==null?void 0:B.__decision;if(!(!re||re==="skip")){if(re==="add"){aa(c==null?void 0:c.index,(le=B==null?void 0:B.ocrRow)==null?void 0:le.id,B==null?void 0:B.versionItem),or.value=[...or.value||[],B.ocrRow];return}if(re==="replace"){const H=B==null?void 0:B.selectedTargetId,ve=(K.value||[]).find(_e=>String(_e==null?void 0:_e.id)===String(H));if(!ve)return;Nr(B,ve)}}}),($l.value||[]).length>0&&(K.value=[...K.value||[]]),(or.value||[]).length>0&&(K.value=[...K.value||[],...or.value||[]],He.value=[...He.value||[],...or.value||[]],(or.value||[]).forEach(B=>{var re,le;return(le=(re=Ve.value)==null?void 0:re.set)==null?void 0:le.call(re,B.id,B)})),tn.value=K.value;const O=$l.value||[],V=or.value||[];if(O.length>0&&(ze("change",{buttonName:"编辑",singleContent:O,content:K.value,relatedContents:c==null?void 0:c.related,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,columns:xe.value,name:c==null?void 0:c.compName}),Fr(O)),V.length>0){const B=Cr.value;ze("change",{buttonName:"OCR批量新增",content:K.value,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,column:xe.value,ocrRows:V,relatedContents:c==null?void 0:c.related,uploadedFiles:(Array.isArray(B==null?void 0:B.result)?B.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:B,matchedCount:(O||[]).length,newCount:(V||[]).length})}Qa.ElMessage.success("已提交候选处理结果"),qr()},Ar=ac(),hn=a.computed(()=>Ar.getConfig()),$r=a.ref(),ir=a.ref(),Pn=Gs(A.pinia),tn=a.ref(),vn=a.ref(0),rt=A.useUnit(A.pinia),{selectIndex:Fn,selectMenu:An,selectTitle:mn}=A.storeToRefs(rt),{selectString:Zl}=A.storeToRefs(Pn),xr=A.useLoginState(A.pinia),{loginUserInfo:Fl}=A.storeToRefs(xr),ql=a.ref(720),Ll=a.ref(!1),dr=a.ref(!1),ar=a.ref([]),Hl=a.ref(),Tr=a.ref(!0),Mr=a.ref(!0),yn=a.ref([]),wn=a.inject("contentRef");a.provide("contentRef",wn),a.provide("getSuggestListForCell",su),a.provide("getSuggestLoadingForCell",(u,f)=>{const N=`${u==null?void 0:u.id}:${(f==null?void 0:f.prop)||(f==null?void 0:f.property)}`;return y.value.get(N)||!1}),a.watch(()=>{var u;return(u=K.value)==null?void 0:u.length},u=>{me.total=u}),a.watch(()=>F.value,async()=>{var f,N,O,V,B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe;if(((f=F.value)==null?void 0:f.length)===0||!((N=c==null?void 0:c.itemData)!=null&&N.find(Ra=>(Ra==null?void 0:Ra.key)==="columnPath"))||!((O=c==null?void 0:c.itemData)!=null&&O.find(Ra=>(Ra==null?void 0:Ra.key)==="pageColumn")))return;let u=(ve=(H=(le=(re=(B=(V=c==null?void 0:c.itemData)==null?void 0:V.find(Ra=>(Ra==null?void 0:Ra.key)==="pageColumn"))==null?void 0:B.contents)==null?void 0:re.split("["))==null?void 0:le[1])==null?void 0:H.split("]"))==null?void 0:ve[0];((je=(Be=(De=(_e=c==null?void 0:c.itemData)==null?void 0:_e.find(Ra=>(Ra==null?void 0:Ra.key)==="pageColumn"))==null?void 0:De.contents)==null?void 0:Be.split("["))==null?void 0:je[0])+((Ha=(ca=F.value)==null?void 0:ca.find(Ra=>(Ra==null?void 0:Ra.key)===u))==null?void 0:Ha.value),(Xe=(Sa=c==null?void 0:c.itemData)==null?void 0:Sa.find(Ra=>(Ra==null?void 0:Ra.key)==="pageGroup"))==null||Xe.contents,Mi(compData,c.allMapContents)},{deep:!0});const dn=u=>{var N,O,V,B,re;const f=(O=(N=xe.value)==null?void 0:N.filter(le=>le==null?void 0:le.mainKey))==null?void 0:O.map(le=>le==null?void 0:le.prop);if(f.length===0){const le=(V=xe.value)==null?void 0:V.map(H=>H==null?void 0:H.prop);return(B=le==null?void 0:le.map(H=>u==null?void 0:u[H]))==null?void 0:B.join("|")}return(re=f==null?void 0:f.map(le=>u==null?void 0:u[le]))==null?void 0:re.join("|")},jn=u=>{var le,H,ve,_e,De;const f=(H=(le=xe.value)==null?void 0:le.filter(Be=>Be==null?void 0:Be.required))==null?void 0:H.map(Be=>Be==null?void 0:Be.prop),N=[];if(u==null||u.forEach(Be=>{f==null||f.forEach(je=>{const ca=Be[je];(ca==null||ca==="")&&(N.includes(je)||N.push(je))})}),N.length>0)return Qa.ElMessage.warning(`请填写必填项:${N.join("、")}`);const O=new Map,V=new Map;(ve=K.value)==null||ve.forEach(Be=>{const je=dn(Be);O.set(je,Be)}),u==null||u.forEach(Be=>{const je=dn(Be);V.set(je,Be)});const B=u==null?void 0:u.filter(Be=>O.has(dn(Be))),re=(_e=K.value)==null?void 0:_e.filter(Be=>V.has(dn(Be)));return(B==null?void 0:B.length)>0&&(o.columns=(De=xe.value)==null?void 0:De.filter(Be=>(Be==null?void 0:Be.label)!=="操作"),o.existRows=re,o.tableData=B,o.show=!0),u==null?void 0:u.filter(Be=>{const je=dn(Be);return!O.has(je)})},Mn=a.ref(""),pn=a.ref(null),Cn=async()=>{var u,f,N,O,V,B;try{const re=await A.quoteApi({related:[{menus:ma.value,groups:c==null?void 0:c.compName}],platId:parseInt((u=Fl.value)==null?void 0:u.plat_id)});if(((f=re==null?void 0:re.data)==null?void 0:f.code)===200){pn.value=(N=re==null?void 0:re.data)==null?void 0:N.result;const le=(O=xe.value)==null?void 0:O.map(_e=>(_e==null?void 0:_e.prop)||(_e==null?void 0:_e.label)),H=zn(le,(V=re==null?void 0:re.data)==null?void 0:V.result),ve=H==null?void 0:H.flatMap(_e=>_e==null?void 0:_e.quote);(ve==null?void 0:ve.length)>0&&(Mn.value=(B=ve==null?void 0:ve.map(_e=>_e==null?void 0:_e.menus))==null?void 0:B.join("、"))}}catch(re){throw new Error(re)}};function zn(u,f){var N;return(N=f.filter(O=>O.struct&&Array.isArray(O.struct)?O.struct.some(V=>V.words&&Array.isArray(V.words)?V.words.some(B=>u.includes(B)):!1):!1))==null?void 0:N.map(O=>{const V={...O};return V.struct&&Array.isArray(V.struct)&&(V.struct=V.struct.filter(B=>B.words&&Array.isArray(B.words)?B.words.some(re=>u.includes(re)):!1)),V})}const Kr=async(u,f)=>{var N,O,V,B,re,le,H,ve,_e,De;try{pn.value||await Cn();const Be=f==null?void 0:f.map(Ra=>{const Ge=Object.keys(Ra),Ia={};return Ge.forEach((za,ke)=>{Ia[u[ke]]=Ra[za]}),Ia}),je=jn(Be);if(!je||(je==null?void 0:je.length)===0)return;let ca=await A.quoteApi({platId:parseInt((N=Fl==null?void 0:Fl.value)==null?void 0:N.plat_id),type:"fatherSyncs",related:[{menus:ma.value,groups:""},{menus:ma.value,groups:c==null?void 0:c.compName}]});ca=(O=ca==null?void 0:ca.data)==null?void 0:O.result;let Ha=ca==null?void 0:ca.map(Ra=>({tableName:"content_"+(Ra==null?void 0:Ra.id),tableContents:je==null?void 0:je.map((Ge,Ia)=>({id:Ia,...Ge}))})),Sa=[{tableName:(V=c==null?void 0:c.related)==null?void 0:V.find(Ra=>Ra==null?void 0:Ra.includes("content")),tableContents:je==null?void 0:je.map((Ra,Ge)=>({id:Ge,...Ra}))}];Sa=[...Sa,...Ha];const Xe=await A.pageBatchAddApi({platId:parseInt((B=Fl.value)==null?void 0:B.plat_id),changeContents:Sa});if(((re=Xe==null?void 0:Xe.data)==null?void 0:re.code)===200){const Ra={buttonName:"新增",columns:xe.value,fixContent:je==null?void 0:je.map((Ia,za)=>({id:za,...Ia})),relatedContents:c==null?void 0:c.related};await vi(Ra),((le=o==null?void 0:o.existRows)==null?void 0:le.length)>0?Qa.ElMessage.success("部分数据导入成功"):Qa.ElMessage.success("数据导入成功");let Ge=[];Sa==null||Sa.forEach(Ia=>{var za;(za=Ia==null?void 0:Ia.tableContents)==null||za.forEach(ke=>{Ge.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ke),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((H=Fl==null?void 0:Fl.value)==null?void 0:H.plat_id),changeContents:[{tableName:"log",tableContents:Ge}]})}else{let Ra=[];Sa==null||Sa.forEach(Ge=>{var Ia;(Ia=Ge==null?void 0:Ge.tableContents)==null||Ia.forEach(za=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(za),request_result:"{}",is_delete:!1,request_table:Ge==null?void 0:Ge.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((ve=Fl==null?void 0:Fl.value)==null?void 0:ve.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]}),Qa.ElMessage.error("数据导入响应失败")}}catch(Be){throw Qa.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((_e=Fl==null?void 0:Fl.value)==null?void 0:_e.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(Be),is_delete:!1,request_table:(De=c==null?void 0:c.related)==null?void 0:De.find(je=>je==null?void 0:je.includes("content")),request_type:"error"}]}]}),new Error(Be)}},En=async u=>{var B,re,le,H,ve,_e,De;let f=be.value;f!=null&&f.find(Be=>(u==null?void 0:u.key)===(Be==null?void 0:Be.key))&&(f=f==null?void 0:f.filter(Be=>(u==null?void 0:u.key)!==(Be==null?void 0:Be.key))),f.push({key:u==null?void 0:u.key,value:[(re=u==null?void 0:u.value)==null?void 0:re[((B=u==null?void 0:u.value)==null?void 0:B.length)-1]]});let N=ie.value;N=N==null?void 0:N.map(Be=>{var je,ca;return(Be==null?void 0:Be.type)==="Select"&&(u==null?void 0:u.key)===(Be==null?void 0:Be.prop)&&Array.isArray(Be.value)&&(je=Be.value)!=null&&je.every(Ha=>typeof Ha=="string")&&(Be.selectValue=(ca=f==null?void 0:f.find(Ha=>(Ha==null?void 0:Ha.key)===(Be==null?void 0:Be.prop)))==null?void 0:ca.value),Be});let O=(H=(le=N==null?void 0:N.find(Be=>(Be==null?void 0:Be.prop)===(u==null?void 0:u.key)))==null?void 0:le.optionUrl)==null?void 0:H.menuId,V=N==null?void 0:N.find(Be=>(Be==null?void 0:Be.prop)===(u==null?void 0:u.key));if(O){let Be=await di(V==null?void 0:V.optionUrl,O),je,ca=q.value,Ha=(De=(_e=(ve=ie.value)==null?void 0:ve.find(Sa=>{var Xe;return(Xe=V==null?void 0:V.optionUrl)==null?void 0:Xe.menuId}))==null?void 0:_e.selectValue)==null?void 0:De[0];if(Be==null||Be.forEach(Sa=>{var Xe,Ra,Ge,Ia,za,ke,_a,oa,ce,E;if(O){let Me=(Ra=(Xe=ie.value)==null?void 0:Xe.find(Qe=>{var ta,da;return((ta=V==null?void 0:V.optionUrl)==null?void 0:ta.menuId)===((da=Qe==null?void 0:Qe.optionUrl)==null?void 0:da.menuId)}))==null?void 0:Ra.prop,ye=(Ia=(Ge=N==null?void 0:N.find(Qe=>(Qe==null?void 0:Qe.prop)===Me))==null?void 0:Ge.selectValue)==null?void 0:Ia[0];Me!=null&&Me.includes("·")&&(Me=(za=Me==null?void 0:Me.split("·"))==null?void 0:za[0],ye=(ce=(oa=(_a=u==null?void 0:u.value)==null?void 0:_a[((ke=u==null?void 0:u.value)==null?void 0:ke.length)-1])==null?void 0:oa.split(" "))==null?void 0:ce[0]),ca!=null&&ca.find(Qe=>(Qe==null?void 0:Qe.value)===Ha)?je=(E=ca==null?void 0:ca.find(Qe=>(Qe==null?void 0:Qe.value)===Ha))==null?void 0:E.objectValue:Sa[Me]===ye&&(je=Sa)}}),je){let Sa=N;Sa=Sa==null?void 0:Sa.map(Xe=>{var Ra,Ge,Ia,za,ke,_a;return O&&(je!=null&&je[Xe==null?void 0:Xe.prop])&&Te.value==="新增"&&(Xe==null?void 0:Xe.prop)!==(V==null?void 0:V.prop)?Xe.value=(je==null?void 0:je[Xe==null?void 0:Xe.prop])||(je==null?void 0:je[(za=(Ia=(Ge=(Ra=Xe==null?void 0:Xe.optionUrl)==null?void 0:Ra.groupSelect)==null?void 0:Ge[1])==null?void 0:Ia.replaceAll("[",""))==null?void 0:za.replaceAll("]","")]):Xe.value=(_a=(ke=ie.value)==null?void 0:ke.find(oa=>(oa==null?void 0:oa.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:_a.value,Xe}),ie.value=Sa}}be.value=f},Hn=async u=>{var f,N,O,V,B;if((f=u==null?void 0:u.toString())!=null&&f.includes(".txt")||(N=u==null?void 0:u.toString())!=null&&N.includes(".cpt")||(O=u==null?void 0:u.toString())!=null&&O.includes(".cyd")){const re=await Qa.axios.get(u,{responseType:"blob",headers:{"Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});let H=URL.createObjectURL(le);ae.value=[{name:(B=u==null?void 0:u.split("/"))==null?void 0:B[((V=u==null?void 0:u.split("/"))==null?void 0:V.length)-1],blobUrl:H}],Va.value=!0}};a.onBeforeUnmount(()=>{Mr.value=!1;let u=vn.value;vn.value=u+1});const Sr=a.reactive({prop:"",order:null}),Un=a.computed(()=>{const u=(K.value??[]).slice(),f=Sr.prop||Q.prop,N=Sr.order||Q.order;if(!f||!N)return u;const O=N==="ascending",V=re=>{if(f)return re&&Object.prototype.hasOwnProperty.call(re,f)?re[f]:f.includes(".")?f.split(".").reduce((le,H)=>le==null?le:le[H],re):re==null?void 0:re[f]},B=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 H=le.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(H))return{ok:!1,value:NaN};const ve=Number(H);return{ok:Number.isFinite(ve),value:ve}};return u.sort((re,le)=>{const H=V(re),ve=V(le);if(H==null&&ve==null)return 0;if(H==null)return O?-1:1;if(ve==null)return O?1:-1;const _e=B(H),De=B(ve);if(_e.ok&&De.ok)return O?_e.value-De.value:De.value-_e.value;const Be=za=>{if(za==null)return{ok:!1,value:NaN};const ke=String(za).trim();if(ke==="")return{ok:!1,value:NaN};const _a=ke.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!_a)return{ok:!1,value:NaN};const oa=_a[1]?-1:1,ce=Number(_a[2]),E=Number(_a[3]),Me=Number(_a[4]);return[ce,E,Me].some(ye=>Number.isNaN(ye))?{ok:!1,value:NaN}:E>=60||Me>=60?{ok:!1,value:NaN}:{ok:!0,value:oa*(ce*3600+E*60+Me)}},je=Be(H),ca=Be(ve);if(je.ok&&ca.ok)return O?je.value-ca.value:ca.value-je.value;const Ha=new Date(H).getTime(),Sa=new Date(ve).getTime(),Xe=!Number.isNaN(Ha),Ra=!Number.isNaN(Sa);if(Xe&&Ra)return O?Ha-Sa:Sa-Ha;const Ge=String(H),Ia=String(ve);return O?Ge.localeCompare(Ia):Ia.localeCompare(Ge)})}),on=a.computed(()=>{var N;const u=(me.currentPage-1)*me.pageSize,f=u+me.pageSize;return ze("getSliceContLength",me),(N=Un.value)==null?void 0:N.slice(u,f)}),St=u=>{me.currentPage=u,ze("getSliceContLength",me)},To=u=>{var O;me.pageSize=u;const f=((O=K.value)==null?void 0:O.length)??0,N=u>0?Math.ceil(f/u):1;me.currentPage>N&&(me.currentPage=N||1,Qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),ze("getSliceContLength",me)},Ao=({prop:u,order:f})=>{Sr.prop=u,Sr.order=f,me.currentPage=1};function gn(u){const f=[];function N(O,V=""){O.forEach(B=>{B.children&&B.children.length>0?N(B.children,B.prop):f.push(B.prop)})}return N(u),f}const Mo=(u,f)=>{var le,H,ve,_e;let N=(H=(le=xe.value)==null?void 0:le.map(De=>De==null?void 0:De.prop))==null?void 0:H.filter(De=>De!=="operate");((ve=xe.value)==null?void 0:ve.some(De=>{var Be;return((Be=De==null?void 0:De.children)==null?void 0:Be.length)>0}))&&(N=gn((_e=xe.value)==null?void 0:_e.filter(De=>(De==null?void 0:De.prop)!=="operate")));let V;if(V=(u==null?void 0:u.length)===(N==null?void 0:N.length)?u:u.slice(0,N==null?void 0:N.length),!(V==null?void 0:V.every(De=>N==null?void 0:N.find(Be=>De===Be))))return Qa.ElMessage.error("导入的数据表头不匹配");Kr(V,f)},zo=(u,f)=>{var V;const N=u==null?void 0:u.filter(B=>B!=="序号"),O=f==null?void 0:f.map(B=>{const re=Object.entries(B);return re.shift(),Object.fromEntries(re)});We.setRefreshCurStructure(!1),((V=xe.value)==null?void 0:V.length)===0||Mo(N,O)},Oo=(u,f,N,O)=>{const V=[],B=[],re=ve=>Object.keys(ve).length;for(const ve in u)if(u[ve]!==void 0){const _e=u[ve],De=[];for(const[Be,je]of Object.entries(_e))De.push(je),B.length<re(_e)&&B.push(Be);V.push(De)}V.unshift(B);const le=Ta.utils.aoa_to_sheet(V),H=Ta.utils.book_new();Ta.utils.book_append_sheet(H,le,O),Ta.writeFileSync(H,`${f}.xlsx`),ar.value=[]},Dt=async(u,f,N,O=!1,V)=>{var B,re,le,H,ve,_e,De,Be;try{We.setRefreshCurStructure(!1);const je=await br.getInsofDataApi({id:c==null?void 0:c.index});if(((B=je==null?void 0:je.data)==null?void 0:B.code)===200){let ca=(ve=(H=(le=(re=je==null?void 0:je.data)==null?void 0:re.result)==null?void 0:le[0])==null?void 0:H.value)==null?void 0:ve.pageData;O?ca={...ca,compData:(De=ca==null?void 0:ca.compData)==null?void 0:De.map(Sa=>{var Xe;return(Sa==null?void 0:Sa.key)==="header"?{...Sa,contents:(Xe=Sa==null?void 0:Sa.contents)==null?void 0:Xe.map(Ra=>({...Ra,[u]:N}))}:Sa})}:ca={...ca,compData:(_e=ca==null?void 0:ca.compData)==null?void 0:_e.map(Sa=>{var Xe,Ra;return(Sa==null?void 0:Sa.key)==="header"?{...Sa,contents:(Xe=Sa==null?void 0:Sa.contents)==null?void 0:Xe.map(Ge=>{if(Array.isArray(Ge))Ge=Ge==null?void 0:Ge.map(Ia=>(Ia==null?void 0:Ia.prop)===(f==null?void 0:f.prop)?{...Ia,[u]:N}:Ia);else if((Ge==null?void 0:Ge.prop)===(f==null?void 0:f.prop))return{...Ge,[u]:N};return Ge})}:(Sa==null?void 0:Sa.key)==="tableToForm"&&V?{...Sa,contents:(Ra=Sa==null?void 0:Sa.contents)==null?void 0:Ra.map(Ge=>(Ge==null?void 0:Ge.prop)===(f==null?void 0:f.prop)?{...Ge,[V]:N}:Ge)}:Sa})};const Ha=await br.updateInsofDataApi({id:c==null?void 0:c.index,value:{pageData:ca}});((Be=Ha==null?void 0:Ha.data)==null?void 0:Be.code)===200?(Qa.ElMessage.success("编辑成功"),We.setRefreshCurStructure(!0)):Qa.ElMessage.error("编辑响应失败")}}catch(je){Qa.ElMessage.error(je)}},Ht=async(u,f)=>{await Dt("label",f,u)},zr=async(u,f)=>{await Dt("columnType",f,u,!1,"type")},Io=async({newRow:u,targetIndex:f})=>{var V;if(!Ce(c.config,{type:Ne.TABLE}))return;const O=(me.currentPage-1)*me.pageSize+(f??0);u._isTemp=!0;try{(u.sort===void 0||u.sort===null||String(u.sort).trim()==="")&&(u.sort=tt(O,K.value||[]))}catch{}K.value.splice(O,0,u),await a.nextTick(),b.value.has(u.id)||b.value.set(u.id,A.cloneDeep(u)),K.value=(V=K.value)==null?void 0:V.map(B=>({...B,tableEditType:(B==null?void 0:B.id)===u.id?"edit":(B==null?void 0:B.tableEditType)??"text"})),d.value.add(u.id),Ll.value=!0},Lo=(u,f,N,O=[])=>(!Array.isArray(f)||f.length===0||f.forEach(V=>{const B=V==null?void 0:V.prop;if(!B)return;let re=u==null?void 0:u[B];if(re==null||String(re).trim()==="")return;re=String(re);const le=new Set([...(Array.isArray(N)?N:[]).filter(_e=>(_e==null?void 0:_e.id)!==(u==null?void 0:u.id)).map(_e=>_e==null?void 0:_e[B]).filter(_e=>_e!=null).map(_e=>String(_e)),...(Array.isArray(O)?O:[]).map(_e=>_e==null?void 0:_e[B]).filter(_e=>_e!=null).map(_e=>String(_e))]);if(!le.has(re))return;let H=1,ve="";for(;ve=`${re}(${H})`,!!le.has(ve);)H++;u[B]=ve}),u),Bt=async()=>{var V,B,re,le,H,ve,_e,De;const u=Array.from(d.value||[]);if(u.length===0)return;const f=(B=ua.getColumnChild((V=A.cloneDeep(xe.value))==null?void 0:V.filter(Be=>(Be==null?void 0:Be.label)!=="操作")))==null?void 0:B.filter(Be=>(Be==null?void 0:Be.required)===!0);if((f==null?void 0:f.length)>0)for(let Be=0;Be<u.length;Be++){const je=u[Be],ca=(re=K.value)==null?void 0:re.find(Ha=>(Ha==null?void 0:Ha.id)===je);if(ca)for(let Ha=0;Ha<f.length;Ha++){const Sa=f[Ha],Xe=Sa==null?void 0:Sa.prop,Ra=(Sa==null?void 0:Sa.label)??Xe,Ge=ca==null?void 0:ca[Xe];if(Ge===""||Ge===null||Ge===void 0||Array.isArray(Ge)&&Ge.length===0){Qa.ElMessage.error(`${Ra}不能为空`);return}}}const N=[],O=[];if(u.forEach(Be=>{var Ra;const je=(Ra=K.value)==null?void 0:Ra.find(Ge=>(Ge==null?void 0:Ge.id)===Be);if(!je)return;if(je!=null&&je._isTemp){const Ia=(ua.getAllLeafNodes(xe.value)||[]).filter(E=>(E==null?void 0:E.mainKey)===!0||(E==null?void 0:E.isMainKey)===!0),za=K.value.findIndex(E=>(E==null?void 0:E.id)===Be),ke=za>=0?za+1:K.value.length+1;Lo(je,Ia,K.value,N);const _a={id:ke.toString()};(je==null?void 0:je.sort)!==void 0&&(je==null?void 0:je.sort)!==null&&String(je.sort).trim()!==""?_a.sort=String(je.sort):_a.sort=tt(za>=0?za:K.value.length-1,K.value||[]),(ua.getAllLeafNodes(xe.value)||[]).filter(E=>(E==null?void 0:E.type)!=="operate"&&(E==null?void 0:E.label)!=="操作"&&(E==null?void 0:E.prop)!=="operate").forEach(E=>{const Me=E==null?void 0:E.prop;if(Me){const ye=je[Me];ye!==void 0?_a[Me]=ye??"":_a[Me]=""}}),N.push(_a);return}const Ha=(ua.getAllLeafNodes(xe.value)||[]).filter(Ge=>(Ge==null?void 0:Ge.type)!=="operate"&&(Ge==null?void 0:Ge.label)!=="操作"&&(Ge==null?void 0:Ge.prop)!=="operate"),Sa=new Set(Ha.map(Ge=>Ge==null?void 0:Ge.prop).filter(Boolean)),Xe={};for(const Ge of Sa)Object.prototype.hasOwnProperty.call(je,Ge)&&(Xe[Ge]=je[Ge]);O.push({id:je.id,value:{tableData:Xe}})}),We.setTableLoading(c==null?void 0:c.index),O.length>0){const Be=O.map(ca=>{const Ha={id:ca.id,...ca.value.tableData};return delete Ha._isOCRRow,delete Ha._ocrTableId,delete Ha._isTemp,delete Ha.tableEditType,delete Ha.index,Ha}),je=[{tableName:(le=c==null?void 0:c.related)==null?void 0:le.find(ca=>ca==null?void 0:ca.includes("content")),tableContents:Be}];try{await A.pageBatchUpdateApi({platId:parseInt((H=Fl.value)==null?void 0:H.plat_id),changeContents:je})}catch(ca){Qa.ElMessage.error(((_e=(ve=ca==null?void 0:ca.response)==null?void 0:ve.data)==null?void 0:_e.message)||(ca==null?void 0:ca.message)||"保存失败"),We.setTableLoading(!1);return}}if(N.length>0){const Be={fixContent:N,buttonName:"新增",relatedContents:c==null?void 0:c.related,name:c==null?void 0:c.compName,columns:xe.value};ze("change",Be)}Qa.ElMessage.success("保存成功"),d.value.clear(),b.value.clear(),K.value=(De=K.value)==null?void 0:De.map(Be=>({...Be,tableEditType:"text"})),Ll.value=!1,We.setRefreshCurStructure(!0)},Vo=()=>{var f;const u=Array.from(d.value||[]);if(u.length===0){Ll.value=!1;return}u.forEach(N=>{var B,re;const O=b.value.get(N),V=(B=K.value)==null?void 0:B.find(le=>(le==null?void 0:le.id)===N);if(V!=null&&V._isTemp){K.value=K.value.filter(le=>(le==null?void 0:le.id)!==V.id);return}if(O){const le=(re=K.value)==null?void 0:re.findIndex(H=>(H==null?void 0:H.id)===N);le!==-1&&(K.value[le]={...K.value[le],...O})}}),d.value.clear(),b.value.clear(),K.value=(f=K.value)==null?void 0:f.map(N=>({...N,tableEditType:"text"})),Ll.value=!1},Nt=a.ref(!1),Ut=async u=>{var V,B,re,le;if(!Ll.value||u!=null&&u.isComposing||(u==null?void 0:u.key)!=="Enter")return;const f=u==null?void 0:u.target;if(((B=(V=f==null?void 0:f.tagName)==null?void 0:V.toLowerCase)==null?void 0:B.call(V))==="textarea")return;const O=document.getElementById("excel-table");O&&!O.contains(f)||((re=f==null?void 0:f.blur)==null||re.call(f),(le=u.preventDefault)==null||le.call(u),await a.nextTick(),await qt())},qt=async()=>{if(P.value){Ll.value=!1;return}if(!Nt.value){Nt.value=!0;try{Array.from(d.value||[]).length>0?await Bt():Ll.value=!1}finally{Promise.resolve().then(()=>{Nt.value=!1})}}},Ro=u=>{ar.value=u},Kt=(u,f)=>{Hl.value===f?Tr.value=!1:Tr.value=!0,Hl.value=f==null?void 0:f.changeProp},nt=u=>{if(!u)return;const{item:f,value:N}=u,O=ie.value.find(V=>V.prop==f.prop);O&&O.contents.push({label:N,value:N})},Zr=a.computed(()=>{var N,O,V;const u=(N=xe.value)==null?void 0:N.some(B=>B==null?void 0:B.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",u?"inline-block":"none"),(V=(O=xe.value)==null?void 0:O.filter(B=>(B==null?void 0:B.label)!=="操作"))==null?void 0:V.map(B=>({...B,filterable:!!(B!=null&&B.filterable),showSummary:!!(B!=null&&B.showSummary),operable:!!(B!=null&&B.operable),fixed:B==null?void 0:B.fixed}))}),qn=async(u,f,N)=>{const O=A.cloneDeep(xe.value);await a.nextTick();const V=O==null?void 0:O.map(re=>(N==null?void 0:N.label)===(re==null?void 0:re.label)?{...re,[f]:u}:re),B=Tt(V);await os(c.index,B),xe.value=V,te.value=B},Tt=u=>{var V;const f=u||[];return((V=ua.getAllLeafNodes(f)||[])==null?void 0:V.filter(B=>(B==null?void 0:B.prop)&&(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate")).map(B=>{const{prop:re}=B;return Cf(re,B)})},Wt=async u=>{let f=await Sf(c.index);f||(f=Tt(u)),te.value=f},Yt=async(u,f)=>{const N=A.cloneDeep(xe.value),O=re=>Array.isArray(re)?re.map(le=>{const H=Array.isArray(le==null?void 0:le.children)&&le.children.length>0,ve={...le};return(ve==null?void 0:ve.prop)==="operate"||(ve==null?void 0:ve.label)==="操作"||(ve==null?void 0:ve.type)==="operate"?(ve.sortable=!1,ve.filterable=!1,ve.operable=!1):ve.sortable=H?!1:!!u,H&&(ve.children=O(ve.children)),ve}):re,V=O(N),B=Tt(V);await os(c.index,B),xe.value=V,te.value=B,await a.nextTick(),vn.value=vn.value+1},Jt=()=>{fa.value=!1},Kn=u=>{ze("clickTrigger",u)},Gt=async u=>{var B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge;const f=u==null?void 0:u.row,N=u==null?void 0:u.rowData,O=u==null?void 0:u.suffix;if((B=f==null?void 0:f.toString())!=null&&B.includes(".urdf")||u!=null&&u.isUrdf||O!=null&&O.includes(".urdf")){if(f.includes(",")){Qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(D(f)){const za={files:[we(f)],data:{}};se(za);return}Ye.value=[{url:f,extension:ge(f)}],wa.value=!0,oe.value={data:A.cloneDeep(N)},Ke.value=!0;return}let V=[];if((re=f==null?void 0:f.toString())!=null&&re.includes(".stl")||(le=f==null?void 0:f.toString())!=null&&le.includes(".STL")||(H=f==null?void 0:f.toString())!=null&&H.includes(".obj")||(ve=f==null?void 0:f.toString())!=null&&ve.includes(".mtl")){const Ia=(_e=f==null?void 0:f.toString())==null?void 0:_e.split(","),za=la(Ia),ke=za==null?void 0:za[0];if(D(ke==null?void 0:ke.extension)){se({files:za,data:{}});return}Ye.value=za,wa.value=!1,Ke.value=!0;return}if((De=f==null?void 0:f.toString())!=null&&De.includes(".stl")||(Be=f==null?void 0:f.toString())!=null&&Be.includes(".STL")||(je=f==null?void 0:f.toString())!=null&&je.includes(".obj")||(ca=f==null?void 0:f.toString())!=null&&ca.includes(".mtl")||O!=null&&O.includes(".stl")||O!=null&&O.includes(".STL")||O!=null&&O.includes(".obj")||O!=null&&O.includes(".mtl")){let Ia,za=[],ke={};if(Array.isArray(f)?Ia=f:Ia=f==null?void 0:f.split(","),Ia==null||Ia.forEach(_a=>{_a.includes(".mtl")?za.push(_a):ke.blob=ke.blob?ke.blob+","+_a:_a}),(za==null?void 0:za.length)>0&&(ke.mtlBlobs=za),O&&(ke.suffix=O),(Sa=(Ha=Object.values(ke))==null?void 0:Ha[0])!=null&&Sa.includes("http:"))V.push(ke);else{const _a=new Blob([ke.blob],{type:"application/octet-stream;charset=UTF-8"});let oa=URL.createObjectURL(_a),ce="";(Xe=f==null?void 0:f.split("/"))==null||Xe.forEach((E,Me)=>{var ye;Me===((ye=f==null?void 0:f.split("/"))==null?void 0:ye.length)-1&&(ce=E)}),(Ra=ke.blob)!=null&&Ra.includes(".stl")&&(ce=(ce==null?void 0:ce.replaceAll(">",""))+".urdf"),ae.value=[{name:ce,blobUrl:oa}],Va.value=!0}}else{const Ia=await Qa.axios.get(f,{responseType:"blob",headers:{"Content-Type":"application/json"}}),za=new Blob([Ia.data],{type:"application/octet-stream;charset=UTF-8"});let ke=URL.createObjectURL(za),_a="";if((Ge=f==null?void 0:f.split("/"))==null||Ge.forEach((oa,ce)=>{var E;ce===((E=f==null?void 0:f.split("/"))==null?void 0:E.length)-1&&(_a=oa)}),D(_a)){const oa=ne(_a),ce=we(f);se({files:[ce],data:{trackFileType:oa}});return}ae.value=[{name:_a,blobUrl:ke}],Va.value=!0}(V==null?void 0:V.length)>0&&t.setBlobUrls(V)},Wn=u=>{var O,V,B,re;if(u!=null&&u.downloadUrl)return u==null?void 0:u.name;const f=(re=(O=u==null?void 0:u.url)==null?void 0:O.split("."))==null?void 0:re[((B=(V=u==null?void 0:u.url)==null?void 0:V.split("."))==null?void 0:B.length)-1];return(u==null?void 0:u.name)+"."+f},Xt=u=>{if(!u)return"未知文件";try{const O=Wn(u);if(typeof O=="string"&&O.includes("."))return O}catch{}const f=(u==null?void 0:u.fileName)||(u==null?void 0:u.name)||"未知文件",N=(u==null?void 0:u.suffix)||"";return f.includes(".")?f:`${f}${N}`},Zt=u=>{if(u==null||typeof u=="number"||typeof u!="string")return u;const f=u.match(/^(\d+)\_(\d+)$/);if(!f)return u;const N=Number(f[1]),O=Number(f[2]);return!Number.isFinite(N)||!Number.isFinite(O)?u:String(N*1e3+O)},Yn=u=>{if(u==null)return null;const f=String(u).trim();if(!f)return null;const N=Number(f);return Number.isFinite(N)?N:null},Qt=(u,f=[])=>{const N=Array.isArray(u)?u.slice():[];if(N.length<=1)return N;const O=new Map((f||[]).map((re,le)=>[String(re),le])),V=N.some(re=>Yn(re==null?void 0:re.sort)!==null),B=N.map((re,le)=>({r:re,idx:le,id:String((re==null?void 0:re.id)??""),sortVal:Yn(re==null?void 0:re.sort),prevIdx:O.has(String(re==null?void 0:re.id))?O.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return B.sort((re,le)=>{if(V){const H=re.sortVal,ve=le.sortVal;if(H===null&&ve!==null)return 1;if(H!==null&&ve===null)return-1;if(H!==null&&ve!==null&&H!==ve)return H-ve}return re.prevIdx!==le.prevIdx?re.prevIdx-le.prevIdx:re.idx-le.idx}),B.map(re=>re.r)},tt=(u,f=[])=>{const N=f==null?void 0:f[u-1],O=f==null?void 0:f[u],V=Yn(N==null?void 0:N.sort),B=Yn(O==null?void 0:O.sort);let re=null;V!==null&&B!==null&&B>V?re=(V+B)/2:V!==null?re=V+1:B!==null?re=Math.max(B-1,0):re=(u??0)+1;const le=Number(re.toFixed(6));return String(Number.isFinite(le)?le:re)},$o=async u=>{let f=null,N=null;if(u!=null&&u.id){const V=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const B=await A.platformDownloadFile(u);f=URL.createObjectURL(B.data),N=Xt(u)}finally{V.close()}}else if(u!=null&&u.downloadUrl){const V=await it(),B=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Qa.axios.post(u==null?void 0:u.url,null,{responseType:"blob",headers:{Authorization:V,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{B.close()}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});f=URL.createObjectURL(le),N=u==null?void 0:u.name}else{const V=await A.platformDownloadFile({url:u==null?void 0:u.url});!u.url.toUpperCase().includes(".OBJ")&&!u.url.toUpperCase().includes(".STL")&&!u.url.toUpperCase().includes(".MTL")&&!u.url.toUpperCase().includes(".URDF")?(f=URL.createObjectURL(V.data),N=Wn(u)):f=u==null?void 0:u.url}if(D(f)){const V={row:`${f}`,suffix:ge(N)};Gt(V);return}const O={name:N,blobUrl:f};ae.value=[O],Va.value=!0},ot=async u=>{let f=null,N=null;if(u!=null&&u.id){const B=await A.platformDownloadFile(u);f=URL.createObjectURL(B.data),N=Xt(u)}else if(u!=null&&u.downloadUrl){const B=await it(),re=await Qa.axios.post(u==null?void 0:u.url,null,{responseType:"blob",headers:{Authorization:B,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});f=URL.createObjectURL(le),N=u==null?void 0:u.name}else{const B=await A.platformDownloadFile({url:u==null?void 0:u.url});f=URL.createObjectURL(B.data),N=Wn(u)}const O={name:N,blobUrl:f},V=document.createElement("a");V.href=O.blobUrl,V.download=O.name,V.style.display="none",document.body.appendChild(V),V.click(),setTimeout(()=>{document.body.removeChild(V)},100)},Po=(u,f)=>{var O;if(Object.values(f).length===0)return;let N=u;return Object.values(f).find(V=>{var B,re,le;return((B=V==null?void 0:V.toString())==null?void 0:B.includes(".txt"))||((re=V==null?void 0:V.toString())==null?void 0:re.includes(".cpt"))||((le=V==null?void 0:V.toString())==null?void 0:le.includes(".obj"))})?N=[...u,ga.value]:(O=c==null?void 0:c.config)!=null&&O.allowMove&&(N=[...u,{label:"迁移"}]),N},At=()=>{Y.value=!0},Fo=a.ref([]),jo=async(u,f,N=!1)=>{var re,le,H,ve;if(!u)return;if(N){K.value=[...Ve.value.values()].filter(_e=>Object.values(_e).some(De=>typeof De=="string"?De==null?void 0:De.toLowerCase().includes(f==null?void 0:f.toLowerCase()):!1));return}let O={};for(let _e in u)(u==null?void 0:u[_e])!==""&&(O[_e]=u==null?void 0:u[_e]);if(JSON.stringify(O)==="{}"){K.value=Array.from(((re=Ve.value)==null?void 0:re.values())??[]);return}let V=(le=c==null?void 0:c.related)==null?void 0:le.find(_e=>_e==null?void 0:_e.includes("content_")),B=await A.getFillFind({platId:parseInt((H=Fl==null?void 0:Fl.value)==null?void 0:H.plat_id),tableName:V,params:O});B=(ve=B==null?void 0:B.data)==null?void 0:ve.result,K.value=B,We.setTableLoading(!1)},eo=async u=>{var N,O;if(!Ce(c.config,{type:Ne.TABLE})||!u)return;((N=Array.from(d.value))==null?void 0:N.length)>0&&await Bt();const f=u==null?void 0:u.id;f!=null&&(d.value.clear(),b.value.clear(),b.value.has(f)||b.value.set(f,A.cloneDeep(u)),K.value=(O=K.value)==null?void 0:O.map(V=>({...V,tableEditType:(V==null?void 0:V.id)===f?"edit":"text"})),d.value.add(f),Ll.value=!0)},On=async(u,f,N,O)=>{O!=null&&O.isExistChild&&ze("clickMainKey",u,N,xe.value)},bn=()=>{Va.value=!1},ao=u=>{ze("rowClick",u)};a.watch(()=>c.changedContent,()=>{var N,O;if(!c.changedContent)return;let u=(N=K.value)==null?void 0:N.map(V=>{var B;return V.id===((B=c.changedContent)==null?void 0:B.id)&&(V={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete V.newId),V});const f=(O=c.itemData)==null?void 0:O.map(V=>((V==null?void 0:V.key)==="tableContents"&&(V.contents=u),V));K.value=u,ze("contentChange",{contents:f,index:c.index}),ze("change",{content:u,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Mt=()=>{},Ho=async()=>{const u=ma.value,f=sessionStorage.getItem("systemKey"),N=await ua.getItemData(u,f,""),O=(N==null?void 0:N.find(le=>(le==null?void 0:le.name)==="方法明细"))||(N==null?void 0:N[0]),V=(O==null?void 0:O.compData)||[],B=V==null?void 0:V.find(le=>{const H=le==null?void 0:le.key;return H==="formContent"||H==="tableContents"});return B==null?void 0:B.contents},it=async()=>{const f=Qa.Local.get("access-token");return f?`Bearer ${f}`:""},Uo=async(u,{token:f,inputData:N}={})=>await Qa.axios.post(u,N,{headers:{Authorization:f}}).catch(V=>(ea.setImportLoading(!1),Promise.reject(V))),qo=u=>{var O;let f={};const N=[];return f.form={},(O=A.cloneDeep(u))==null||O.forEach((V,B)=>{var re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge;if((V==null?void 0:V.comp)==="Table"){(le=(re=V==null?void 0:V.compData)==null?void 0:re.find(_a=>(_a==null?void 0:_a.key)==="header"))==null||le.contents;let Ia=(_e=(ve=(H=V==null?void 0:V.compData)==null?void 0:H.find(_a=>(_a==null?void 0:_a.key)==="tableContents"))==null?void 0:ve.contents)==null?void 0:_e.map(_a=>_a.slice(1));(Ha=(ca=(je=(Be=(De=V==null?void 0:V.compData)==null?void 0:De.find(_a=>(_a==null?void 0:_a.key)==="header"))==null?void 0:Be.contents)==null?void 0:je[0])==null?void 0:ca[0])==null||Ha.label;let za=(Xe=(Sa=V==null?void 0:V.compData)==null?void 0:Sa.find(_a=>(_a==null?void 0:_a.key)==="header"))==null?void 0:Xe.contents,ke=[];Ia==null||Ia.forEach(_a=>{let oa=[];_a==null||_a.forEach((ce,E)=>{var ye;let Me={};((ye=za[E])==null?void 0:ye.label)!=="操作"&&(Me[za[E].label]=ce,oa.push(Me))}),ke.push(oa)}),f[V.name]=ke}else{const Ia=(Ge=(Ra=V.compData)==null?void 0:Ra.find(za=>(za==null?void 0:za.key)==="formContent"))==null?void 0:Ge.contents;Ia==null||Ia.forEach(za=>{var ke,_a;if(za.prop!==""){let oa=za==null?void 0:za.value;Array.isArray(oa)?oa=((ke=oa==null?void 0:oa[0])==null?void 0:ke.oldUrl)||"http://222.92.178.198:62001/"+((_a=oa==null?void 0:oa[0])==null?void 0:_a.url):oa=oa.toString(),za={key:(za==null?void 0:za.prop)??(za==null?void 0:za.label),value:oa},N.push(za)}})}}),f.form=ua.getFormContents(N),f},Ko=u=>{const f=[],N=O=>{O&&typeof O=="object"&&!Array.isArray(O)?Object.values(O).forEach(N):f.push(O)};return N(u),f},Wo=async(u,f,N)=>{var za,ke,_a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl;ea.setImportLoading(!0),We.setFreshContent(!1);let O=await Ho().catch(Wa=>(ea.setImportLoading(!1),Promise.reject(Wa)));O=O==null?void 0:O.filter(Wa=>{var _l;return((_l=Wa==null?void 0:Wa.find(Ka=>Ka==null?void 0:Ka.id))==null?void 0:_l.id)===(f==null?void 0:f.id)});let V=ua.getEqualChild([(za=xe.value)==null?void 0:za.filter(Wa=>(Wa==null?void 0:Wa.label)!=="操作")]);const B=(_a=(ke=ua.tableToForm(O,V))==null?void 0:ke[0])==null?void 0:_a.find(Wa=>{const _l=Wa==null?void 0:Wa.key;return _l==="Interface"||_l==="方法体"}),re=B==null?void 0:B.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),ea.setImportLoading(!1);return}const le=xe.value?ua.getEqualChild([xe.value]):[],H=le.find(Wa=>{const _l=Wa==null?void 0:Wa.prop;return _l==="Input1"||_l==="输入数据.输入1"||_l==="样本输入数据"}),ve=H==null?void 0:H.prop;let _e=f==null?void 0:f[ve];const De=await it().catch(Wa=>(ea.setImportLoading(!1),Promise.reject(Wa)));let Be=!0,je="";(oa=xe.value)==null||oa.forEach(Wa=>{(Wa==null?void 0:Wa.prop)===ve&&(Be=!!(Wa!=null&&Wa.childPath),je=Wa==null?void 0:Wa.childPath)});let ca="";if(Be){let Wa=(E=(ce=xe.value)==null?void 0:ce.find(vl=>(vl==null?void 0:vl.isMainKey)===!0))==null?void 0:E.prop;ca=f==null?void 0:f[Wa];let _l=je==null?void 0:je.split(k),Ka=[];_l==null||_l.forEach((vl,Il)=>{(_l==null?void 0:_l.length)-1===Il&&Ka.push(ca),Ka.push(vl)}),Ka=Ka==null?void 0:Ka[0];let hl=await ua.getItemData(Ka,sessionStorage.getItem("systemKey"),""),el=hl==null?void 0:hl.filter(vl=>(vl==null?void 0:vl.name)===ve);el=el==null?void 0:el.map(vl=>{var Il;return vl.compData=(Il=vl==null?void 0:vl.compData)==null?void 0:Il.map(Bl=>{var pr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(pr=Bl==null?void 0:Bl.contents)==null?void 0:pr.filter(Pl=>(Pl==null?void 0:Pl[1])===(f==null?void 0:f[ve]))),Bl}),vl}),(!el||(el==null?void 0:el.length)===0)&&(el=hl,el=el==null?void 0:el.map(vl=>{var Il;return vl.compData=(Il=vl==null?void 0:vl.compData)==null?void 0:Il.map(Bl=>{var pr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(pr=Bl==null?void 0:Bl.contents)==null?void 0:pr.filter(Pl=>{var bl,zl;return(Pl==null?void 0:Pl[1])===(f==null?void 0:f[(zl=(bl=xe==null?void 0:xe.value)==null?void 0:bl[0])==null?void 0:zl.prop])})),Bl}),vl})),_e=qo(el)}const Ha=await Uo(re,{token:De,inputData:_e}).catch(Wa=>(ea.setImportLoading(!1),Promise.reject(Wa))),Sa=(Me=Ha==null?void 0:Ha.data)==null?void 0:Me.data,Xe=le.find(Wa=>(Wa==null?void 0:Wa.prop)==="Output1"),Ra=Xe==null?void 0:Xe.prop;let Ge=[],Ia=[];if(Sa&&((ye=Object.values(Sa))==null?void 0:ye.length)>0){let Wa=[];const _l=new FormData,Ka=(Qe=Ko(Sa))==null?void 0:Qe.map(async el=>{var vl,Il;if(!Array.isArray(el)&&(el!=null&&el.includes("http"))){let Bl=await Qa.axios.get(el,{responseType:"blob"}),pr=(Il=el==null?void 0:el.split("/"))==null?void 0:Il[((vl=el==null?void 0:el.split("/"))==null?void 0:vl.length)-1];_l.append("files",Bl.data,pr)}else Wa.push(el)});if(await Promise.all(Ka),!ua.isFormDataEmpty(_l)){let el=await A.uploadAmountApi(_l),vl=(da=(ta=el==null?void 0:el.data)==null?void 0:ta.result)==null?void 0:da.map(Il=>{var Bl,pr,Pl,bl,zl,Yl;return{name:(Yl=(zl=(bl=(Bl=Il==null?void 0:Il.url)==null?void 0:Bl.split("/"))==null?void 0:bl[((Pl=(pr=Il==null?void 0:Il.url)==null?void 0:pr.split("/"))==null?void 0:Pl.length)-1])==null?void 0:zl.split("."))==null?void 0:Yl[0],url:Il==null?void 0:Il.url}});Wa=[...Wa,...vl]}let hl={};for(let el in f)el!=="id"&&(hl[el]=f[el]);hl[Ra]=Wa,Ia.push({id:f==null?void 0:f.id,value:{tableData:hl}})}if((Ia==null?void 0:Ia.length)>0){const Wa=Ia.map(Ka=>{const hl={id:Ka.id,...Ka.value.tableData};return delete hl._isOCRRow,delete hl._ocrTableId,delete hl._isTemp,delete hl.tableEditType,delete hl.index,hl}),_l=[{tableName:(Ma=c==null?void 0:c.related)==null?void 0:Ma.find(Ka=>Ka==null?void 0:Ka.includes("content")),tableContents:Wa}];await A.pageBatchUpdateApi({platId:parseInt((dl=Fl.value)==null?void 0:dl.plat_id),changeContents:_l})}if((Ge==null?void 0:Ge.length)>0)try{await A.pageBatchAddApi({platId:parseInt((Ga=Fl.value)==null?void 0:Ga.plat_id),changeContents:[{tableName:(ml=c==null?void 0:c.related)==null?void 0:ml.find(Wa=>Wa==null?void 0:Wa.includes("content")),tableContents:Ge.map(Wa=>{var Ka,hl,el;const _l={id:((Ka=Wa==null?void 0:Wa.key)==null?void 0:Ka.id)??((hl=Wa==null?void 0:Wa.key)==null?void 0:hl.rowId)??(Wa==null?void 0:Wa.id),...((el=Wa==null?void 0:Wa.value)==null?void 0:el.tableData)||{}};return delete _l._isOCRRow,delete _l._ocrTableId,delete _l._isTemp,delete _l.tableEditType,delete _l.index,Object.keys(_l).forEach(vl=>{vl==="证书附件"&&Array.isArray(_l[vl])&&(_l[vl]=JSON.stringify(_l[vl]))}),_l})}]})}catch(Wa){Qa.ElMessage.error(((jl=(yl=Wa==null?void 0:Wa.response)==null?void 0:yl.data)==null?void 0:jl.message)||(Wa==null?void 0:Wa.message)||"保存失败"),We.setTableLoading(!1);return}It(!0),ea.setImportLoading(!1),We.setFreshContent(!0)},lo=(u,f)=>(u=u==null?void 0:u.map(N=>{var O,V;return N!=null&&N.children&&((O=N.children)!=null&&O.find(B=>B.id===(f==null?void 0:f.id))?N.children=(V=N.children)==null?void 0:V.filter(B=>(B==null?void 0:B.id)!==(f==null?void 0:f.id)):N.children=lo(N.children,f)),N}),u),st=a.ref(!1),Yo=()=>{st.value=!0},Jo=async u=>{var N,O,V,B;st.value=!1;const f=Array.isArray(u)?u:u?[u]:[];if(f.length!==0)for(const re of f){const le={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};tl.value.push(le),Tl(le,"uploading"),Vl(le,0);try{const H=new FormData;H.append("file",re,le.name);const ve=await A.platformUploadFile(H);le.uploadResult=((N=ve==null?void 0:ve.data)==null?void 0:N.result)||{name:le.name,url:"",fileName:le.name},Ml({name:((O=le.uploadResult)==null?void 0:O.name)||le.name,url:((V=le.uploadResult)==null?void 0:V.url)||"",id:(B=le.uploadResult)==null?void 0:B.id}),Tl(le,"uploaded"),Vl(le,100)}catch(H){console.error("文件上传失败:",H),Qa.ElMessage.error(`文件 ${le.name} 上传失败,请重试`),Tl(le,"pending"),Vl(le,0);const ve=tl.value.findIndex(_e=>_e.uid===le.uid);ve>-1&&tl.value.splice(ve,1)}}},i=a.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:c==null?void 0:c.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(u,f,N)=>{f===(c==null?void 0:c.index)?N(new Error("选择源不能和目标源一致")):N()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),o=a.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],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:""}),p=()=>{o.show=!1},m=async u=>{var f,N,O,V,B,re,le,H,ve;try{if(u==="cancel"&&(o.show=!1),u==="replace"&&((f=o==null?void 0:o.existRows)==null?void 0:f.length)>0){await A.pageBatchDeleteApi({platId:parseInt((N=Fl.value)==null?void 0:N.plat_id),changeContents:[{tableName:((O=c==null?void 0:c.related)==null?void 0:O.find(De=>De==null?void 0:De.includes("content_")))||((V=c==null?void 0:c.related)==null?void 0:V.find(De=>De==null?void 0:De.includes("content"))),tableContents:o==null?void 0:o.existRows}]});const _e=await A.pageBatchAddApi({platId:parseInt((B=Fl.value)==null?void 0:B.plat_id),changeContents:[{tableName:(re=c==null?void 0:c.related)==null?void 0:re.find(De=>De==null?void 0:De.includes("content")),tableContents:(le=o==null?void 0:o.tableData)==null?void 0:le.map((De,Be)=>({id:Be,...De}))}]});((H=_e==null?void 0:_e.data)==null?void 0:H.code)===200&&(await vi({buttonName:"新增",columns:xe.value,fixContent:(ve=o==null?void 0:o.tableData)==null?void 0:ve.map((De,Be)=>({id:Be,...De})),relatedContents:c==null?void 0:c.related}),Qa.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{o.show=!1,o.columns=[],o.tableData=[],o.existRows=[]}},_=()=>{i.show=!1},I=u=>{var f,N;if((u==null?void 0:u.buttonName)==="取消")return i.show=!1;i.to=u==null?void 0:u.content,!(!(c!=null&&c.index)||!((f=i.to)!=null&&f.groupName))&&(c==null?void 0:c.index)!==((N=i.to)==null?void 0:N.groupName)&&(ze("change",{buttonName:"迁移",value:{from:i.from,to:i.to,data:i.selectRow}}),i.show=!1)},U=async u=>{var f,N,O,V;if(u){if(!Ar.validateFileSize(u.raw)){Qa.ElMessage.warning(`文件大小不能超过 ${hn.value.maxSize}MB`);const B=tl.value.findIndex(re=>re.uid===u.uid);B>-1&&tl.value.splice(B,1),G();return}if(!Ar.validateFileType(u.raw)){Qa.ElMessage.warning("请上传图片文件");const B=tl.value.findIndex(re=>re.uid===u.uid);B>-1&&tl.value.splice(B,1),G();return}Tl(u,"uploading"),Vl(u,0);try{const B=new FormData;B.append("file",u.raw,u.name);const re=await A.platformUploadFile(B);u.uploadResult=((f=re==null?void 0:re.data)==null?void 0:f.result)||{name:u.name,url:"",fileName:u.name},Ml({name:((N=u.uploadResult)==null?void 0:N.name)||u.name,url:((O=u.uploadResult)==null?void 0:O.url)||"",id:(V=u.uploadResult)==null?void 0:V.id}),Tl(u,"uploaded"),Vl(u,100)}catch(B){console.error("文件上传失败:",B),Qa.ElMessage.error(`文件 ${u.name} 上传失败,请重试`),Tl(u,"pending"),Vl(u,0);const re=tl.value.findIndex(le=>le.uid===u.uid);re>-1&&tl.value.splice(re,1)}finally{G()}}},G=()=>{a.nextTick(()=>{const u=document.querySelector('.ocr-upload-input input[type="file"]');u&&(u.value="")})},pe=async()=>{var N,O;if(sessionStorage.setItem("ocr_root_table_id",String((c==null?void 0:c.index)??"")),tl.value.length===0){Qa.ElMessage.warning("请先选择要上传的图片");return}if(tl.value.filter(V=>{const B=sl(V);return B!=="uploaded"&&B!=="completed"&&B!=="failed"}).length>0){Qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}Ya.value=!0,ol.value=0;let f=null;try{tl.value.forEach(Xe=>{Tl(Xe,"processing")});const V=Math.floor(Math.random()*10)+90;f=setInterval(()=>{ol.value<V?ol.value+=1:clearInterval(f)},50);const B=tl.value.map(Xe=>{var Ra,Ge,Ia;return{name:((Ra=Xe.uploadResult)==null?void 0:Ra.name)||Xe.name,url:((Ge=Xe.uploadResult)==null?void 0:Ge.url)||"",fileName:((Ia=Xe.uploadResult)==null?void 0:Ia.fileName)||Xe.name}}),re=Ar.extractTableHeaders(xe.value),le=B.map(Xe=>({name:(Xe==null?void 0:Xe.fileName)||(Xe==null?void 0:Xe.name),url:(Xe==null?void 0:Xe.url)||""})),H=await Ar.recognize(le,re);if(console.log(H,"ocrResult"),clearInterval(f),f=null,(H==null?void 0:H.code)===500||(H==null?void 0:H.type)==="error"||!(H!=null&&H.result)){ol.value=0,tl.value.forEach(Xe=>{Tl(Xe,"failed"),Vl(Xe,0)}),Qa.ElMessage.error((H==null?void 0:H.message)||"OCR识别失败,请重试"),Ya.value=!1;return}ol.value=V;const ve=Array.isArray(H==null?void 0:H.result)?H.result:[];if(ve.length===0){ol.value=0,tl.value.forEach(Xe=>{Tl(Xe,"failed"),Vl(Xe,0)}),Qa.ElMessage.warning("OCR识别未返回有效数据"),Ya.value=!1;return}const _e=new Set,De=[];ve.forEach((Xe,Ra)=>{const Ge=Xe!=null&&Xe.数据&&typeof(Xe==null?void 0:Xe.数据)=="object"?Xe.数据:{},Ia=Array.isArray(Xe==null?void 0:Xe.图片信息)?Xe.图片信息:[],za=new Map;Ia.forEach(_a=>{_a!=null&&_a.name&&za.set(_a.name,_a.url||"")});const ke={_index:Ra,_certType:(Xe==null?void 0:Xe.证书类型)||"",_certNo:(Xe==null?void 0:Xe.证书编号)||"",_ocrImages:Ia,__ocrFieldMeta:{}};Object.entries(Ge).forEach(([_a,oa])=>{let ce="",E=0,Me=[],ye="";oa&&typeof oa=="object"&&!Array.isArray(oa)?(ce=(oa==null?void 0:oa.value)??"",E=(oa==null?void 0:oa.score)??0,Me=Array.isArray(oa==null?void 0:oa.bboxNorm)?oa==null?void 0:oa.bboxNorm:[],ye=(oa==null?void 0:oa.imageName)||""):Array.isArray(oa)&&oa.length>=2?(ce=oa[0]??"",E=oa[1]??0):(ce=oa??"",E=0),ke[_a]=ce,ke[`${_a}_accuracy`]=E,_e.add(_a),ke.__ocrFieldMeta[_a]={value:ce,score:E,bboxNorm:Me,imageName:ye,imageUrl:ye&&za.get(ye)||"",images:Ia}}),De.push(ke)});const Be=[],je=new Set;De.forEach(Xe=>{Xe&&_e.forEach(Ra=>{const Ge=Xe[`${Ra}_accuracy`];(typeof Ge=="number"?Ge>0:Ge!=null&&String(Ge).trim()!==""&&String(Ge)!=="0")&&je.add(Ra)})}),_e.forEach(Xe=>{Be.push({prop:Xe,label:Xe,editable:!0,minWidth:230}),je.has(Xe)&&Be.push({prop:`${Xe}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),tl.value.forEach(Xe=>{Tl(Xe,"completed")}),ol.value=100,Aa.value=Be,pa.value=De,La.value=B,Ja.value=H;const ca=["出厂编号","设备名称","制造厂"],Ha=Be.filter(Xe=>Xe&&!Xe.isAccuracy&&typeof Xe.prop=="string").map(Xe=>Xe.prop),Sa=["出厂编号","设备名称","制造厂"];Ol.value=Ha.filter(Xe=>Sa.includes(Xe)),console.log("[OCR] 默认勾选字段 props:",Ol.value),Ea.value=2,Ya.value=!1,xa.value=!1}catch(V){console.error("OCR处理失败:",V),f&&(clearInterval(f),f=null),Qa.ElMessage.error(((O=(N=V==null?void 0:V.response)==null?void 0:N.data)==null?void 0:O.message)||"OCR识别失败,请重试"),Ya.value=!1,ol.value=0,tl.value.forEach(B=>{Tl(B,"pending"),Vl(B,0)})}},Ae=u=>{if(u==null)return"";let f=String(u);return f=f.replace(/\s+/g," ").trim(),f=f.replace(/[!-~]/g,N=>String.fromCharCode(N.charCodeAt(0)-65248)),f=f.replace(/ /g," "),f=f.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),f},he=()=>{var Xe,Ra;const u=La.value,f=Ja.value,N=pa.value;if(!N||N.length===0){Qa.ElMessage.warning("暂无数据可添加");return}const O=(Xe=ua.getAllLeafNodes(xe.value)||[])==null?void 0:Xe.filter(Ge=>(Ge==null?void 0:Ge.type)!=="operate"&&(Ge==null?void 0:Ge.label)!=="操作"&&(Ge==null?void 0:Ge.prop)!=="operate"),V=new Map,B=new Map,re=(Ra=O==null?void 0:O.find(Ge=>(Ge==null?void 0:Ge.label)==="证书附件"))==null?void 0:Ra.prop;O==null||O.forEach(Ge=>{Ge!=null&&Ge.label&&(Ge!=null&&Ge.prop)&&(V.set(Ge.label,Ge.prop),B.set(Ge.prop,Ge.label))});const le=Date.now(),H=Ge=>String(le*1e3+Ge),ve=[],_e=[],De=Ge=>{const Ia=_o&&_o[Ge]||[Ge];for(const za of Ia){const ke=V.get(za);if(ke)return ke}return""},Be=De("出厂编号"),je=De("设备名称"),ca=De("制造厂"),Ha=[],Sa=Ge=>{var ce,E;if(!re)return[];const Ia=(Array.isArray(u)?u[Ge]:null)||null,za=(Ia==null?void 0:Ia.url)||"",ke=(Ia==null?void 0:Ia.fileName)||(Ia==null?void 0:Ia.name)||"";return(String(ke).toLowerCase().endsWith(".pdf")||String(za).toLowerCase().endsWith(".pdf"))&&za?[{url:za,name:ke,fileName:ke}]:(Array.isArray((E=(ce=f==null?void 0:f.result)==null?void 0:ce[Ge])==null?void 0:E.图片信息)?f.result[Ge].图片信息:[]).map(Me=>({url:(Me==null?void 0:Me.url)||"",name:(Me==null?void 0:Me.name)||"",fileName:(Me==null?void 0:Me.name)||""})).filter(Me=>Me.url)};if(N.forEach((Ge,Ia)=>{var dl;const za={id:H(Ia),_isOCRRow:!0,_ocrTableId:c==null?void 0:c.index};for(const[Ga,ml]of V.entries())Object.prototype.hasOwnProperty.call(Ge,Ga)&&(za[ml]=Ge[Ga]);re&&(za[re]=Sa(Ia));const ke=(Array.isArray(f==null?void 0:f.result)?f.result[Ia]:null)||null,_a=(Array.isArray(u)?u[Ia]:null)||null,oa=(_a==null?void 0:_a.url)||"",ce=(_a==null?void 0:_a.fileName)||(_a==null?void 0:_a.name)||"",E=String(ce).toLowerCase().endsWith(".pdf")||String(oa).toLowerCase().endsWith(".pdf"),Me={ts:Date.now(),versionId:String(Date.now())+"_"+String(Ia),label:new Date().toLocaleString(),certType:(ke==null?void 0:ke.证书类型)||"",certNo:(ke==null?void 0:ke.证书编号)||"",fileType:E?"pdf":"image",sourceUrl:E?oa:"",images:Array.isArray(ke==null?void 0:ke.图片信息)?ke.图片信息.map(Ga=>({name:(Ga==null?void 0:Ga.name)||"",url:(Ga==null?void 0:Ga.url)||""})).filter(Ga=>Ga.url):[]},ye=Ga=>Ae(Ga?za==null?void 0:za[Ga]:""),Qe=ye(Be),ta=ye(je),da=ye(ca);if(!!(Be&&je&&ca&&Qe&&ta&&da)){const Ga=(K.value||[]).find(ml=>{const yl=Ae(Be?ml==null?void 0:ml[Be]:""),jl=Ae(je?ml==null?void 0:ml[je]:""),Wa=Ae(ca?ml==null?void 0:ml[ca]:"");return yl&&jl&&Wa&&yl===Qe&&jl===ta&&Wa===da});if(Ga){Ha.push({idx:Ia,ocrRow:za,versionItem:Me,ocrNo:Qe,candidates:[Ga],selectedTargetId:String((Ga==null?void 0:Ga.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(Qe&&Be){const Ga=(K.value||[]).filter(ml=>{const yl=Ae(Be?ml==null?void 0:ml[Be]:"");return yl&&yl===Qe});if(Ga.length>0){Ha.push({idx:Ia,ocrRow:za,versionItem:Me,ocrNo:Qe,candidates:Ga,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(za.sort===void 0||za.sort===null||String(za.sort).trim()===""){const Ga=(K.value||[]).map(yl=>Yn(yl==null?void 0:yl.sort)).filter(yl=>yl!==null),ml=Ga.length>0?Math.max(...Ga):((dl=K.value)==null?void 0:dl.length)??0;za.sort=String(Number((ml+1).toFixed(6)))}}catch{}aa(c==null?void 0:c.index,za.id,Me),Ha.push({idx:Ia,ocrRow:za,versionItem:Me,ocrNo:Qe,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Ha||[]).length>0){Dl.value=(Ha||[]).map(Ge=>({...Ge,selectedTargetId:(Ge==null?void 0:Ge.selectedTargetId)||""})),kl.value=!0,$l.value=_e,or.value=ve,Cr.value=f,Gr.value=u,Xr.value=re||"";return}},Je=(u,f,N)=>{pa.value[u]&&(pa.value[u][f]=N)},Ba=u=>u==null||u===0?"-":`${(Number(u)*100).toFixed(1)}%`,ll=u=>{if(u==null||u===0)return"#909399";const f=Number(u);return f>=.9?"#67c23a":f>=.7?"#e6a23c":"#f56c6c"},Za=u=>{var N,O,V,B;if(El.value===u){El.value=null,wl.value=!1,Sl.value="";return}El.value=u,Sl.value="";const f=(N=pa.value)==null?void 0:N[u];if(f&&Array.isArray(f._ocrImages)&&f._ocrImages.length>0){fl.value=f._ocrImages.map(H=>({name:(H==null?void 0:H.name)||"",url:(H==null?void 0:H.url)||""})).filter(H=>H.name||H.url);const re=f.__ocrFieldMeta||{},le=(O=Object.values(re))==null?void 0:O.find(H=>H==null?void 0:H.imageName);cl.value=(le==null?void 0:le.imageName)||((B=(V=fl.value)==null?void 0:V[0])==null?void 0:B.name)||"",wl.value=fl.value.length>0}else fl.value=[],wl.value=!1,cl.value=""},il=()=>{Xa.value=!1,tl.value=[],Da.value=null,Ea.value=1,Pa.value.clear(),ul.value.clear(),ol.value=0,wl.value=!1},xl=u=>u.raw?URL.createObjectURL(u.raw):u.url?u.url:"",sl=u=>{const f=u.uid||u.name;return Pa.value.get(f)||"pending"},Al=u=>{const f=u.uid||u.name;return ul.value.get(f)||0},Vl=(u,f)=>{const N=u.uid||u.name;ul.value.set(N,Math.min(100,Math.max(0,f)))},Wl=u=>{const f=sl(u),N=100.53;if(f==="completed"||f==="uploaded")return`${N} ${N}`;if(f==="failed")return`${N} ${N}`;if(f==="uploading"){const O=Al(u);return`${N*(O/100)} ${N}`}else if(f==="processing")return`${N*.5} ${N}`;return`0 ${N}`},Tl=(u,f)=>{const N=u.uid||u.name;Pa.value.set(N,f),(f==="completed"||f==="uploaded")&&Vl(u,100)},Ul=()=>{a.nextTick(()=>{const u=document.querySelector('.ocr-upload-input input[type="file"]');if(u)u.value="",u.click();else{const f=document.createElement("input");f.type="file",f.multiple=!0,f.accept="image/*,application/pdf",f.style.display="none",f.onchange=async N=>{const O=Array.from(N.target.files||[]);for(const V of O){const B={name:V.name,raw:V,uid:Date.now()+Math.random()};tl.value.push(B),await U(B)}N.target.value="",document.body.removeChild(f)},document.body.appendChild(f),f.click()}})},Or=()=>{Ea.value>1&&Ea.value--},gr=()=>{Ea.value===1?tl.value.length>0&&!Ya.value&&pe():Ea.value===2&&(he(),Ea.value=3)},jr=async u=>{await sn(u==null?void 0:u.row)},Qr=async({row:u,prop:f})=>{!u||!f||await sn(u,f)},sn=async(u,f)=>{var V,B;const N=u==null?void 0:u.id;if(!N){Qa.ElMessage.warning("暂无可预览数据");return}let O=nl(c==null?void 0:c.index,N);if(!O||O.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),le=re!==null?Number(re):null;if(le!=null&&le!==""&&!Number.isNaN(le)){const H=nl(le,N);Array.isArray(H)&&H.length>0&&(Ca(c==null?void 0:c.index,N,H),O=H)}}if(!O||O.length===0){const re=(V=ua.getAllLeafNodes(xe.value)||[])==null?void 0:V.filter(H=>(H==null?void 0:H.type)!=="operate"&&(H==null?void 0:H.label)!=="操作"&&(H==null?void 0:H.prop)!=="operate"),le=f||((B=re==null?void 0:re.find(H=>(H==null?void 0:H.label)==="证书附件"))==null?void 0:B.prop);if(le&&u[le]){const H=u[le];let ve=[],_e="",De=!1;if(typeof H=="string")try{const Be=JSON.parse(H);Array.isArray(Be)&&(ve=Be.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),ve.length>0&&(_e=ve[0].url||"",De=String(ve[0].name).toLowerCase().endsWith(".pdf")||String(_e).toLowerCase().endsWith(".pdf")))}catch{_e=H,De=String(H).toLowerCase().endsWith(".pdf"),ve=[{name:H,url:H}]}else Array.isArray(H)&&(ve=H.map(Be=>({name:(Be==null?void 0:Be.name)||(Be==null?void 0:Be.fileName)||"",url:(Be==null?void 0:Be.url)||""})).filter(Be=>Be.url||Be.name),ve.length>0&&(_e=ve[0].url||"",De=String(ve[0].name).toLowerCase().endsWith(".pdf")||String(_e).toLowerCase().endsWith(".pdf")));if(ve.length>0||_e){const Be={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:u.证书类型||"",certNo:u.证书编号||"",fileType:De?"pdf":"image",sourceUrl:De?_e:"",images:ve};O=[Be],aa(c==null?void 0:c.index,N,Be)}}}if(!O||O.length===0){Qa.ElMessage.warning("暂无可预览数据");return}Z.value=O,sa.value=!0},ct=u=>{tl.value=tl.value.filter((f,N)=>N!==u)},Sn=async(u,f,N)=>{var O,V,B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a;if(Ce(c.config,{type:Ne.TABLE,tableOperate:u})){if(ra.value="",Na.value=!0,va.value=!0,ze("onButtonClick",u,f),q.value=[],u==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var oa,ce,E,Me;(oa=K.value)!=null&&oa.find(ye=>(ye==null?void 0:ye.id)===(f==null?void 0:f.id))?K.value=(ce=A.cloneDeep(K.value))==null?void 0:ce.filter(ye=>(ye==null?void 0:ye.id)!==(f==null?void 0:f.id)):K.value=lo(A.cloneDeep(K.value),f);try{f!=null&&f.id&&((Me=(E=Ve.value)==null?void 0:E.has)!=null&&Me.call(E,f==null?void 0:f.id))&&Ve.value.delete(f.id)}catch{}Xp(tn.value,An.value,f==null?void 0:f.id),We.setTableLoading(c==null?void 0:c.index),ze("change",{content:K.value,fixContent:[f],index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.compName,buttonName:u,columns:xe.value,relatedContents:c==null?void 0:c.related}),console.log(f,"item")});else if(u==="批量删除"){if(((O=ar.value)==null?void 0:O.length)===0)return Qa.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var E,Me,ye,Qe,ta;const oa=(E=ar.value)==null?void 0:E.map(da=>da.id);K.value=(Me=A.cloneDeep(K.value))==null?void 0:Me.filter(da=>!(oa!=null&&oa.includes(da.id))),We.setTableLoading(c==null?void 0:c.index),ze("change",{content:K.value,fixContent:ar.value,index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.compName,buttonName:u,relatedContents:c==null?void 0:c.related,columns:xe.value});const ce=(oa||[]).filter(Boolean);if(ce.length>0&&ce.every(da=>da!=null&&da!=="")){const da=(ar.value||[]).map(Ma=>{const dl={...Ma};return delete dl._isOCRRow,delete dl._ocrTableId,delete dl._isTemp,delete dl.tableEditType,delete dl.index,dl});await A.pageBatchDeleteApi({platId:parseInt((ye=Fl.value)==null?void 0:ye.plat_id),changeContents:[{tableName:((Qe=c==null?void 0:c.related)==null?void 0:Qe.find(Ma=>Ma==null?void 0:Ma.includes("content_")))||((ta=c==null?void 0:c.related)==null?void 0:ta.find(Ma=>Ma==null?void 0:Ma.includes("content"))),tableContents:da}]})}})}else if(u==="复制新增"){Te.value="复制新增",A.cloneDeep(f);const oa=(V=xe.value)==null?void 0:V.find(ce=>ce==null?void 0:ce.isMainKey);oa||((B=xe.value)==null||B[0]),ir.value=f,It(!0)}else if(u==="新增")Te.value="新增",zt(""),fa.value=!0;else if(u==="编辑")Te.value="编辑",zt(f),fa.value=!0;else if(u==="查看")Te.value="查看",zt(f),Na.value=!1,va.value=!1,fa.value=!0;else if(u==="查看三维模型"){const oa={};for(let E in f)E!=="id"&&(oa[E]=f[E]);let ce=(re=Object.values(oa))==null?void 0:re[1];Le.setTableShowThree(ce)}else if(u==="切换视图")lu();else if(((le=N==null?void 0:N.extra)==null?void 0:le.type)==="modelExample")Te.value=u,fe.value=!0;else if(u==="新建"){let oa=R.value,ce=[];for(let ta in oa)ta!=null&&ta.includes(`loading${((H=Fl.value)==null?void 0:H.account)||((ve=Fl.value)==null?void 0:ve.账号)}`)&&(ce=[...ce,...ta]);let E=[];for(let ta in oa)ta!=null&&ta.includes(`updateLoading${((_e=Fl.value)==null?void 0:_e.account)||((De=Fl.value)==null?void 0:De.账号)}`)&&(E=[...E,...ta]);let Me=ce==null?void 0:ce.map(ta=>ta==null?void 0:ta.id);const ye=E==null?void 0:E.map(ta=>ta==null?void 0:ta.id);Me=[...A.cloneDeep(Me),...ye],(Me==null?void 0:Me.length)>0&&(Me!=null&&Me.every(ta=>ta!==null&&ta))&&await br.batchDeleteInsofDataApi({ids:Me});const Qe=(Be=ue.value)==null?void 0:Be.find(ta=>(ta==null?void 0:ta.label)==="新建");await Wc(!1,Qe)}else if(u==="修改模板"){let oa=A.cloneDeep(ma).value;We.setRouteToChildPath(oa),ea.setActiveMenuPath(oa+k)}else if(u==="执行")Wo(u,f);else if(u==="导出paraform"){const oa=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const ce=["推力","真空","压力","温度","流量"],E=bl=>{var zl,Yl,Rl;return bl?typeof(bl==null?void 0:bl.value)=="string"?bl.value:((Rl=(Yl=(zl=bl==null?void 0:bl._custom)==null?void 0:zl.value)==null?void 0:Yl.value)==null?void 0:Rl.value)||"":""},Me=Array.isArray(mn.value)?mn.value:[],ye=E(Me.find(bl=>(bl==null?void 0:bl.condition)==="child")),Qe=String(ye||"").slice(0,8),ta=bl=>{if(bl==null)return"";const zl=String(bl).trim();if(!zl)return"";if(/^\d{8}$/.test(zl))return zl;const Yl=zl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Yl){const fr=Yl[1],hr=Yl[2].padStart(2,"0"),Jl=Yl[3].padStart(2,"0");return`${fr}${hr}${Jl}`}const Rl=zl.replace(/\D/g,"");return Rl.length>=8?Rl.slice(0,8):""},da=async bl=>{var zl,Yl;if(!bl)return"";try{const Rl=await Pr("试验任务/任务管理",!1),fr=(cr,lr=[])=>{if(!Array.isArray(cr))return lr;for(const nr of cr)(nr==null?void 0:nr.comp)==="Table"&&(nr!=null&&nr.name)&&lr.push(nr),Array.isArray(nr==null?void 0:nr.children)&&fr(nr.children,lr),Array.isArray(nr==null?void 0:nr.tab)&&fr(nr.tab,lr),Array.isArray(nr==null?void 0:nr.choice)&&fr(nr.choice,lr);return lr},Jl=fr(Rl||[]).find(cr=>(cr==null?void 0:cr.name)==="任务列表"),sr=((Yl=(zl=Jl==null?void 0:Jl.compData)==null?void 0:zl.find(cr=>(cr==null?void 0:cr.key)==="tableContents"))==null?void 0:Yl.contents)||[];if(!Array.isArray(sr)||sr.length===0)return"";const Lr=sr.find(cr=>String((cr==null?void 0:cr["试验代号(名称)"])||"").slice(0,8)===bl);return ta(Lr==null?void 0:Lr.计划试验时间)}catch(Rl){return console.warn("获取任务列表计划试验时间失败:",Rl),""}},Ma=(ma.value||"").replace(/\/+$/,""),dl=ye?`${Ma}/${ye}`:Ma,Ga=await Pr(dl||ma.value,!1),ml=String(Ie.value||"").trim(),yl=bl=>String(bl||"").trim(),jl=(bl,zl=[],Yl="")=>{if(!Array.isArray(bl))return zl;for(const Rl of bl){const fr=yl((Rl==null?void 0:Rl.choiceName)||(Rl==null?void 0:Rl.name0)||Yl);(Rl==null?void 0:Rl.comp)==="Table"&&(Rl==null?void 0:Rl.name)&&ce.includes(Rl.name)&&(!ml||fr===ml)&&zl.push(Rl),Array.isArray(Rl==null?void 0:Rl.children)&&jl(Rl.children,zl,fr),Array.isArray(Rl==null?void 0:Rl.tab)&&jl(Rl.tab,zl,fr),Array.isArray(Rl==null?void 0:Rl.choice)&&jl(Rl.choice,zl,fr)}return zl},Wa=jl(Ga||[]),_l=new Map;for(const bl of Wa)bl!=null&&bl.name&&!_l.has(bl.name)&&_l.set(bl.name,bl);const Ka=ce.map(bl=>_l.get(bl)).filter(Boolean);if(!Ka||Ka.length===0)return Qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const hl=bl=>{const zl=new Map,Yl=(Rl,fr=[])=>{if(Array.isArray(Rl))for(const hr of Rl){const Jl=((hr==null?void 0:hr.label)??"").toString().trim(),sr=Jl?[...fr,Jl]:[...fr];if(Array.isArray(hr==null?void 0:hr.children)&&hr.children.length>0)Yl(hr.children,sr);else{const cr=((hr==null?void 0:hr.prop)??"").toString();if(!cr)continue;const lr=Jl||cr,nr=(sr.length>0?[...fr,lr]:[lr]).join(".");zl.set(cr,nr)}}};return Yl(bl,[]),zl},el=(bl,zl)=>{const Yl=hl(bl||[]),fr=(ua.getAllLeafNodes(bl||[])||[]).filter(Jl=>(Jl==null?void 0:Jl.prop)&&(Jl==null?void 0:Jl.type)!=="operate"&&(Jl==null?void 0:Jl.label)!=="操作"&&(Jl==null?void 0:Jl.prop)!=="operate"),hr=Array.isArray(zl)?zl:[];return hr.length===0?[]:hr.map(Jl=>{const sr={};return fr.forEach(Lr=>{const cr=String(Lr.prop),lr=Yl.get(cr)||String(Lr.label||Lr.prop);sr[lr]=(Jl==null?void 0:Jl[cr])??""}),sr})},vl=Ka.map(bl=>{var hr,Jl;const zl=(bl==null?void 0:bl.compData)||[];let Yl=(hr=zl==null?void 0:zl.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:hr.contents;Array.isArray(Yl==null?void 0:Yl[0])&&(Yl=Yl[0]);const Rl=((Jl=zl==null?void 0:zl.find(sr=>(sr==null?void 0:sr.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(Yl)||Yl.length===0||!Array.isArray(Rl)||Rl.length===0)return null;const fr=el(Yl||[],Rl||[]);return!Array.isArray(fr)||fr.length===0?null:{类型:bl==null?void 0:bl.name,数据:fr}}).filter(Boolean);if(!vl||vl.length===0)return Qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Il=await da(Qe),Bl={试验代号:Qe,试验日期:Il,ParaForm:vl},pr=await it().catch(()=>""),Pl=await A.exportParaformApi(Bl,pr);if(((je=Pl==null?void 0:Pl.data)==null?void 0:je.code)===200&&((Ha=(ca=Pl==null?void 0:Pl.data)==null?void 0:ca.result)!=null&&Ha.Excel文件)){const bl=Pl.data.result.Excel文件,zl=await A.platformDownloadFile({url:bl}),Yl=new Blob([zl.data],{type:"application/vnd.ms-excel"}),Rl=URL.createObjectURL(Yl),fr=A.dayjs().format("YYYYMMDD"),Jl=`${(Qe||"UNKNOWN").trim()||"UNKNOWN"}_${fr}_paraform.xls`,sr=document.createElement("a");sr.href=Rl,sr.download=Jl,sr.style.display="none",document.body.appendChild(sr),sr.click(),setTimeout(()=>{document.body.removeChild(sr),URL.revokeObjectURL(Rl)},100);const Lr=Array.isArray((Xe=(Sa=Pl==null?void 0:Pl.data)==null?void 0:Sa.result)==null?void 0:Xe.warnings)?Pl.data.result.warnings:[];if(Lr.length>0){const cr=Lr.map((lr,nr)=>`${nr+1}. ${(lr==null?void 0:lr.field)||"未知字段"}:${(lr==null?void 0:lr.message)||""}`).join(`
|
|
24
24
|
`);Qa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
-
${cr}`,duration:5e3,showClose:!0})}else Qa.ElMessage.success("导出成功")}else Qa.ElMessage.error(((Ra=Pl==null?void 0:Pl.data)==null?void 0:Ra.message)||"导出失败")}catch(ce){console.error("导出paraform失败:",ce),Qa.ElMessage.error("导出失败:"+((ce==null?void 0:ce.message)||"未知错误"))}finally{oa.close()}}else if(u!=null&&u.includes("导出")&&u!=="导出paraform"){if(u==="导出选中"&&((Ge=ar.value)==null?void 0:Ge.length)===0)return Qa.ElMessage.warning(`请先勾选${u}的数据`);if(u==="导出全部"&&((Ia=K.value)==null?void 0:Ia.length)===0)return Qa.ElMessage.warning("暂无数据导出");let oa=["序号",...(ke=(za=xe.value)==null?void 0:za.map(ye=>ye==null?void 0:ye.prop))==null?void 0:ke.filter(ye=>ye!=="操作")],ce=u==="导出全部"?K.value:ar.value;const E=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id"];ce=ce==null?void 0:ce.map(ye=>Object.fromEntries(Object.entries(ye).filter(([Qe])=>!E.includes(Qe)))),oa=["序号",...oa],ce=ce==null?void 0:ce.map((ye,Qe)=>({序号:Qe+1,...ye}));let Me=(c==null?void 0:c.compName)||"表格信息";Oo(ce,Me,oa,Me)}else if(u==="OCR识别")Xa.value=!0,tl.value=[],Ea.value=1,Pa.value.clear(),ul.value.clear(),ol.value=0;else if(u==="迁移")i.selectRow=f,i.show=!0;else if(u==="生成方法"){let oa=await yf(f),ce;f!==""?ce=[f]:ce=A.cloneDeep(K.value),ce=ce==null?void 0:ce.map(Me=>(Me.输出值=oa,Me));const E={fixContent:ce,buttonName:"编辑",relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};ze("change",E)}else if(((_a=N==null?void 0:N.extra)==null?void 0:_a.type)==="methodButton"){let oa;f!==""?oa=[f]:oa=A.cloneDeep(K.value);const E={fixContent:await ci(oa,xe==null?void 0:xe.value),buttonName:"methodButton",relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};ze("change",E)}}},qc=async(u,f)=>{var N,O,V,B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za;try{let ke,_a;const oa=(N=R.value[ma.value+k])==null?void 0:N.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="structureMethod"}),ce=(O=R.value[ma.value+k])==null?void 0:O.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="structure"}),E=oa==null?void 0:oa.find(Ma=>{var dl,Ga;return((Ga=(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.pageData)==null?void 0:Ga.method)==="保存"});if(!E)return;const Me=(le=(re=R.value[(B=(V=E==null?void 0:E.value)==null?void 0:V.pageData)==null?void 0:B.path])==null?void 0:re.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="data"}))==null?void 0:le.find(Ma=>{var dl,Ga,ml,yl;return((Ga=(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.tableData)==null?void 0:Ga.算法名称)===((yl=(ml=E==null?void 0:E.value)==null?void 0:ml.pageData)==null?void 0:yl.method)});if(!Me)return;const ye={buttonName:(ve=(H=E==null?void 0:E.value)==null?void 0:H.pageData)==null?void 0:ve.method,api:(De=(_e=Me==null?void 0:Me.value)==null?void 0:_e.tableData)==null?void 0:De.算法体,content:ce==null?void 0:ce.map(Ma=>{var dl;return(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.pageData}),extraContent:[],extraValues:(je=(Be=E==null?void 0:E.value)==null?void 0:Be.pageData)==null?void 0:je.data,methodName:(Ha=(ca=E==null?void 0:E.value)==null?void 0:ca.pageData)==null?void 0:Ha.path};if(!u)return;const Qe={...u,compData:(Sa=u==null?void 0:u.compData)==null?void 0:Sa.map(Ma=>{var dl;return(Ma==null?void 0:Ma.key)==="formContent"?{...Ma,contents:(dl=Ma==null?void 0:Ma.contents)==null?void 0:dl.map(Ga=>(Ga==null?void 0:Ga.prop)===f?{...Ga,value:""}:Ga)}:Ma})},ta={key:{pageKey:ma.value+k,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:Qe}},da=await Qa.axios.post(ye.api,ta,{headers:{"Content-Type":"application/json"}});return((Xe=da==null?void 0:da.data)==null?void 0:Xe.code)===200&&(ke=(Ge=(Ra=da==null?void 0:da.data)==null?void 0:Ra.result)==null?void 0:Ge.latestReportCode,_a=(za=(Ia=da==null?void 0:da.data)==null?void 0:Ia.result)==null?void 0:za.status),{newMainKeyValue:ke,newStatus:_a}}catch(ke){throw Qa.ElMessage.error(ke),new Error(ke)}},Ci=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const Kc=async(u,f,N)=>{var H,ve;let O=u==null?void 0:u[f==null?void 0:f.prop],V=1,B,re;const le=A.cloneDeep(ma).value+k+O;if(le){Ci.value="",B=(H=R.value[le])==null?void 0:H.filter(Be=>{var je;return((je=Be==null?void 0:Be.key)==null?void 0:je.type)==="structure"});const _e=B==null?void 0:B.find(Be=>{var je,ca,Ha;return((Ha=(ca=(je=Be==null?void 0:Be.value)==null?void 0:je.pageData)==null?void 0:ca.comp)==null?void 0:Ha.toUpperCase())==="FORM"});re={...(ve=_e==null?void 0:_e.value)==null?void 0:ve.pageData,id:_e==null?void 0:_e.id};const De=await qc(re,f==null?void 0:f.prop);if(Ci.value=De==null?void 0:De.newStatus,De!=null&&De.newMainKeyValue)return De==null?void 0:De.newMainKeyValue}if(K.value.some(_e=>(_e==null?void 0:_e[f==null?void 0:f.prop])===O)){const _e=O;for(;K.value.some(De=>(De==null?void 0:De[f==null?void 0:f.prop])===`${_e}(${V})`);)V++;O=`${_e}(${V})`}return O},Wc=async(u,f,N)=>{var B,re,le,H;let O,V;if(await Kc(N==null?void 0:N.data,N==null?void 0:N.firstCol),O=A.cloneDeep(ma).value+k,V=A.cloneDeep(O)+`loading${((B=Fl.value)==null?void 0:B.account)||((re=Fl.value)==null?void 0:re.账号)}`,f){const ve=(H=(le=R.value[V])==null?void 0:le.filter(_e=>{var De;return((De=_e==null?void 0:_e.key)==null?void 0:De.parentTable)===""}))==null?void 0:H.map(_e=>{var De;return{id:_e==null?void 0:_e.id,...(De=_e==null?void 0:_e.value)==null?void 0:De.pageData}});(ve==null?void 0:ve.length)>0||await ua.loadingConstruct(O,V,null,null,null),We.setRouteToChildPath(A.cloneDeep(ma).value),ea.setActiveMenuPath(V)}else We.setRouteToChildPath(A.cloneDeep(ma).value),ea.setActiveMenuPath(V)},Yc=()=>{Ke.value=!1,Ye.value=[],wa.value=!1},zt=u=>{var B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce;const f=[];de.value=A.cloneDeep(xe.value),(re=ua.getColumnChild((B=A.cloneDeep(xe.value))==null?void 0:B.filter(E=>(E==null?void 0:E.label)!=="操作")))==null||re.forEach((E,Me)=>{var ye,Qe,ta;E!=null&&E.formType&&((ye=E==null?void 0:E.formType)==null?void 0:ye.toUpperCase())==="SELECT"||E!=null&&E.menuId?f.push({label:(Qe=E==null?void 0:E.prop)!=null&&Qe.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",name:(E==null?void 0:E.prop)??"t"+Me,prop:E==null?void 0:E.prop,type:"Select",value:(u==null?void 0:u[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??Me,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,relatedValueId:E==null?void 0:E.relatedValueId,disabled:E==null?void 0:E.disabled,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,allSelectionContents:(E==null?void 0:E.allSelectionContents)??[],filterContent:E==null?void 0:E.filterContent,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter}):f.push({label:(ta=E==null?void 0:E.prop)!=null&&ta.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",prop:E==null?void 0:E.prop,name:(E==null?void 0:E.prop)??"t"+Me,type:!(E!=null&&E.formType)||(E==null?void 0:E.formType)===""?"Input":E==null?void 0:E.formType,value:(E==null?void 0:E.formType)==="Upload"?(u==null?void 0:u[E==null?void 0:E.prop])??"{}":(u==null?void 0:u[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??Me,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,relatedValueId:E==null?void 0:E.relatedValueId,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter})}),u===""||!u||(ra.value=(u==null?void 0:u.id)??"");let N=ua.getColumnChild((le=A.cloneDeep(xe.value))==null?void 0:le.filter(E=>(E==null?void 0:E.label)!=="操作"));Fe.value&&((H=Fe.value)==null?void 0:H.length)>0&&(Fe.value=(ve=A.cloneDeep(Fe).value)==null?void 0:ve.map(E=>{var ye;let Me=(E==null?void 0:E.prop)||((ye=N==null?void 0:N.find(Qe=>(Qe==null?void 0:Qe.label)===(E==null?void 0:E.label)))==null?void 0:ye.prop);return Me&&(E.value=u[Me]),E})),ie.value=Fe.value&&((_e=Fe.value)==null?void 0:_e.length)>0?ua.getTableFormToForm(Fe.value):f,ie.value=((De=ie.value)==null?void 0:De.map(E=>({...E,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled})))??ie.value;let O=[],V=((ca=(je=(Be=c.itemData)==null?void 0:Be.filter(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:je[0])==null?void 0:ca.contents)??"";if(V=Ta.analyzeSplitToContent(V,","),(V==null?void 0:V.length)>0&&(O=V.flat()),(O==null?void 0:O.length)>0){let E=O==null?void 0:O.filter(da=>da==null?void 0:da.includes("@Type"));if(E=E==null?void 0:E[(E==null?void 0:E.length)-1],(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){let da=(Sa=(Ha=E==null?void 0:E.replace("=",$))==null?void 0:Ha.split($))==null?void 0:Sa[1];((Xe=da==null?void 0:da.trim())==null?void 0:Xe.toUpperCase())==="MANUAL"&&(c==null||c.index,ie.value=(Ra=ie.value)==null?void 0:Ra.map((Ma,dl)=>Ma))}let Me=(Ge=ie.value)==null?void 0:Ge.filter(da=>da==null?void 0:da.mainKey),ye;Me==null||Me.forEach(da=>{var dl;if(ye!==void 0)return;let Ma=da==null?void 0:da.menus;((dl=Me==null?void 0:Me.filter(Ga=>Ga==null?void 0:Ga.mainKey))==null?void 0:dl.length)>1&&(ye=Ma,da==null||da.groups)});let Qe=[],ta=new Map;if(Me==null||Me.forEach(da=>{var Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il;if((Ma=da==null?void 0:da.prop)!=null&&Ma.includes(".")){let Bl=[];ta.get(((Ga=(dl=da==null?void 0:da.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])+(da!=null&&da.isMainPath?0:1)+((ml=da==null?void 0:da.groups)==null?void 0:ml[0]))&&(Bl=ta.get(((jl=(yl=da==null?void 0:da.prop)==null?void 0:yl.split("."))==null?void 0:jl[0])+(da!=null&&da.isMainPath?0:1)+((Wa=da==null?void 0:da.groups)==null?void 0:Wa[0]))),Bl.push(da),ta.set(((Ka=(_l=da==null?void 0:da.prop)==null?void 0:_l.split("."))==null?void 0:Ka[0])+(da!=null&&da.isMainPath?0:1)+((hl=da==null?void 0:da.groups)==null?void 0:hl[0]),Bl)}else{let Bl=[];ta.get("normal"+(da!=null&&da.isMainPath?0:1)+((el=da==null?void 0:da.groups)==null?void 0:el[0]))&&(Bl=ta.get("normal"+(da!=null&&da.isMainPath?0:1)+((vl=da==null?void 0:da.groups)==null?void 0:vl[0]))),Bl.push(da),ta.set("normal"+(da!=null&&da.isMainPath?0:1)+((Il=da==null?void 0:da.groups)==null?void 0:Il[0]),Bl)}}),Qe=Array.from(ta.values()),(Qe==null?void 0:Qe.length)>0)for(let da in Qe){let Ma=Qe==null?void 0:Qe[da];if((Ma==null?void 0:Ma.length)!==1){if((Ma==null?void 0:Ma.length)>1){let dl=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.prop),Ga=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.label),ml=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.value),yl=(Ia=A.cloneDeep(Ma))==null?void 0:Ia[0],jl=(za=ie.value)==null?void 0:za.findIndex(hl=>(hl==null?void 0:hl.prop)===(yl==null?void 0:yl.prop)),Wa=(ke=ie.value)==null?void 0:ke.slice(0,jl),_l=(oa=ie.value)==null?void 0:oa.slice(jl,(_a=ie.value)==null?void 0:_a.length);yl.label=Ga==null?void 0:Ga.join("·"),yl.value=ml==null?void 0:ml.join(" "),yl.value.trim()===""&&(yl.value=""),yl.prop=dl==null?void 0:dl.join("·");let Ka=Ma==null?void 0:Ma.map(hl=>{var el;return(el=hl==null?void 0:hl.words)==null?void 0:el.join(".")});yl.relatedWords=Ka,yl.usingType="parent",_l.unshift(yl),ie.value=[...Wa,..._l],ie.value=(ce=ie.value)==null?void 0:ce.map(hl=>(dl!=null&&dl.find(el=>el===(hl==null?void 0:hl.prop))&&(hl.isFormColHidden=!0,hl.relatedWords=Ka),hl))}}}}},Jc=()=>{var f;const u=(f=s.value)==null?void 0:f.$el;u&&Ta.Sortable.create(u,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:N=>{var re;const{oldIndex:O,newIndex:V}=N;if(O===V)return;const B=Zr.value.splice(O,1)[0];Zr.value.splice(V,0,B),xe.value=(re=xe.value)==null?void 0:re.slice().sort((le,H)=>{if(le.label==="操作")return 1;if(H.label==="操作")return-1;const ve=Zr.value.findIndex(De=>De.label===le.label),_e=Zr.value.findIndex(De=>De.label===H.label);return ve-_e})}})};a.onMounted(()=>{ka.value=window.innerWidth-240*2,window.addEventListener("keydown",Ut)});const Gc=()=>{a.nextTick(()=>{Jc()})},Go=(u,f)=>{var O;if(!u&&!(u!=null&&u.children))return{contents:u,currentSelectContents:void 0};let N;return u.children=(O=u.children)==null?void 0:O.map(V=>{var B,re;if((V==null?void 0:V.id)===ra.value){let le={};for(let H in V){let ve=(B=f==null?void 0:f.find(_e=>(_e==null?void 0:_e.prop)===H))==null?void 0:B.label;ve?le[H]=(re=ir.value)==null?void 0:re[ve]:le[H]=V[H]??""}V=Object.assign(le,ir.value),N=V}else{let le=Go(V,f);V=le==null?void 0:le.contents,N=le==null?void 0:le.currentSelectContents}return V}),{contents:u,currentSelectContents:N}},Ei=(u,f)=>{let N,O;return u!=null&&u.find(V=>(V==null?void 0:V.id)===ra.value)?N=u==null?void 0:u.map(V=>{var B,re,le;if((V==null?void 0:V.id)===ra.value){let H={};for(let _e in V){let De=(B=f==null?void 0:f.find(Be=>(Be==null?void 0:Be.prop)===_e))==null?void 0:B.label;De?H[_e]=((re=ir.value)==null?void 0:re[De])??"":H[_e]=V[_e]??""}let ve=ir.value;for(let _e in H)(le=ir.value)!=null&&le[_e]||(ve[_e]=(H==null?void 0:H[_e])??"");V=ve,O=V}return V}):N=u==null?void 0:u.map(V=>{var B,re,le,H;if((V==null?void 0:V.id)===ra.value){let ve={};for(let _e in V){let De=(B=f==null?void 0:f.find(Be=>(Be==null?void 0:Be.prop)===_e))==null?void 0:B.label;De?ve[_e]=(re=ir.value)==null?void 0:re[De]:ve[_e]=V[_e]??""}V=Object.assign(ve,ir.value),O=V}else V=(le=Go(V,f))==null?void 0:le.contents,O=(H=Go(V,f))==null?void 0:H.currentSelectContents;return V}),{newContents:N,currentSelectContents:O}},Si=(u,f,N)=>{var O,V;return u[f==null?void 0:f.prop]=N,typeof u.id=="number"&&(u.id=(O=u.id)==null?void 0:O.toString()),u.children&&((V=u.children)==null?void 0:V.length)>0&&(u.children=u.children.map(Si)),u},Di=u=>{var N;const f=[];return f.push({...u}),u!=null&&u.children&&Array.isArray(u.children)&&((N=u.children)==null||N.forEach(O=>{f.push(...Di(O))})),(f==null?void 0:f.length)>0?f==null?void 0:f.map(O=>{const V={...O};return delete V.children,V}):[]},ro=["Pacific6000数据采集装置.通道号","通道号"],Ot=u=>{if(!u)return"";const f=ro.map(N=>u==null?void 0:u[N]).find(N=>N!=null&&String(N).trim()!=="");return f==null?"":String(f).trim()},Xo=async(u,f=void 0)=>{if(!u)return!1;try{const N=je=>{var ca,Ha,Sa;return je?typeof(je==null?void 0:je.value)=="string"?je.value:((Sa=(Ha=(ca=je==null?void 0:je._custom)==null?void 0:ca.value)==null?void 0:Ha.value)==null?void 0:Sa.value)||"":""},O=Array.isArray(mn.value)?mn.value:[],V=N(O.find(je=>(je==null?void 0:je.condition)==="child")),B=(ma.value||"").replace(/\/+$/,""),re=V?`${B}/${V}`:B,le=await Pr(re||ma.value,!1),H=String(Ie.value||"").trim(),ve=je=>String(je||"").trim(),_e=(je,ca=[],Ha="")=>{if(!Array.isArray(je))return ca;for(const Sa of je){const Xe=ve((Sa==null?void 0:Sa.choiceName)||(Sa==null?void 0:Sa.name0)||Ha);(Sa==null?void 0:Sa.comp)==="Table"&&(!H||Xe===H)&&ca.push(Sa),Array.isArray(Sa==null?void 0:Sa.children)&&_e(Sa.children,ca,Xe),Array.isArray(Sa==null?void 0:Sa.tab)&&_e(Sa.tab,ca,Xe),Array.isArray(Sa==null?void 0:Sa.choice)&&_e(Sa.choice,ca,Xe)}return ca},De=_e(le||[]),Be=String((c==null?void 0:c.compName)||"");return De.some(je=>{var Ha,Sa;const ca=((Sa=(Ha=je==null?void 0:je.compData)==null?void 0:Ha.find(Xe=>(Xe==null?void 0:Xe.key)==="tableContents"))==null?void 0:Sa.contents)||[];return!Array.isArray(ca)||ca.length===0?!1:ca.some(Xe=>{if(String((je==null?void 0:je.name)||"")===Be&&(Xe==null?void 0:Xe.id)===f)return!1;const Ge=Ot(Xe);return!!Ge&&Ge===u})})}catch{return(K.value||[]).some(O=>{if((O==null?void 0:O.id)===f)return!1;const V=Ot(O);return!!V&&V===u})}},It=async(u=!0,f,N)=>{var ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l;if(ir.value){const Ka=(_e=ua.getColumnChild((ve=A.cloneDeep(xe.value))==null?void 0:ve.filter(el=>(el==null?void 0:el.label)!=="操作")))==null?void 0:_e.filter(el=>(el==null?void 0:el.required)===!0);for(let el=0;el<((Ka==null?void 0:Ka.length)??0);el++){const vl=Ka[el],Il=vl==null?void 0:vl.prop,Bl=(vl==null?void 0:vl.label)??Il,pr=(De=ir.value)==null?void 0:De[Il];if(pr===""||pr===null||pr===void 0||Array.isArray(pr)&&pr.length===0){Qa.ElMessage.error(`${Bl}不能为空`);return}}const hl=Ot(ir.value);if(hl&&await Xo(hl,ra.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let O=ua.getColumnChild((Be=A.cloneDeep(xe.value))==null?void 0:Be.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")),V,B=A.cloneDeep(K.value);if(!ir.value){fa.value=!1;return}if(ra.value===""){$e.value++;let Ka;Ka={id:$e.value.toString()},Ka!=null&&Ka.children&&(Ka={...Ka,children:(je=Ka.children)==null?void 0:je.map(hl=>Si(hl,f,N))}),B.push(Object.assign(ir.value,Ka)),V=Object.assign(ir.value,Ka)}else B=(ca=Ei(B,O))==null?void 0:ca.newContents,V=(Ha=Ei(B,O))==null?void 0:Ha.currentSelectContents;const re=(Sa=c.itemData)==null?void 0:Sa.filter(Ka=>(Ka==null?void 0:Ka.key)==="childTree")[0];if(((Xe=re==null?void 0:re.contents)==null?void 0:Xe.length)>0){Te.value="编辑";const Ka=[];B==null||B.forEach((vl,Il)=>{var pr;let Bl={};if(Array.isArray(vl)){let Pl=[];vl==null||vl.filter(bl=>!(bl!=null&&bl.id)).forEach((bl,zl)=>{var Yl,Rl,fr,hr,Jl,sr,Lr;if((Rl=(Yl=$r.value)==null?void 0:Yl[zl])!=null&&Rl.prop&&!Array.isArray(bl)){let cr={};cr[$r.value[zl].column]=bl,Oa!=null&&Oa.value&&((fr=Oa==null?void 0:Oa.value)==null?void 0:fr.length)>0&&((hr=Oa==null?void 0:Oa.value)!=null&&hr.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(cr)))&&(Pl=(Jl=Oa==null?void 0:Oa.value)==null?void 0:Jl.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(cr))),Pl&&Pl.length>0?Bl[$r.value[zl].prop]=Pl!=null&&Pl.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===$r.value[zl].column})?(sr=Pl==null?void 0:Pl.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===$r.value[zl].column}))==null?void 0:sr[$r.value[zl].column]:bl:Bl[$r.value[zl].prop]=bl}else Array.isArray(bl)&&((Lr=$r.value[zl])!=null&&Lr.prop?Bl[$r.value[zl].prop]=bl:Bl.children=ui(bl,$r.value))})}else Bl=vl;if(Array.isArray(vl)&&vl.some(Pl=>Pl==null?void 0:Pl.id)){const Pl=(pr=vl==null?void 0:vl.find(bl=>bl.id))==null?void 0:pr.id;Ka.push(Object.assign(Bl,{id:Zt(Pl)}))}else Bl.id?Ka.push(Bl):Ka.push(Object.assign(Bl,{id:Il.toString()}))});const hl=(K.value||[]).map(vl=>String(vl==null?void 0:vl.id)),el=Qt(Ka,hl);K.value=Ai(el,re,xe.value)}Ni(K.value),tn.value=K.value;const le=Qp(tn.value,An.value,B);let H=[];if(P.value?(H=(Ra=A.cloneDeep(P).value.singleContent)==null?void 0:Ra.filter(Ka=>(Ka==null?void 0:Ka.id)!==(V==null?void 0:V.id)),H.push(V)):H=[V],Ll.value){const Ka={content:le,singleContent:((Ge=re==null?void 0:re.contents)==null?void 0:Ge.length)>0?H==null?void 0:H.flatMap(Di):H,index:c==null?void 0:c.index,buttonName:"编辑",column:xe.value,parentTableId:c==null?void 0:c.parentTableId};We.setCacheUpdatingData(Ka)}if((Ia=xe.value)==null||Ia.forEach(Ka=>{(Ka==null?void 0:Ka.formType)==="Upload"&&(V[Ka.prop]=V[Ka.prop]===""?"{}":typeof V[Ka.prop]!="string"?JSON.stringify(V[Ka.prop]):V[Ka.prop])}),u){(oa=(_a=(ke=(za=c.itemData)==null?void 0:za.find(el=>(el==null?void 0:el.key)==="filterAllType"))==null?void 0:ke.value)==null?void 0:_a.find(el=>(el==null?void 0:el.value)==="onConditionContents"))==null||oa.content;let Ka=(ce=c.itemData)==null?void 0:ce.filter(el=>(el==null?void 0:el.key)==="filterAllType");Ka=Array.from(new Map(Ka.filter(Boolean).map((el,vl)=>[el.value,{...el,_idx:vl}])).values()).sort((el,vl)=>el._idx-vl._idx).map(({_idx:el,...vl})=>vl),Ka=(E=Ka==null?void 0:Ka[(Ka==null?void 0:Ka.length)-1])==null?void 0:E.value;const hl={fixContent:[V],buttonName:Te.value,relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};We.setTableLoading(c==null?void 0:c.index),fa.value=!1,ir.value=void 0,ze("change",hl)}if((Qe=(ye=(Me=ie.value)==null?void 0:Me[0])==null?void 0:ye.optionUrl)!=null&&Qe.menuId){fa.value=!1;let Ka=(ta=c.itemData)==null?void 0:ta.filter(hl=>(hl==null?void 0:hl.key)==="filterAllType");if((Ka==null?void 0:Ka.length)>0){let hl=Ka==null?void 0:Ka.map(Il=>Il==null?void 0:Il.value),el=(dl=(Ma=(da=hl.flat().find(Il=>{var Bl;return(Bl=Il==null?void 0:Il.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:da.content)==null?void 0:Ma.split(":"))==null?void 0:dl[1];((yl=(ml=(Ga=hl.flat().find(Il=>{var Bl;return(Bl=Il==null?void 0:Il.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:Ga.content)==null?void 0:ml.split(":"))==null?void 0:yl[1])!=="Manual"&&(el=parseInt(el),K.value=(_l=K.value)==null?void 0:_l.slice(((jl=K.value)==null?void 0:jl.length)-el,(Wa=K.value)==null?void 0:Wa.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Ut),xe.value=[],K.value=[],de.value=[],ya.value=[],Fe.value=[],$a.value=[],Ye.value=[],Oe.value=[],ie.value=[],ar.value=[],s.value=null,Mn.value=""});const no=async(u,f,N)=>{var je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce;Hl.value=(N==null?void 0:N.prop)??(N==null?void 0:N.property);const O=A.cloneDeep(c.itemData),V=((je=O==null?void 0:O.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:je.contents)??[];let B=V==null?void 0:V.find((E,Me)=>{var ye,Qe,ta;return(E==null?void 0:E.prop)===Hl.value||(E==null?void 0:E.label)===Hl.value||(Me==null?void 0:Me.toString())===((ta=(Qe=(ye=Hl.value)==null?void 0:ye.split("a"))==null?void 0:Qe[1])==null?void 0:ta.toString())});const re=ua.getColumnChild((ca=A.cloneDeep(xe.value))==null?void 0:ca.filter(E=>(E==null?void 0:E.label)!=="操作"));if(B||(B=re==null?void 0:re.find(E=>(E==null?void 0:E.prop)===Hl.value||(E==null?void 0:E.label)===Hl.value)),B&&!((Ha=B==null?void 0:B.menus)!=null&&Ha.length)&&!((Sa=B==null?void 0:B.groups)!=null&&Sa.length)&&!((Xe=B==null?void 0:B.words)!=null&&Xe.length)){const E=(Ra=ie.value)==null?void 0:Ra.find(Me=>(Me==null?void 0:Me.prop)===Hl.value);E&&(B={...B,menus:(E==null?void 0:E.menus)??(B==null?void 0:B.menus),groups:(E==null?void 0:E.groups)??(B==null?void 0:B.groups),words:(E==null?void 0:E.words)??(B==null?void 0:B.words),bindMenus:(E==null?void 0:E.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(E==null?void 0:E.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(E==null?void 0:E.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(E==null?void 0:E.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((Ge=ie==null?void 0:ie.value)==null||Ge.forEach(E=>{var Me,ye,Qe,ta,da;(E==null?void 0:E.prop)===(B==null?void 0:B.prop)&&(E!=null&&E.endChildMenu)&&((Me=B==null?void 0:B.prop)!=null&&Me.includes(".")&&((Qe=(ye=B==null?void 0:B.prop)==null?void 0:ye.split("."))==null?void 0:Qe[0])!==((da=(ta=E==null?void 0:E.prop)==null?void 0:ta.split("."))==null?void 0:da[0])?B.endChildMenu=E==null?void 0:E.value:B.endChildMenu=E==null?void 0:E.endChildMenu)})),!B)return;const le=Hl.value,H=(Ia=K.value)==null?void 0:Ia.findIndex(E=>(E==null?void 0:E.id)===(f==null?void 0:f.id));H!==-1&&le&&(K.value[H]={...K.value[H],[le]:u});const ve=E=>{Array.isArray(E)&&E.forEach(Me=>{Array.isArray(Me==null?void 0:Me.allSelectionContents)&&Me.allSelectionContents.length>0&&(Me.contactValue=K.value[H]??f),Array.isArray(Me==null?void 0:Me.children)&&Me.children.length>0&&ve(Me.children)})};ve(xe.value),B.value=u,B.endChildMenu=B.endChildMenu||"";let _e=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const De=E=>{Array.isArray(E)&&E.forEach(Me=>{var Qe,ta;if(((Me==null?void 0:Me.type)==="Select"||(Me==null?void 0:Me.formType)&&Me.formType.toUpperCase()==="SELECT"||(Me==null?void 0:Me.columnType)&&Me.columnType.toUpperCase()==="SELECT")&&Array.isArray(Me==null?void 0:Me.menus)&&Me.menus.length>0&&Me.menus[Me.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const da=(Qe=Me==null?void 0:Me.prop)!=null&&Qe.includes(".")?Me.prop.split(".")[0]:null,Ma=(ta=B==null?void 0:B.prop)!=null&&ta.includes(".")?B.prop.split(".")[0]:null;(!da||!Ma||da===Ma)&&(Me.endChildMenu=_e)}Array.isArray(Me==null?void 0:Me.children)&&Me.children.length>0&&De(Me.children)})};if(De(xe.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let E=B!=null&&B.relatedContents&&((za=B==null?void 0:B.relatedContents)==null?void 0:za.length)>0?(ke=B==null?void 0:B.relatedContents)==null?void 0:ke.find(Me=>{var ye,Qe,ta,da;return(Me==null?void 0:Me[(da=(ye=B==null?void 0:B.prop)==null?void 0:ye.split("."))==null?void 0:da[((ta=(Qe=B==null?void 0:B.prop)==null?void 0:Qe.split("."))==null?void 0:ta.length)-1]])===(B==null?void 0:B.value)}):await as(B);if(E){const Me={...f};re==null||re.forEach(ye=>{var Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il;(ye==null?void 0:ye.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((Qe=B==null?void 0:B.relatedContents)==null?void 0:Qe.length)>0?(ta=ye==null?void 0:ye.prop)!=null&&ta.includes(".")&&((Ma=(da=ye==null?void 0:ye.prop)==null?void 0:da.split("."))==null?void 0:Ma[0])===((Ga=(dl=B==null?void 0:B.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])?Me[ye.prop]=E[(Wa=(ml=ye==null?void 0:ye.prop)==null?void 0:ml.split("."))==null?void 0:Wa[((jl=(yl=ye==null?void 0:ye.prop)==null?void 0:yl.split("."))==null?void 0:jl.length)-1]]??Me[ye.prop]:Me[ye.prop]=(E==null?void 0:E[ye.prop])??Me[ye.prop]:Ta.same((B==null?void 0:B.menus)??[],(ye==null?void 0:ye.menus)??[])&&Ta.same((B==null?void 0:B.groups)??[],(ye==null?void 0:ye.groups)??[])&&!Ta.same((B==null?void 0:B.words)??[],(ye==null?void 0:ye.words)??[])?(_l=ye==null?void 0:ye.prop)!=null&&_l.includes(".")&&((hl=(Ka=ye==null?void 0:ye.prop)==null?void 0:Ka.split("."))==null?void 0:hl[0])!==((vl=(el=B==null?void 0:B.prop)==null?void 0:el.split("."))==null?void 0:vl[0])||(Me[ye.prop]=(E==null?void 0:E[(Il=ye==null?void 0:ye.words)==null?void 0:Il.join(".")])??(E==null?void 0:E[ye.prop])??Me[ye.prop]):(!(ye!=null&&ye.isMainPath)&&Ta.same((B==null?void 0:B.bindMenus)??[],(ye==null?void 0:ye.bindMenus)??[]),Me[ye.prop]=(E==null?void 0:E[ye.prop])??Me[ye.prop]))}),K.value=(_a=A.cloneDeep(K.value))==null?void 0:_a.map(ye=>(ye==null?void 0:ye.id)===(f==null?void 0:f.id)?{...Me,id:ye==null?void 0:ye.id}:ye)}}if((oa=B==null?void 0:B.optionUrl)!=null&&oa.menuSelect){let E="";re==null||re.forEach(Qe=>{var ta,da,Ma,dl,Ga;E===""&&((Ma=(da=(ta=Qe==null?void 0:Qe.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:da[1])!=null&&Ma.includes("["))&&(E=(Ga=(dl=Qe==null?void 0:Qe.optionUrl)==null?void 0:dl.groupSelect)==null?void 0:Ga[1])});let Me=await di(B),ye;if(Me==null||Me.forEach(Qe=>{var ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l;E===((da=(ta=B==null?void 0:B.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:da[1])&&((Ga=(dl=(Ma=B==null?void 0:B.optionUrl)==null?void 0:Ma.groupSelect)==null?void 0:dl[1])!=null&&Ga.includes("["))&&((_l=A.cloneDeep(Qe))==null?void 0:_l[(Wa=(jl=(yl=(ml=B==null?void 0:B.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])==null?void 0:jl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])===(B==null?void 0:B.value)&&(ye=Qe)}),ye){const Qe={...f};re==null||re.forEach(ta=>{var da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl;(ye!=null&&ye[ta==null?void 0:ta.label]||ye!=null&&ye[(Ga=(dl=(Ma=(da=ta==null?void 0:ta.optionUrl)==null?void 0:da.groupSelect)==null?void 0:Ma[1])==null?void 0:dl.replaceAll("[",""))==null?void 0:Ga.replaceAll("]","")])&&((jl=(yl=(ml=ta==null?void 0:ta.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])!=null&&jl.includes("["))&&(Qe[ta.prop]=(ye==null?void 0:ye[ta==null?void 0:ta.label])||(ye==null?void 0:ye[(hl=(Ka=(_l=(Wa=ta==null?void 0:ta.optionUrl)==null?void 0:Wa.groupSelect)==null?void 0:_l[1])==null?void 0:Ka.replaceAll("[",""))==null?void 0:hl.replaceAll("]","")]))}),K.value=(ce=A.cloneDeep(K.value))==null?void 0:ce.map(ta=>(ta==null?void 0:ta.id)===(f==null?void 0:f.id)?{...Qe,id:ta==null?void 0:ta.id}:ta)}}},Xc=async u=>{var je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa;if(!u)return;const f=A.cloneDeep(ir.value||{});ir.value=u;const N=Ot(f),O=Ot(ir.value);if(O&&O!==N&&await Xo(O,ra.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),ro.forEach(E=>{if(Object.prototype.hasOwnProperty.call(ir.value||{},E)||Object.prototype.hasOwnProperty.call(f||{},E)){const Me=(f==null?void 0:f[E])??"";ir.value[E]=Me,u[E]=Me}}),ie.value=(ie.value||[]).map(E=>{if(!(E!=null&&E.prop)||!ro.includes(E.prop))return E;const Me=(f==null?void 0:f[E.prop])??"";return{...E,value:Me,selectValue:Me===""?[]:[Me]}});return}let V=A.cloneDeep(c.itemData);V==null||V.map(ce=>{var E,Me,ye,Qe;return(ce==null?void 0:ce.key)==="header"&&(Array.isArray((E=ce.contents)==null?void 0:E[0])?ce.contents=(ye=ua.getColumnChild((Me=ce.contents)==null?void 0:Me[0]))==null?void 0:ye.map((ta,da)=>{var Ma,dl,Ga,ml,yl,jl;return((Ga=(dl=(Ma=ie.value)==null?void 0:Ma.find(Wa=>(Wa==null?void 0:Wa.prop)===(ta==null?void 0:ta.prop)))==null?void 0:dl.optionUrl)==null?void 0:Ga.multiple)===!0&&!Array.isArray((ml=Object.values(u))==null?void 0:ml[da])?ta.value=[(yl=Object.values(u))==null?void 0:yl[da]]:ta.value=(jl=Object.values(u))==null?void 0:jl[da],ta}):ce.contents=(Qe=ce.contents)==null?void 0:Qe.map((ta,da)=>{var Ma,dl,Ga,ml,yl,jl;return((Ga=(dl=(Ma=ie.value)==null?void 0:Ma.find(Wa=>(Wa==null?void 0:Wa.prop)===(ta==null?void 0:ta.prop)))==null?void 0:dl.optionUrl)==null?void 0:Ga.multiple)===!0&&!Array.isArray((ml=Object.values(u))==null?void 0:ml[da])?ta.value=[(yl=Object.values(u))==null?void 0:yl[da]]:ta.value=(jl=Object.values(u))==null?void 0:jl[da],ta})),ce});let B=ie.value,re=(je=V==null?void 0:V.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:je.contents;if(B=B==null?void 0:B.map(ce=>{var E;return ce.value=ce.value??((E=re==null?void 0:re.find((Me,ye)=>(Me==null?void 0:Me.prop)===(ce==null?void 0:ce.name)))==null?void 0:E.value),ce}),!Tr.value)return;let le=A.cloneDeep(Hl.value);(ca=Hl.value)!=null&&ca.includes("·")&&(Hl.value=(Sa=(Ha=Hl.value)==null?void 0:Ha.split("·"))==null?void 0:Sa[0]);let H=(Ra=(Xe=V==null?void 0:V.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:Xe.contents)==null?void 0:Ra.find((ce,E)=>(ce==null?void 0:ce.prop)===Hl.value);(Ge=ie==null?void 0:ie.value)==null||Ge.forEach(ce=>{var E,Me,ye,Qe,ta,da,Ma,dl,Ga;(ce==null?void 0:ce.prop)===(H==null?void 0:H.prop)&&(ce!=null&&ce.endChildMenu)&&((E=H==null?void 0:H.prop)!=null&&E.includes(".")&&((ye=(Me=H==null?void 0:H.prop)==null?void 0:Me.split("."))==null?void 0:ye[0])!==((ta=(Qe=ce==null?void 0:ce.prop)==null?void 0:Qe.split("."))==null?void 0:ta[0])?H.endChildMenu=(Ma=(da=ce==null?void 0:ce.value)==null?void 0:da.split(" "))==null?void 0:Ma[0]:H.endChildMenu=(Ga=(dl=ce==null?void 0:ce.endChildMenu)==null?void 0:dl.split(" "))==null?void 0:Ga[0])});let ve=H!=null&&H.isMainPath&&(H!=null&&H.mainKey)?H==null?void 0:H.value:"",_e=A.cloneDeep(B),De=be.value;if(De!=null&&De.find(ce=>(H==null?void 0:H.prop)===(ce==null?void 0:ce.key))&&(De=De==null?void 0:De.filter(ce=>(H==null?void 0:H.prop)!==(ce==null?void 0:ce.key))),De!=null&&De.find(ce=>le===(ce==null?void 0:ce.key))&&(De=De==null?void 0:De.filter(ce=>le!==(ce==null?void 0:ce.key))),_e=_e==null?void 0:_e.map(ce=>{var E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl;return(ce==null?void 0:ce.type)==="Select"&&(((E=ce==null?void 0:ce.allSelectionContents)==null?void 0:E.length)>0&&(ce.contactValue=u),((H==null?void 0:H.prop)===(ce==null?void 0:ce.prop)||le===(ce==null?void 0:ce.prop))&&H&&(Array.isArray(H.value)&&((Me=H.value)==null?void 0:Me.length)>0&&((ye=H.value)!=null&&ye.every(el=>typeof el=="string"))?(De.push({key:ce==null?void 0:ce.prop,value:[(ta=H.value)==null?void 0:ta[((Qe=H.value)==null?void 0:Qe.length)-1]]}),ce.selectValue=(da=De==null?void 0:De.find(el=>(el==null?void 0:el.key)===(ce==null?void 0:ce.prop)))==null?void 0:da.value):Array.isArray(H.value)&&((Ma=H.value)==null?void 0:Ma.length)===0?(De=[],ce.selectValue=[],u[ce==null?void 0:ce.prop]=""):Array.isArray(ce.value)&&De.push({key:ce==null?void 0:ce.prop,value:[(dl=ce.value)==null?void 0:dl[(ce==null?void 0:ce.length)-1]]})),((ml=ce==null?void 0:ce.menus)==null?void 0:ml[((Ga=ce==null?void 0:ce.menus)==null?void 0:Ga.length)-1])===""&&(H!=null&&H.isMainPath)&&(H!=null&&H.mainKey)&&((yl=ce==null?void 0:ce.prop)!=null&&yl.includes(".")&&((Wa=(jl=ce==null?void 0:ce.prop)==null?void 0:jl.split("."))==null?void 0:Wa[0])!==((Ka=(_l=H==null?void 0:H.prop)==null?void 0:_l.split("."))==null?void 0:Ka[0])||(ce.endChildMenu=(hl=ve==null?void 0:ve.split(" "))==null?void 0:hl[0]))),ce.value=(u==null?void 0:u[ce==null?void 0:ce.prop])??(ce==null?void 0:ce.value),ce}),be.value=De,_e!=null&&_e.some(ce=>(ce==null?void 0:ce.functionName)&&(ce==null?void 0:ce.functionName)!=="")){let ce=await ci([u],xe==null?void 0:xe.value,"Auto",K.value);_e=_e==null?void 0:_e.map(E=>{var Me;return E.value=((Me=ce==null?void 0:ce[0])==null?void 0:Me[E==null?void 0:E.prop])??E.value,E}),ir.value=ce==null?void 0:ce[0]}if(ie.value=A.cloneDeep(_e),H=Object.assign({},H??{},{relatedWords:(za=(Ia=ie==null?void 0:ie.value)==null?void 0:Ia.find(ce=>(ce==null?void 0:ce.prop)===(H==null?void 0:H.prop)))==null?void 0:za.relatedWords}),(H==null?void 0:H.mainKey)&&(H!=null&&H.value)&&(H==null?void 0:H.value)!==""){let ce=H!=null&&H.relatedContents&&((ke=H==null?void 0:H.relatedContents)==null?void 0:ke.length)>0?(_a=H==null?void 0:H.relatedContents)==null?void 0:_a.find(E=>{var Me,ye,Qe,ta;return(E==null?void 0:E[(ta=(Me=H==null?void 0:H.prop)==null?void 0:Me.split("."))==null?void 0:ta[((Qe=(ye=H==null?void 0:H.prop)==null?void 0:ye.split("."))==null?void 0:Qe.length)-1]])===(H==null?void 0:H.value)}):await as(H);if(ce&&JSON.stringify(ce)!=="{}"){let E=_e;E=E==null?void 0:E.map(ye=>{var Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il,Bl,pr,Pl,bl,zl;return(H==null?void 0:H.prop)===(ye==null?void 0:ye.prop)?ye.value=(ce==null?void 0:ce[(Qe=ye==null?void 0:ye.words)==null?void 0:Qe.join(".")])??(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ce[(dl=(ta=ye==null?void 0:ye.prop)==null?void 0:ta.split("."))==null?void 0:dl[((Ma=(da=ye==null?void 0:ye.prop)==null?void 0:da.split("."))==null?void 0:Ma.length)-1]]:H!=null&&H.relatedContents&&((Ga=H==null?void 0:H.relatedContents)==null?void 0:Ga.length)>0?ye.value=(ml=ye==null?void 0:ye.prop)!=null&&ml.includes(".")&&((jl=(yl=ye==null?void 0:ye.prop)==null?void 0:yl.split("."))==null?void 0:jl[0])===((_l=(Wa=H==null?void 0:H.prop)==null?void 0:Wa.split("."))==null?void 0:_l[0])?ce[(vl=(Ka=ye==null?void 0:ye.prop)==null?void 0:Ka.split("."))==null?void 0:vl[((el=(hl=ye==null?void 0:ye.prop)==null?void 0:hl.split("."))==null?void 0:el.length)-1]]:(ce==null?void 0:ce[ye==null?void 0:ye.prop])??(ye==null?void 0:ye.value):Ta.same((H==null?void 0:H.menus)??[],(ye==null?void 0:ye.menus)??[])&&Ta.same((H==null?void 0:H.groups)??[],(ye==null?void 0:ye.groups)??[])&&!Ta.same((H==null?void 0:H.words)??[],(ye==null?void 0:ye.words)??[])?(Il=ye==null?void 0:ye.prop)!=null&&Il.includes(".")&&((pr=(Bl=ye==null?void 0:ye.prop)==null?void 0:Bl.split("."))==null?void 0:pr[0])!==((bl=(Pl=H==null?void 0:H.prop)==null?void 0:Pl.split("."))==null?void 0:bl[0])||(ye.value=(ce==null?void 0:ce[(zl=ye==null?void 0:ye.words)==null?void 0:zl.join(".")])??(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ye.value):(!(ye!=null&&ye.isMainPath)&&Ta.same((H==null?void 0:H.bindMenus)??[],(ye==null?void 0:ye.bindMenus)??[]),ye.value=(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ye.value),ye}),ie.value=E;let Me={};(oa=ie.value)==null||oa.forEach(ye=>{Me[ye.prop]=ye==null?void 0:ye.value}),ir.value=Me}}Tr.value=!0,Y.value=!1},Zc=u=>u?(u==null?void 0:u.toUpperCase())==="INPUT"?"TEXTAREA":u:"TEXTAREA",Qc=u=>{var B,re;const f=(re=(B=Fe.value)==null?void 0:B.find(le=>(le==null?void 0:le.label)===(u==null?void 0:u.label)))==null?void 0:re.multiple,N=u==null?void 0:u.prop;if((u==null?void 0:u.formType)!="Select")return;K.value.forEach(le=>{const H=le==null?void 0:le[N];f&&ko.isString(H)&&(le[N]=[H]),!f&&!ko.isString(H)&&(le[N]="")})},Bi=(u,f)=>{var N;return f==null||f.forEach(O=>{u[O==null?void 0:O.prop]=O==null?void 0:O.value}),u.children&&((N=u.children)==null?void 0:N.length)>0&&(u.children=u.children.map(O=>Bi(O,f))),u},Zo=u=>{var N,O,V,B,re,le;zt("");const f=(N=ie.value)==null?void 0:N.reduce((H,ve)=>(H[ve.name]=ve.value,H),{});if(((O=Object.keys(f))==null?void 0:O.length)>0){ir.value=f,ra.value="",$e.value=(V=K.value)==null?void 0:V.length,Oe.value=(B=ue.value)==null?void 0:B.filter(ve=>(ve==null?void 0:ve.label)!=="新增");const H=(le=(re=de.value)==null?void 0:re.filter(ve=>(ve==null?void 0:ve.label)!=="操作"))==null?void 0:le.map(ve=>{var De,Be,je;const _e=(Be=(De=Fe.value)==null?void 0:De.find(ca=>(ca==null?void 0:ca.label)===(ve==null?void 0:ve.label)))==null?void 0:Be.multiple;return Qc(ve),{...ve,contents:(ve==null?void 0:ve.options)??[],optionUrl:ve!=null&&ve.formMenuSelect&&((je=ve==null?void 0:ve.formMenuSelect)==null?void 0:je.length)>0?{groupSelect:ve==null?void 0:ve.groupSelect,menuSelect:ve==null?void 0:ve.formMenuSelect,selectRelateType:"",type:ve==null?void 0:ve.formType,multiple:_e}:null}});xe.value=H==null?void 0:H.map(ve=>Bi(ve,[{prop:"type",value:"edit"},{prop:"columnType",value:Zc(ve==null?void 0:ve.formType)||(ve==null?void 0:ve.columnType)}])),u==="createClick"&&(Te.value="新增",It(!0))}},ut={START:"开始时间",END:"结束时间",HOURS:"工时"},eu=(u,f)=>Number(A.dayjs(f).diff(A.dayjs(u),"day",!0).toFixed(1)),Ni=u=>{var B;const f=c.itemData,N=(B=f==null?void 0:f.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:B.contents,O=new Map;return N==null||N.forEach((re,le)=>{const{label:H}=re;O.set(H,le)}),!O.has(ut.START)||!O.has(ut.END)||!O.has(ut.HOURS)?u:u==null?void 0:u.map(re=>{const le=re==null?void 0:re[ut.START],H=re==null?void 0:re[ut.END],ve=eu(le,H);return le&&H&&(re[ut.HOURS]=`${ve}天`),re})},Ti=(u,f,N=0)=>{if(N>((f==null?void 0:f.length)??""))return u;const O=f==null?void 0:f[N],V=new Map;for(const re of u){const le=re[O];V.has(le)||V.set(le,[]),V.get(le)&&V.get(le).push(re)}const B=[];for(const[re,le]of V){const[H,...ve]=le,_e={...H};N+1===((f==null?void 0:f.length)??"")?_e.children=le==null?void 0:le.map(De=>(De.level=A.cloneDeep(N)+1,De)).filter((De,Be)=>Be!==0):ve.length>0&&(_e.children=Ti(ve,f,N+1)),_e.level=N,B.push(_e)}return B},Ai=(u,f,N)=>{var V;if(!(f!=null&&f.contents)||((V=f==null?void 0:f.contents)==null?void 0:V.length)===0)return u;let O=[];return O=Ti(u,f==null?void 0:f.contents,0),O},Mi=async(u,f)=>{var Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il,Bl,pr,Pl,bl,zl,Yl,Rl,fr,hr,Jl,sr,Lr,cr,lr,nr,Oi,Ii,Li;const N=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="header");u==null||u.filter(ia=>(ia==null?void 0:ia.key)==="tableIndexColumn")[0];const O=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="childTree")[0];let V=!0;if((Ra=(Xe=(Sa=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:Sa.value)==null?void 0:Xe.find(ia=>(ia==null?void 0:ia.value)==="onPamButtonContents"))!=null&&Ra.content){let ia=(za=(Ia=(Ge=u==null?void 0:u.find(Nl=>(Nl==null?void 0:Nl.key)==="filterAllType"))==null?void 0:Ge.value)==null?void 0:Ia.find(Nl=>(Nl==null?void 0:Nl.value)==="onPamButtonContents"))==null?void 0:za.content;ia=(ke=ia==null?void 0:ia.split(":"))==null?void 0:ke[1],ia=(_a=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:_a.split(","),V=!!(ia!=null&&ia.find(Nl=>Nl==="操作"))}const B=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="page"),re=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="rowButton"),le=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="extraButton"),H=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableContents"),ve=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="bottomButton"),_e=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableIndex");Fe.value=(ce=(oa=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableToForm"))==null?void 0:oa[0])==null?void 0:ce.contents,ba.value=(B==null?void 0:B.contents)??!0;let De=[];Zl.value===""?De=N==null?void 0:N[0]:De=(N==null?void 0:N.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+Zl.value+")"))??(N==null?void 0:N.find(ia=>!(ia!=null&&ia.selectLabel)));let Be=[];Zl.value===""?Be=_e==null?void 0:_e[0]:Be=(_e==null?void 0:_e.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+Zl.value+")"))??(_e==null?void 0:_e.find(ia=>!(ia!=null&&ia.selectLabel)));let je=[],ca=[];if(((E=De==null?void 0:De.contents)==null?void 0:E.length)>0){let ia=[],Nl=De==null?void 0:De.contents;if(Array.isArray(Nl==null?void 0:Nl[0])&&((Me=Nl==null?void 0:Nl[0])!=null&&Me.every(al=>!(al!=null&&al.children)))&&(Nl=Nl==null?void 0:Nl[0]),Nl.some(al=>Array.isArray(al)&&(al==null?void 0:al.find(qe=>qe.children))))ia=(ye=ua.getGradeColumns(Nl,V))==null?void 0:ye[0],ia!=null&&ia.find(al=>(al==null?void 0:al.label)==="操作")||ia.push({label:"操作",prop:"operate",type:"operate"});else{let al=Nl.some(qe=>Array.isArray(qe))?Nl==null?void 0:Nl[0]:Nl;al!=null&&al.find(qe=>(qe==null?void 0:qe.label)==="操作")||al.push({label:"操作",prop:"operate",type:"operate"}),al==null||al.forEach((qe,Gl)=>{var Dr,wr,Br,kr,Gn,ft,ht,vr,fn,In,vt,Yr,Ln,Pi,Fi,ji,Hi,Ui,qi,Ki;if((wr=(Dr=ma.value)==null?void 0:Dr.split("/"))==null||wr.forEach(Ql=>{var ur,kn,Wi;Ql!==""&&((Wi=(kn=(ur=Ql==null?void 0:Ql.split(k+"updateLoading"))==null?void 0:ur[0])==null?void 0:kn.split(k+"loading"))==null||Wi[0])}),qe!=null&&qe.methodContent){let Ql=(Gn=(kr=(Br=qe==null?void 0:qe.methodContent)==null?void 0:Br.replace("@","%%#"))==null?void 0:kr.split("%%#"))==null?void 0:Gn[1];if(Ql=Ql==null?void 0:Ql.slice(0,(Ql==null?void 0:Ql.length)-1),Ql=ua.contentTransArrayToAllNoExtra(Ql??"",","),(ft=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("@Button")))!=null&&ft.includes("Prop")&&((ht=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("Type")))!=null&&ht.includes("Manual"))){let ur=(fn=(vr=Ql==null?void 0:Ql.find(kn=>kn==null?void 0:kn.includes("@Button")))==null?void 0:vr.split(":"))==null?void 0:fn[1];ur=((Yr=(vt=(In=ur==null?void 0:ur.replaceAll("[",""))==null?void 0:In.replaceAll("]",""))==null?void 0:vt.split(","))==null?void 0:Yr[1])??"算法执行",je.push(ur)}else if((Ln=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("@Button")))!=null&&Ln.includes("Row")&&((Pi=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("Type")))!=null&&Pi.includes("Manual"))){let ur=(ji=(Fi=Ql==null?void 0:Ql.find(kn=>kn==null?void 0:kn.includes("@Button")))==null?void 0:Fi.split(":"))==null?void 0:ji[1];ur=((qi=(Ui=(Hi=ur==null?void 0:ur.replaceAll("[",""))==null?void 0:Hi.replaceAll("]",""))==null?void 0:Ui.split(","))==null?void 0:qi[1])??"算法执行",ca.push(ur)}}(Ki=Fe.value)==null||Ki.find(Ql=>(Ql==null?void 0:Ql.prop)===(qe==null?void 0:qe.prop)),ia.push({label:(qe==null?void 0:qe.label)==="操作"?V?"操作":"":(qe==null?void 0:qe.label)??"",prop:(qe==null?void 0:qe.label)==="操作"?"operate":(qe==null?void 0:qe.prop)??"a"+Gl,width:qe!=null&&qe.width?parseInt(qe.width):"",fixed:(qe==null?void 0:qe.fixed)??void 0,sortable:(qe==null?void 0:qe.sortable)??!1,filterable:(qe==null?void 0:qe.filterable)??!1,operable:(qe==null?void 0:qe.operable)??!1,showSummary:(qe==null?void 0:qe.showSummary)??!1,align:(qe==null?void 0:qe.align)??"left",showOverflowTooltip:(qe==null?void 0:qe.showOverflowTooltip)??!0,isNotDrag:(qe==null?void 0:qe.isNotDrag)??!1,isEditCol:(qe==null?void 0:qe.isEditCol)??!1,isOperate:(qe==null?void 0:qe.isOperate)??!1,id:(qe==null?void 0:qe.id)??Gl,type:(qe==null?void 0:qe.label)==="操作"?"operate":void 0,formType:(qe==null?void 0:qe.formType)??(qe!=null&&qe.groupSelect?"Select":""),disabled:qe==null?void 0:qe.disabled,options:(qe==null?void 0:qe.options)??[],value:(qe==null?void 0:qe.value)??"",isExistChild:(qe==null?void 0:qe.isExistChild)??!1,mainKey:(qe==null?void 0:qe.mainKey)??Gl===0,allSelectionContents:(qe==null?void 0:qe.allContents)??[],filterContent:qe==null?void 0:qe.filterContents,menus:qe==null?void 0:qe.menus,groups:qe==null?void 0:qe.groups,words:qe==null?void 0:qe.words,filter:qe==null?void 0:qe.filter,bindMenus:qe==null?void 0:qe.bindMenus,fatherPath:qe==null?void 0:qe.fatherPath,isMainPath:qe==null?void 0:qe.isMainPath,required:(qe==null?void 0:qe.required)??!1,relatedContents:qe==null?void 0:qe.relatedContents,functionName:qe==null?void 0:qe.functionName,functionRelatedWords:qe==null?void 0:qe.functionRelatedWords,calculatorFilter:qe==null?void 0:qe.calculatorFilter})})}w.value=(Qe=ve==null?void 0:ve[0])==null?void 0:Qe.contents;const en=ua.getNewColumnChild(ia),Vi=al=>Array.isArray(al)?al.map(qe=>(Array.isArray(qe==null?void 0:qe.children)&&qe.children.length>0?(qe.sortable=!1,Vi(qe.children)):(qe==null?void 0:qe.prop)==="operate"||(qe==null?void 0:qe.label)==="操作"||(qe==null?void 0:qe.type)==="operate"||(qe.sortable=!1),qe)):al;Vi(en),await Wt(en),_f(te.value,en),xe.value=en,ya.value=en,r.value=(ta=xe.value)==null?void 0:ta.map(al=>al==null?void 0:al.label);let an=(Ma=(da=ua.getAllLeafNodes(xe.value))==null?void 0:da.filter(al=>(al==null?void 0:al.type)!=="operate"))==null?void 0:Ma.map((al,qe)=>({prop:(al==null?void 0:al.prop)??"a"+qe,column:al.label}));$r.value=an;let Wr=[];Zl.value===""?Wr=H==null?void 0:H[0]:Wr=(H==null?void 0:H.find(al=>(al==null?void 0:al.selectLabel)==="("+Zl.value+")"))??(H==null?void 0:H.find(al=>!(al!=null&&al.selectLabel)));let Jn=Array.isArray((dl=Wr==null?void 0:Wr.contents)==null?void 0:dl[0])&&((Ga=Wr==null?void 0:Wr.contents)!=null&&Ga[0].every(al=>Array.isArray(al)))?(ml=Wr==null?void 0:Wr.contents)==null?void 0:ml[0]:Wr==null?void 0:Wr.contents;Be!=null&&Be.contents&&((yl=Be==null?void 0:Be.contents)==null?void 0:yl.length)!==0&&(Jn=(jl=A.cloneDeep(Jn))==null?void 0:jl.map((al,qe)=>{if(!Array.isArray(al)){let Gl={};for(let Dr in al)Dr!=="id"&&Dr!=="index"&&(Gl[Dr]=al[Dr]);al=Object.values(Gl)}return al}));const fu=!!((Wa=xe.value)!=null&&Wa.find(al=>al.prop==="index"));Jn=Xs(Jn,Be==null?void 0:Be.contents,fu);const dt=[];Jn==null||Jn.forEach((al,qe)=>{var Dr;let Gl={};if(Array.isArray(al)){let wr=[];al==null||al.filter(Br=>!(Br!=null&&Br.id)).forEach((Br,kr)=>{var Gn,ft,ht,vr,fn,In;if((Gn=an==null?void 0:an[kr])!=null&&Gn.prop&&!Array.isArray(Br)){let vt={};vt[an[kr].column]=Br,Oa!=null&&Oa.value&&((ft=Oa==null?void 0:Oa.value)==null?void 0:ft.length)>0&&((ht=Oa==null?void 0:Oa.value)!=null&&ht.find(Yr=>JSON.stringify(Yr==null?void 0:Yr[0])===JSON.stringify(vt)))&&(wr=(vr=Oa==null?void 0:Oa.value)==null?void 0:vr.find(Yr=>JSON.stringify(Yr==null?void 0:Yr[0])===JSON.stringify(vt))),wr&&wr.length>0?Gl[an[kr].prop]=wr!=null&&wr.find(Yr=>{var Ln;return((Ln=Object.keys(Yr))==null?void 0:Ln[0])===an[kr].column})?(fn=wr==null?void 0:wr.find(Yr=>{var Ln;return((Ln=Object.keys(Yr))==null?void 0:Ln[0])===an[kr].column}))==null?void 0:fn[an[kr].column]:Br:Gl[an[kr].prop]=Br}else Array.isArray(Br)&&((In=an[kr])!=null&&In.prop?Gl[an[kr].prop]=Br:Gl.children=ui(Br,an))})}else Gl=al;if(Array.isArray(al)&&al.some(wr=>wr==null?void 0:wr.id)){const wr=(Dr=al==null?void 0:al.find(Br=>Br.id))==null?void 0:Dr.id;dt.push(Object.assign(Gl,{id:Zt(wr)}))}else Gl.id?dt.push(Gl):dt.push(Object.assign(Gl,{id:qe.toString()}))});try{const al=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),qe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Gl=al==null?void 0:al.tableId,Dr=al==null?void 0:al.compIndex;if(Gl&&Array.isArray(qe)&&qe.length>0&&String(Gl)===String(c==null?void 0:c.parentTableId)&&String(Dr)===String(c==null?void 0:c.index)){const wr=new Set(dt.map(kr=>String(kr==null?void 0:kr.id))),Br=qe.filter(kr=>!wr.has(String(kr)));if(Br.length>0){const kr=al==null?void 0:al.pageKey,Gn=kr!=null&&kr.startsWith("/")?kr.substring(1):kr;((f==null?void 0:f[kr])||(f==null?void 0:f[Gn])||[]).filter(vr=>{var fn,In;return((fn=vr==null?void 0:vr.key)==null?void 0:fn.type)==="data"&&String((In=vr==null?void 0:vr.key)==null?void 0:In.tableId)===String(Gl)&&Br.includes(vr==null?void 0:vr.id)}).forEach(vr=>{var fn;wr.has(String(vr==null?void 0:vr.id))||(dt.push({id:vr==null?void 0:vr.id,...((fn=vr==null?void 0:vr.value)==null?void 0:fn.tableData)||{}}),wr.add(String(vr==null?void 0:vr.id)))})}}}catch{}let pt=null;try{const al=`ocr_committed_temp_ids_v1:${String((c==null?void 0:c.parentTableId)??"")}:${String((c==null?void 0:c.index)??"")}`,qe=JSON.parse(sessionStorage.getItem(al)||"null");Array.isArray(qe)&&qe.length>0&&(pt=new Set(qe.map(Gl=>String(Gl))))}catch{}const Ri=Array.from(((_l=Ve.value)==null?void 0:_l.values())||[]).filter(al=>!(!(al!=null&&al._isOCRRow&&(al==null?void 0:al._ocrTableId)===(c==null?void 0:c.index))||pt&&pt.has(String(al==null?void 0:al.id)))),hu=(K.value||[]).map(al=>String(al==null?void 0:al.id)),$i=Qt(dt,hu);if(K.value=Ai($i,O,xe.value),He.value=$i,(Ka=He.value)==null||Ka.forEach(al=>{var qe;(qe=Ve.value)==null||qe.set(al.id,al)}),pt&&pt.size>0)try{const al=new Set(Array.from(pt.values()));K.value=(K.value||[]).filter(qe=>!al.has(String(qe==null?void 0:qe.id))),He.value=(He.value||[]).filter(qe=>!al.has(String(qe==null?void 0:qe.id))),al.forEach(qe=>{var Gl,Dr;try{(Dr=(Gl=Ve.value)==null?void 0:Gl.delete)==null||Dr.call(Gl,qe)}catch{}})}catch{}const to=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Qo=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(to&&Array.isArray(Qo)&&Qo.length>0&&String(to==null?void 0:to.compIndex)===String(c==null?void 0:c.index)){const al=new Set((He.value||[]).map(qe=>String(qe==null?void 0:qe.id)));Qo.filter(qe=>!al.has(String(qe)))}if(Ri.length>0){const al=new Set((K.value||[]).map(Gl=>Gl==null?void 0:Gl.id)),qe=Ri.filter(Gl=>!al.has(Gl.id));qe.length>0&&(K.value=[...K.value||[],...qe],He.value=[...He.value||[],...qe],qe.forEach(Gl=>{var Dr;return(Dr=Ve.value)==null?void 0:Dr.set(Gl.id,Gl)}))}}else xe.value=[],de.value=[],K.value=[],He.value=[],Ve.value=new Map;if(ca=[...new Set(ca)],ca=ca==null?void 0:ca.map(ia=>({label:ia,type:"methodButton"})),((hl=re==null?void 0:re.contents)==null?void 0:hl.length)>0?$a.value=re==null?void 0:re.contents:$a.value=[],$a.value=[...$a.value,...ca],je=[...new Set(je)],je=je==null?void 0:je.map(ia=>({label:ia,type:"methodButton"})),((el=le==null?void 0:le.contents)==null?void 0:el.length)>0)if((Bl=(Il=(vl=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:vl.value)==null?void 0:Il.find(ia=>(ia==null?void 0:ia.value)==="onButtonContents"))!=null&&Bl.content){let ia=(bl=(Pl=(pr=u==null?void 0:u.find(Nl=>(Nl==null?void 0:Nl.key)==="filterAllType"))==null?void 0:pr.value)==null?void 0:Pl.find(Nl=>(Nl==null?void 0:Nl.value)==="onButtonContents"))==null?void 0:bl.content;if(ia=(zl=ia==null?void 0:ia.split(":"))==null?void 0:zl[1],ia=(Yl=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Yl.split(","),Oe.value=(Rl=le==null?void 0:le.contents)==null?void 0:Rl.filter(Nl=>ia==null?void 0:ia.find(en=>en===(Nl==null?void 0:Nl.label))),ue.value=(fr=le==null?void 0:le.contents)==null?void 0:fr.filter(Nl=>ia==null?void 0:ia.find(en=>en===(Nl==null?void 0:Nl.label))),(hr=le==null?void 0:le.contents)!=null&&hr.some(Nl=>(Nl==null?void 0:Nl.label)==="OCR识别")&&!((Jl=Oe.value)!=null&&Jl.some(Nl=>(Nl==null?void 0:Nl.label)==="OCR识别"))){const Nl=(sr=le==null?void 0:le.contents)==null?void 0:sr.find(en=>(en==null?void 0:en.label)==="OCR识别");Oe.value=[...Oe.value,Nl],ue.value=[...ue.value,Nl]}x.value=!!(ia!=null&&ia.find(Nl=>Nl==="搜索")),j.value=!!(ia!=null&&ia.find(Nl=>Nl==="块状显示"))}else Oe.value=le==null?void 0:le.contents,ue.value=le==null?void 0:le.contents;else Oe.value=[],ue.value=[];Oe.value=[...Oe.value,...je],ue.value=[...ue.value,...je],typeof ma.value=="string"&&ma.value==="设备管理/试验设备"&&(c==null?void 0:c.compName)==="设备列表"?((Lr=Oe.value)!=null&&Lr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}]),(cr=ue.value)!=null&&cr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(ue.value=[...ue.value||[],{label:"OCR识别"}])):(Oe.value=(Oe.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别"),ue.value=(ue.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别")),(lr=Oe.value)!=null&&lr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),(nr=ue.value)!=null&&nr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(ue.value=[...ue.value||[],{label:"切换视图"}]),$e.value=((Oi=K==null?void 0:K.value)==null?void 0:Oi.length)??0,Ni(K.value),tn.value=K.value,Ll.value&&(xe.value=(Li=(Ii=de.value)==null?void 0:Ii.filter(ia=>(ia==null?void 0:ia.label)!=="操作"))==null?void 0:Li.map(ia=>{var Nl;return{...ia,type:"edit",optionUrl:ia!=null&&ia.formMenuSelect&&((Nl=ia==null?void 0:ia.formMenuSelect)==null?void 0:Nl.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}}),Zo())};a.watch(()=>[c.itemData,Zl.value,Fn.value,An.value,Oa==null?void 0:Oa.value],async()=>{var u,f,N,O,V,B;if((u=c==null?void 0:c.itemData)!=null&&u.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((f=F.value)!=null&&f.find(re=>{var le,H;return(re==null?void 0:re.key)===((H=(le=c==null?void 0:c.itemData)==null?void 0:le.find(ve=>(ve==null?void 0:ve.key)==="columnPath"))==null?void 0:H.contents)}))){let re=F.value,le={key:(O=(N=c==null?void 0:c.itemData)==null?void 0:N.find(H=>(H==null?void 0:H.key)==="columnPath"))==null?void 0:O.contents,value:(B=(V=c==null?void 0:c.itemData)==null?void 0:V.find(H=>(H==null?void 0:H.key)==="columnUsingPath"))==null?void 0:B.contents};re!=null&&re.find(H=>(H==null?void 0:H.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(H=>((H==null?void 0:H.key)===(le==null?void 0:le.key)&&(H.value=le.value),H)):re.push(le),We.setTableViewContents(re)}await Mi(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.operatingForm,u=>{u!=null&&u.form&&(zt(u==null?void 0:u.form),Te.value=u==null?void 0:u.dialogTitle,Na.value=!0,fa.value=!0)},{immediate:!0,deep:!0});const au=()=>{var u;(u=L.value)!=null&&u.includes("read")&&(Ll.value=!Ll.value)},lu=()=>{dr.value=!dr.value};a.watch(()=>{var u;return(u=c==null?void 0:c.config)==null?void 0:u.viewport},u=>{var f;L.value=u,(u==null?void 0:u.length)===0?Ll.value=!1:(u!=null&&u.includes("read")||(Ll.value=!0),u!=null&&u.includes("edit")||(Ll.value=!1)),M.value=((f=c==null?void 0:c.config)==null?void 0:f.showIndex)||Ll.value},{immediate:!0}),a.watch(()=>Ll.value,u=>{var f;u?(Zo("viewChange"),We.setCacheUpdatingData(null)):(Oe.value=ue.value,xe.value=ya.value,P.value&&(We.setTableLoading(c==null?void 0:c.index),ze("change",P.value))),M.value=u||((f=c==null?void 0:c.config)==null?void 0:f.showIndex),ar.value=[]},{immediate:!0}),a.watch(()=>{var u;return(u=on.value)==null?void 0:u.length},u=>{u===0&&(me.currentPage=1)}),a.watch(()=>c==null?void 0:c.compNames,u=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:u||[],width:1}]},{immediate:!0}),a.ref(!1);const ru=(u,f)=>{var N;Zo("createClick"),f===me.pageSize&&(me.currentPage=Math.ceil(((N=K.value)==null?void 0:N.length)/me.pageSize))},nu=async(u,f,N)=>{var V,B,re,le,H;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop);if(O&&ro.includes(O)&&N!==void 0&&N!==null&&String(N).trim()!==""){const ve=String(N).trim();if(await Xo(ve,u==null?void 0:u.id)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const De=(V=K.value)==null?void 0:V.findIndex(je=>(je==null?void 0:je.id)===(u==null?void 0:u.id)),Be=De!==-1?(re=(B=K.value)==null?void 0:B[De])==null?void 0:re[O]:void 0;O&&(u[O]=Be??"");return}}if(Ll.value){const ve=u==null?void 0:u.id;ve!=null&&(b.value.has(ve)||b.value.set(ve,A.cloneDeep(u)),d.value.add(ve));const _e=(le=K.value)==null?void 0:le.findIndex(De=>(De==null?void 0:De.id)===(u==null?void 0:u.id));_e!==-1&&O&&(K.value[_e]={...K.value[_e],[O]:N}),no(N,u,f);return}no(N,u,f),ir.value=A.cloneDeep(u),ra.value=u==null?void 0:u.id,$e.value=(H=K.value)==null?void 0:H.length,Te.value=u!=null&&u._isTemp?"新增":"编辑",It(!1)},tu=async()=>{var u,f;try{const N=[];if(c!=null&&c.related&&Array.isArray(c.related)&&(console.log("props.related",c.related),c.related.forEach(O=>{if(typeof O=="string"&&O.includes("content_")){const V=O.split("_")[1];V&&(N.push(`content_${V}`),N.push(`struct_${V}`))}})),N.length===0&&(c!=null&&c.itemData)){const O=(f=(u=c.itemData)==null?void 0:u.find(V=>(V==null?void 0:V.key)==="contentTableId"))==null?void 0:f.contents;O&&(N.push(`content_${O}`),N.push(`struct_${O}`))}return N}catch(N){return console.error("获取 tableNames 失败:",N),[]}},ou=async(u,f,N)=>{var B,re;if(!N||typeof N!="string"||N.trim()===""){const le=(f==null?void 0:f.property)??(f==null?void 0:f.prop),H=`${u==null?void 0:u.id}:${le}`;h.value.delete(H),y.value.set(H,!1);return}const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),V=`${u==null?void 0:u.id}:${O}`;y.value.set(V,!0);try{const le=await tu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),h.value.delete(V),y.value.set(V,!1);return}const H=parseInt((B=Fl.value)==null?void 0:B.plat_id);if(!H){console.warn("platId 无效,跳过全局搜索"),h.value.delete(V),y.value.set(V,!1);return}const ve=await A.getAllTables({platId:H,tableNames:le}),_e=((re=ve==null?void 0:ve.data)==null?void 0:re.result)||[],De=[],Be=[];for(let je=0;je<_e.length;je+=2)je+1<_e.length&&Be.push([_e[je],_e[je+1]]);Be.forEach(([je,ca])=>{var Ia;if(!Array.isArray(je)||je.length===0||!Array.isArray(ca)||ca.length===0)return;const Ha=ca[0];let Sa=((Ia=Ha==null?void 0:Ha.结构)==null?void 0:Ia.contents)??[];if(!Array.isArray(Sa)||Sa.length===0)return;let Xe=A.cloneDeep(Sa);if(Array.isArray(Xe==null?void 0:Xe[0])&&(Xe=ua.getColumnChild(Xe[0])),!Array.isArray(Xe)||Xe.length===0||!Xe.some(za=>(za==null?void 0:za.prop)===O))return;[...je].sort((za,ke)=>{const _a=Number((za==null?void 0:za.update_time)??0);return Number((ke==null?void 0:ke.update_time)??0)-_a}).slice(0,20).forEach(za=>{const ke=za[O];if(ke!=null){const _a=String(ke);_a.toLowerCase().includes(N.toLowerCase())&&De.findIndex(ce=>{var E;return za.id&&((E=ce.rowData)==null?void 0:E.id)===za.id?!0:ce.label===_a})===-1&&De.push({label:_a,rowData:A.cloneDeep(za),sourceTable:(Ha==null?void 0:Ha.source_table)||""})}})}),h.value.set(V,De)}catch(le){console.error("全局搜索建议失败:",le),h.value.delete(V)}finally{y.value.set(V,!1)}},iu=(u,f,N)=>{if(!Ll.value)return;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),V=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"";if(V&&V.toUpperCase()!=="INPUT"&&V!=="")return;const B=`${u==null?void 0:u.id}:${O}`;if(v.has(B)&&clearTimeout(v.get(B)),!N||N.trim()===""){h.value.delete(B),y.value.set(B,!1);return}const re=setTimeout(()=>{ou(u,{prop:O,property:O},N),v.delete(B)},300);v.set(B,re)};function su(u,f){const N=`${u==null?void 0:u.id}:${(f==null?void 0:f.property)??(f==null?void 0:f.prop)}`;return h.value.get(N)||[]}const cu=(u,f,N)=>{var _e;if(!N||!N.rowData)return;const O=N.rowData,V=u==null?void 0:u.id,B=(f==null?void 0:f.property)??(f==null?void 0:f.prop),le=(ua.getAllLeafNodes(xe.value)||[]).filter(De=>(De==null?void 0:De.type)!=="operate"&&(De==null?void 0:De.label)!=="操作"&&(De==null?void 0:De.prop)!=="operate");le.forEach(De=>{const Be=De==null?void 0:De.prop;Be&&O[Be]!==void 0&&(u[Be]=O[Be])});const H=(_e=K.value)==null?void 0:_e.findIndex(De=>(De==null?void 0:De.id)===V);H!==-1&&le.forEach(De=>{const Be=De==null?void 0:De.prop;Be&&O[Be]!==void 0&&(K.value[H][Be]=O[Be])}),V!=null&&(b.value.has(V)||b.value.set(V,A.cloneDeep(u)),d.value.add(V));const ve=`${V}:${B}`;h.value.delete(ve),y.value.set(ve,!1),no(u[B],u,f)},Ir=u=>{var H,ve,_e,De,Be,je,ca,Ha,Sa,Xe;const{row:f,column:N,item:O,slotData:V}=u;let B=f!=null&&f[N==null?void 0:N.prop]||(f==null?void 0:f[N==null?void 0:N.prop])===0?((ve=(H=f==null?void 0:f[N==null?void 0:N.prop])==null?void 0:H[0])==null?void 0:ve.contents)??((f==null?void 0:f[N==null?void 0:N.prop])===0?"0":f==null?void 0:f[N==null?void 0:N.prop]):((De=(_e=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:_e[0])==null?void 0:De.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((je=(Be=V==null?void 0:V[O==null?void 0:O.prop])==null?void 0:Be[0])==null?void 0:je.contents)??(V==null?void 0:V[O==null?void 0:O.prop])??((Sa=(Ha=f==null?void 0:f[(ca=O==null?void 0:O.child)==null?void 0:ca.prop])==null?void 0:Ha[0])==null?void 0:Sa.contents)??(f==null?void 0:f[(Xe=O==null?void 0:O.child)==null?void 0:Xe.prop]),le=Array.isArray(B)&&!(B!=null&&B.every(Ra=>typeof Ra=="string"||typeof Ra=="number"))?"查看":B;if(le=Array.isArray(le)?le.join(","):le,(N==null?void 0:N.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const Ra=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=Ra.isValid()?Ra.format("YYYYMMDD"):le??""}return le},uu=u=>{var ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra;const{row:f,column:N,item:O,slotData:V}=u;let B=f!=null&&f[N==null?void 0:N.prop]?((_e=(ve=f==null?void 0:f[N==null?void 0:N.prop])==null?void 0:ve[0])==null?void 0:_e.contents)??(f==null?void 0:f[N==null?void 0:N.prop]):((Be=(De=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:De[0])==null?void 0:Be.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((ca=(je=V==null?void 0:V[O==null?void 0:O.prop])==null?void 0:je[0])==null?void 0:ca.contents)??(V==null?void 0:V[O==null?void 0:O.prop])??((Xe=(Sa=f==null?void 0:f[(Ha=O==null?void 0:O.child)==null?void 0:Ha.prop])==null?void 0:Sa[0])==null?void 0:Xe.contents)??(f==null?void 0:f[(Ra=O==null?void 0:O.child)==null?void 0:Ra.prop]);const le=Array.isArray(B)&&!(B!=null&&B.every(Ge=>typeof Ge=="string"||typeof Ge=="number")),H=Array.isArray(B)&&(B==null?void 0:B.find(Ge=>Ge==null?void 0:Ge.url));return le&&H},du=u=>{var V,B;if(!(u!=null&&u.column))return!1;const f=ma.value==="试验任务/任务管理",N=(c==null?void 0:c.compName)==="任务列表",O=((V=u==null?void 0:u.column)==null?void 0:V.label)==="任务状态"||((B=u==null?void 0:u.column)==null?void 0:B.prop)==="任务状态";return f&&N&&O},pu=(u,f)=>u.find(N=>Object.values(N).some(O=>O===f));return a.watch(()=>Ee.value,async u=>{if(u){ea.setContentLoading(!0),await a.nextTick();const f=pu(K.value,u==null?void 0:u.data);if(!f)return ea.setContentLoading(!1);await On(u==null?void 0:u.data,null,f,{data:u==null?void 0:u.data}),ea.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.cacheNewData,u=>{var f;u&&(Array.isArray(u)?u.forEach(N=>{var O,V,B,re,le;if(换,String(N==null?void 0:N.compId)===String(c==null?void 0:c.index)&&(N!=null&&N.resId)&&((O=N==null?void 0:N.data)!=null&&O.id)){const H=(V=N==null?void 0:N.data)==null?void 0:V.id,ve=N==null?void 0:N.resId;if(K.value=(B=K.value)==null?void 0:B.map(_e=>{if((_e==null?void 0:_e.id)===H){const De={..._e,id:ve};return delete De._isOCRRow,delete De._ocrTableId,De}return _e}),(le=(re=Ve.value)==null?void 0:re.has)!=null&&le.call(re,H)){const De={...Ve.value.get(H)||{},id:ve};delete De._isOCRRow,delete De._ocrTableId,Ve.value.delete(H),Ve.value.set(ve,De)}Se(c==null?void 0:c.index,H,ve)}}):String(u==null?void 0:u.compId)===String(c==null?void 0:c.index)&&(K.value=(f=K.value)==null?void 0:f.map(N=>{var O;if((N==null?void 0:N.id)===((O=u==null?void 0:u.data)==null?void 0:O.id)){const V={...N,id:u==null?void 0:u.resId};return delete V._isOCRRow,delete V._ocrTableId,V}return N})))},{immediate:!0,deep:!0}),(u,f)=>{var Ra,Ge,Ia,za;const N=a.resolveComponent("svg-icon"),O=a.resolveComponent("el-popover"),V=a.resolveComponent("el-switch"),B=a.resolveComponent("el-checkbox"),re=a.resolveComponent("el-radio"),le=a.resolveComponent("el-radio-group"),H=a.resolveComponent("el-checkbox-group"),ve=a.resolveComponent("el-button"),_e=a.resolveComponent("LookComponent"),De=a.resolveComponent("el-icon"),Be=a.resolveComponent("el-progress"),je=a.resolveComponent("el-alert"),ca=a.resolveComponent("el-table-column"),Ha=a.resolveComponent("el-table"),Sa=a.resolveComponent("el-upload"),Xe=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",o0,[Mr.value?(a.openBlock(),a.createBlock(pl.ssTable,{id:"excel-table",pageObj:me,showIndex:M.value,isTree:(Ra=l.compItem)==null?void 0:Ra.isTree,summaryInfo:J,columns:xe.value,defaultSort:Q,isCardViewport:dr.value,checkedColumns:r.value,key:vn.value+xe.value,tableData:on.value,isEditViewport:Ll.value,isShowPagination:ba.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:eo,extraButton:Oe.value,rowButton:$a.value,cacheExtraButtons:ue.value,isClearSelection:((Ge=ar.value)==null?void 0:Ge.length)===0,onDoCurrentChange:St,onDoSizeChange:To,onSortChange:Ao,onContentClick:On,onRowClick:ao,onSelectChange:Ro,onCellChange:nu,onCellInput:iu,onSelectSuggest:cu,onChange:no,onPreview:Gt,onSubmitEditingTable:qt,onHandleColEditChange:Ht,onHandleColTypeChange:zr,onClickButton:Sn,onAddNewRow:Io,bottomButton:w.value},a.createSlots({headerButton:a.withCtx(ke=>{var _a,oa;return[l.showHeader?(a.openBlock(),a.createBlock(Lp,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(W)===a.unref(ma),filterValues:Fo.value,selectNums:(_a=ar.value)==null?void 0:_a.length,dataNums:(oa=K.value)==null?void 0:oa.length,compName:l.compName,isDevMode:l.isDevMode,buttons:ke.buttons,onButtonClick:f[1]||(f[1]=(ce,E,Me)=>Sn(ce,E,{extra:Me})),columns:xe.value,onFilter:jo,onGetImportData:zo,level:l.level,filterShow:x.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var ke,_a,oa,ce;return[((ke=K.value)==null?void 0:ke.length)>0&&l.allowOperate&&j.value?(a.openBlock(),a.createElementBlock("div",c0,[(_a=L.value)!=null&&_a.includes("read")&&((oa=L.value)!=null&&oa.includes("edit"))&&((ce=$a.value)!=null&&ce.some(E=>(E==null?void 0:E.label)==="编辑"))&&!dr.value&&a.unref(W)!==a.unref(ma)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:au},[a.createVNode(N,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:ke,index:_a})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:oa=>ru(ke,_a)},[a.createVNode(N,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,u0)]),operateCol:a.withCtx(()=>[a.createVNode(O,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Gc},{reference:a.withCtx(()=>[a.createElementVNode("span",d0,[a.createVNode(N,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",p0,[f[21]||(f[21]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(V,{"model-value":g.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:f[2]||(f[2]=ke=>Yt(ke))},null,8,["model-value"]),f[22]||(f[22]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(H,{modelValue:r.value,"onUpdate:modelValue":f[3]||(f[3]=ke=>r.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Zr.value,ke=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[a.createVNode(B,{value:ke.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:ke.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(ke.label),9,f0)]),_:2},1032,["value"]),a.createVNode(O,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(N,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var _a;return[a.createElementVNode("div",h0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((_a=Object.keys(ke))==null?void 0:_a.filter(oa=>{var ce;return(ce=ee.value)==null?void 0:ce.find(E=>(E==null?void 0:E.value)===oa)}),oa=>{var ce,E;return a.openBlock(),a.createElementBlock("div",{key:oa},[z[oa]=="radio"?(a.openBlock(),a.createElementBlock("div",v0,[f[20]||(f[20]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(le,{"model-value":ke==null?void 0:ke[oa],onChange:Me=>qn(Me,oa,ke)},{default:a.withCtx(()=>{var Me,ye;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ye=(Me=ee.value)==null?void 0:Me.find(Qe=>(Qe==null?void 0:Qe.value)===oa))==null?void 0:ye.options,Qe=>(a.openBlock(),a.createBlock(re,{key:Qe==null?void 0:Qe.value,label:Qe==null?void 0:Qe.value,value:Qe==null?void 0:Qe.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Qe==null?void 0:Qe.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),z[oa]=="switch"?(a.openBlock(),a.createBlock(V,{key:1,"model-value":ke==null?void 0:ke[oa],"active-text":(E=(ce=ee.value)==null?void 0:ce.find(Me=>(Me==null?void 0:Me.value)===oa))==null?void 0:E.label,onChange:Me=>qn(Me,oa,ke)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",m0,[a.createVNode(N,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(ke=>{var _a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el;return[((_a=ke==null?void 0:ke.column)==null?void 0:_a.label)==="证书附件"||((oa=ke==null?void 0:ke.column)==null?void 0:oa.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",y0,[a.createVNode(N,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(vl=>jr(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):uu(ke)?(a.openBlock(),a.createBlock(O,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",g0,a.toDisplayString(Ir(ke)),1)]),default:a.withCtx(()=>{var vl,Il;return[a.createElementVNode("div",b0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Il=ke==null?void 0:ke.row)==null?void 0:Il[(vl=ke==null?void 0:ke.column)==null?void 0:vl.prop],Bl=>(a.openBlock(),a.createElementBlock("div",k0,[a.createElementVNode("div",{class:"prop-url",title:Wn(Bl),onClick:pr=>$o(Bl)},a.toDisplayString(Wn(Bl)),9,x0),a.createElementVNode("div",{class:"prop-download",onClick:pr=>ot(Bl)}," 下载 ",8,_0)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[du(ke)?(a.openBlock(),a.createBlock(Us,{key:0,value:Ir(ke)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Ir(ke))&&((E=(ce=Ir(ke))==null?void 0:ce.toString())!=null&&E.includes(".txt")||(ye=(Me=Ir(ke))==null?void 0:Me.toString())!=null&&ye.includes(".cpt")||(ta=(Qe=Ir(ke))==null?void 0:Qe.toString())!=null&&ta.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ir(ke))&&((Ma=(da=Ir(ke))==null?void 0:da.toString())!=null&&Ma.includes(".txt")||(Ga=(dl=Ir(ke))==null?void 0:dl.toString())!=null&&Ga.includes(".cpt")||(yl=(ml=Ir(ke))==null?void 0:ml.toString())!=null&&yl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ir(ke))&&((Wa=(jl=Ir(ke))==null?void 0:jl.toString())!=null&&Wa.includes(".txt")||(Ka=(_l=Ir(ke))==null?void 0:_l.toString())!=null&&Ka.includes(".cpt")||(el=(hl=Ir(ke))==null?void 0:hl.toString())!=null&&el.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:vl=>Hn(Ir(ke))},a.toDisplayString(Ir(ke)===0?"0":Ir(ke)),13,w0))],64))]}),_:2},[((Ia=$a.value)==null?void 0:Ia.length)>0?{name:"actions",fn:a.withCtx(({item:ke,fIndex:_a})=>[a.createVNode(O,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(N,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:f[0]||(f[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",i0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Po($a.value,ke),(oa,ce)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:ce,onClick:a.withModifiers(E=>Sn(oa==null?void 0:oa.label,ke,{extra:oa}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:oa==null?void 0:oa.textColor}),class:"extra-button-label"},a.toDisplayString(oa==null?void 0:oa.label),5)],8,s0))),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"])):a.createCommentVNode("",!0),Ll.value?(a.openBlock(),a.createElementBlock("div",C0,[a.createVNode(ve,{id:"themeBorderButton",onClick:Vo},{default:a.withCtx(()=>f[23]||(f[23]=[a.createTextVNode("取消")])),_:1,__:[23]}),a.createVNode(ve,{class:"ok-button",id:"themeButton",onClick:Bt},{default:a.withCtx(()=>f[24]||(f[24]=[a.createTextVNode("保存")])),_:1,__:[24]})])):a.createCommentVNode("",!0),a.createVNode(yr.ssDialog,{title:Te.value,visible:fa.value,width:ql.value,onBeforeDestroy:Jt,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",E0,[a.createVNode(pl.ssForm,{ref_key:"formRef",ref:Ue,rowContents:ie.value,showOperator:!1,onChange:Xc,isEnableWrap:!1,onFixChangeValue:At,onClickTrigger:Kn,isEdit:va.value,onBlurChange:Kt,onCreate:nt,onTagChange:En},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Na.value?(a.openBlock(),a.createElementBlock("div",S0,[a.createVNode(ve,{onClick:f[4]||(f[4]=ke=>fa.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>f[25]||(f[25]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[25]}),a.createVNode(ve,{class:"ok-button",onClick:f[5]||(f[5]=ke=>It(!0)),id:"themeButton"},{default:a.withCtx(()=>f[26]||(f[26]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[26]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(yr.ssDialog,{title:Te.value,visible:fe.value,width:ka.value,onBeforeDestroy:f[7]||(f[7]=ke=>fe.value=!1)},{default:a.withCtx(()=>[a.createVNode(Gp)]),footer:a.withCtx(()=>[a.createElementVNode("div",D0,[a.createVNode(ve,{onClick:f[6]||(f[6]=ke=>fe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>f[27]||(f[27]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[27]}),a.createVNode(ve,{class:"ok-button",onClick:Mt,id:"themeButton"},{default:a.withCtx(()=>f[28]||(f[28]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[28]})])]),_:1},8,["title","visible","width"]),Va.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:2,fileDataList:ae.value,onDestroy:bn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ke.value?(a.openBlock(),a.createBlock(yr.ssDialog,{key:3,visible:Ke.value,onBeforeDestroy:Yc,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(bo.ThreeViewerHost,{files:Ye.value,threeData:oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(yr.ssDialog,{visible:u.componentVisible,onBeforeDestroy:f[8]||(f[8]=ke=>u.componentVisible=!1),width:ka.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(_e,{dialogItem:yn.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),a.createVNode(yr.ssDialog,{title:"OCR扫描录入",visible:Xa.value,"close-on-click-modal":!1,onBeforeDestroy:il,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[f[39]||(f[39]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",B0,[a.createElementVNode("div",N0,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===1}])},f[29]||(f[29]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),f[32]||(f[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===2}])},f[30]||(f[30]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),f[33]||(f[33]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===3}])},f[31]||(f[31]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Ea.value===1?(a.openBlock(),a.createElementBlock("div",T0,[a.createVNode(ve,{onClick:Yo,class:"ocr-action-btn",disabled:Ya.value,size:"default"},{default:a.withCtx(()=>f[34]||(f[34]=[a.createTextVNode("扫描文件 ")])),_:1,__:[34]},8,["disabled"]),a.createVNode(ve,{onClick:Ul,class:"ocr-action-btn",disabled:Ya.value,size:"default"},{default:a.withCtx(()=>f[35]||(f[35]=[a.createTextVNode("上传文件 ")])),_:1,__:[35]},8,["disabled"])])):a.createCommentVNode("",!0),Ea.value===1?(a.openBlock(),a.createElementBlock("div",A0,[a.createElementVNode("div",M0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(tl.value,(ke,_a)=>{var oa;return a.openBlock(),a.createElementBlock("div",{key:_a,class:"ocr-file-item"},[a.createElementVNode("div",z0,[ke.raw&&((oa=ke.raw.type)!=null&&oa.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:xl(ke),alt:"预览",class:"thumbnail-image"},null,8,O0)):(a.openBlock(),a.createElementBlock("div",I0,[a.createVNode(De,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:sl(ke)==="uploading",processing:sl(ke)==="processing",completed:sl(ke)==="completed"||sl(ke)==="uploaded",failed:sl(ke)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",L0,[f[36]||(f[36]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:sl(ke)==="completed"||sl(ke)==="uploaded",uploading:sl(ke)==="uploading",processing:sl(ke)==="processing",failed:sl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:sl(ke)==="failed"?"#f56c6c":sl(ke)==="completed"||sl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":sl(ke)==="completed"||sl(ke)==="uploaded"||sl(ke)==="failed"?3:2,"stroke-dasharray":Wl(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,V0)])),sl(ke)==="completed"||sl(ke)==="uploaded"?(a.openBlock(),a.createElementBlock("div",R0,[a.createVNode(De,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1})])):a.createCommentVNode("",!0),sl(ke)==="failed"?(a.openBlock(),a.createElementBlock("div",$0,[a.createVNode(De,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:ce=>ct(_a)},[a.createVNode(De,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.close_default))]),_:1})],8,P0)]),a.createElementVNode("div",F0,a.toDisplayString(ke.name||"文件名123"),1)])}),128))]),tl.value.length>0?(a.openBlock(),a.createElementBlock("div",j0,[a.createVNode(ve,{onClick:pe,class:"ocr-start-recognize-btn",disabled:Ya.value||tl.value.length===0,size:"default"},{default:a.withCtx(()=>f[37]||(f[37]=[a.createTextVNode("开始识别 ")])),_:1,__:[37]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),Ea.value===1?(a.openBlock(),a.createElementBlock("div",H0,[a.createVNode(Be,{percentage:ol.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),Ea.value===2?(a.openBlock(),a.createElementBlock("div",U0,[a.createElementVNode("div",q0,[a.createVNode(je,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",K0,[a.createVNode(Ha,{data:pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(ca,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Aa.value,ke=>(a.openBlock(),a.createBlock(ca,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",W0,[a.createElementVNode("span",null,a.toDisplayString(ke.label),1)])]),default:a.withCtx(({row:_a,$index:oa})=>{var ce,E,Me;return[ke.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:ll(_a[ke.prop]),fontWeight:500})},a.toDisplayString(Ba(_a[ke.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[El.value!==oa?(a.openBlock(),a.createElementBlock("span",Y0,a.toDisplayString(_a[ke.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ha(ke.prop)),{key:1,modelValue:_a[ke.prop],"onUpdate:modelValue":ye=>_a[ke.prop]=ye,size:"small",placeholder:"请输入"+ke.label,content:((ce=Ze(ke.prop))==null?void 0:ce.contents)??((E=Ze(ke.prop))==null?void 0:E.options)??[],optionUrl:(Me=Ze(ke.prop))==null?void 0:Me.optionUrl,onChange:ye=>Je(oa,ke.prop,ye),onFocus:ye=>Sl.value=ke.prop,onBlur:f[9]||(f[9]=ye=>Sl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(ca,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:ke})=>[El.value===ke?(a.openBlock(),a.createBlock(De,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(_a=>Za(ke),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(N,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(_a=>Za(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),Ea.value===3?(a.openBlock(),a.createElementBlock("div",J0,[a.createVNode(De,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1}),f[38]||(f[38]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(Sa,{ref:"ocrUploadRef","file-list":tl.value,"onUpdate:fileList":f[10]||(f[10]=ke=>tl.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":U,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[Ea.value!==3?(a.openBlock(),a.createElementBlock("div",G0,[a.createVNode(ve,{onClick:Or,class:"ocr-start-recognize-btn",disabled:Ea.value===1||Ya.value},{default:a.withCtx(()=>f[40]||(f[40]=[a.createTextVNode(" 上一步 ")])),_:1,__:[40]},8,["disabled"]),a.createVNode(ve,{onClick:gr,class:"ocr-start-recognize-btn",disabled:Ya.value},{default:a.withCtx(()=>f[41]||(f[41]=[a.createTextVNode(" 下一步 ")])),_:1,__:[41]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(vf,{visible:st.value,onConfirm:Jo,onCancel:f[11]||(f[11]=ke=>st.value=!1)},null,8,["visible"]),a.createVNode(nd,{visible:sa.value,"onUpdate:visible":f[12]||(f[12]=ke=>sa.value=ke),versions:Z.value},null,8,["visible","versions"]),a.createVNode(Uu,{visible:wl.value,"onUpdate:visible":f[13]||(f[13]=ke=>wl.value=ke),images:fl.value,"default-image-name":cl.value,"field-meta":El.value!==null?((za=pa.value[El.value])==null?void 0:za.__ocrFieldMeta)||{}:{},"focused-field-name":Sl.value,onClose:f[14]||(f[14]=ke=>wl.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(yd,{visible:kl.value,"onUpdate:visible":f[15]||(f[15]=ke=>kl.value=ke),candidates:Dl.value,"name-prop":Rr.value,"mfr-prop":nn.value,columns:xe.value,onSubmit:_n,onPreviewFile:Qr},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(Cd,{visible:xa.value,"onUpdate:visible":f[16]||(f[16]=ke=>xa.value=ke),ocrPreviewData:pa.value,"onUpdate:ocrPreviewData":f[17]||(f[17]=ke=>pa.value=ke),ocrSelectedFields:Ol.value,"onUpdate:ocrSelectedFields":f[18]||(f[18]=ke=>Ol.value=ke),ocrPreviewColumns:Aa.value,onConfirm:he,onFieldChange:f[19]||(f[19]=({rowIndex:ke,prop:_a,value:oa})=>Je(ke,_a,oa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(yr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:_},{default:a.withCtx(()=>[a.createElementVNode("div",X0,[a.createVNode(pl.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:va.value,isStartJustify:!1,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(yr.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:p},{header:a.withCtx(()=>[a.createVNode(Xe,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>f[42]||(f[42]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[42]})]),footer:a.withCtx(()=>[a.createElementVNode("div",Z0,[a.createVNode(Xe,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Mn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",Q0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,ke=>(a.openBlock(),a.createBlock(ve,{key:ke==null?void 0:ke.label,style:a.normalizeStyle({background:ke==null?void 0:ke.background,color:ke==null?void 0:ke.color}),onClick:_a=>m(ke==null?void 0:ke.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ke==null?void 0:ke.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(Vp,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:ke,item:_a,slotData:oa,scope:ce,column:E,columnProp:Me,$index:ye})=>[a.createTextVNode(a.toDisplayString((ke==null?void 0:ke[(E==null?void 0:E.prop)||(E==null?void 0:E.label)])||(oa==null?void 0:oa[E==null?void 0:E.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},hc=Kl._export_sfc(a3,[["__scopeId","data-v-3304f526"]]),l3={class:"static-form-card"},r3={key:0,class:"static-form-body"},n3={class:"static-form-label"},t3=["onClick"],o3={key:1},i3={key:1,class:"static-form-empty"},s3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1}},setup(l){const n=l,r=c=>{switch(c){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},t=a.computed(()=>{var L;const c=(L=n.itemData)==null?void 0:L.find(x=>(x==null?void 0:x.key)==="formContent"),C=(c==null?void 0:c.contents)||[];return(n.fields&&n.fields.length>0?n.fields:C).filter(x=>!(x!=null&&x.isFormColHidden)&&(x==null?void 0:x.label)).map(x=>{let Y=x==null?void 0:x.value;Array.isArray(Y)&&(Y=Y.map(S=>S==null?"":typeof S=="object"?S.label??S.value??S.name??JSON.stringify(S):String(S)).filter(Boolean).join(",")),Y!=null&&typeof Y=="object"&&(Y=Y.label??Y.value??Y.name??JSON.stringify(Y));const w=x.label??"",z=Y==null||Y===""?"-":String(Y),ee=w==="使用状态";return{label:w,value:z,isStatus:ee,tagType:ee?r(z):"",width:x.width??1,field:x}})}),s=a.ref(null),d=c=>pl.getComponent(c),b=c=>{if(!c)return;const C=c.querySelector("input, textarea, .el-input__inner");C&&typeof C.focus=="function"&&C.focus()},h=(c,C,M)=>{n.disabled||(s.value=C,a.nextTick(()=>{b(M.currentTarget)}))},v=()=>{s.value=null},y=c=>{const C=c!=null&&c.width&&c.width>0?c.width:1,L=`calc((100% - ${(C-1)*48}px) / ${C})`;return{flex:`0 0 ${L}`,maxWidth:L,minWidth:"0",boxSizing:"border-box"}};return(c,C)=>{const M=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",l3,[t.value.length?(a.openBlock(),a.createElementBlock("div",r3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(L,x)=>{var Y,w,z,ee,S,$,T,k;return a.openBlock(),a.createElementBlock("div",{key:x,class:"static-form-item",style:a.normalizeStyle(y(L))},[a.createElementVNode("div",n3,a.toDisplayString(L.label)+": ",1),a.createElementVNode("div",{class:"static-form-value",onClick:g=>h(L,x,g)},[s.value===x&&L.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d(((Y=L.field)==null?void 0:Y.type)??"Input")),{key:0,modelValue:L.field.value,"onUpdate:modelValue":g=>L.field.value=g,isEdit:!0,disabled:(w=L.field)==null?void 0:w.disabled,content:((z=L.field)==null?void 0:z.contents)??[],optionUrl:L.field,originalValue:(ee=L.field)==null?void 0:ee.value,config:(S=L.field)==null?void 0:S.config,configModel:(($=L.field)==null?void 0:$.prop)??((T=L.field)==null?void 0:T.name),selectedTagList:((k=L.field)==null?void 0:k.selectValue)??[],onBlur:v,onBlurChange:v},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[L.isStatus?(a.openBlock(),a.createBlock(M,{key:0,type:L.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(L.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",o3,a.toDisplayString(L.value??"-"),1))],64))],8,t3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",i3," 暂无数据 "))])}}}),vc=Kl._export_sfc(s3,[["__scopeId","data-v-c4ed3455"]]),c3={class:"form-content"},u3={title:"选择标签"},d3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},p3={class:"col-operate-wrap"},f3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},h3={__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(l,{emit:n}){const r=()=>{b.value=!1,h.value=!1,v.value=[]},t=l;a.computed(()=>{var Ve;const K=(Ve=D.value)==null?void 0:Ve.split("/");return(K==null?void 0:K.some(ra=>(ra==null?void 0:ra.includes("updateLoading"))||(ra==null?void 0:ra.includes("loading"))))?!1:te.value==="view"});const s=n,d=a.ref([]),b=a.ref(!1),h=a.ref(!1),v=a.ref([]),{getFileExtension:y}=bo.useThreeSystem(),c=a.ref(),C=a.ref(!1),M=a.ref(!1),L=A.useUnit(A.pinia),{chooseTitle:x}=A.storeToRefs(L),Y=a.ref([]),w=a.ref(),z=a.ref(!1),ee=a.ref([]),S=Gs(A.pinia),$=bi(A.pinia),T=a.ref(!1),k=a.ref(),g=A.useLoginState(A.pinia),{loginUserInfo:j}=A.storeToRefs(g),q=a.ref(),J=a.ref(!0),me=A.useModelComp(A.pinia),{tableViewContents:ze,itemData:xe,isEdit:te,routeToChildPath:be,lockingPage:Q}=A.storeToRefs(me),de=a.ref(null),Ke=a.ref(!1),wa=a.ref(!1),oe=A.useMenuState(),{activeMenuPath:D}=A.storeToRefs(oe),ne=ua.useOriginalState(A.pinia),{originalPath:ge}=A.storeToRefs(ne),{compType:se,hasEditable:we}=Fs.useRole(),la=()=>!we(t.config,{type:se.FORM});a.computed(()=>D.value==="设备管理/试验设备"&&t.compName==="设备概要");const ya=a.ref([]),Va=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ae=async K=>{wa.value=K,await We("disabled",null,K,!0)},ea=async K=>{await We("operable",null,K,!0)};a.watch(()=>D.value,async()=>{d.value=[],v.value=[]},{deep:!0,immediate:!0});const Re=()=>{a.nextTick(()=>{Le()})},ma=K=>{var He;d.value=(He=d.value)==null?void 0:He.map(Ve=>({...Ve,isFormColHidden:!(K!=null&&K.includes(Ve.label))}))};a.onUnmounted(()=>{de.value=null});const Pe=K=>{s("clickTrigger",K)},Ee=async K=>{var He,Ve,ra,va,$e,ba;if(K===""){let Te="";(He=d.value)==null||He.forEach(fe=>{fe!=null&&fe.isMain&&(Te=fe==null?void 0:fe.value)});let fa=await ua.getItemData(be.value,sessionStorage.getItem("systemKey"),"");Te=((ba=($e=(va=(ra=(Ve=fa==null?void 0:fa[0])==null?void 0:Ve.compData)==null?void 0:ra.find(fe=>(fe==null?void 0:fe.key)==="mainRouters"))==null?void 0:va.contents)==null?void 0:$e[0])==null?void 0:ba.routerContent)+ge.value+Te;let ga=await ua.getItemData(Te,sessionStorage.getItem("systemKey"),"");z.value=!0,ee.value=ga==null?void 0:ga.filter(fe=>(fe==null?void 0:fe.comp)!=="methodButton"),s("routeUrl",ee.value)}},Le=()=>{var He;const K=(He=de.value)==null?void 0:He.$el;K&&Ta.Sortable.create(K,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Ve=>{const{oldIndex:ra,newIndex:va}=Ve;if(ra===va)return;const $e=d.value.splice(ra,1)[0];d.value.splice(va,0,$e)}})},We=async(K,He,Ve,ra=!1)=>{try{me.setRefreshCurStructure(!1)}catch{Qa.ElMessage.error("编辑处理失败")}},Ua=async(K,He)=>{await We()},Oa=async(K,He)=>{K&&await We()},P=async(K,He,Ve)=>{await We(He,Ve,K,!1)},F=(K,He)=>{q.value===He?J.value=!1:J.value=!0,q.value=He==null?void 0:He.changeProp},X=async K=>{var Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye;let He=[];if((Ve=K==null?void 0:K.toString())!=null&&Ve.includes(".urdf")){if(K.includes(",")){Qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}v.value=[{url:K,extension:y(K)}],h.value=!0,b.value=!0;return}if((ra=K==null?void 0:K.toString())!=null&&ra.includes(".stl")||(va=K==null?void 0:K.toString())!=null&&va.includes(".STL")||($e=K==null?void 0:K.toString())!=null&&$e.includes(".obj")||(ba=K==null?void 0:K.toString())!=null&&ba.includes(".mtl")){const ue=((Te=K==null?void 0:K.toString())==null?void 0:Te.split(",")).map(ie=>({url:ie,extension:y(ie)}));v.value=ue,h.value=!1,b.value=!0;return}if((fa=K==null?void 0:K.toString())!=null&&fa.includes(".stl")||(Ue=K==null?void 0:K.toString())!=null&&Ue.includes(".STL")||(ga=K==null?void 0:K.toString())!=null&&ga.includes(".obj")||(fe=K==null?void 0:K.toString())!=null&&fe.includes(".mtl")){let Oe,ue=[],ie={};if(Array.isArray(K)?Oe=K:Oe=K==null?void 0:K.split(","),Oe==null||Oe.forEach(na=>{na.includes(".mtl")?ue.push(na):ie.blob=ie.blob?ie.blob+","+na:na}),(ue==null?void 0:ue.length)>0&&(ie.mtlBlobs=ue),(Fe=(ka=Object.values(ie))==null?void 0:ka[0])!=null&&Fe.includes("http:"))He.push(ie);else{const na=new Blob([ie.blob],{type:"application/octet-stream;charset=UTF-8"});let qa=URL.createObjectURL(na),rl="";($a=K==null?void 0:K.split("/"))==null||$a.forEach((Ml,Fa)=>{var nl;Fa===((nl=K==null?void 0:K.split("/"))==null?void 0:nl.length)-1&&(rl=Ml)}),(Na=ie.blob)!=null&&Na.includes(".stl")&&(rl=(rl==null?void 0:rl.replaceAll(">",""))+".urdf"),w.value=[{name:rl,blobUrl:qa}],M.value=!0}}else{const Oe=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ue=await Qa.axios.get(K,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Oe.close()}),ie=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"});let na=URL.createObjectURL(ie),qa="";(Ye=K==null?void 0:K.split("/"))==null||Ye.forEach((rl,Ml)=>{var Fa;Ml===((Fa=K==null?void 0:K.split("/"))==null?void 0:Fa.length)-1&&(qa=rl)}),w.value=[{name:qa,blobUrl:na}],M.value=!0}(He==null?void 0:He.length)>0&&$.setBlobUrls(He)},R=()=>{M.value=!1},W=K=>{var $e,ba,Te,fa;const He=(ba=($e=pl.safeClone(t.itemData))==null?void 0:$e.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:ba.contents,Ve=pl.safeClone(K.content);let ra={};Ve&&((Te=Object.values(Ve))==null?void 0:Te.length)>0&&((fa=Object.values(Ve))==null||fa.forEach((Ue,ga)=>{ra[He[ga].key]=Ue}));const va={content:ra,index:t==null?void 0:t.index,buttonName:K==null?void 0:K.buttonName};s("change",va)};a.computed(()=>"http://222.92.178.198:62001");const Ie=async K=>{var ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl,Ca,aa;if(!K)return;(Fe=(ka=t==null?void 0:t.itemData)==null?void 0:ka.find(Se=>(Se==null?void 0:Se.key)==="parentFormPath"))==null||Fe.contents;let He=ze.value;(He==null?void 0:He.length)>0&&(He=He==null?void 0:He.map(Se=>{var Ya,tl,Da,sa;let Xa=(Ya=Se==null?void 0:Se.key)==null?void 0:Ya.split("/");return(t==null?void 0:t.compName)===(Xa==null?void 0:Xa[0])&&(tl=d.value)!=null&&tl.find(Z=>(Z==null?void 0:Z.prop)===(Xa==null?void 0:Xa[1]))&&(Se.value=(sa=(Da=d.value)==null?void 0:Da.find(Z=>(Z==null?void 0:Z.prop)===(Xa==null?void 0:Xa[1])))==null?void 0:sa.value),Se}),me.setTableViewContents(He));const Ve=pl.safeClone(t.itemData);let ra=Ve==null?void 0:Ve.map(Se=>{var Xa;return(Se==null?void 0:Se.key)==="formContent"&&((Xa=Se.contents)==null||Xa.map((Ya,tl)=>{var Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El,Sl,wl,fl;return Ya.type=(sa=(Da=d.value)==null?void 0:Da.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:sa.type,Ya.options=Ya!=null&&Ya.options?Ya.options:((Pa=(Ea=(Z=Ya==null?void 0:Ya.key)==null?void 0:Z.split("$"))==null?void 0:Ea[1])==null?void 0:Pa.length)>0?(pa=(xa=xu((ol=(ul=Ya==null?void 0:Ya.key)==null?void 0:ul.split("$"))==null?void 0:ol[1]))==null?void 0:xa.split(","))==null?void 0:pa.map(cl=>({label:cl,value:cl})):[],(Aa=Ya==null?void 0:Ya.key)!=null&&Aa.includes("$")&&(Ya.key=(ha=(Ze=Ya==null?void 0:Ya.key)==null?void 0:Ze.split("$"))==null?void 0:ha[0]),Ya.signature=(Ja=(La=d.value)==null?void 0:La.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:Ja.signature,Ya.isLoginUser=(El=(Ol=d.value)==null?void 0:Ol.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:El.isLoginUser,Ya.value=(Sl=Object.values(K))==null?void 0:Sl[tl],Ya.isFormColHidden=(fl=(wl=d.value)==null?void 0:wl.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:fl.isFormColHidden,Ya})),Se}),va=d.value,$e=(Na=($a=pl.safeClone(ra))==null?void 0:$a.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:Na.contents;if(va=va==null?void 0:va.map(Se=>{var Xa,Ya;return(Se==null?void 0:Se.type)==="Select"&&((Xa=Se==null?void 0:Se.allSelectionContents)==null?void 0:Xa.length)>0&&(Se.contactValue=K),Se.value=(Ya=$e==null?void 0:$e.find((tl,Da)=>((tl==null?void 0:tl.id)??Da)===(Se==null?void 0:Se.id)))==null?void 0:Ya.value,Se}),!J.value){s("contentChange",{contents:ra,index:t.index});return}let ba="",Te=(ue=(Oe=(Ye=pl.safeClone(ra))==null?void 0:Ye.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:Oe.contents)==null?void 0:ue.find((Se,Xa)=>{var Ya,tl,Da;return(Se==null?void 0:Se.label)===q.value||Xa.toString()===((Da=(tl=(Ya=q.value)==null?void 0:Ya.split("t"))==null?void 0:tl[1])==null?void 0:Da.toString())}),fa=(ie=Te==null?void 0:Te.optionUrl)==null?void 0:ie.menuSelect,Ue=!0;if((rl=(qa=(na=pl.safeClone(ra))==null?void 0:na.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:qa.contents)==null||rl.forEach(Se=>{var Xa,Ya,tl,Da,sa,Z;Ue&&((tl=(Ya=(Xa=Se==null?void 0:Se.optionUrl)==null?void 0:Xa.groupSelect)==null?void 0:Ya[1])!=null&&tl.includes("["))&&(ba=(sa=(Da=Se==null?void 0:Se.optionUrl)==null?void 0:Da.groupSelect)==null?void 0:sa[1],JSON.stringify(fa)===JSON.stringify((Z=Se==null?void 0:Se.optionUrl)==null?void 0:Z.menuSelect)&&(Ue=!1))}),(Ml=Te==null?void 0:Te.optionUrl)!=null&&Ml.menuSelect&&J.value){let Se=await di(Te),Xa,Ya=(Fa=Te==null?void 0:Te.optionUrl)==null?void 0:Fa.menuSelect;if(Se==null||Se.forEach(tl=>{var Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa;ba===((sa=(Da=Te==null?void 0:Te.optionUrl)==null?void 0:Da.groupSelect)==null?void 0:sa[1])&&((Pa=(Ea=(Z=Te==null?void 0:Te.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ea[1])!=null&&Pa.includes("["))&&((Aa=pl.safeClone(tl))==null?void 0:Aa[(pa=(xa=(ol=(ul=Te==null?void 0:Te.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:ol[1])==null?void 0:xa.replaceAll("[",""))==null?void 0:pa.replaceAll("]","")])===(Te==null?void 0:Te.value)&&(Xa=tl)}),Xa){let tl=pl.safeClone(va);tl=tl==null?void 0:tl.map(sa=>{var Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La;return(Xa!=null&&Xa[sa==null?void 0:sa.label]||Xa!=null&&Xa[(ul=(Pa=(Ea=(Z=sa==null?void 0:sa.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ea[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:ul.replaceAll("]","")])&&((pa=(xa=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:xa[1])!=null&&pa.includes("["))&&Ya!=null&&Ya.every(Ja=>{var Ol,El;return(El=(Ol=sa==null?void 0:sa.optionUrl)==null?void 0:Ol.menuSelect)==null?void 0:El.includes(Ja)})&&(sa.value=(Xa==null?void 0:Xa[sa==null?void 0:sa.label])||(Xa==null?void 0:Xa[(La=(ha=(Ze=(Aa=sa==null?void 0:sa.optionUrl)==null?void 0:Aa.groupSelect)==null?void 0:Ze[1])==null?void 0:ha.replaceAll("[",""))==null?void 0:La.replaceAll("]","")]),Array.isArray(sa.value)&&sa.value.every(Ja=>(Ja==null?void 0:Ja.url)&&(Ja==null?void 0:Ja.name))&&(sa.type="Upload")),sa}),tl=tl==null?void 0:tl.map(sa=>{var Z,Ea,Pa;return(Z=sa==null?void 0:sa.optionUrl)!=null&&Z.oldMenuSelect&&(sa.optionUrl.menuSelect=(Pa=(Ea=pl.safeClone(sa))==null?void 0:Ea.optionUrl)==null?void 0:Pa.oldMenuSelect),sa}),d.value=pl.safeClone(tl);let Da=pl.safeClone(tl);Da=Da==null?void 0:Da.map(sa=>{var Z,Ea,Pa,ul,ol,xa;return(Ea=(Z=sa==null?void 0:sa.optionUrl)==null?void 0:Z.menuSelect)!=null&&Ea.some(pa=>pa==null?void 0:pa.includes("["))&&(sa.optionUrl.oldMenuSelect=(ul=(Pa=pl.safeClone(sa))==null?void 0:Pa.optionUrl)==null?void 0:ul.menuSelect,sa.optionUrl.menuSelect=(xa=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.menuSelect)==null?void 0:xa.map(pa=>{var Aa,Ze,ha,La;if(pa!=null&&pa.includes("[")){let Ja=(Ze=(Aa=pa==null?void 0:pa.replaceAll("[","").replaceAll("]",""))==null?void 0:Aa.split(":"))==null?void 0:Ze[1];pa=(La=(ha=pl.safeClone(tl))==null?void 0:ha.find(Ol=>(Ol==null?void 0:Ol.label)===Ja))==null?void 0:La.value}return pa})),sa}),d.value=Da}else d.value=va;ra=ra==null?void 0:ra.map(tl=>{var Da;return(tl==null?void 0:tl.key)==="formContent"&&(tl.contents=(Da=tl.contents)==null?void 0:Da.map(sa=>{var Z,Ea,Pa,ul;return sa.value=((Ea=(Z=d.value)==null?void 0:Z.find(ol=>(ol==null?void 0:ol.label)===(sa==null?void 0:sa.key)))==null?void 0:Ea.value)??(sa==null?void 0:sa.value),sa.type=((ul=(Pa=d.value)==null?void 0:Pa.find(ol=>(ol==null?void 0:ol.prop)===(sa==null?void 0:sa.key)))==null?void 0:ul.type)??(sa==null?void 0:sa.type),sa})),tl})}J.value=!1,s("contentChange",{contents:ra,index:t.index});let ga=[],fe=[];if((Ca=pl.safeClone((nl=ra==null?void 0:ra.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:nl.contents))==null||Ca.forEach(Se=>{var Xa;Array.isArray(Se==null?void 0:Se.value)&&((Xa=Se==null?void 0:Se.value)!=null&&Xa.find(Ya=>{var tl;return(tl=Ya==null?void 0:Ya.url)==null?void 0:tl.includes(".obj")}))&&(fe=Se==null?void 0:Se.value)}),(fe==null?void 0:fe.length)>0){const Se=(aa=pl.safeClone(fe))==null?void 0:aa.filter(Xa=>{var Ya;return(Ya=Xa==null?void 0:Xa.url)==null?void 0:Ya.includes(".obj")});Se==null||Se.forEach(Xa=>{var tl,Da,sa,Z;const Ya=(tl=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:tl.map(Ea=>Ea==null?void 0:Ea.url);ga.push({objUrl:Xa==null?void 0:Xa.url,mtlUrls:((Da=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:Da.length)===1?(Z=(sa=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:sa[0])==null?void 0:Z.url:Ya})}),$.setObjUrl(ga)}},Ne=(K,He,Ve)=>{let ra="";const va=He==null?void 0:He.map($e=>{var ba;return(ba=$e==null?void 0:$e.value)==null?void 0:ba.pageData});return va==null||va.forEach($e=>{var ba;($e==null?void 0:$e.name)===(K==null?void 0:K[0])&&((ba=$e==null?void 0:$e.compData)==null||ba.forEach(Te=>{var fa;(Te==null?void 0:Te.key)==="formContent"&&((fa=Te==null?void 0:Te.contents)==null||fa.forEach(Ue=>{var ga;(Ue==null?void 0:Ue.prop)===(K==null?void 0:K[1])&&(ra=(Ue==null?void 0:Ue.value)===""?ua.judgeContents((ga=pl.safeClone(Ue))==null?void 0:ga.optionUrl,Ve):Ue==null?void 0:Ue.value)}))}))}),ra},Ce=(K,He,Ve,ra)=>{var Te,fa;let va="",$e="";(Te=pl.safeClone(He))==null||Te.forEach((Ue,ga)=>{Ue!=null&&Ue.includes("[")?$e=$e+ge.value+K[ga]:$e=$e===""?$e+Ue:$e+"/"+Ue});let ba=(fa=ra[$e])==null?void 0:fa.map(Ue=>{var ga;return(ga=Ue==null?void 0:Ue.value)==null?void 0:ga.pageData});return ba==null||ba.forEach(Ue=>{var ga;(Ue==null?void 0:Ue.name)===(Ve==null?void 0:Ve[0])&&((ga=Ue==null?void 0:Ue.compData)==null||ga.forEach(fe=>{var ka;(fe==null?void 0:fe.key)==="formContent"&&((ka=fe==null?void 0:fe.contents)==null||ka.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(Ve==null?void 0:Ve[1])&&(va=Fe==null?void 0:Fe.value)}))}))}),va};return a.watch(()=>t.itemData,async()=>{var Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl;const K=(Te=t.itemData)==null?void 0:Te.find(Ca=>(Ca==null?void 0:Ca.key)==="formContent"),He=(fa=pl.safeClone(t.itemData))==null?void 0:fa.find(Ca=>(Ca==null?void 0:Ca.key)==="formButton"),Ve=(Ue=pl.safeClone(t.itemData))==null?void 0:Ue.find(Ca=>(Ca==null?void 0:Ca.key)==="formFlex"),ra=(ga=pl.safeClone(t.itemData))==null?void 0:ga.find(Ca=>(Ca==null?void 0:Ca.key)==="formWrap"),va=(fe=pl.safeClone(t.itemData))==null?void 0:fe.find(Ca=>(Ca==null?void 0:Ca.key)==="enableWrap");(ra==null?void 0:ra.contents)==="纵向"?C.value=!1:C.value=!0;const $e=va==null?void 0:va.contents;if($e===void 0?T.value=Zn.BLOCK:typeof $e=="boolean"?T.value=$e?Zn.ORDINARY:Zn.BLOCK:T.value=$e,k.value=typeof(Ve==null?void 0:Ve.contents)!="boolean"?!(!(Ve!=null&&Ve.contents)===""||((ka=Ve==null?void 0:Ve.contents)==null?void 0:ka.toUpperCase())==="VERTICAL"):Ve==null?void 0:Ve.contents,((Fe=K==null?void 0:K.contents)==null?void 0:Fe.length)>0&&Array.isArray(K==null?void 0:K.contents)){let Ca=t.allMapContents;const aa=(Na=($a=pl.safeClone(K))==null?void 0:$a.contents)==null?void 0:Na.map((Z,Ea)=>{var wl,fl,cl,kl,Dl,$l,or,Cr,Gr,Xr,Rr,nn,qr;let Pa=(Z==null?void 0:Z.label)??(Z==null?void 0:Z.key)??"";Z==null||Z.type;let ul=(Z==null?void 0:Z.options)??[];if((wl=Z==null?void 0:Z.key)!=null&&wl.includes("$")&&(Pa=(fl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:fl[0],((kl=(cl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:cl[1])==null?void 0:kl.length)>0)){const[rr,Nr]=($l=(Dl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:Dl[1])==null?void 0:$l.split(/[()]/);(or=ua.FormType.find(Fr=>(Fr==null?void 0:Fr.key)===rr))==null||or.value,((Cr=Nr==null?void 0:Nr.split(","))==null?void 0:Cr.length)>0&&(ul=(Gr=Nr==null?void 0:Nr.split(","))==null?void 0:Gr.map(Fr=>({label:Fr,value:Fr})))}let ol=Z==null?void 0:Z.options;((Xr=Z==null?void 0:Z.optionUrl)==null?void 0:Xr.selectRelateType)==="自定义绑定"&&(ol=(nn=(Rr=Z==null?void 0:Z.optionUrl)==null?void 0:Rr.defaultSelect)==null?void 0:nn.map(rr=>({label:rr,value:rr})));let xa=(Z==null?void 0:Z.menuPath)??[],pa=(Z==null?void 0:Z.groups)??[],Aa=(Z==null?void 0:Z.columns)??[],Ze=!1,ha=(Z==null?void 0:Z.isFormColHidden)??!1,La="",Ja=Z!=null&&Z.value?Z.value:(ol==null?void 0:ol.length)>0?(qr=ol==null?void 0:ol[0])==null?void 0:qr.value:(Z==null?void 0:Z.value)??"",Ol=!1,El="Input";return((ol==null?void 0:ol.length)>0||(xa==null?void 0:xa.length)>0)&&(El="Select"),(Array.isArray(La)&&(La!=null&&La.every(rr=>(rr==null?void 0:rr.name)&&(rr==null?void 0:rr.url)))||Array.isArray(Ja)&&(Ja!=null&&Ja.every(rr=>(rr==null?void 0:rr.name)&&(rr==null?void 0:rr.url))))&&(El="upload"),Z!=null&&Z.isMainUrl&&(El="Url"),{label:Pa??"",name:Pa??"t"+Ea,prop:Pa??pl.safeClone(Z==null?void 0:Z.key),type:(Z==null?void 0:Z.type)??El,value:(Z==null?void 0:Z.type)==="Date"&&Ja===""?new Date:Ja,id:(Z==null?void 0:Z.id)??Ea,contents:(ol==null?void 0:ol.length)>0?ol:ul??[],width:(Z==null?void 0:Z.width)??1,isLoginUser:Ze,config:Z==null?void 0:Z.config,optionUrl:(Z==null?void 0:Z.optionUrl)??Z,isFormColHidden:ha,signature:Ol,isMain:Z==null?void 0:Z.isMain,required:(Z==null?void 0:Z.required)??!1,isMainUrl:Z==null?void 0:Z.isMainUrl,operable:(Z==null?void 0:Z.operable)??!1,disabled:(Z==null?void 0:Z.disabled)??!1,isSync:Z==null?void 0:Z.isSync,menus:xa,groups:pa,words:Aa,allSelectionContents:Z==null?void 0:Z.allContents,filterContent:Z==null?void 0:Z.filterContents}}),Se=aa==null?void 0:aa.map(Z=>Z==null?void 0:Z.value);let Xa="";Se==null||Se.forEach(Z=>{Z!==""&&Z!==void 0&&(Xa=Xa===""?Z:Xa+"/"+Z)}),S.setSelectArray(Se),S.setSelectString(Xa);let Ya=(Ye=pl.safeClone(aa))==null?void 0:Ye.map(Z=>(Z!=null&&Z.value&&ua.IsJson(Z==null?void 0:Z.value)&&Array.isArray(JSON.parse(Z==null?void 0:Z.value))&&(Z.value=JSON.parse(Z.value)),Z)),tl={};Ya==null||Ya.forEach(Z=>{tl[Z.label]=Z==null?void 0:Z.value}),Ya=Ya==null?void 0:Ya.map(Z=>{var Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha;if((Z==null?void 0:Z.type)==="Select"&&((Ea=Z==null?void 0:Z.allSelectionContents)==null?void 0:Ea.length)>0&&(Z.contactValue=tl),(ul=(Pa=Z==null?void 0:Z.optionUrl)==null?void 0:Pa.menuSelect)!=null&&ul.some(La=>La==null?void 0:La.includes("["))){let La="";Z.optionUrl.oldMenuSelect=(xa=(ol=pl.safeClone(Z))==null?void 0:ol.optionUrl)==null?void 0:xa.menuSelect,Z.optionUrl.menuSelect=(Aa=(pa=Z==null?void 0:Z.optionUrl)==null?void 0:pa.menuSelect)==null?void 0:Aa.map(Ja=>{var Ol,El,Sl,wl,fl,cl;if(Ja!=null&&Ja.includes("[")){let kl=(El=(Ol=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:Ol.split(":"))==null?void 0:El[1];La=Ne((Sl=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:Sl.split(":"),Ca==null?void 0:Ca[D.value],Ca),Ja=((fl=(wl=pl.safeClone(Ya))==null?void 0:wl.find(Dl=>(Dl==null?void 0:Dl.label)===kl))==null?void 0:fl.value)||Ne((cl=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:cl.split(":"),Ca==null?void 0:Ca[D.value],Ca)}return Ja}),La!==""&&Z.value===""&&(Z.value=Ce(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(Ze=Z==null?void 0:Z.optionUrl)==null?void 0:Ze.groupSelect,Ca),Array.isArray(Z.value)&&((ha=Z.value)!=null&&ha.every(Ja=>Ja==null?void 0:Ja.url))&&(Z.type="UPLOAD"))}return Z}),d.value=Ya,wa.value=((Oe=d.value)==null?void 0:Oe.every(Z=>Z==null?void 0:Z.disabled))||Q.value===D.value,Ke.value=(ue=d.value)==null?void 0:ue.every(Z=>Z==null?void 0:Z.operable),ya.value=(ie=d.value)==null?void 0:ie.map(Z=>Z==null?void 0:Z.label);let Da=[],sa=[];if((na=pl.safeClone(d.value))==null||na.forEach(Z=>{var Ea;Array.isArray(Z==null?void 0:Z.value)&&((Ea=Z==null?void 0:Z.value)!=null&&Ea.find(Pa=>{var ul;return(ul=Pa==null?void 0:Pa.url)==null?void 0:ul.includes(".obj")}))&&(sa=Z==null?void 0:Z.value)}),(sa==null?void 0:sa.length)>0){const Z=(qa=pl.safeClone(sa))==null?void 0:qa.filter(Ea=>{var Pa;return(Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".obj")});Z==null||Z.forEach(Ea=>{var ul,ol,xa,pa;const Pa=(ul=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:ul.map(Aa=>Aa==null?void 0:Aa.url);Da.push({objUrl:Ea==null?void 0:Ea.url,mtlUrls:((ol=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:ol.length)===1?(pa=(xa=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:xa[0])==null?void 0:pa.url:Pa})}),$.setObjUrl(Da)}(rl=pl.safeClone(d.value))==null||rl.forEach(Z=>{var Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El;if((Pa=(Ea=Z==null?void 0:Z.value)==null?void 0:Ea.toString())!=null&&Pa.includes(".stl")||(ol=(ul=Z==null?void 0:Z.value)==null?void 0:ul.toString())!=null&&ol.includes(".STL")||(pa=(xa=Z==null?void 0:Z.value)==null?void 0:xa.toString())!=null&&pa.includes(".obj")||(Ze=(Aa=Z==null?void 0:Z.value)==null?void 0:Aa.toString())!=null&&Ze.includes(".mtl")||(La=(ha=Z==null?void 0:Z.value)==null?void 0:ha.toString())!=null&&La.includes(".urdf")){let Sl={},wl=[],fl;Array.isArray(Z==null?void 0:Z.value)?fl=Z==null?void 0:Z.value:fl=(Ja=Z==null?void 0:Z.value)==null?void 0:Ja.split(","),fl==null||fl.forEach(cl=>{cl.includes(".mtl")?wl.push(cl):Sl.blob=Sl.blob==="undefined"?cl:Sl.blob+","+cl}),(wl==null?void 0:wl.length)>0&&(Sl.mtlBlobs=wl),(El=(Ol=Object.values(Sl))==null?void 0:Ol[0])!=null&&El.includes("http:")}})}else d.value=[];let ba=ze.value;if((ba==null?void 0:ba.length)>0&&(ba=ba==null?void 0:ba.map(Ca=>{var Se,Xa,Ya,tl;let aa=(Se=Ca==null?void 0:Ca.key)==null?void 0:Se.split("/");return(t==null?void 0:t.compName)===(aa==null?void 0:aa[0])&&(Xa=d.value)!=null&&Xa.find(Da=>(Da==null?void 0:Da.prop)===(aa==null?void 0:aa[1]))&&(Ca.value=(tl=(Ya=d.value)==null?void 0:Ya.find(Da=>(Da==null?void 0:Da.prop)===(aa==null?void 0:aa[1])))==null?void 0:tl.value),Ca}),me.setTableViewContents(ba)),t!=null&&t.formRules)c.value=t==null?void 0:t.formRules;else{let Ca={};(Ml=pl.safeClone(d).value)==null||Ml.forEach(aa=>{((aa==null?void 0:aa.isMain)===!0||(aa==null?void 0:aa.required)===!0)&&(Ca[(aa==null?void 0:aa.prop)??(aa==null?void 0:aa.name)]=[{required:!0,message:`${(aa==null?void 0:aa.label)||(aa==null?void 0:aa.prop)||(aa==null?void 0:aa.name)}不能为空`}])}),c.value=Ca}if(((Fa=He==null?void 0:He.contents)==null?void 0:Fa.length)>0){const Ca=[];(nl=He==null?void 0:He.contents)==null||nl.forEach((aa,Se)=>{(aa==null?void 0:aa.label)!==""&&Ca.push({label:(aa==null?void 0:aa.label)??"",id:(aa==null?void 0:aa.id)??Se,type:(aa==null?void 0:aa.type)??"",background:aa==null?void 0:aa.background})}),Y.value=Ca}else Y.value=[]},{deep:!0,immediate:!0}),a.watch(()=>Q.value,K=>{wa.value=K===D.value},{immediate:!0}),(K,He)=>{var Te,fa;const Ve=a.resolveComponent("svg-icon"),ra=a.resolveComponent("el-switch"),va=a.resolveComponent("el-checkbox"),$e=a.resolveComponent("el-popover"),ba=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",c3,[T.value===a.unref(Zn).TEXT?(a.openBlock(),a.createBlock(vc,{key:0,itemData:l.itemData,compName:l.compName,fields:d.value,disabled:wa.value||la()},null,8,["itemData","compName","fields","disabled"])):T.value===a.unref(Zn).BLOCK?(a.openBlock(),a.createBlock(qp,{key:1,items:(fa=(Te=d.value)==null?void 0:Te.filter(Ue=>!(Ue!=null&&Ue.isFormColHidden)))==null?void 0:fa.map(Ue=>({label:Ue==null?void 0:Ue.label,value:Ue==null?void 0:Ue.value,width:(Ue==null?void 0:Ue.width)??1,field:Ue})),disabled:wa.value||la()},null,8,["items","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":T.value===a.unref(Zn).ORDINARY})},[a.createVNode(pl.ssForm,{rowContents:d.value,formRules:c.value,buttonValue:Y.value,isRowFlex:!1,isEnableWrap:!0,onOnButtonClick:W,onChange:Ie,formDisabled:wa.value||la(),formLabelsOperable:Ke.value,isButtonRow:C.value,onPreview:X,onBlurChange:F,onHandleColEditChange:Ua,onHandleColTypeChange:Oa,onRouteUrl:Ee,onClickTrigger:Pe},{operateCol:a.withCtx(({renderColumns:Ue,formDisabled:ga,formLabelsOperable:fe})=>[a.createVNode($e,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Re},{reference:a.withCtx(()=>[a.createElementVNode("span",u3,[a.createVNode(Ve,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",d3,[He[1]||(He[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(ra,{"model-value":ga,"active-text":"禁用","inactive-text":"",onChange:ae,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(ra,{"model-value":fe,"active-text":"编辑所有标签","inactive-text":"",onChange:ea},null,8,["model-value"]),He[2]||(He[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(ba,{modelValue:ya.value,"onUpdate:modelValue":He[0]||(He[0]=ka=>ya.value=ka),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:de,onChange:ma},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ue,ka=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ka.label},[a.createVNode(va,{value:ka.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(ka.label),1)]),_:2},1032,["value"]),a.createVNode($e,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(Ve,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Fe;return[a.createElementVNode("div",p3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Fe=Object.keys(ka))==null?void 0:Fe.filter($a=>{var Na;return(Na=Va.value)==null?void 0:Na.find(Ye=>(Ye==null?void 0:Ye.value)===$a)}),$a=>{var Na,Ye;return a.openBlock(),a.createElementBlock("div",{key:$a},[a.createVNode(pl._sfc_main$1,{value:ka==null?void 0:ka[$a],"active-text":(Ye=(Na=Va.value)==null?void 0:Na.find(Oe=>(Oe==null?void 0:Oe.value)===$a))==null?void 0:Ye.label,inactiveText:"",onChange:Oe=>P(Oe,$a,ka)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",f3,[a.createVNode(Ve,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","formDisabled","formLabelsOperable","isButtonRow"])],2)),M.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:3,fileDataList:w.value,onDestroy:R},null,8,["fileDataList"])):a.createCommentVNode("",!0),b.value?(a.openBlock(),a.createBlock(yr.ssDialog,{key:4,visible:b.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(bo.ThreeViewerHost,{files:v.value,onGetAnimationData:K.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ps=Kl._export_sfc(h3,[["__scopeId","data-v-b9cbe990"]]),So=a.ref(0),mc=l=>{var n;return!l||(l==null?void 0:l.length)===0?[]:(n=A.cloneDeep(l))==null?void 0:n.map(t=>(So.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??So.value,children:mc(t==null?void 0:t.children)},t))},v3=l=>{var r;return(r=A.cloneDeep(l))==null?void 0:r.map(t=>(So.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??So.value,children:mc(t==null?void 0:t.children)},t))},yc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===n)?(r=A.cloneDeep(l))==null?void 0:r.filter(s=>(s==null?void 0:s.id)!==n):(l=l==null?void 0:l.map(t=>(t.children=yc(t==null?void 0:t.children,n),t)),l)},gc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(n==null?void 0:n.id))?(r=A.cloneDeep(l))==null?void 0:r.map(s=>((s==null?void 0:s.id)===(n==null?void 0:n.id)&&(s=n),s)):(l=l==null?void 0:l.map(t=>(t.children=gc(t==null?void 0:t.children,n),t)),l)},bc=(l,n)=>{var r;return l!=null&&l.find(t=>{var s;return(t==null?void 0:t.id)===((s=n==null?void 0:n.contents)==null?void 0:s.id)})?(r=A.cloneDeep(l))==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.id)===((d=n==null?void 0:n.contents)==null?void 0:d.id)&&(s=n==null?void 0:n.contents),s}):(l=l==null?void 0:l.map(t=>(t.children=bc(t==null?void 0:t.children,n),t)),l)},kc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(n==null?void 0:n.id))?(r=A.cloneDeep(l))==null?void 0:r.map(s=>((s==null?void 0:s.id)===(n==null?void 0:n.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(n.contents)),s)):(l=l==null?void 0:l.map(t=>(t.children=kc(t==null?void 0:t.children,n),t)),l)},er=[{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"}],m3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],y3=[{label:"新增",value:"add"}],Bn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:y3},{key:"background",label:"按钮背景色",type:"Color"}],Nn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:m3},{key:"textColor",label:"按钮颜色",type:"Color"}],g3={class:"table-header-child"},b3={class:"table-header-child-main"},k3={class:"table-header-child-content"},x3={class:"table-header-child-content-item"},_3={class:"fix-button"},w3={key:0},C3={class:"form-content"},E3={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref(""),b=ua.useTableComp(A.pinia),{tableIndex:h}=A.storeToRefs(b);a.ref(0);const v=a.ref(""),y=a.ref([]),c=a.ref([]),C=S=>{var T;s.value=!0;let $=[];er==null||er.forEach(k=>{let g=A.cloneDeep(h.value)+1;b.setTableIndex(g),$.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:h.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((T=S==null?void 0:S.children)==null?void 0:T.length)>0&&$.push({children:S==null?void 0:S.children,isFormColHidden:!0}),v.value=S==null?void 0:S.id,y.value=$,c.value=$},M=S=>{t("fixChange",A.cloneDeep(S))},L=S=>{t("deleteChange",A.cloneDeep(S))},x=S=>{s.value=!0;let $=[];er==null||er.forEach(T=>{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),$.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),d.value=S==null?void 0:S.id,y.value=$,c.value=$},Y=S=>{let $=A.cloneDeep(c.value);$=$==null?void 0:$.map(T=>(T.children||(T.value=S==null?void 0:S[T.name]),T)),c.value=$},w=()=>{var $,T;y.value=c.value;let S={};if(v.value!=="")S.id=v.value,($=y.value)==null||$.forEach(k=>{const g=er==null?void 0:er.find(j=>(j==null?void 0:j.label)===(k==null?void 0:k.label));g?S[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"fix"});else{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),S.id="id"+h.value,(T=y.value)==null||T.forEach(g=>{const j=er==null?void 0:er.find(q=>(q==null?void 0:q.label)===(g==null?void 0:g.label));j?S[j.key]=g.value:g!=null&&g.children&&g.children.length>0&&(S.children=g.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"add"})}v.value="",y.value=[],c.value=[]},z=()=>{s.value=!1,v.value="",d.value="",y.value=[],c.value=[]},ee=S=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",S),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(S,$)=>{const T=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",g3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(k,g)=>(a.openBlock(),a.createElementBlock("div",b3,[a.createElementVNode("div",k3,[a.createElementVNode("div",x3,a.toDisplayString(k.label),1),a.createElementVNode("div",_3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>x(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>C(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>ee(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",w3,[a.createVNode(xc,{tableChildContents:k==null?void 0:k.children,onDeleteChange:L,onFixChange:M},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:z,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",C3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:z,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:w},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},S3=Kl._export_sfc(E3,[["__scopeId","data-v-e0fef72d"]]),D3={class:"table-header-child"},B3={class:"table-header-child-main"},N3={class:"table-header-child-content"},T3={class:"table-header-child-content-item"},A3={class:"fix-button"},M3={key:0},z3={class:"form-content"},O3={class:"dialog-footer"},I3={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref(""),b=ua.useTableComp(A.pinia),{tableIndex:h}=A.storeToRefs(b),v=a.ref(""),y=a.ref([]),c=a.ref([]),C=S=>{t("fixChange",A.cloneDeep(S))},M=S=>{var T;s.value=!0;let $=[];er==null||er.forEach(k=>{let g=A.cloneDeep(h.value)+1;b.setTableIndex(g),$.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:h.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((T=S==null?void 0:S.children)==null?void 0:T.length)>0&&$.push({children:S==null?void 0:S.children,isFormColHidden:!0}),v.value=S==null?void 0:S.id,y.value=$,c.value=$},L=S=>{s.value=!0;let $=[];er==null||er.forEach(T=>{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),$.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),d.value=S==null?void 0:S.id,y.value=$,c.value=$},x=S=>{let $=A.cloneDeep(c.value);$=$==null?void 0:$.map(T=>(T.children||(T.value=S==null?void 0:S[T.name]),T)),c.value=$},Y=()=>{var $,T;y.value=c.value;let S={};if(v.value!=="")S.id=v.value,($=y.value)==null||$.forEach(k=>{const g=er==null?void 0:er.find(j=>(j==null?void 0:j.label)===(k==null?void 0:k.label));g?S[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"fix"});else{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),S.id="idChild"+h.value,(T=y.value)==null||T.forEach(g=>{const j=er==null?void 0:er.find(q=>(q==null?void 0:q.label)===(g==null?void 0:g.label));j?S[j.key]=g.value:g!=null&&g.children&&g.children.length>0&&(S.children=g.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"add"})}v.value="",y.value=[],c.value=[]},w=()=>{s.value=!1,v.value="",d.value="",y.value=[],c.value=[]},z=S=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",S),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ee=S=>{t("deleteChange",S)};return(S,$)=>{const T=a.resolveComponent("svg-icon"),k=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",D3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(g,j)=>(a.openBlock(),a.createElementBlock("div",B3,[a.createElementVNode("div",N3,[a.createElementVNode("div",T3,a.toDisplayString(g.label),1),a.createElementVNode("div",A3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>L(g)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>M(g)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(a.openBlock(),a.createElementBlock("div",M3,[a.createVNode(S3,{tableChildContents:g==null?void 0:g.children,onDeleteChange:ee,onFixChange:C},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:w,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",z3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",O3,[a.createVNode(k,{onClick:w,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>$[0]||($[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(k,{class:"ok-button button",onClick:Y,id:"themeButton"},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},xc=Kl._export_sfc(I3,[["__scopeId","data-v-ebd68fa1"]]),L3={class:"table-operate-content"},V3={class:"table-operate-item"},R3={class:"operate-title"},$3={class:"operate-content"},P3={class:"fix-content"},F3={class:"fix-content-label"},j3={class:"fix-button"},H3={key:0},U3={class:"operate-title"},q3={class:"operate-content"},K3={class:"fix-content"},W3={class:"fix-content-label"},Y3={class:"fix-button"},J3={class:"operate-title"},G3={class:"operate-content"},X3={class:"fix-content"},Z3={class:"fix-content-label"},Q3={class:"fix-button"},e1={class:"operate-title"},a1={class:"operate-content"},l1={class:"fix-content"},r1={class:"fix-content-label"},n1={class:"fix-button"},o1={class:"operate-content"},i1={style:{display:"flex","justify-content":"space-between"}},s1={class:"form-content"},c1={class:"dialog-footer"},u1={class:"form-content"},d1={class:"dialog-footer"},p1={class:"form-content"},f1={class:"dialog-footer"},h1={class:"form-content"},v1={class:"dialog-footer"},m1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref(!1),b=a.ref(!1),h=a.ref([]),v=a.ref(!1),y=a.ref([]),c=a.ref(!1),C=a.ref([]),M=a.ref(""),L=a.ref(""),x=a.ref([]),Y=a.ref([]),w=a.ref([]),z=a.ref([]),ee=a.ref(!1),S=a.ref([]),$=a.ref([]),T=a.ref(0),k=a.ref([]),g=a.ref([]),j=a.ref([]),q=()=>{ee.value=!0;let P=[];Bn==null||Bn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:(F==null?void 0:F.key)==="background"?"var(--ssComponent-primary-color)":"",id:T.value,contents:F==null?void 0:F.options})}),S.value=P,$.value=P},J=()=>{var F,X,R;b.value=!0;let P=[];(R=(X=(F=ua.FormContent)==null?void 0:F.find(W=>(W==null?void 0:W.key)==="Input"))==null?void 0:X.value)==null||R.forEach(W=>{T.value++,P.push({label:W==null?void 0:W.label,name:(W==null?void 0:W.name)||(W==null?void 0:W.label),type:W.type,value:(W==null?void 0:W.label)==="类型"?"Input":"",id:T.value,contents:W==null?void 0:W.options})}),k.value=P,g.value=P},me=P=>{P||(k.value=g.value)},ze=async P=>{var F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va;if((P==null?void 0:P.类型)!==((X=(F=g.value)==null?void 0:F.find($e=>($e==null?void 0:$e.label)==="类型"))==null?void 0:X.value)){let $e=[],ba=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:W.value)==null?void 0:Ie.value)?await((Ve=(He=(K=ua.FormContent)==null?void 0:K.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:He.value)==null?void 0:Ve.value):(Ce=(Ne=ua.FormContent)==null?void 0:Ne.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ce.value;if(ba==null||ba.forEach(Te=>{T.value++,$e.push({label:Te==null?void 0:Te.label,name:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.label),type:Te.type,value:Te!=null&&Te.属性名?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):(P==null?void 0:P[Te.label])??"",id:T.value,contents:Te==null?void 0:Te.options,prop:(Te==null?void 0:Te.prop)||(Te==null?void 0:Te.name)||(Te==null?void 0:Te.label)})}),P!=null&&P.菜单选项&&((ra=P==null?void 0:P.菜单选项)==null?void 0:ra.length)>0){const Te=await ua.menuToContentType(P==null?void 0:P.菜单选项);$e=$e==null?void 0:$e.map(fa=>((fa==null?void 0:fa.name)==="组信息选项"&&(fa.contents=Te),fa))}g.value=await ua.selectToBase(A.cloneDeep($e)),k.value=await ua.selectToBase(A.cloneDeep($e))}else{let $e=A.cloneDeep(k.value);if($e=$e==null?void 0:$e.map(ba=>(ba.value=P==null?void 0:P[ba.name],ba)),P!=null&&P.菜单选项&&((va=P==null?void 0:P.菜单选项)==null?void 0:va.length)>0){const ba=await ua.menuToContentType(P==null?void 0:P.菜单选项);$e=$e==null?void 0:$e.map(Te=>((Te==null?void 0:Te.name)==="组信息选项"&&(Te.contents=ba),Te))}$e=ua.formToOptionsContents($e),g.value=await ua.selectToBase(A.cloneDeep($e))}},xe=async P=>{await ze(P),k.value=g.value},te=(P,F)=>{if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.selectRelateType)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.menuSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.groupSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(F==null?void 0:F.value)||F[P.key];if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const X=F[P.key];return Hs(X)?X:P.default}return(P==null?void 0:P.label)==="类型"&&F[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!F[P.key]?!1:F[P.key]},be=async P=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra;b.value=!0;let F=[];const X=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:W.value)==null?void 0:Ie.value)?await((Ve=(He=(K=ua.FormContent)==null?void 0:K.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:He.value)==null?void 0:Ve.value):(Ce=(Ne=ua.FormContent)==null?void 0:Ne.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ce.value;if(X==null||X.forEach(va=>{T.value++,F.push({label:va==null?void 0:va.label,name:(va==null?void 0:va.name)||(va==null?void 0:va.label),type:va.type,value:(va==null?void 0:va.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):te(va,P),id:T.value,contents:va==null?void 0:va.options})}),P!=null&&P.menuSelect&&((ra=P==null?void 0:P.menuSelect)==null?void 0:ra.length)>0){const va=await ua.menuToContentType(P==null?void 0:P.menuSelect);F=F==null?void 0:F.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=va),$e))}M.value=P==null?void 0:P.id,k.value=await ua.selectToBase(ua.formToOptionsContents(F)),g.value=await ua.selectToBase(ua.formToOptionsContents(F))},Q=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;j.value=(F=A.cloneDeep(j.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="tableToForm"&&(R.contents=j.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{b.value=!1,k.value=[],M.value=""},Ke=async()=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra,va;k.value=g.value;let P={};M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value);let F=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find($e=>{var ba,Te;return($e==null?void 0:$e.key)===(((Te=(ba=k.value)==null?void 0:ba.find(fa=>(fa==null?void 0:fa.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:W.value)==null?void 0:Ie.value)??((Ce=(Ne=ua.FormContent)==null?void 0:Ne.find($e=>{var ba,Te;return($e==null?void 0:$e.key)===(((Te=(ba=k.value)==null?void 0:ba.find(fa=>(fa==null?void 0:fa.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:Ce.value);if((K=k.value)==null||K.forEach($e=>{const ba=F==null?void 0:F.find(Te=>(Te==null?void 0:Te.label)===($e==null?void 0:$e.label));ba&&(P[ba.key]=$e.value)}),P.name=P.label,(He=j.value)!=null&&He.find($e=>$e.id===P.id))j.value=(Ve=j.value)==null?void 0:Ve.map($e=>($e.id===P.id&&($e=P),$e));else{let $e=A.cloneDeep(j.value);j.value||(j.value=[]),$e.push(P),j.value=$e}j.value=j.value.map(({id:$e,...ba})=>ba),b.value=!1,M.value="";let X=A.cloneDeep(r.originalItemContents);(ra=A.cloneDeep(r.originalItemContents))!=null&&ra.find($e=>($e==null?void 0:$e.key)==="tableToForm")?X=(va=A.cloneDeep(r.originalItemContents))==null?void 0:va.map($e=>(($e==null?void 0:$e.key)==="tableToForm"&&($e.contents=j.value),$e)):X.push({key:"tableToForm",contents:j.value}),t("change",X)},wa=P=>{ee.value=!0;let F=[];Bn==null||Bn.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:P[X.key],id:T.value,contents:X==null?void 0:X.options})}),M.value=P==null?void 0:P.id,S.value=F,$.value=F};a.watch(()=>c.value,()=>{var F,X;let P=A.cloneDeep(r.originalItemContents);(F=A.cloneDeep(r.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="page")?P=(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="page"&&(R.contents=c.value),R)):P.push({key:"page",contents:c.value}),t("change",P)},{deep:!0});const oe=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;Y.value=(F=A.cloneDeep(Y.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=Y.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=()=>{var X,R,W,Ie,Ne;S.value=$.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=S.value)==null||X.forEach(Ce=>{const K=Bn==null?void 0:Bn.find(He=>(He==null?void 0:He.label)===(Ce==null?void 0:Ce.label));K?P[K.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(P.children=Ce.children)}),(R=Y.value)!=null&&R.find(Ce=>Ce.id===P.id))Y.value=(W=Y.value)==null?void 0:W.map(Ce=>(Ce.id===P.id&&(Ce=P),Ce));else{let Ce=A.cloneDeep(Y.value)??[];Ce.push(P),Y.value=Ce}ee.value=!1,M.value="";let F=A.cloneDeep(r.originalItemContents);(Ie=A.cloneDeep(r.originalItemContents))!=null&&Ie.find(Ce=>(Ce==null?void 0:Ce.key)==="extraButton")?F=(Ne=A.cloneDeep(r.originalItemContents))==null?void 0:Ne.map(Ce=>((Ce==null?void 0:Ce.key)==="extraButton"&&(Ce.contents=Y.value),Ce)):F.push({key:"extraButton",contents:Y.value}),t("change",F)},ne=P=>{let F=A.cloneDeep($.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),$.value=F},ge=()=>{ee.value=!1,S.value=[],M.value=""},se=P=>{v.value=!0;let F=[];Nn==null||Nn.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:P[X.key],id:T.value,contents:X==null?void 0:X.options})}),M.value=P==null?void 0:P.id,w.value=F,z.value=F},we=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;x.value=(F=A.cloneDeep(x.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=x.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},la=()=>{d.value=!0;let P=[];er==null||er.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),y.value=P,C.value=P},ya=()=>{v.value=!0;let P=[];Nn==null||Nn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),w.value=P,z.value=P},Va=P=>{let F=A.cloneDeep(z.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),z.value=F},ae=()=>{var X,R,W,Ie,Ne;w.value=z.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=w.value)==null||X.forEach(Ce=>{const K=Nn==null?void 0:Nn.find(He=>(He==null?void 0:He.label)===(Ce==null?void 0:Ce.label));K?P[K.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(P.children=Ce.children)}),(R=x.value)!=null&&R.find(Ce=>Ce.id===P.id))x.value=(W=x.value)==null?void 0:W.map(Ce=>(Ce.id===P.id&&(Ce=P),Ce));else{let Ce=A.cloneDeep(x.value);Ce.push(P),x.value=Ce}v.value=!1,M.value="";let F=A.cloneDeep(r.originalItemContents);(Ie=A.cloneDeep(r.originalItemContents))!=null&&Ie.find(Ce=>(Ce==null?void 0:Ce.key)==="rowButton")?F=(Ne=A.cloneDeep(r.originalItemContents))==null?void 0:Ne.map(Ce=>((Ce==null?void 0:Ce.key)==="rowButton"&&(Ce.contents=x.value),Ce)):F.push({key:"rowButton",contents:x.value}),t("change",F)},ea=()=>{v.value=!1,M.value="",z.value=[],w.value=[]},Re=P=>{d.value=!0;let F=[];er==null||er.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:T.value,contents:X==null?void 0:X.options})}),y.value=F,L.value=P==null?void 0:P.id,C.value=F},ma=P=>{var F;h.value=yc(A.cloneDeep(h.value),P==null?void 0:P.id),t("change",(F=A.cloneDeep(r.originalItemContents))==null?void 0:F.map(X=>{var R;return(X==null?void 0:X.key)==="header"&&(X.contents=(R=h.value)!=null&&R.some(W=>W==null?void 0:W.children)?[h.value]:h.value),X}))},Pe=P=>{var X,R,W;P.type==="fix"?P.id!==""?h.value=bc(h.value,P):h.value=gc(h.value,P==null?void 0:P.contents):h.value=kc(h.value,P),h.value=(X=h.value)!=null&&X.some(Ie=>Ie==null?void 0:Ie.children)?[h.value]:h.value,M.value="";let F=A.cloneDeep(r.originalItemContents);(R=A.cloneDeep(r.originalItemContents))!=null&&R.find(Ie=>(Ie==null?void 0:Ie.key)==="header")?F=(W=A.cloneDeep(r.originalItemContents))==null?void 0:W.map(Ie=>((Ie==null?void 0:Ie.key)==="header"&&(Ie.contents=h.value),Ie)):F.push({key:"header",contents:h.value}),t("change",F)},Ee=P=>{var X;d.value=!0;let F=[];er==null||er.forEach(R=>{T.value++,F.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:P[R.key],id:T.value,contents:R==null?void 0:R.options})}),P!=null&&P.children&&((X=P==null?void 0:P.children)==null?void 0:X.length)>0&&F.push({children:P==null?void 0:P.children,isFormColHidden:!0}),M.value=P==null?void 0:P.id,L.value="",y.value=F,C.value=F},Le=P=>{let F=A.cloneDeep(C.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),C.value=F},We=()=>{d.value=!1,M.value="",L.value="",C.value=[]},Ua=()=>{var X,R,W,Ie,Ne,Ce;y.value=C.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=y.value)==null||X.forEach(K=>{const He=er==null?void 0:er.find(Ve=>(Ve==null?void 0:Ve.label)===(K==null?void 0:K.label));He?P[He.key]=K.value:K!=null&&K.children&&K.children.length>0&&(P.children=K.children)}),(R=h.value)!=null&&R.find(K=>K.id===P.id))h.value=(W=h.value)==null?void 0:W.map(K=>(K.id===P.id&&(K=P),K));else{let K=A.cloneDeep(h.value)??[];L.value===""?K.push(P):K=K==null?void 0:K.map(He=>(He.id===L.value&&(He.children||(He.children=[]),He.children.push(P)),He)),h.value=K}h.value=(Ie=h.value)!=null&&Ie.some(K=>K==null?void 0:K.children)?[h.value]:h.value,d.value=!1,M.value="",L.value="";let F=A.cloneDeep(r.originalItemContents);(Ne=A.cloneDeep(r.originalItemContents))!=null&&Ne.find(K=>(K==null?void 0:K.key)==="header")?F=(Ce=A.cloneDeep(r.originalItemContents))==null?void 0:Ce.map(K=>((K==null?void 0:K.key)==="header"&&(K.contents=h.value),K)):F.push({key:"header",contents:h.value}),t("change",F)},Oa=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;h.value=(F=A.cloneDeep(h.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>{var W;return(R==null?void 0:R.key)==="header"&&(R.contents=(W=h.value)!=null&&W.some(Ie=>Ie==null?void 0:Ie.children)?[h.value]:h.value),R})),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>r.originalItemContents,()=>{var P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(s.value=A.cloneDeep(r.originalItemContents),h.value=(F=(P=s.value)==null?void 0:P.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:F.contents,x.value=(R=(X=s.value)==null?void 0:X.find(fe=>(fe==null?void 0:fe.key)==="rowButton"))==null?void 0:R.contents,Y.value=(Ie=(W=s.value)==null?void 0:W.find(fe=>(fe==null?void 0:fe.key)==="extraButton"))==null?void 0:Ie.contents,c.value=(Ce=(Ne=s.value)==null?void 0:Ne.find(fe=>(fe==null?void 0:fe.key)==="page"))!=null&&Ce.contents?!!((He=(K=s.value)==null?void 0:K.find(fe=>(fe==null?void 0:fe.key)==="page"))!=null&&He.contents):!1,j.value=(ra=(Ve=s.value)==null?void 0:Ve.find(fe=>(fe==null?void 0:fe.key)==="tableToForm"))==null?void 0:ra.contents,h.value=(va=h.value)==null?void 0:va.map((fe,ka)=>(Array.isArray(fe)?fe=v3(fe):fe={label:(fe==null?void 0:fe.label)??"",prop:(fe==null?void 0:fe.label)==="操作"?"operate":fe==null?void 0:fe.prop,width:fe!=null&&fe.width?parseInt(fe.width):"",fixed:(fe==null?void 0:fe.fixed)??void 0,sortable:(fe==null?void 0:fe.sortable)??!1,align:(fe==null?void 0:fe.align)??"left",showOverflowTooltip:(fe==null?void 0:fe.showOverflowTooltip)??!0,isNotDrag:(fe==null?void 0:fe.isNotDrag)??!1,isEditCol:(fe==null?void 0:fe.isEditCol)??!1,isOperate:(fe==null?void 0:fe.isOperate)??!1,id:(fe==null?void 0:fe.id)??ka,formMenuSelect:(fe==null?void 0:fe.formMenuSelect)??void 0,groupSelect:(fe==null?void 0:fe.groupSelect)??void 0},fe)),h.value=($e=h.value)!=null&&$e.every(fe=>Array.isArray(fe))?(ba=h.value)==null?void 0:ba[0]:h.value,x.value=(Te=x.value)==null?void 0:Te.map((fe,ka)=>fe={label:(fe==null?void 0:fe.label)??"",type:(fe==null?void 0:fe.type)??"",textColor:(fe==null?void 0:fe.textColor)??"#000000",id:(fe==null?void 0:fe.id)??ka}),Y.value=(fa=Y.value)==null?void 0:fa.map((fe,ka)=>fe={label:(fe==null?void 0:fe.label)??"",type:(fe==null?void 0:fe.type)??"",background:(fe==null?void 0:fe.background)??"var(--ssComponent-primary-color)",id:(fe==null?void 0:fe.id)??ka}),j.value)j.value=(ga=j.value)==null?void 0:ga.map(fe=>{T.value++;let ka=fe;return ka.id=T.value,ka});else{let fe=[];const ka=(Ue=ua.getColumnChild(A.cloneDeep(h.value)))==null?void 0:Ue.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="operate");ka==null||ka.forEach(Fe=>{var $a;T.value++,fe.push({label:Fe==null?void 0:Fe.label,name:(Fe==null?void 0:Fe.prop)||(Fe==null?void 0:Fe.label),type:Fe!=null&&Fe.groupSelect?"Select":"Input",value:"",id:T.value,contents:Fe==null?void 0:Fe.options,menuSelect:Fe==null?void 0:Fe.formMenuSelect,groupSelect:($a=Fe==null?void 0:Fe.groupSelect)==null?void 0:$a.split(":"),selectRelateType:"关联绑定列"})}),j.value=fe}},{deep:!0,immediate:!0}),(P,F)=>{const X=a.resolveComponent("svg-icon"),R=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",L3,[a.createElementVNode("div",V3,[a.createElementVNode("div",R3,[F[2]||(F[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(R,{class:"icon-content",onClick:la,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[1]||(F[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",$3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",P3,[a.createElementVNode("div",F3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",j3,[a.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Re(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Ee(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Oa(W)},null,8,["onClick"])])]),W!=null&&W.children&&W.children.length>0?(a.openBlock(),a.createElementBlock("div",H3,[a.createVNode(xc,{tableChildContents:W==null?void 0:W.children,onDeleteChange:ma,onFixChange:Pe},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",U3,[F[4]||(F[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:ya},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[3]||(F[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",q3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",K3,[a.createElementVNode("div",W3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",Y3,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>se(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>we(W)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",J3,[F[6]||(F[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:q},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[5]||(F[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",G3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Y.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",X3,[a.createElementVNode("div",Z3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",Q3,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>wa(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>oe(W)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",e1,[F[8]||(F[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:J},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[7]||(F[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",a1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",l1,[a.createElementVNode("div",r1,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",n1,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>be(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Q(W)},null,8,["onClick"])])])]))),128))]),F[10]||(F[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",o1,[a.createElementVNode("div",i1,[F[9]||(F[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:c.value,"onUpdate:modelValue":F[0]||(F[0]=W=>c.value=W)},null,8,["modelValue"])])])]),a.createVNode(yr.ssDialog,{visible:d.value,onBeforeDestroy:We,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",s1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Le},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",c1,[a.createVNode(R,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[11]||(F[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(R,{class:"ok-button button",onClick:Ua,id:"themeButton"},{default:a.withCtx(()=>F[12]||(F[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:v.value,onBeforeDestroy:ea,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",u1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Va},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",d1,[a.createVNode(R,{onClick:ea,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[13]||(F[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(R,{class:"ok-button button",onClick:ae,id:"themeButton"},{default:a.withCtx(()=>F[14]||(F[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:ee.value,onBeforeDestroy:ge,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",p1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:ne},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",f1,[a.createVNode(R,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[15]||(F[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(R,{class:"ok-button button",onClick:D,id:"themeButton"},{default:a.withCtx(()=>F[16]||(F[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:b.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",h1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:ze,onChangeVisible:me,onBlurChange:xe},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",v1,[a.createVNode(R,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[17]||(F[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(R,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:a.withCtx(()=>F[18]||(F[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},y1=Kl._export_sfc(m1,[["__scopeId","data-v-7a6b87b5"]]),g1=A.useModelComp(A.pinia),{pageMapState:b1}=A.storeToRefs(g1),k1=A.useMenuState(A.pinia),{activeMenuPath:x1}=A.storeToRefs(k1),_1=a.ref(24),w1=a.ref(6),C1=a.ref(70),E1=a.ref(.18),S1=a.ref(45),D1=(l,n,r,t)=>{var s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S;return{x:((d=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:d.x)||n%2*12,y:((h=(b=l==null?void 0:l.value)==null?void 0:b.tableData)==null?void 0:h.y)||n,w:((y=(v=l==null?void 0:l.value)==null?void 0:v.tableData)==null?void 0:y.w)||_1.value,h:((C=(c=l==null?void 0:l.value)==null?void 0:c.tableData)==null?void 0:C.h)||r,minW:((L=(M=l==null?void 0:l.value)==null?void 0:M.tableData)==null?void 0:L.minW)||w1.value,minH:((Y=(x=l==null?void 0:l.value)==null?void 0:x.tableData)==null?void 0:Y.minH)||E1.value,maxH:((z=(w=l==null?void 0:l.value)==null?void 0:w.tableData)==null?void 0:z.maxH)||S1.value,i:((S=(ee=l==null?void 0:l.value)==null?void 0:ee.tableData)==null?void 0:S.i)||n,id:(l==null?void 0:l.id)||n+"",component:t}},B1=(l,n)=>{var t,s,d,b,h,v,y,c;let r=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){if(((b=(d=(s=l==null?void 0:l.compData)==null?void 0:s.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:b.length)===0)return 2}else((h=l==null?void 0:l.comp)==null?void 0:h.toUpperCase())==="FORM"&&(r=((c=(y=(v=l==null?void 0:l.compData)==null?void 0:v.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:y.contents)==null?void 0:c.length)/5);return r*2},_c=(l,n,r)=>{var b,h;const t=(h=(b=b1.value)==null?void 0:b[x1.value])==null?void 0:h.filter(v=>{var y;return((y=v==null?void 0:v.key)==null?void 0:y.type)==="gridLayout"}),s=t==null?void 0:t.find(v=>{var y,c,C;return((C=(c=(y=v==null?void 0:v.value)==null?void 0:y.tableData)==null?void 0:c.component)==null?void 0:C.id)===l.id}),d=B1(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((v,y)=>_c(v,y))),{...D1(s,n,d,l)}},N1=(l,n)=>{if((l==null?void 0:l.length)===0)return[];const r=A.cloneDeep(l);return Array.isArray(l)?r==null?void 0:r.map((t,s)=>_c(t,s)):[]},T1=l=>({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}]}]}}),A1=(l,n)=>l==null?void 0:l.map(r=>{for(const t in n)if(t===(r==null?void 0:r.prop))return{...r,value:n[t]};return r}),M1=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]);a.watch(()=>r.compType,h=>{var c;const v=T1(r==null?void 0:r.optionItems),y=h?(c=v[h==null?void 0:h.toUpperCase()])==null?void 0:c[r==null?void 0:r.target]:[];s.value=y==null?void 0:y.map(C=>{for(const[M,L]of Object.entries((r==null?void 0:r.comp)||{}))if((C==null?void 0:C.prop)===M)return{...C,value:L};return C})},{immediate:!0});const d=h=>pl.getComponent(h),b=h=>{var v,y;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?s.value=(v=s.value)==null?void 0:v.map(c=>{var C;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(C=c==null?void 0:c.options)==null?void 0:C.map(M=>({...M,disabled:!0}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!0}:c}):s.value=(y=s.value)==null?void 0:y.map(c=>{var C;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(C=c==null?void 0:c.options)==null?void 0:C.map(M=>({...M,disabled:!1}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!1}:c}),t("change",{target:r==null?void 0:r.target,styleConfigs:s.value,prop:h==null?void 0:h.prop})};return(h,v)=>{const y=a.resolveComponent("el-col"),c=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,C=>(a.openBlock(),a.createBlock(c,{class:"style-row",key:C==null?void 0:C.prop},{default:a.withCtx(()=>[a.createVNode(y,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(C==null?void 0:C.label)+":",1)]),_:2},1024),a.createVNode(y,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d(C.type)),{modelValue:C.value,"onUpdate:modelValue":M=>C.value=M,content:C==null?void 0:C.options,optionUrl:C==null?void 0:C.optionUrl,disabled:C==null?void 0:C.disabled,activeText:C==null?void 0:C.activeText,inactiveText:C==null?void 0:C.inactiveText,onChange:M=>b(C)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),z1=Kl._export_sfc(M1,[["__scopeId","data-v-6c233914"]]),O1=a.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(l,{emit:n}){const r=l,t=n,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=a.ref([]),b=z=>z==null?void 0:z.reduce((ee,S)=>(ee[S==null?void 0:S.prop]=S==null?void 0:S.rule,ee),{}),h=a.computed(()=>({formRules:b(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),v=a.ref([]),y=a.ref(""),c=(z,ee,S)=>{var k;let $=[];(r==null?void 0:r.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:z},{label:"按钮名称",value:"按钮名称",children:ee}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(r==null?void 0:r.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(k=r==null?void 0:r.relatedData)==null?void 0:k.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let T;return S&&(S==null?void 0:S.length)>0?T=[...$,...C(z,ee,S)]:T=$,T},C=(z,ee,S)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return S?$==null?void 0:$.filter(T=>S==null?void 0:S.includes(T==null?void 0:T.prop)):$},M=(z,ee)=>{var g,j,q,J,me,ze,xe,te,be;const S=((me=(J=(q=(j=(g=r==null?void 0:r.comp)==null?void 0:g.compData)==null?void 0:j.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:q.contents)==null?void 0:J.filter(Q=>(Q==null?void 0:Q.label)!=="操作"))==null?void 0:me.map(Q=>({value:Q==null?void 0:Q.prop,label:Q.label})))||[],$=/button/i,T=((be=(te=(xe=(ze=r==null?void 0:r.comp)==null?void 0:ze.compData)==null?void 0:xe.filter(Q=>$.test(Q==null?void 0:Q.key)))==null?void 0:te.flatMap(Q=>Q==null?void 0:Q.contents))==null?void 0:be.map(Q=>({value:Q==null?void 0:Q.label,label:Q.label})))||[],k=c(S,T,z);v.value=ee?A1(k,ee):k,z&&(z==null?void 0:z.length)>0&&d.value.push(...z==null?void 0:z.map(Q=>({prop:Q,rule:s})))};a.onMounted(()=>{M(null,r==null?void 0:r.extendItem)});const L=z=>{const ee=z==null?void 0:z[y.value];if(y.value==="执行任务"){if(!(ee!=null&&ee.join("/")))return;const S=ee==null?void 0:ee.join("/");M(S==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:S==="进度设置/进度条"?["进度关键词"]:null,z)}},x=z=>{t("change",{target:r==null?void 0:r.target,extendConfigs:z})},Y=(z,ee)=>{y.value=ee==null?void 0:ee.changeProp,L(z)},w=z=>{t("onButtonClick",z)};return(z,ee)=>(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:x,onBlurChange:Y,onOnButtonClick:w},null,8,["rowContents","formRules","buttonValue"]))}}),I1=Kl._export_sfc(O1,[["__scopeId","data-v-7c660c1f"]]),L1={};function V1(l,n){return null}const R1=Kl._export_sfc(L1,[["render",V1]]),$1={class:"form-operate-content"},P1={class:"form-operate-item"},F1={class:"operate-title"},j1={class:"operate-content"},H1={class:"fix-content"},U1={class:"fix-button"},q1={class:"operate-title"},K1={class:"operate-content"},W1={class:"fix-content"},Y1={class:"fix-button"},J1={style:{display:"flex","justify-content":"space-between"}},G1={class:"form-content"},X1={class:"dialog-footer"},Z1={class:"form-content"},Q1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref([]),b=a.ref([]),h=a.ref(!1),v=a.ref([]),y=a.ref([]),c=a.ref(""),C=a.ref(!1),M=a.ref(0),L=a.ref([]),x=a.ref([]),Y=(te,be)=>{if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="selectRelateType"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.selectRelateType)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="menuSelect"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.menuSelect)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="groupSelect"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.groupSelect)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="originalContent")return(be==null?void 0:be.value)||be[te.key];if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="multiple"){const Q=be[te.key];return Hs(Q)?Q:te.default}return(te==null?void 0:te.label)==="类型"&&be[te.key]===""?"Input":(te==null?void 0:te.key)==="isFormColHidden"&&!be[te.key]?!1:be[te.key]},w=async te=>{var de,Ke,wa,oe,D,ne;s.value=!0;let be=[];const Q=await((wa=(Ke=(de=ua.FormContent)==null?void 0:de.find(ge=>(ge==null?void 0:ge.key)===((te==null?void 0:te.type)===""?"Input":te==null?void 0:te.type)))==null?void 0:Ke.value)==null?void 0:wa.value)??((D=(oe=ua.FormContent)==null?void 0:oe.find(ge=>(ge==null?void 0:ge.key)===((te==null?void 0:te.type)===""?"Input":te==null?void 0:te.type)))==null?void 0:D.value);if(Q==null||Q.forEach(ge=>{M.value++,be.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,prop:ge==null?void 0:ge.prop,value:Y(ge,te),id:M.value,contents:ge==null?void 0:ge.options,width:(te==null?void 0:te.width)??1})}),te!=null&&te.menuSelect&&((ne=te==null?void 0:te.menuSelect)==null?void 0:ne.length)>0){const ge=await ua.menuToContentType(te==null?void 0:te.menuSelect);be=be==null?void 0:be.map(se=>((se==null?void 0:se.name)==="组信息选项"&&(se.contents=ge),se))}c.value=te==null?void 0:te.id,d.value=await ua.selectToBase(ua.formToOptionsContents(be)),b.value=await ua.selectToBase(ua.formToOptionsContents(be))},z=te=>{var Q;h.value=!0;let be=[];(Q=ua.FormButton)==null||Q.forEach(de=>{M.value++,be.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&te[de.key]===""?"normal":te[de.key],id:M.value,contents:de==null?void 0:de.options})}),L.value=be,x.value=be,c.value=te==null?void 0:te.id};a.watch(()=>C.value,()=>{var be,Q;let te=A.cloneDeep(r.originalItemContents);(be=A.cloneDeep(r.originalItemContents))!=null&&be.find(de=>(de==null?void 0:de.key)==="enableWrap")?te=(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!C.value),de)):te.push({key:"enableWrap",contents:!C.value}),t("change",te)},{deep:!0});const ee=()=>{var Q,de,Ke,wa,oe;L.value=x.value;let te={};if(c.value!==""?te.id=c.value:(M.value++,te.id="id"+M.value),(Q=L.value)==null||Q.forEach(D=>{var ge;const ne=(ge=ua.FormButton)==null?void 0:ge.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label));ne&&(te[ne.key]=D.value)}),(de=v.value)!=null&&de.find(D=>D.id===te.id))v.value=(Ke=v.value)==null?void 0:Ke.map(D=>(D.id===te.id&&(D=te),D));else{let D=A.cloneDeep(v.value);v.value||(v.value=[]),D.push(te),v.value=D}h.value=!1,c.value="";let be=A.cloneDeep(r.originalItemContents);(wa=A.cloneDeep(r.originalItemContents))!=null&&wa.find(D=>(D==null?void 0:D.key)==="formButton")?be=(oe=A.cloneDeep(r.originalItemContents))==null?void 0:oe.map(D=>((D==null?void 0:D.key)==="formButton"&&(D.contents=v.value),D)):be.push({key:"formButton",contents:v.value}),t("change",be)},S=te=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var be,Q;y.value=(be=A.cloneDeep(y.value))==null?void 0:be.filter(de=>(de==null?void 0:de.id)!==(te==null?void 0:te.id)),t("change",(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=y.value),de))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=te=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var be,Q;v.value=(be=A.cloneDeep(v.value))==null?void 0:be.filter(de=>(de==null?void 0:de.id)!==(te==null?void 0:te.id)),t("change",(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=v.value),de))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>{var be;h.value=!0;let te=[];(be=ua.FormButton)==null||be.forEach(Q=>{M.value++,te.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:(Q==null?void 0:Q.label)==="类型"?"normal":"",id:M.value,contents:Q==null?void 0:Q.options})}),L.value=te,x.value=te},k=()=>{var be,Q,de;s.value=!0;let te=[];(de=(Q=(be=ua.FormContent)==null?void 0:be.find(Ke=>(Ke==null?void 0:Ke.key)==="Input"))==null?void 0:Q.value)==null||de.forEach(Ke=>{M.value++,te.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,value:(Ke==null?void 0:Ke.label)==="类型"?"Input":"",id:M.value,contents:Ke==null?void 0:Ke.options})}),d.value=te,b.value=te},g=te=>{let be=A.cloneDeep(x.value);be=be==null?void 0:be.map(Q=>(Q.value=te==null?void 0:te[Q.name],Q)),x.value=be},j=te=>{const be=te.find(Ke=>(Ke==null?void 0:Ke.name)==="类型");if((be==null?void 0:be.value)!="Select")return;const Q=te.find(Ke=>(Ke==null?void 0:Ke.name)==="多选"),de=te.find(Ke=>(Ke==null?void 0:Ke.name)==="初始值");Q!=null&&Q.value&&ko.isString(de.value)&&(de.value=[de.value]),!(Q!=null&&Q.value)&&!ko.isString(de.value)&&(de.value="")},q=async te=>{var be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la;if((te==null?void 0:te.类型)!==((Q=(be=b.value)==null?void 0:be.find(ya=>(ya==null?void 0:ya.label)==="类型"))==null?void 0:Q.value)){let ya=[];const Va=await((wa=(Ke=(de=ua.FormContent)==null?void 0:de.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:Ke.value)==null?void 0:wa.value)?await((se=(ge=(ne=ua.FormContent)==null?void 0:ne.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:ge.value)==null?void 0:se.value):(D=(oe=ua.FormContent)==null?void 0:oe.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:D.value;if(Va==null||Va.forEach(ae=>{var Re,ma;M.value++;const ea=ku(ae==null?void 0:ae.default)?(te==null?void 0:te[ae.label])??ae.value??"":ae==null?void 0:ae.default;ya.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:ea,prop:ae==null?void 0:ae.prop,id:M.value,contents:ae==null?void 0:ae.options,width:((ma=(Re=b.value)==null?void 0:Re[0])==null?void 0:ma.width)??1})}),te!=null&&te.菜单选项&&((we=te==null?void 0:te.菜单选项)==null?void 0:we.length)>0){const ae=await ua.menuToContentType(te==null?void 0:te.菜单选项);ya=ya==null?void 0:ya.map(ea=>((ea==null?void 0:ea.name)==="组信息选项"&&(ea.contents=ae),ea))}j(ya),b.value=await ua.selectToBase(A.cloneDeep(ya)),d.value=await ua.selectToBase(A.cloneDeep(ya))}else{let ya=A.cloneDeep(b.value);if(ya=ya==null?void 0:ya.map(Va=>(Va.value=te==null?void 0:te[Va.name],Va)),te!=null&&te.菜单选项&&((la=te==null?void 0:te.菜单选项)==null?void 0:la.length)>0){const Va=await ua.menuToContentType(te==null?void 0:te.菜单选项);ya=ya==null?void 0:ya.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Va),ae))}ya=ua.formToOptionsContents(ya),j(ya),b.value=await ua.selectToBase(A.cloneDeep(ya))}},J=te=>{te||(d.value=b.value)},me=async te=>{await q(te),d.value=b.value},ze=Ta.debounce(async()=>{var de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va;d.value=b.value;let te={};te.width=((Ke=(de=d.value)==null?void 0:de[0])==null?void 0:Ke.width)??1,c.value!==""?te.id=c.value:(M.value++,te.id="id"+M.value);let be=await((D=(oe=(wa=ua.FormContent)==null?void 0:wa.find(ae=>{var ea,Re;return(ae==null?void 0:ae.key)===(((Re=(ea=d.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:oe.value)==null?void 0:D.value)??((ge=(ne=ua.FormContent)==null?void 0:ne.find(ae=>{var ea,Re;return(ae==null?void 0:ae.key)===(((Re=(ea=d.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:ge.value);if((se=d.value)==null||se.forEach(ae=>{const ea=be==null?void 0:be.find(Re=>(Re==null?void 0:Re.label)===(ae==null?void 0:ae.label));ea&&(te[ea.key]=ae.value)}),te.width=te.width?te.width:1,te.key=te==null?void 0:te.label,te.isFormColHidden=te==null?void 0:te.isFormColHidden,(we=y.value)!=null&&we.find(ae=>ae.id===te.id))y.value=(la=y.value)==null?void 0:la.map(ae=>(ae.id===te.id&&(ae=te),ae));else{let ae=A.cloneDeep(y.value);ae.push(te),y.value=ae}y.value=y.value.map(({id:ae,...ea})=>ea),s.value=!1,c.value="";let Q=A.cloneDeep(r.originalItemContents);(ya=A.cloneDeep(r.originalItemContents))!=null&&ya.find(ae=>(ae==null?void 0:ae.key)==="formContent")?Q=(Va=A.cloneDeep(r.originalItemContents))==null?void 0:Va.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=y.value),ae)):Q.push({key:"formContent",contents:y.value}),t("change",Q)},300),xe=()=>{s.value=!1,h.value=!1,c.value="",b.value=[],x.value=[]};return a.watch(()=>r.originalItemContents,()=>{var be,Q,de,Ke,wa,oe;if(!r.originalItemContents||r.originalItemContents.length===0)return;const te=A.cloneDeep(r.originalItemContents);y.value=((be=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:be.contents)??[],v.value=((Q=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="formButton"))==null?void 0:Q.contents)??[],C.value=(de=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&de.contents?!((Ke=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&Ke.contents):!0,y.value=(wa=A.cloneDeep(y.value))==null?void 0:wa.map((D,ne)=>{var se;let ge=D;return ge.id=(D==null?void 0:D.id)??ne,D!=null&&D.label||(D.label=(D==null?void 0:D.key)??(D==null?void 0:D.label)??""),D!=null&&D.type||(D.type=(D==null?void 0:D.type)??""),D.contents=((se=D==null?void 0:D.options)==null?void 0:se.length)===0?(D==null?void 0:D.contents)??"":D==null?void 0:D.options,ge}),y.value=ua.formToOptionsContents(y.value),v.value=(oe=v.value)==null?void 0:oe.map((D,ne)=>D={label:(D==null?void 0:D.label)??"",type:(D==null?void 0:D.type)??"",background:(D==null?void 0:D.background)??"var(--ssComponent-primary-color)",id:ne})},{deep:!0,immediate:!0}),(te,be)=>{const Q=a.resolveComponent("svg-icon"),de=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",$1,[a.createElementVNode("div",P1,[a.createElementVNode("div",F1,[be[2]||(be[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:k},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[be[1]||(be[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",j1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(Ke,wa)=>(a.openBlock(),a.createElementBlock("div",{key:wa},[a.createElementVNode("div",H1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",U1,[a.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>w(Ke)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>S(Ke)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",q1,[be[4]||(be[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:T},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[be[3]||(be[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",K1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(Ke,wa)=>(a.openBlock(),a.createElementBlock("div",{key:wa},[a.createElementVNode("div",W1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",Y1,[a.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>z(Ke)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>$(Ke)},null,8,["onClick"])])])]))),128))]),be[6]||(be[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",J1,[be[5]||(be[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":be[0]||(be[0]=Ke=>C.value=Ke)},null,8,["modelValue"])])]),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:xe,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",G1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:q,onChangeVisible:J,onBlurChange:me},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",X1,[a.createVNode(de,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>be[7]||(be[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(de,{class:"ok-button button",onClick:a.unref(ze),id:"themeButton"},{default:a.withCtx(()=>be[8]||(be[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:h.value,onBeforeDestroy:xe,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Z1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:L.value,key:L.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:xe,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:ee},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},fs=Kl._export_sfc(Q1,[["__scopeId","data-v-20850524"]]),e2={class:"step-module content"},a2={class:"module-data"},l2={class:"step-module layout"},r2={class:"form-content"},n2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.reactive({visible:!1,width:"40%",title:"步骤条"}),v=a.ref("create"),y=a.ref({}),c=a.ref([]),C=w=>{var z;y.value=w,t("change",(z=x())==null?void 0:z.compData)},M=(w,z)=>{var ee,S;switch(w){case"create":(ee=d.value)==null||ee.forEach($=>{$.value=""}),v.value="create",h.visible=!0;break;case"update":(S=d.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),v.value="update",h.visible=!0;break;case"delete":c.value.splice(z,1),v.value="delete";break}},L=w=>{var z,ee,S;if((w==null?void 0:w.buttonName)==="确认"){const $=A.cloneDeep(w==null?void 0:w.content);switch(Object.keys($).forEach(T=>{$[T]===""&&delete $[T]}),v.value){case"create":c.value.push({...$,index:((z=c.value)==null?void 0:z.length)+1});break;case"update":c.value=(ee=c.value)==null?void 0:ee.map(T=>T.index===($==null?void 0:$.index)?{...T,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:T);break}t("change",(S=x())==null?void 0:S.compData),h.visible=!1}else h.visible=!1},x=()=>({comp:"Step",compData:[{key:"stepList",contents:c.value},{key:"stepConfig",contents:y.value}]}),Y=()=>{h.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(y.value=((z=w==null?void 0:w.find(S=>S.key==="stepConfig"))==null?void 0:z.contents)??{},c.value=((ee=w==null?void 0:w.find(S=>S.key==="stepList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",e2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>M("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",a2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.title),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>M("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>M("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",l2,[z[5]||(z[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:s.value,onChange:C},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Y,width:h.width},{default:a.withCtx(()=>[a.createElementVNode("div",r2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),t2=Kl._export_sfc(n2,[["__scopeId","data-v-7dbd17f2"]]),o2={class:"step-module content"},i2={class:"module-data"},s2={class:"step-module layout"},c2={class:"form-content"},u2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref("create"),d=a.ref({}),b=a.ref([]),h=a.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}]),v=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=a.reactive({visible:!1,width:"40%",title:"时间线"}),C=w=>{var z;d.value=w,t("change",(z=x())==null?void 0:z.compData)},M=(w,z)=>{var ee,S;switch(w){case"create":(ee=v.value)==null||ee.forEach($=>{$.value=""}),s.value="create",c.visible=!0;break;case"update":(S=v.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),s.value="update",c.visible=!0;break;case"delete":b.value.splice(z,1),s.value="delete";break}},L=w=>{var z,ee,S,$;if((w==null?void 0:w.buttonName)==="确认"){const T=A.cloneDeep(w==null?void 0:w.content);switch(Object.keys(T).forEach(k=>{T[k]===""&&delete T[k]}),s.value){case"create":(ee=b.value)==null||ee.push({...T,index:((z=b.value)==null?void 0:z.length)+1});break;case"update":b.value=(S=b.value)==null?void 0:S.map(k=>k.index===(T==null?void 0:T.index)?{...k,content:T==null?void 0:T.content,timestamp:T==null?void 0:T.timestamp}:k);break}t("change",($=x())==null?void 0:$.compData),c.visible=!1}else c.visible=!1},x=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:d.value}]}),Y=()=>{c.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(d.value=((z=w==null?void 0:w.find(S=>S.key==="timeLineConfig"))==null?void 0:z.contents)??{},b.value=((ee=w==null?void 0:w.find(S=>S.key==="timeLineList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",o2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>M("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",i2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.content),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>M("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>M("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",s2,[z[5]||(z[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:h.value,onChange:C},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Y,width:c.width},{default:a.withCtx(()=>[a.createElementVNode("div",c2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),d2=Kl._export_sfc(u2,[["__scopeId","data-v-39ffc861"]]),p2={};function f2(l,n){return a.openBlock(),a.createElementBlock("div")}const h2=Kl._export_sfc(p2,[["render",f2]]),v2={class:"extra-content"},m2={key:0},y2={key:1},g2={class:"dialog-footer"},b2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:n}){const r=l,t=a.ref(0),s=a.ref(),d=a.ref(),b=n,h=a.ref(!1),v=a.ref({}),y=a.ref({}),c=a.ref();a.watch(()=>[r.itemData],()=>{var $;const S=A.cloneDeep(r.itemData);s.value=($=A.cloneDeep(S))==null?void 0:$.map(T=>{var k;if(T.key==="extra"){let g=[];(k=T.value)==null||k.forEach(j=>{var q;g.push((q=Object.values(j))==null?void 0:q[0])}),T.value=g}return T})},{deep:!0,immediate:!0});const C=(S,$,T,k)=>{var j;let g={};((j=S==null?void 0:S[0])==null?void 0:j.contents)==="详情"&&(h.value=!0,g[$]=S,d.value=S==null?void 0:S.filter(q=>(q==null?void 0:q.key)!=="tableContentName"),v.value=g,y.value=T,c.value=k.id)},M=S=>{var q,J,me,ze;const $=(J=(q=Object.values(A.cloneDeep(v.value)))==null?void 0:q[0])==null?void 0:J.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),T=(ze=(me=Object.values(A.cloneDeep(v.value)))==null?void 0:me[0])==null?void 0:ze.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),k=T==null?void 0:T.map((xe,te)=>{var be;return te===S.index&&(xe==null?void 0:xe.comp)==="Table"&&(xe.compData=(be=xe.compData)==null?void 0:be.map(Q=>{var de,Ke;return(Q==null?void 0:Q.key)==="tableContents"&&(Q.contents=(Ke=(de=S.content)==null?void 0:de.map(wa=>{let oe={};for(let D in wa)D!=="id"&&(oe[D]=wa[D]);return oe}))==null?void 0:Ke.map(wa=>Object.values(wa))),Q})),xe});k.unshift($==null?void 0:$[0]);let g=A.cloneDeep(v.value),j={};for(let xe in g)j[xe]=k;v.value=j},L=()=>{h.value=!1,v.value={},y.value={},c.value=void 0,t.value++},x=S=>{var q,J,me,ze;const $=(J=(q=Object.values(A.cloneDeep(v.value)))==null?void 0:q[0])==null?void 0:J.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),T=(ze=(me=Object.values(A.cloneDeep(v.value)))==null?void 0:me[0])==null?void 0:ze.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),k=T==null?void 0:T.map((xe,te)=>(te===S.index&&(xe.compData=S.contents),xe));k.unshift($==null?void 0:$[0]);let g=A.cloneDeep(v.value),j={};for(let xe in g)j[xe]=k;v.value=j},Y=()=>{var $,T;let S={};for(let k in y.value)k===(($=Object.keys(v.value))==null?void 0:$[0])?S[k]=(T=Object.values(v.value))==null?void 0:T[0]:S[k]=y.value[k];b("change",{buttonName:"编辑",index:c.value,singleContent:S},"methodData"),h.value=!1,v.value={},y.value={},c.value=void 0},w=()=>{h.value=!1,v.value={},y.value={},c.value=void 0},z=S=>{b("change",S,"methodData")},ee=S=>Et(S);return(S,$)=>{const T=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",v2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:t.value},[(k==null?void 0:k.key)==="extra"?(a.openBlock(),a.createElementBlock("div",m2)):(a.openBlock(),a.createElementBlock("div",y2,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ee(k.comp)),{itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,key:g,index:(k==null?void 0:k.id)??g,onContentClick:C,onChange:z},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(yr.ssDialog,{visible:h.value,onBeforeDestroy:w},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:g,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ee(k.comp)),{itemData:k==null?void 0:k.compData,onChange:M,childItemData:k==null?void 0:k.itemChildData,key:g,onContentChange:x,index:(k==null?void 0:k.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",g2,[a.createVNode(T,{class:"cancel-button footer-button",onClick:L,id:"themeBorderButton"},{default:a.withCtx(()=>$[0]||($[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(T,{class:"confirm-button footer-button",onClick:Y,id:"themeButton"},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},k2=Kl._export_sfc(b2,[["__scopeId","data-v-2d9c5ab2"]]),x2={key:0,class:"method-content"},_2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const n=a.ref([]),r=ua.useOriginalState(A.pinia),{originalPath:t}=A.storeToRefs(r),s=l,d=a.ref(!1),b=a.ref(),h=ua.useTableComp(A.pinia),{multipleTableConst:v}=A.storeToRefs(h),y=A.useModelComp(A.pinia),c=a.ref(!1),C=A.useMenuState(A.pinia),M=A.useLoginState(A.pinia),{itemData:L,isEdit:x,routeToChildPath:Y,tableViewContents:w,lockingPage:z,payloadTypes:ee}=A.storeToRefs(y),{activeMenuPath:S,platform:$,childMenu:T}=A.storeToRefs(C),{loginUserInfo:k}=A.storeToRefs(M),g=a.ref(!1),j=async()=>{var oe,D;(oe=n.value)!=null&&oe.find(ne=>(ne==null?void 0:ne.buttonName)==="保存")&&await Q((D=n.value)==null?void 0:D.find(ne=>(ne==null?void 0:ne.buttonName)==="保存")),await ua.onSaveBack()};a.watch(()=>L.value,async()=>{x.value==="view"&&!g.value&&await wa(A.cloneDeep(s.itemData)),g.value=!1},{deep:!0});const q=()=>{d.value=!1,b.value=void 0},J=oe=>oe.map(D=>{const ne={};for(const ge in D){const se=D[ge];if(ge.includes(v.value)){const we=ge.split(v.value);let la=ne;we.forEach((ya,Va)=>{Va===we.length-1?la[ya]=se:(la[ya]||(la[ya]={}),la=la[ya])})}else ne[ge]=se}return ne}),me=async(oe,D,ne=[])=>{var se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa;let ge=(se=A.cloneDeep(D))==null?void 0:se.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(oe!=null&&oe.includes("[")){let P=(ae=(Va=(ya=(la=(we=A.cloneDeep(oe))==null?void 0:we.split("["))==null?void 0:la[1])==null?void 0:ya.split("]"))==null?void 0:Va[0])==null?void 0:ae.split(":"),F="";if(P!=null&&P[0]){let X=(ea=ge==null?void 0:ge.find(R=>(R==null?void 0:R.name)===(P==null?void 0:P[0])))==null?void 0:ea.compData;if(!X){let R=(Re=oe==null?void 0:oe.split("["))==null?void 0:Re[0],W=await ua.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",ne);X=(ma=W==null?void 0:W.find(Ie=>(Ie==null?void 0:Ie.name)===(P==null?void 0:P[0])))==null?void 0:ma.compData}X==null||X.forEach(R=>{var W,Ie,Ne,Ce,K,He;if((R==null?void 0:R.key)==="formContent")(W=R==null?void 0:R.contents)==null||W.forEach(Ve=>{var ra;(Ve==null?void 0:Ve.key)===(P==null?void 0:P[1])&&(Array.isArray(Ve==null?void 0:Ve.value)?F=Ve==null?void 0:Ve.value:F=(ra=Ve==null?void 0:Ve.value)==null?void 0:ra.toString())});else if((R==null?void 0:R.key)==="tableContents"){let Ve=[],ra=(Ie=X==null?void 0:X.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:Ie.contents,va=(P==null?void 0:P[1])??"";if(ra!=null&&ra.every($e=>Array.isArray($e))){let $e=ua.getColumnChild((K=ra==null?void 0:ra[0])==null?void 0:K.filter(ba=>(ba==null?void 0:ba.label)!=="操作"));(He=R.contents)==null||He.forEach(ba=>{let Te={};ba=ba==null?void 0:ba.filter(fa=>!(fa!=null&&fa.id)),$e==null||$e.forEach((fa,Ue)=>{let ga=ba[Ue];typeof ba[Ue]=="number"&&(ga=ba[Ue].toString()),(va===""||va===fa.prop)&&(Te[fa.prop]=ga)}),Ve.push(Te)}),Ve=J(Ve)}else{let $e=(Ne=ra==null?void 0:ra.map(ba=>ba==null?void 0:ba.label))==null?void 0:Ne.filter(ba=>ba!=="操作");(Ce=R.contents)==null||Ce.forEach(ba=>{let Te={};ba=ba==null?void 0:ba.filter(fa=>!(fa!=null&&fa.id)),$e==null||$e.forEach((fa,Ue)=>{let ga=ba[Ue];typeof ba[Ue]=="number"&&(ga=ba[Ue].toString()),(va===""||va===fa)&&(Te[fa]=ga)}),Ve.push(Te)})}F=Ve}})}return F}else if(oe!=null&&oe.includes("/")){let P={};return(Pe=A.cloneDeep(ge))==null||Pe.forEach((F,X)=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe;if((F==null?void 0:F.comp)==="Table"){let $a=Array.isArray((Ie=(W=(R=F==null?void 0:F.compData)==null?void 0:R.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:W.contents)==null?void 0:Ie[0])?(He=(K=(Ce=(Ne=F==null?void 0:F.compData)==null?void 0:Ne.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Ce.contents)==null?void 0:K[0])==null?void 0:He.some(ue=>ue==null?void 0:ue.children):[],Na=(va=(ra=(Ve=F==null?void 0:F.compData)==null?void 0:Ve.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:ra.contents)==null?void 0:va.map(ue=>(ue!=null&&ue.find(ie=>ie==null?void 0:ie.id)&&(ue=ue.slice(1)),ue)),Ye=(Ue=(fa=(Te=(ba=($e=F==null?void 0:F.compData)==null?void 0:$e.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:ba.contents)==null?void 0:Te[0])==null?void 0:fa[0])==null?void 0:Ue.label,Oe=(fe=(ga=F==null?void 0:F.compData)==null?void 0:ga.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:fe.contents;if($a)($a==null?void 0:$a.length)===0?P[F.name]=P!=null&&P[F.name]?P[F.name]:ua.tableToForm(Na,Oe):P[Ye]=ua.tableToForm(Na,Oe);else{const ue=[];Oe=Oe.slice(1,Oe.length-1),Oe==null||Oe.forEach((ie,na)=>{Na==null||Na.forEach(qa=>{ue.push({key:ie.label+qa[0],value:qa[na+1]})})}),P["form"+X]=ue}}else{const $a=(Fe=(ka=F.compData)==null?void 0:ka.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:Fe.contents;P!=null&&P.form||(P.form=[]);const Na=[];$a==null||$a.forEach(Ye=>{Ye.key!==""&&(Ye={key:(Ye==null?void 0:Ye.key)??(Ye==null?void 0:Ye.label),value:Ye==null?void 0:Ye.value},Na.push(Ye))}),P.form=[...Na,...A.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(oe==="createInsofDataApi"){let P=(Ee=A.cloneDeep(D))==null?void 0:Ee[0];return P={comp:(Le=A.cloneDeep(P))==null?void 0:Le.comp,compData:(We=A.cloneDeep(P))==null?void 0:We.compData,name:(Ua=A.cloneDeep(P))==null?void 0:Ua.name,isShow:(Oa=A.cloneDeep(P))==null?void 0:Oa.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:S.value},value:{pageData:P}}}return oe}},ze=async(oe,D,ne)=>{var we,la,ya;let ge=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),se=ge==null?void 0:ge.find(Va=>(Va==null?void 0:Va.name)===(ne==null?void 0:ne[0]));if(se){if((se==null?void 0:se.comp)==="Table"){let Va={};for(let Le in A.cloneDeep(oe))A.cloneDeep(oe)[Le]!=="loginUser"?Va[Le]=A.cloneDeep(oe)[Le]:Va[Le]=((we=k.value)==null?void 0:we.account)||((la=k.value)==null?void 0:la.账号);let ae=[],ea=Va;Array.isArray(oe)||(ea=[Va]),ea==null||ea.forEach(Le=>{ae.push({[Le[ne[1]]]:Le})});let Re=[],ma=ae==null?void 0:ae.map(Le=>{var We;return(We=Object.keys(Le))==null?void 0:We[0]});ge==null||ge.forEach(Le=>{var We;(Le==null?void 0:Le.name)===(ne==null?void 0:ne[0])&&((We=Le==null?void 0:Le.compData)==null||We.forEach(Ua=>{var Oa;(Ua==null?void 0:Ua.key)==="tableContents"&&((Oa=Ua==null?void 0:Ua.contents)==null||Oa.forEach(P=>{P!=null&&P.some(F=>ma.includes(F))&&Re.push({[P.find(F=>F.id).id]:P.find(F=>ma.includes(F))})}))}))});let Pe=Re==null?void 0:Re.map(Le=>{var We;return(We=Object.keys(Le))==null?void 0:We[0]}),Ee=[];if(Pe==null||Pe.forEach(Le=>{var Oa;let We=(Oa=Re==null?void 0:Re.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0].toString())===Le.toString()}))==null?void 0:Oa[Le],Ua=ae==null?void 0:ae.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0])===We});Ee.push({id:parseInt(Le),value:{tableData:Ua[We]}})}),(Ee==null?void 0:Ee.length)>0)return Ee}else if((se==null?void 0:se.comp)==="Form"){let Va=A.cloneDeep(se);Va.compData=(ya=Va.compData)==null?void 0:ya.map(Re=>{var ma;return(Re==null?void 0:Re.key)==="formContent"&&(Re.contents=(ma=Re.contents)==null?void 0:ma.map(Pe=>((Pe==null?void 0:Pe.key)===(ne==null?void 0:ne[1])&&(Pe.value=(oe==null?void 0:oe[Pe==null?void 0:Pe.prop])||oe),Pe))),Re});let ae={};for(let Re in Va)Re!=="id"&&(ae[Re]=Va[Re]);let ea=[];if(ea.push({id:se==null?void 0:se.id,keyType:ne==null?void 0:ne[1],value:{pageData:ae}}),(ea==null?void 0:ea.length)>0)return ea}}},xe=async(oe,D,ne)=>{var we,la,ya,Va,ae,ea,Re,ma,Pe,Ee;let ge=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),se=ge==null?void 0:ge.find(Le=>(Le==null?void 0:Le.name)===(ne==null?void 0:ne[0]));if(se){if((se==null?void 0:se.comp)==="Table"){let Le={};for(let We in A.cloneDeep(oe))A.cloneDeep(oe)[We]!=="loginUser"?Le[We]=A.cloneDeep(oe)[We]:Le[We]=((we=k.value)==null?void 0:we.account)||((la=k.value)==null?void 0:la.账号);await br.createInsofDataApi({key:{type:"data",pageKey:D,tableId:se==null?void 0:se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Le}})}else if((se==null?void 0:se.comp)==="Form"){let Le=A.cloneDeep(se),We=Object.keys(oe),Ua="";(Va=(ya=A.cloneDeep(Le))==null?void 0:ya.compData)==null||Va.forEach(W=>{var Ie,Ne;(W==null?void 0:W.key)==="formContent"&&((Ne=(Ie=A.cloneDeep(W))==null?void 0:Ie.contents)==null||Ne.forEach(Ce=>{var K;We.includes(Ce==null?void 0:Ce.key)&&(Ce==null?void 0:Ce.value)===((K=k.value)==null?void 0:K.姓名)&&(Ua=Ce==null?void 0:Ce.key)}))});let Oa=[];(ae=Object.values(oe[Ua]))==null||ae.forEach(W=>{W!=null&&W.includes("(")&&Oa.push(W)}),Oa=[...new Set(Oa)];const P=Oa==null?void 0:Oa.map(async W=>{var He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka;let Ie="";(ba=($e=(va=(ra=(Ve=(He=A.cloneDeep(W))==null?void 0:He.split("("))==null?void 0:Ve[1])==null?void 0:ra.split(")"))==null?void 0:va[0])==null?void 0:$e.split(":"))==null||ba.forEach(Fe=>{Ie=Ie===""?Ie+Fe.replaceAll("'",""):Ie+"/"+Fe.replaceAll("'","")});let Ne=[];(ka=(fe=(ga=(Ue=(fa=(Te=A.cloneDeep(W))==null?void 0:Te.split("<"))==null?void 0:fa[1])==null?void 0:Ue.split(">"))==null?void 0:ga[0])==null?void 0:fe.split(":"))==null||ka.forEach(Fe=>{Ne.push(Fe.replaceAll("'",""))});const Ce=await ua.getItemData(Ie,sessionStorage.getItem("systemKey"),"");let K="";return Ce==null||Ce.forEach(Fe=>{var $a;Fe.name===(Ne==null?void 0:Ne[0])&&(($a=Fe==null?void 0:Fe.compData)==null||$a.forEach(Na=>{var Ye;(Na==null?void 0:Na.key)==="formContent"&&((Ye=Na.contents)==null||Ye.forEach(Oe=>{(Oe==null?void 0:Oe.key)===(Ne==null?void 0:Ne[1])&&(K=Oe==null?void 0:Oe.value)}))}))}),{[W]:K}}),F=await Promise.all(P);Le.compData=(Re=(ea=A.cloneDeep(Le))==null?void 0:ea.compData)==null?void 0:Re.map(W=>{var Ie,Ne;return(W==null?void 0:W.key)==="formContent"&&(W.contents=(Ne=(Ie=A.cloneDeep(W))==null?void 0:Ie.contents)==null?void 0:Ne.map(Ce=>{var K,He,Ve,ra;return(K=oe[Ua])!=null&&K[Ce==null?void 0:Ce.key]&&(oe[Ua][Ce==null?void 0:Ce.key].includes("(")?Ce.value=(He=F==null?void 0:F.find(va=>{var $e;return(($e=Object.keys(va))==null?void 0:$e[0])===oe[Ua][Ce==null?void 0:Ce.key]}))==null?void 0:He[oe[Ua][Ce==null?void 0:Ce.key]]:Ce.value=(ra=(Ve=A.cloneDeep(oe))==null?void 0:Ve[Ua])==null?void 0:ra[Ce==null?void 0:Ce.key]),Ce})),W});const X=await br.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let R="";((ma=X==null?void 0:X.data)==null?void 0:ma.type)==="success"&&((Ee=(Pe=X==null?void 0:X.data)==null?void 0:Pe.result)==null||Ee.forEach(W=>{var Ie,Ne;((Ne=(Ie=W==null?void 0:W.value)==null?void 0:Ie.pageData)==null?void 0:Ne.name)===(ne==null?void 0:ne[0])&&(R=W.id)}),await br.updateInsofDataApi({id:R,value:{pageData:Le}}))}}},te=(oe,D="",ne={})=>{for(const[ge,se]of Object.entries(oe)){const we=D?`${D}.${ge}`:ge;se!==null&&typeof se=="object"&&!Array.isArray(se)&&Object.prototype.toString.call(se)!=="[object Date]"?te(se,we,ne):ne[we]=se}return ne},be=async(oe,D,ne,ge)=>{var la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra;let se=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),we=se==null?void 0:se.find(va=>(va==null?void 0:va.name)===(ne==null?void 0:ne[0]));if(we){if(!(ne!=null&&ne[1])&&(we==null?void 0:we.comp)==="Table"){let va={},$e=[],ba=(ya=(la=we==null?void 0:we.compData)==null?void 0:la.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ya.contents;ba!=null&&ba.every(Ue=>Array.isArray(Ue))?$e=(ae=ua.getColumnChild((Va=ba==null?void 0:ba[0])==null?void 0:Va.filter(Ue=>(Ue==null?void 0:Ue.label)!=="操作")))==null?void 0:ae.map(Ue=>Ue==null?void 0:Ue.prop):$e=ba==null?void 0:ba.map(Ue=>Ue==null?void 0:Ue.label);for(let Ue in A.cloneDeep(oe))if(A.cloneDeep(oe)[Ue]!=="loginUser"){let ga=te(A.cloneDeep(oe)[Ue]),fe={};for(let ka in ga)if($e!=null&&$e.find(Fe=>Fe===ka))fe[ka]=ga[ka];else if($e!=null&&$e.find(Fe=>(Fe==null?void 0:Fe.toUpperCase())===(ka==null?void 0:ka.toUpperCase()))){let Fe=$e==null?void 0:$e.find($a=>($a==null?void 0:$a.toUpperCase())===(ka==null?void 0:ka.toUpperCase()));fe[Fe]=ga[ka]}va[Ue]=fe}else va[Ue]=((ea=k.value)==null?void 0:ea.account)||((Re=k.value)==null?void 0:Re.账号);let Te=await br.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((Pe=(ma=Te==null?void 0:Te.data)==null?void 0:ma.result)==null?void 0:Pe.length)>0){let Ue=(Le=(Ee=Te==null?void 0:Te.data)==null?void 0:Ee.result)==null?void 0:Le.map(ga=>ga==null?void 0:ga.id);(Ue==null?void 0:Ue.length)>0&&await br.batchDeleteInsofDataApi({ids:Ue})}let fa=[];if((We=we==null?void 0:we.compData)!=null&&We.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")&&((P=(Oa=(Ua=we==null?void 0:we.compData)==null?void 0:Ua.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn"))==null?void 0:Oa.contents)!=null&&P.includes("["))){const Ue=await br.getInsofDataApi({id:we==null?void 0:we.tableId});let ga=((W=(R=(X=(F=Ue==null?void 0:Ue.data)==null?void 0:F.result)==null?void 0:X[0])==null?void 0:R.key)==null?void 0:W.pageKey)??"";(Ie=Object.values(va))==null||Ie.forEach(fe=>{fa.push({key:{type:"data",pageKey:ga,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})})}else(Ne=Object.values(va))==null||Ne.forEach(Ue=>{fa.push({key:{type:"data",pageKey:D,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ue}})});(fa==null?void 0:fa.length)>0&&await br.batchAddInsofDataApi({dataList:fa})}else if(!(ne!=null&&ne[1])&&(we==null?void 0:we.comp)==="Form"){let va=A.cloneDeep(we);va.compData=(K=(Ce=A.cloneDeep(va))==null?void 0:Ce.compData)==null?void 0:K.map(Te=>{var fa,Ue;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(Ue=(fa=A.cloneDeep(Te))==null?void 0:fa.contents)==null?void 0:Ue.map(ga=>{var fe,ka;return(fe=A.cloneDeep(oe))!=null&&fe[ga==null?void 0:ga.key]&&(ga.value=(ka=A.cloneDeep(oe))==null?void 0:ka[ga==null?void 0:ga.key]),ga})),Te});const $e=await br.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let ba="";((He=$e==null?void 0:$e.data)==null?void 0:He.type)==="success"&&((ra=(Ve=$e==null?void 0:$e.data)==null?void 0:Ve.result)==null||ra.forEach(Te=>{var fa,Ue;((Ue=(fa=Te==null?void 0:Te.value)==null?void 0:fa.pageData)==null?void 0:Ue.name)===(ne==null?void 0:ne[0])&&(ba=Te.id)}),await br.updateInsofDataApi({id:ba,value:{pageData:va}}))}}},Q=async oe=>{var D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee;C.setImportLoading(!0);try{if(oe.api){let Le=new WeakMap,We=await ua.getItemData((T==null?void 0:T.value)===""?S.value:T==null?void 0:T.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le),Ua="";if(We=We==null?void 0:We.map(Ne=>{var Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if((Ne==null?void 0:Ne.comp)==="Form")Ne.compData=(Ce=Ne.compData)==null?void 0:Ce.map(fe=>{var ka;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(ka=fe.contents)==null?void 0:ka.map(Fe=>{var $a;if((Fe==null?void 0:Fe.value)===""&&(Fe==null?void 0:Fe.type)==="Select"){let Na=ua.judgeContents(($a=A.cloneDeep(Fe))==null?void 0:$a.optionUrl,Le);Fe.value=Fe.value||Na}return Fe})),fe});else if((Ne==null?void 0:Ne.comp)==="Table"&&(K=Ne.compData)!=null&&K.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")){let fe=(Ve=(He=Ne.compData)==null?void 0:He.find(Na=>(Na==null?void 0:Na.key)==="pageColumn"))==null?void 0:Ve.contents,ka=((va=(ra=Ne.compData)==null?void 0:ra.find(Na=>(Na==null?void 0:Na.key)==="pageGroup"))==null?void 0:va.contents)??"",Fe=(Te=(ba=($e=fe==null?void 0:fe.split("["))==null?void 0:$e[1])==null?void 0:ba.split("]"))==null?void 0:Te[0];Ua=((fa=fe==null?void 0:fe.split("["))==null?void 0:fa[0])+((ga=(Ue=w.value)==null?void 0:Ue.find(Na=>(Na==null?void 0:Na.key)===Fe))==null?void 0:ga.value)}return Ne}),!(Ua===""||Ua==="")){const Ne=await ua.getItemData(Ua,sessionStorage.getItem("systemKey"),"",!1,"","",Le);We=We==null?void 0:We.map(Ce=>{var K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka;if((Ce==null?void 0:Ce.comp)==="Table"&&(K=Ce.compData)!=null&&K.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")){let Fe=(Ve=(He=Ce.compData)==null?void 0:He.find(ue=>(ue==null?void 0:ue.key)==="pageColumn"))==null?void 0:Ve.contents,$a=((va=(ra=Ce.compData)==null?void 0:ra.find(ue=>(ue==null?void 0:ue.key)==="pageGroup"))==null?void 0:va.contents)??"",Na=(Te=(ba=($e=Fe==null?void 0:Fe.split("["))==null?void 0:$e[1])==null?void 0:ba.split("]"))==null?void 0:Te[0],Ye=((fa=Fe==null?void 0:Fe.split("["))==null?void 0:fa[0])+((ga=(Ue=w.value)==null?void 0:Ue.find(ue=>(ue==null?void 0:ue.key)===Na))==null?void 0:ga.value),Oe=(fe=Ne==null?void 0:Ne.find(ue=>(ue==null?void 0:ue.name)===($a===""?s==null?void 0:s.compName:$a)))==null?void 0:fe.compData;Ce.compData=(ka=Ce.compData)==null?void 0:ka.map(ue=>{var ie;return(ue==null?void 0:ue.key)==="tableContents"&&(ue.contents=(ie=Oe==null?void 0:Oe.find(na=>(na==null?void 0:na.key)==="tableContents"))==null?void 0:ie.contents),ue})}return Ce})}let Oa={};if(((ne=(D=oe==null?void 0:oe.extraValues)==null?void 0:D.input)==null?void 0:ne.length)>0){const Ne=(se=(ge=oe==null?void 0:oe.extraValues)==null?void 0:ge.input)==null?void 0:se.map(async Ce=>{var K;de!=null&&de.find(He=>He===Ce)?Oa=await me(Ce,We):Oa[Object.keys(Ce)[0]]=await me((K=Object.values(Ce))==null?void 0:K[0],We,Le)});await Promise.all(Ne)}else Oa=await me("/",We);let P=!1;(la=(we=oe==null?void 0:oe.extraValues)==null?void 0:we.output)==null||la.forEach(Ne=>{var Ce,K;(K=(Ce=Object.values(Ne))==null?void 0:Ce[0])!=null&&K.includes(".doc")&&(P=!0)});let F;if(P){const Ne=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});F=await Qa.axios.post(oe.api,Oa,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ne.close()})}else F=await Qa.axios.post(oe.api,Oa,{headers:{"Content-Type":"application/json"}});let X=(ea=(ae=(Va=(ya=A.cloneDeep(oe))==null?void 0:ya.extraValues)==null?void 0:Va.output)==null?void 0:ae.map(Ne=>{var Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a;if(!((K=(Ce=Object.values(Ne))==null?void 0:Ce[0])!=null&&K.includes(".doc"))){let Na=(fa=(Te=(ba=(Ve=A.cloneDeep((He=Object.values(Ne))==null?void 0:He[0]))==null?void 0:Ve.split("["))==null?void 0:ba[(($e=(va=A.cloneDeep((ra=Object.values(Ne))==null?void 0:ra[0]))==null?void 0:va.split("["))==null?void 0:$e.length)-1])==null?void 0:Te.split("]"))==null?void 0:fa[0],Ye=Na==null?void 0:Na.split(":"),Oe=(fe=A.cloneDeep((Ue=Object.values(Ne))==null?void 0:Ue[0]))==null?void 0:fe.substring(0,A.cloneDeep((ga=Object.values(Ne))==null?void 0:ga[0]).lastIndexOf("["));if(Oe=(Fe=A.cloneDeep(Oe))==null?void 0:Fe.slice(0,((ka=A.cloneDeep(Oe))==null?void 0:ka.length)-1),Oe!=null&&Oe.includes("[")){let ue="";if(($a=ua.contentTransArrayToAll(Oe,"/"))==null||$a.forEach(ie=>{var na,qa,rl,Ml,Fa,nl,Ca;if(!(ie!=null&&ie.includes("[")))ue=ue===""?ue+ie.replaceAll("/",""):ue+"/"+ie.replaceAll("/","");else{let aa=A.cloneDeep(ie).slice(1,((na=A.cloneDeep(ie))==null?void 0:na.length)-1),Se=(nl=(Fa=(Ml=(rl=(qa=A.cloneDeep(aa))==null?void 0:qa.split("["))==null?void 0:rl[1])==null?void 0:Ml.split("]"))==null?void 0:Fa[0])==null?void 0:nl.split(":"),Xa="",Ya=(Ca=We==null?void 0:We.find(tl=>(tl==null?void 0:tl.name)===(Se==null?void 0:Se[0])))==null?void 0:Ca.compData;Ya==null||Ya.forEach(tl=>{var Da;(tl==null?void 0:tl.key)==="formContent"&&((Da=tl==null?void 0:tl.contents)==null||Da.forEach(sa=>{(sa==null?void 0:sa.key)===(Se==null?void 0:Se[1])&&(Xa=sa==null?void 0:sa.value)}))}),ue=ue===""?ue+Xa.replaceAll("/",""):ue+"/"+Xa.replaceAll("/","")}}),Oe=ue,Oe[(Oe==null?void 0:Oe.length)-1]!=="/")return Oe}}}))==null?void 0:ea.filter(Ne=>Ne);X=[...new Set(A.cloneDeep(X))];let R=X==null?void 0:X.map(async Ne=>{let Ce=await ua.getItemData(Ne,sessionStorage.getItem("systemKey"),"",!1,"","",Le);if((Ce==null?void 0:Ce.length)===0)return await ua.getParentContents(Ne)});await Promise.all(R);let W=[],Ie=(Pe=(ma=(Re=A.cloneDeep(oe))==null?void 0:Re.extraValues)==null?void 0:ma.output)==null?void 0:Pe.map(async Ne=>{var ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl,Ca,aa,Se,Xa,Ya,tl,Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El,Sl,wl,fl,cl,kl,Dl,$l,or,Cr,Gr,Xr,Rr,nn,qr,rr,Nr,Fr,_n,Ar,hn,$r,ir,Pn,tn,vn,rt,Fn,An;if((Te=(ba=Object.values(Ne))==null?void 0:ba[0])!=null&&Te.includes(".doc")){var Ce=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"}),K=F.headers["content-disposition"],He=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Ve=He.exec(K),ra=Ve==null?void 0:Ve[1],va=document.createElement("a"),$e=window.URL.createObjectURL(Ce);b.value=[{name:ra,blobUrl:$e}],d.value=!0}else{let mn=(Na=($a=(Fe=(Ue=A.cloneDeep((fa=Object.values(Ne))==null?void 0:fa[0]))==null?void 0:Ue.split("["))==null?void 0:Fe[((ka=(fe=A.cloneDeep((ga=Object.values(Ne))==null?void 0:ga[0]))==null?void 0:fe.split("["))==null?void 0:ka.length)-1])==null?void 0:$a.split("]"))==null?void 0:Na[0],Zl=mn==null?void 0:mn.split(":"),xr=(ue=A.cloneDeep((Ye=Object.values(Ne))==null?void 0:Ye[0]))==null?void 0:ue.substring(0,A.cloneDeep((Oe=Object.values(Ne))==null?void 0:Oe[0]).lastIndexOf("["));if(xr!=null&&xr.includes("[")?xr=(na=A.cloneDeep(xr))==null?void 0:na.slice(0,((ie=A.cloneDeep(xr))==null?void 0:ie.length)-1):xr===""&&(xr=S.value),xr=xr.replaceAll("<","[").replaceAll(">","]"),xr!=null&&xr.includes("[")){let ql="";(qa=ua.contentTransArrayToAll(xr,"/"))==null||qa.forEach((Ll,dr)=>{var ar,Hl,Tr,Mr,yn,wn,dn,jn,Mn,pn,Cn;if(!(Ll!=null&&Ll.includes("[")))ql=ql===""?ql+Ll.replaceAll("/",""):ql+"/"+Ll.replaceAll("/","");else{let zn="",Kr="";(ar=A.cloneDeep(Ll))!=null&&ar.includes("]")?(zn=A.cloneDeep(Ll).slice(1,((Hl=A.cloneDeep(Ll))==null?void 0:Hl.length)-1),Kr=(dn=(wn=(yn=(Mr=(Tr=A.cloneDeep(zn))==null?void 0:Tr.split("["))==null?void 0:Mr[1])==null?void 0:yn.split("]"))==null?void 0:wn[0])==null?void 0:dn.split(":")):(zn=A.cloneDeep(Ll).slice(1,(jn=A.cloneDeep(Ll))==null?void 0:jn.length),Kr=(Mn=A.cloneDeep(zn))==null?void 0:Mn.split("/"));let En="",Hn=(pn=We==null?void 0:We.find(Sr=>(Sr==null?void 0:Sr.name)===(Kr==null?void 0:Kr[0])))==null?void 0:pn.compData;Hn==null||Hn.forEach(Sr=>{var Un;(Sr==null?void 0:Sr.key)==="formContent"&&((Un=Sr==null?void 0:Sr.contents)==null||Un.forEach(on=>{(on==null?void 0:on.key)===(Kr==null?void 0:Kr[1])&&(En=on==null?void 0:on.value)}))}),((Cn=ua.contentTransArrayToAll(xr,"/"))==null?void 0:Cn.length)-1!==dr?ql=ql===""?ql+En.replaceAll("/",""):ql+"/"+En.replaceAll("/",""):ql=ql+t.value+En.replaceAll("/","")}}),(rl=S.value)!=null&&rl.includes(ql)?xr=S.value:xr=ql}let Fl=A.cloneDeep((Ml=Object.keys(Ne))==null?void 0:Ml[0]);if(((Fa=F==null?void 0:F.data)==null?void 0:Fa.statusCode)===200||((nl=F==null?void 0:F.data)==null?void 0:nl.code)===200){if(((aa=(Ca=F==null?void 0:F.data)==null?void 0:Ca.data)!=null&&aa[Fl]||(Xa=(Se=F==null?void 0:F.data)==null?void 0:Se.result)!=null&&Xa[Fl])&&(Zl==null?void 0:Zl.length)===1)return await be(((tl=(Ya=F==null?void 0:F.data)==null?void 0:Ya.data)==null?void 0:tl[Fl])||((sa=(Da=F==null?void 0:F.data)==null?void 0:Da.result)==null?void 0:sa[Fl]),A.cloneDeep(xr),Zl,Ua);if((Ea=(Z=F==null?void 0:F.data)==null?void 0:Z.data)!=null&&Ea[Fl]||(ul=(Pa=F==null?void 0:F.data)==null?void 0:Pa.result)!=null&&ul[Fl]){let ql=await ze(((xa=(ol=F==null?void 0:F.data)==null?void 0:ol.data)==null?void 0:xa[Fl])||((Aa=(pa=F==null?void 0:F.data)==null?void 0:pa.result)==null?void 0:Aa[Fl]),A.cloneDeep(xr),Zl);return ql&&(W=[...W,...ql]),ql}else{if(!((Ze=F==null?void 0:F.data)!=null&&Ze.data)){let ql=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le);ql=ql==null?void 0:ql.map(dr=>{var ar;return(dr==null?void 0:dr.name)===(Zl==null?void 0:Zl[0])&&(dr.compData=(ar=dr.compData)==null?void 0:ar.map(Hl=>{var Tr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(Tr=Hl.contents)==null?void 0:Tr.map(Mr=>{var yn,wn;return(Mr==null?void 0:Mr.key)===(Zl==null?void 0:Zl[1])&&(Mr.value=(wn=(yn=F==null?void 0:F.data)==null?void 0:yn.result)==null?void 0:wn[Fl==null?void 0:Fl.replaceAll(":","")]),Mr})),Hl})),dr});let Ll=[];(ha=ql==null?void 0:ql.filter(dr=>(dr==null?void 0:dr.comp)==="Form"))==null||ha.forEach(async dr=>{let ar={};for(let Hl in dr)Hl!=="id"&&(ar[Hl]=dr[Hl]);Ll.push({id:dr==null?void 0:dr.id,value:{pageData:ar}})}),(Ll==null?void 0:Ll.length)>0&&await br.batchUpdateInsofDataApi({dataList:Ll});return}if((Zl==null?void 0:Zl.length)===1){const ql=(Ol=(Ja=(La=F==null?void 0:F.data)==null?void 0:La.data)==null?void 0:Ja.path)==null?void 0:Ol.path;let Ll="";(cl=(fl=(wl=(Sl=(El=ql==null?void 0:ql.split("("))==null?void 0:El[1])==null?void 0:Sl.split(")"))==null?void 0:wl[0])==null?void 0:fl.split(":"))==null||cl.forEach(Hl=>{var Tr,Mr;Ll=Ll===""?Ll+((Tr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:Tr.trim()):Ll+"/"+((Mr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:Mr.trim())});let dr=[(Cr=(or=($l=(Dl=(kl=ql==null?void 0:ql.split("<"))==null?void 0:kl[1])==null?void 0:Dl.split(">"))==null?void 0:$l[0])==null?void 0:or.replaceAll("'",""))==null?void 0:Cr.trim()],ar;return(Rr=(Xr=(Gr=F==null?void 0:F.data)==null?void 0:Gr.data)==null?void 0:Xr.data)!=null&&Rr[Zl==null?void 0:Zl[0]]?ar=await be((rr=(qr=(nn=F==null?void 0:F.data)==null?void 0:nn.data)==null?void 0:qr.data)==null?void 0:rr[Zl==null?void 0:Zl[0]],Ll,Zl,Ua):ar=await xe((Fr=(Nr=F==null?void 0:F.data)==null?void 0:Nr.data)==null?void 0:Fr.data,Ll,dr,Le),ar}else{const ql=(hn=(Ar=(_n=F==null?void 0:F.data)==null?void 0:_n.data)==null?void 0:Ar.path)==null?void 0:hn.path;let Ll="";return(vn=(tn=(Pn=(ir=($r=ql==null?void 0:ql.split("("))==null?void 0:$r[1])==null?void 0:ir.split(")"))==null?void 0:Pn[0])==null?void 0:tn.split(":"))==null||vn.forEach(ar=>{var Hl,Tr;Ll=Ll===""?Ll+((Hl=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:Hl.trim()):Ll+"/"+((Tr=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:Tr.trim())}),await ze((An=(Fn=(rt=F==null?void 0:F.data)==null?void 0:rt.data)==null?void 0:Fn.data)==null?void 0:An[Zl==null?void 0:Zl[0]],Ll,Zl)}}}}});if(await Promise.all(Ie),(W==null?void 0:W.length)>0){let Ne=[];W==null||W.forEach(He=>{Ne!=null&&Ne.find(Ve=>{var ra,va,$e,ba;return((va=(ra=Ve==null?void 0:Ve.value)==null?void 0:ra.pageData)==null?void 0:va.name)===((ba=($e=He==null?void 0:He.value)==null?void 0:$e.pageData)==null?void 0:ba.name)})||Ne.push(He)});let Ce=[];Ne==null||Ne.forEach(He=>{var va,$e,ba,Te;let Ve=A.cloneDeep(He);Ve.value.pageData.compData=(va=Ve.value.pageData.compData)==null?void 0:va.map(fa=>{var Ue;return(fa==null?void 0:fa.key)==="formContent"&&(fa.contents=(Ue=fa.contents)==null?void 0:Ue.map(ga=>{var ka,Fe,$a,Na;let fe=(ka=A.cloneDeep(W))==null?void 0:ka.find(Ye=>(Ye==null?void 0:Ye.keyType)===(ga==null?void 0:ga.key));if(fe){let Ye=(Na=($a=(Fe=fe.value.pageData.compData)==null?void 0:Fe.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:$a.contents)==null?void 0:Na.find(Oe=>(Oe==null?void 0:Oe.key)===(ga==null?void 0:ga.key));ga.value=Ye==null?void 0:Ye.value}return ga})),fa}),Ce.push({id:Ve==null?void 0:Ve.id,value:Ve==null?void 0:Ve.value});let ra=[];(Te=(ba=($e=Ve==null?void 0:Ve.value)==null?void 0:$e.pageData)==null?void 0:ba.compData)==null||Te.forEach(fa=>{var Ue;(fa==null?void 0:fa.key)==="formContent"&&((Ue=fa==null?void 0:fa.contents)==null||Ue.forEach(ga=>{var fe,ka,Fe,$a,Na,Ye;if((ka=(fe=ga==null?void 0:ga.optionUrl)==null?void 0:fe.menuSelect)!=null&&ka.find(Oe=>Oe==null?void 0:Oe.includes("[")))if(ra!=null&&ra.find(Oe=>{var ue,ie,na;return((ue=Oe==null?void 0:Oe.key)==null?void 0:ue.join(","))===((na=(ie=ga==null?void 0:ga.optionUrl)==null?void 0:ie.menuSelect)==null?void 0:na.join(","))})){let Oe=(Fe=ra==null?void 0:ra.find(ue=>{var ie,na,qa;return((ie=ue==null?void 0:ue.key)==null?void 0:ie.join(","))===((qa=(na=ga==null?void 0:ga.optionUrl)==null?void 0:na.menuSelect)==null?void 0:qa.join(","))}))==null?void 0:Fe.value;Oe.push({key:ga==null?void 0:ga.prop,groups:($a=ga==null?void 0:ga.optionUrl)==null?void 0:$a.groupSelect,value:ga==null?void 0:ga.value}),ra=ra==null?void 0:ra.map(ue=>{var ie,na,qa;return((ie=ue==null?void 0:ue.key)==null?void 0:ie.join(","))===((qa=(na=ga==null?void 0:ga.optionUrl)==null?void 0:na.menuSelect)==null?void 0:qa.join(","))&&(ue.value=Oe),ue})}else ra.push({key:(Na=ga==null?void 0:ga.optionUrl)==null?void 0:Na.menuSelect,value:[{key:ga==null?void 0:ga.prop,groups:(Ye=ga==null?void 0:ga.optionUrl)==null?void 0:Ye.groupSelect,value:ga==null?void 0:ga.value}]})}))}),(ra==null?void 0:ra.length)>0&&(ra=ra==null?void 0:ra.map(fa=>{var ga;let Ue="";return(ga=fa==null?void 0:fa.key)==null||ga.forEach(fe=>{var ka;if(!(fe!=null&&fe.includes("[")))Ue=Ue===""?Ue+fe:Ue+"/"+fe;else{let Fe="",$a=(ka=fe==null?void 0:fe.replaceAll("[","").replaceAll("]",""))==null?void 0:ka.split(":");We==null||We.forEach(Na=>{var Ye;(Na==null?void 0:Na.name)===($a==null?void 0:$a[0])&&((Ye=Na==null?void 0:Na.compData)==null||Ye.forEach(Oe=>{var ue;(Oe==null?void 0:Oe.key)==="formContent"&&((ue=Oe==null?void 0:Oe.contents)==null||ue.forEach(ie=>{(ie==null?void 0:ie.prop)===($a==null?void 0:$a[1])&&(Fe=ie==null?void 0:ie.value)}))}))}),Ue=Ue+t.value+Fe}}),fa.key=Ue,fa})),ra==null||ra.forEach(fa=>{var ka,Fe,$a;let Ue=(ka=Le[fa.key])==null?void 0:ka.find(Na=>{var Ye,Oe,ue,ie,na,qa,rl;return((Oe=(Ye=Na==null?void 0:Na.value)==null?void 0:Ye.pageData)==null?void 0:Oe.name)===((na=(ie=(ue=fa==null?void 0:fa.value)==null?void 0:ue[0])==null?void 0:ie.groups)==null?void 0:na[0])&&((rl=(qa=Na==null?void 0:Na.value)==null?void 0:qa.pageData)==null?void 0:rl.name)!==void 0}),ga=Ue==null?void 0:Ue.id,fe=(Fe=Ue==null?void 0:Ue.value)==null?void 0:Fe.pageData;fe.compData=($a=fe.compData)==null?void 0:$a.map(Na=>{var Ye;return(Na==null?void 0:Na.key)==="formContent"&&(Na.contents=(Ye=Na.contents)==null?void 0:Ye.map(Oe=>{var ie;let ue=(ie=fa.value)==null?void 0:ie.find(na=>(na==null?void 0:na.key)===(Oe==null?void 0:Oe.prop));return ue&&(Oe.value=ue.value),Oe})),Na}),Ce.push({id:ga,value:{pageData:fe}})})});let K=(Ee=A.cloneDeep(W))==null?void 0:Ee[0];(Ce==null?void 0:Ce.length)>0&&await br.batchUpdateInsofDataApi({dataList:Ce})}y.setFreshContent(!0)}C.setImportLoading(!1)}catch{Qa.ElMessage.error("方法执行错误,请查看方法!"),C.setImportLoading(!1)}g.value=!0},de=["createInsofDataApi"],Ke=Ta.debounce(async oe=>{Q(oe)},100),wa=async oe=>{var la,ya,Va;const D=A.cloneDeep(oe);let ne,ge=new WeakMap;oe!=null&&oe[0].path&&(ne=await(D==null?void 0:D.map(async(ae,ea)=>{var Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba;const ma=(Oa=ge[ae==null?void 0:ae.path])==null?void 0:Oa.filter(Te=>{var fa;return((fa=Te==null?void 0:Te.key)==null?void 0:fa.type)==="data"});let Pe="";const Ee=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);ma==null||ma.forEach(Te=>{var fa,Ue,ga,fe,ka;((Ue=(fa=Te==null?void 0:Te.value)==null?void 0:fa.tableData)==null?void 0:Ue.算法名称)===((ga=D==null?void 0:D[ea])==null?void 0:ga.method)&&(Pe=(ka=(fe=Te==null?void 0:Te.value)==null?void 0:fe.tableData)==null?void 0:ka.算法体)});const Le=await ua.getItemData(ae==null?void 0:ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);let We="",Ua=(R=(X=(F=(P=Le==null?void 0:Le[0])==null?void 0:P.compData)==null?void 0:F.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:X.contents)==null?void 0:R.findIndex(Te=>(Te==null?void 0:Te.prop)==="算法体");return(Ie=(W=Le==null?void 0:Le[0])==null?void 0:W.compData)==null||Ie.forEach(Te=>{var fa;(Te==null?void 0:Te.key)==="tableContents"&&((fa=Te==null?void 0:Te.contents)==null||fa.forEach(Ue=>{Ue!=null&&Ue.find(ga=>ga===(ae==null?void 0:ae.method))&&(We=Ue[Ua])}))}),{buttonName:((Ne=D==null?void 0:D[ea])==null?void 0:Ne.method)||((He=(K=(Ce=ma==null?void 0:ma[0])==null?void 0:Ce.value)==null?void 0:K.tableData)==null?void 0:He.算法名称),api:(Pe===""?(va=(ra=(Ve=ma==null?void 0:ma[0])==null?void 0:Ve.value)==null?void 0:ra.tableData)==null?void 0:va.算法体:Pe)||We,content:Ee==null?void 0:Ee.filter(Te=>Te.comp!=="methodButton"),extraContent:($e=A.cloneDeep(ae.value))==null?void 0:$e.slice(1),methodName:(ae==null?void 0:ae.path)??"",extraValues:(ba=D==null?void 0:D[ea])==null?void 0:ba.data}})));const se=D==null?void 0:D.map(async ae=>{var Le,We,Ua,Oa,P,F;const ea=(Le=resAll.data.result)==null?void 0:Le.filter(X=>{var R,W,Ie;return((R=X==null?void 0:X.key)==null?void 0:R.parentTable)===""&&((W=X==null?void 0:X.key)==null?void 0:W.type)==="method"&&((Ie=X==null?void 0:X.key)==null?void 0:Ie.methodName)===X.method}),Re=ea==null?void 0:ea[0],ma=(We=resAll.data.result)==null?void 0:We.filter(X=>{var R,W;return((R=X==null?void 0:X.key)==null?void 0:R.type)==="methodData"&&((W=X==null?void 0:X.key)==null?void 0:W.tableId)===(Re==null?void 0:Re.id)}),Pe=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge),Ee=ma==null?void 0:ma[0];return{buttonName:(Ua=Re==null?void 0:Re.key)==null?void 0:Ua.methodKey,api:(P=(Oa=Ee==null?void 0:Ee.value)==null?void 0:Oa.tableData)==null?void 0:P[0],content:Pe==null?void 0:Pe.filter(X=>X.comp!=="methodButton"),extraContent:(F=A.cloneDeep(ae.value))==null?void 0:F.slice(1),methodName:(ae==null?void 0:ae.method)??""}}),we=(la=oe==null?void 0:oe[0])!=null&&la.path&&((ya=oe==null?void 0:oe[0])==null?void 0:ya.path)!==""?await Promise.all(ne):await Promise.all(se);n.value=we==null?void 0:we.filter(ae=>ae==null?void 0:ae.extraContent),(Va=n.value)==null||Va.forEach(ae=>{var ea;ae.api===""&&((ea=ae.content)==null||ea.forEach(Re=>{var ma;Re.comp=="Table"&&y.setExtraContents(ua.methodTableToContent(Re.compData,(ma=ae.extraContent)==null?void 0:ma[0]))}))})};return a.watch(()=>s.itemData,async()=>{x.value=="view"&&!g.value&&await wa(A.cloneDeep(s.itemData)),g.value=!1},{immediate:!0,deep:!0}),(oe,D)=>{var ne,ge,se;return a.unref(x)!=="edit"?(a.openBlock(),a.createElementBlock("div",x2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ne=n.value)==null?void 0:ne.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var la;return a.openBlock(),a.createElementBlock("div",null,[we.api!==""?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,disabled:a.unref(z)===a.unref(S)&&!((la=we==null?void 0:we.buttonName)!=null&&la.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:ya=>a.unref(Ke)(we),loading:c.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(Y)!==""&&((se=a.unref(S))==null?void 0:se[((ge=a.unref(S))==null?void 0:ge.length)-1])!==a.unref(t)?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,class:"calculator-content",onClickTrigger:j,modelValue:"保存"})):a.createCommentVNode("",!0)]),d.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:q},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},w2=Kl._export_sfc(_2,[["__scopeId","data-v-063aa9af"]]),C2={};function E2(l,n){return" 567 "}const S2=Kl._export_sfc(C2,[["render",E2]]),D2={class:"module content"},B2={class:"module data"},N2={class:"module layout"},T2={class:"form-content"},A2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),d=a.ref("create"),b=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.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}]),v=a.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:""}]),y=a.ref({}),c=a.ref([]),C=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:c.value},{key:"signConfig",contents:y.value}]}),M=w=>{var z;y.value=A.cloneDeep(w),t("change",(z=C())==null?void 0:z.compData)},L=w=>{var z,ee;if((w==null?void 0:w.buttonName)==="确认"){const S=A.cloneDeep(w==null?void 0:w.content);switch(d.value){case"create":c.value.push({...S,index:((z=c.value)==null?void 0:z.length)+1});break}t("change",(ee=C())==null?void 0:ee.compData),s.visible=!1}else s.visible=!1},x=(w,z)=>{var ee,S;switch(w){case"create":(ee=v.value)==null||ee.forEach($=>{$.value=""}),d.value="create",s.visible=!0;break;case"update":(S=v.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),d.value="update",s.visible=!0;break;case"delete":c.value.splice(z,1),d.value="delete";break}},Y=()=>{s.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(y.value=((z=w==null?void 0:w.find(S=>S.key==="signConfig"))==null?void 0:z.contents)??{},c.value=((ee=w==null?void 0:w.find(S=>S.key==="signTypeList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",D2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>x("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",B2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.label),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>x("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>x("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",N2,[a.createVNode(pl.ssForm,{rowContents:h.value,onChange:M},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:Y,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",T2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),M2=Kl._export_sfc(A2,[["__scopeId","data-v-487e0536"]]),z2=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(1),d=a.computed(()=>{var C,M;return(C=r==null?void 0:r.stepConfig)!=null&&C.allowTrigger?s.value:(M=r==null?void 0:r.stepConfig)==null?void 0:M.active}),b=(C,M)=>{s.value=M,t("clickStep",C,M)},h=C=>pl.getComponent(C),v=()=>{var M;const C=(M=r==null?void 0:r.stepList)==null?void 0:M.find((L,x)=>x+1===d.value);return console.log("findStep",C),C?C==null?void 0:C.children:[]},y=C=>{t("clickTrigger",C)},c=C=>{t("changeTrigger",C)};return(C,M)=>{var Y,w,z,ee,S;const L=a.resolveComponent("el-step"),x=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(x,{direction:(Y=l.stepConfig)==null?void 0:Y.direction,active:d.value,"finish-status":"success",simple:(w=l.stepConfig)==null?void 0:w.simple,"align-center":((z=l.stepConfig)==null?void 0:z.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,($,T)=>(a.openBlock(),a.createBlock(L,{key:T,class:"step-item",onClick:k=>b($,T+1)},{title:a.withCtx(()=>[a.renderSlot(C.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(C.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ee=l.stepConfig)!=null&&ee.allowTrigger&&((S=l.stepConfig)!=null&&S.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(v(),($,T)=>(a.openBlock(),a.createElementBlock("div",{key:T,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":k=>$.value=k,onClickTrigger:y,onChangeTrigger:c,content:$==null?void 0:$.content},a.createSlots({_:2},[a.renderList(C.$slots,(k,g)=>({name:g,fn:a.withCtx(j=>[a.renderSlot(C.$slots,g,a.mergeProps({ref_for:!0},j||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),O2=Kl._export_sfc(z2,[["__scopeId","data-v-d7c99969"]]),I2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:n}){const r=l,t=n,s=a.ref({}),d=a.ref([]),b=(h,v)=>{t("clickStep",h,v)};return a.watch(()=>r==null?void 0:r.itemData,h=>{var v,y;d.value=(v=h==null?void 0:h.find(c=>(c==null?void 0:c.key)==="stepList"))==null?void 0:v.contents,s.value=(y=h==null?void 0:h.find(c=>(c==null?void 0:c.key)==="stepConfig"))==null?void 0:y.contents},{immediate:!0,deep:!0}),(h,v)=>{const y=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(O2,{stepConfig:s.value,stepList:d.value,onClickStep:b},{icon:a.withCtx(()=>[a.createVNode(y,{name:"import"})]),title:a.withCtx(({title:c})=>[a.createTextVNode(a.toDisplayString(c),1)]),description:a.withCtx(({description:c})=>[a.createTextVNode(a.toDisplayString(c),1)]),_:1},8,["stepConfig","stepList"])}}}),L2=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(n,r)=>{const t=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(d,b)=>(a.openBlock(),a.createBlock(t,{key:b,timestamp:d.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(n.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),V2=Kl._export_sfc(L2,[["__scopeId","data-v-4172a886"]]),R2={class:"line-content"},$2={class:"line-time"},P2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const n=l,r=a.ref({}),t=a.ref([]);return a.watch(()=>n==null?void 0:n.itemData,s=>{var d,b;t.value=(d=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:d.contents,r.value=(b=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(s,d)=>(a.openBlock(),a.createBlock(V2,{activities:t.value,timeLineConfig:r.value},{content:a.withCtx(({content:b,timestamp:h})=>[a.createElementVNode("span",R2,a.toDisplayString(b),1),a.createElementVNode("span",$2,a.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),F2=Kl._export_sfc(P2,[["__scopeId","data-v-b4d9deed"]]),j2={class:"tabs-content"},H2=a.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(l,{emit:n}){const r=l,t=n,s=a.ref();a.watch(()=>r==null?void 0:r.itemData,()=>{s.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const d=M=>{t("change",M)},b=(M,L)=>{t("contentChange",M,L)},h=M=>{t("pageChange",M)},v=M=>{t("rowClick",M)},y=(M,L)=>{t("routeUrl",M,L)},c=M=>{t("clickTrigger",M)},C=(M,L)=>{t("clickMainKey",M,L)};return(M,L)=>{var x,Y;return a.openBlock(),a.createElementBlock("div",j2,[(x=s.value)!=null&&x.length?(a.openBlock(),a.createBlock(pl.ssTab,{tabsContents:s.value,key:(Y=s.value)==null?void 0:Y.length},{pane:a.withCtx(({tab:w,index:z})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(w==null?void 0:w.comp)),{related:w==null?void 0:w.relatedTables,compNames:r==null?void 0:r.compNames,compName:w==null?void 0:w.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:l.isDevMode,itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,onChange:d,index:(w==null?void 0:w.id)??z,config:{showIndex:w==null?void 0:w.showIndex,allowMove:w==null?void 0:w.allowMove,viewport:w==null?void 0:w.viewport},onContentChange:b,onPageChange:h,onRowClick:v,onRouteUrl:y,parentTableId:w==null?void 0:w.tableId,allMapContents:l.allMapContents,children:w==null?void 0:w.children,level:1,onClickTrigger:c,onClickMainKey:C},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),U2=Kl._export_sfc(H2,[["__scopeId","data-v-ded4e0d9"]]),q2={class:"type-select"},K2=["onClick"],W2={class:"list-icon"},Y2={__name:"modelSelect",setup(l){const n=at(A.pinia),{itemData:r}=A.storeToRefs(n),t=s=>{const d=A.cloneDeep(r.value);d.push({comp:s.comp,name:s.name,compData:[]}),n.setItemData(d)};return(s,d)=>{const b=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",q2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Uc),(h,v)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:v},[a.createElementVNode("div",{class:"list-content",onClick:y=>t(h)},[a.createElementVNode("div",W2,[a.createVNode(b,{name:h.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(h.name),1)],8,K2)]))),128))])}}},J2=Kl._export_sfc(Y2,[["__scopeId","data-v-91799bf8"]]),G2={class:"fill-content"},X2={class:"operate-content"},Z2={class:"collapse-title-content"},Q2={class:"collapse-title-item"},eh={key:1},ah=["onClick"],lh={class:"icon-content"},rh={key:0,class:"edit-content"},nh=["onClick"],th={class:"comp-child"},oh={__name:"modelFill",setup(l){const n=at(A.pinia),{itemData:r,originalData:t}=A.storeToRefs(n),s=a.ref([]);a.ref([]);const d=a.ref([]),b=a.ref([]),h=L=>{var Y;let x=(Y=A.cloneDeep(b.value))==null?void 0:Y.map((w,z)=>(L===z&&(w.content=!0),w));b.value=x},v=L=>{var Y;let x=(Y=A.cloneDeep(b.value))==null?void 0:Y.map((w,z)=>(L===z&&(w.content=!1),w));b.value=x,s.value=A.cloneDeep(r.value)},y=(L,x)=>{var ee;let Y=(ee=A.cloneDeep(b.value))==null?void 0:ee.map((S,$)=>(L===$&&(S.content=!1),S));b.value=Y;const w=A.cloneDeep(r.value),z=w==null?void 0:w.filter((S,$)=>($===L&&(S.name=x),S));n.setOriginalData(z),n.setItemData(z)};a.watch(()=>r.value,()=>{var L,x,Y;!r.value||((L=r.value)==null?void 0:L.length)===0?s.value=[]:s.value=(x=A.cloneDeep(r.value))==null?void 0:x.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),d.value=s.value,b.value=(Y=A.cloneDeep(d.value))==null?void 0:Y.map((w,z)=>({id:z,content:!1}))},{deep:!0,immediate:!0});const c=L=>Et(L),C=(L,x,Y)=>{var z,ee;if(!L)return;let w=A.cloneDeep(r.value);w=(z=w==null?void 0:w.map((S,$)=>($===Y&&(S.compData=L),S)))==null?void 0:z.filter(S=>(S==null?void 0:S.comp)!=="methodButton"),b.value=(ee=A.cloneDeep(w))==null?void 0:ee.map((S,$)=>({id:$,content:!1})),n.setOriginalData(w),n.setItemData(w)},M=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const x=A.cloneDeep(r.value),Y=x==null?void 0:x.filter((w,z)=>z!==L);n.setOriginalData(Y),n.setItemData(Y),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(L,x)=>{const Y=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",G2,[x[1]||(x[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",X2,[a.createVNode(js.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:w,index:z})=>{var ee,S,$,T,k,g,j,q,J,me;return[a.createElementVNode("div",Z2,[a.createElementVNode("div",Q2,[(S=(ee=b.value)==null?void 0:ee.find(ze=>ze.id===z))!=null&&S.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:w.name&&w.name!==""?"8px":"0px"})},a.toDisplayString(w.name),5)),(T=($=b.value)==null?void 0:$.find(ze=>ze.id===z))!=null&&T.content?(a.openBlock(),a.createElementBlock("div",eh,[a.createVNode(pl.ssInput,{modelValue:w.name,"onUpdate:modelValue":ze=>w.name=ze,onClick:x[0]||(x[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(g=(k=b.value)==null?void 0:k.find(ze=>ze.id===z))!=null&&g.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(ze=>h(z),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ah))]),a.createElementVNode("div",lh,[(q=(j=b.value)==null?void 0:j.find(ze=>ze.id===z))!=null&&q.content?(a.openBlock(),a.createElementBlock("div",rh,[a.createVNode(Y,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(ze=>v(z),["stop"])},null,8,["onClick"]),a.createVNode(Y,{name:"Save",onClick:a.withModifiers(ze=>y(z,w.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(me=(J=b.value)==null?void 0:J.find(ze=>ze.id===z))!=null&&me.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(ze=>M(z),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,nh))])])]}),content:a.withCtx(({item:w,index:z})=>{var ee,S;return[a.createElementVNode("div",th,[a.createTextVNode(a.toDisplayString(c(w.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(w.comp+"Operate")),{itemContents:w==null?void 0:w.compData,originalItemContents:(S=(ee=d.value)==null?void 0:ee.find(($,T)=>T===z))==null?void 0:S.compData,onChange:$=>C($,w,z)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},ih=Kl._export_sfc(oh,[["__scopeId","data-v-a46a44b9"]]),sh={key:0,class:"show-content"},ch={style:{display:"flex"}},uh={__name:"modelShow",setup(l){const n=at(A.pinia),{itemData:r}=A.storeToRefs(n),t=a.ref([]);a.watch(()=>r.value,()=>{var d;!r.value||((d=r.value)==null?void 0:d.length)===0?t.value=[]:t.value=A.cloneDeep(r.value)},{deep:!0,immediate:!0});const s=d=>Et(d);return(d,b)=>{var h;return((h=t.value)==null?void 0:h.length)>0?(a.openBlock(),a.createElementBlock("div",sh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(v,y)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:y},[a.createElementVNode("div",ch,a.toDisplayString(v.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(v.comp)),{itemData:v==null?void 0:v.compData,childItemData:v==null?void 0:v.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},dh=Kl._export_sfc(uh,[["__scopeId","data-v-3f3e863e"]]),ph={class:"tabs-header"},fh={class:"tabs-list"},hh={class:"tab-name"},vh={class:"tab-actions"},mh=["onClick"],yh=["onClick"],gh=["onClick"],bh={class:"model-operate"},kh={class:"model-select",style:{display:"unset"}},xh={class:"existing-components"},_h={class:"component-list"},wh=["onClick"],Ch={class:"component-info"},Eh={class:"component-type"},Sh={class:"component-name"},Dh={class:"model-fill"},Bh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref(!1),b=a.ref(""),h=a.ref({title:""}),v=a.ref(-1),y=a.ref(!1),c=a.ref(-1),C=a.ref(new WeakMap),M=a.ref(null),L=at(A.pinia),{itemData:x}=A.storeToRefs(L),Y=()=>{b.value="新增标签页",h.value.title="",v.value=-1,d.value=!0},w=oe=>{b.value="修改标签页",h.value.title=s.value[oe].title,v.value=oe,d.value=!0},z=oe=>{const D=$(oe);C.value.delete(D),s.value.splice(oe,1),wa()},ee=()=>{if(h.value.title.trim()){if(v.value===-1){const oe={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:S()};s.value.push(oe)}else s.value[v.value].title=h.value.title,s.value[v.value].value=h.value.title,s.value[v.value].label=h.value.title;d.value=!1,wa()}},S=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=oe=>{const D=s.value[oe];return D.id||(D.id=S()),D.id},T=oe=>{var ge;c.value=oe;const D=$(oe);M.value=A.cloneDeep(x.value);let ne=C.value.get(D);!ne&&((ge=s.value[oe].children)==null?void 0:ge.length)>0&&(ne=q(s.value[oe].children)),ne?L.setItemData(A.cloneDeep(ne)):L.setItemData([]),y.value=!0},k=a.computed(()=>{const oe=A.useModelComp(A.pinia),D=A.storeToRefs(oe).itemData.value;return console.log("可用组件数据",D),!D||!Array.isArray(D)?[]:D.filter(ne=>{var ge;if(ne.comp==="Tabs"&&c.value>=0){const se=$(c.value);if((ge=ne.compData)==null?void 0:ge.some(la=>{var ya;return la.key==="stepList"&&((ya=la.contents)==null?void 0:ya.some(Va=>Va.id===se))}))return!1}return!0})}),g=oe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[oe]||oe,j=oe=>{var D;try{const ne=A.cloneDeep(oe);ne.id=Date.now()+Math.random(),ne.comp==="Tabs"&&((D=ne.compData)==null||D.forEach(se=>{se.key==="stepList"&&se.contents&&se.contents.forEach(we=>{we.id=S()})}));const ge=A.cloneDeep(x.value);ge.push(ne),L.setItemData(ge)}catch(ne){console.error("添加组件失败:",ne)}},q=oe=>oe.map(D=>{var ne;switch(D.type){case"form":return{comp:"Form",name:D.value||"表单",compData:J(D.content)};case"table":return{comp:"Table",name:D.value||"表格",compData:me(D.content)};default:return{comp:"Unknown",name:D.value||"",compData:((ne=D.content)==null?void 0:ne.originalData)||[]}}}),J=oe=>{if(!oe)return[];const D=[];return oe.rowContents&&D.push({key:"formContent",contents:oe.rowContents}),oe.buttonValue&&D.push({key:"formButton",contents:oe.buttonValue}),typeof oe.isEnableWrap<"u"&&D.push({key:"enableWrap",contents:oe.isEnableWrap}),D},me=oe=>[],ze=()=>{if(c.value>=0&&c.value<s.value.length){const oe=$(c.value);C.value.set(oe,A.cloneDeep(x.value)),s.value[c.value].children=be(x.value),console.log("保存后的数据",be(x.value))}y.value=!1,c.value=-1,M.value=null,wa()},xe=()=>{M.value&&L.setItemData(A.cloneDeep(M.value)),y.value=!1,c.value=-1,M.value=null},te=()=>{y.value&&xe()},be=oe=>{if(!Array.isArray(oe))throw new Error("sourceData must be an array");return oe.map((D,ne)=>{if(!D||typeof D!="object")return D;const{comp:ge,name:se,compData:we}=D;switch(ge){case"Form":return{type:"form",content:Q(we||[]),value:"表单"};case"Table":return{type:"table",content:de(we||[]),value:"表格"};default:return{type:"xxx",content:Ke(we||[]),value:""}}})},Q=oe=>{const D={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ne={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return oe.forEach((ge,se)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${se}:`,ge);return}const{key:we,contents:la}=ge,ya=ne[we];if(!ya){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?D[ya]=!!la:D[ya]=Array.isArray(la)?la:[]}),D},de=oe=>{const D={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ne={header:"columns",tableContents:"tableData"};return oe.forEach((ge,se)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${se}:`,ge);return}const{key:we,contents:la}=ge,ya=ne[we];if(!ya){console.warn(`Unknown Table config key: ${we}`);return}D[ya]=Array.isArray(la)?la:[]}),D},Ke=oe=>(console.log("Default conversion logic - to be implemented"),{originalData:oe,processed:!1,componentType:"unknown"}),wa=()=>{const oe=[{key:"stepList",contents:s.value}];t("change",oe)};return a.watch(()=>r.itemContents,oe=>{if(oe&&oe.length>0){const D=oe.find(ne=>ne.key==="stepList");D&&D.contents&&(s.value=D.contents.map(ne=>({title:ne.title||"",value:ne.value||ne.title||"",label:ne.label||ne.title||"",children:ne.children||[],id:ne.id||S()})))}},{immediate:!0,deep:!0}),(oe,D)=>{const ne=a.resolveComponent("svg-icon"),ge=a.resolveComponent("el-input"),se=a.resolveComponent("el-form-item"),we=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",ph,[D[6]||(D[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:Y},[a.createVNode(ne,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),D[5]||(D[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",fh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(la,ya)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:ya},[a.createElementVNode("span",hh,a.toDisplayString(la.title),1),a.createElementVNode("div",vh,[a.createElementVNode("button",{onClick:Va=>w(ya)},"修改标题",8,mh),a.createElementVNode("button",{onClick:Va=>T(ya)},"布局调整",8,yh),a.createElementVNode("button",{onClick:Va=>z(ya)},"删除",8,gh)])]))),128))]),a.createVNode(yr.ssDialog,{modelValue:d.value,"onUpdate:modelValue":D[2]||(D[2]=la=>d.value=la),title:b.value,onBeforeDestroy:D[3]||(D[3]=la=>d.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:D[1]||(D[1]=la=>d.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:ee},"确定")]),default:a.withCtx(()=>[a.createVNode(we,{model:h.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(se,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(ge,{modelValue:h.value.title,"onUpdate:modelValue":D[0]||(D[0]=la=>h.value.title=la),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(yr.ssDialog,{modelValue:y.value,"onUpdate:modelValue":D[4]||(D[4]=la=>y.value=la),title:"布局调整",fullScreen:"",onBeforeDestroy:te},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:xe},"取消"),a.createElementVNode("button",{onClick:ze},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",bh,[a.createElementVNode("div",kh,[a.createVNode(J2),a.createElementVNode("div",xh,[D[8]||(D[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",_h,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k.value,la=>(a.openBlock(),a.createElementBlock("div",{key:la.id,class:"component-item",onClick:ya=>j(la)},[a.createElementVNode("div",Ch,[a.createElementVNode("span",Eh,a.toDisplayString(g(la.comp)),1),a.createElementVNode("span",Sh,a.toDisplayString(la.name),1)]),D[7]||(D[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,wh))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:oe.innerWidth},[a.createVNode(dh)])),a.createElementVNode("div",Dh,[a.createVNode(ih)])])]),_:1},8,["modelValue"])])}}},Nh=Kl._export_sfc(Bh,[["__scopeId","data-v-9096ed0d"]]);function Th(){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 Ah(l){return{type:"line",...l}}function Mh(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function zh(l){return{type:"bar",barWidth:"60%",...l}}function Oh(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ih(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const Tn={line:{initBaseoptions:Th,initSeries:Ah},bar:{initBaseoptions:Mh,initSeries:zh},pie:{initBaseoptions:Oh,initSeries:Ih}},hs=A.useMenuState(A.pinia),wc=(l,n)=>{var c;const r=[],t=[],{group:s,nameCol:d,valueCol:b}=n||{},h=l==null?void 0:l.find(C=>{const{name:M}=C;return M===s});if(!h)return{names:r,values:t};const v=(c=h==null?void 0:h.compData)==null?void 0:c.find(C=>{const{key:M}=C;return M==="tableContents"});return((v==null?void 0:v.contents)||[]).forEach(C=>{const M=C==null?void 0:C[0];let L=!1;Qa.isObject(M)&&(M!=null&&M.id)&&(L=!0);let x=d,Y=b;L&&(x=x+1,Y=Y+1);const w=C==null?void 0:C[x],z=C==null?void 0:C[Y];r.push(w),t.push(z)}),{names:r,values:t}},Lh=async l=>{const{menu:n,mainKey:r,detailGroup:t,detailNameCol:s,detailValueCol:d,isSelfDetail:b}=l||{};let h=null;const v=sessionStorage.getItem("systemKey");if(b&&hs.activeMenuPath&&(h=await ua.getItemData(`${hs.activeMenuPath}`,v,"")),!b){const y=n==null?void 0:n.join("/");h=await ua.getItemData(`${y}^${r}`,v,"")}return wc(h,{group:t,nameCol:s,valueCol:d})},Vh=async l=>{const{menu:n,group:r,nameCol:t,valueCol:s}=l||{},d=n==null?void 0:n.join("/"),b=sessionStorage.getItem("systemKey"),h=await ua.getItemData(d,b,"");return wc(h,{group:r,nameCol:t,valueCol:s})},_i=async(l,n)=>{const r={names:[],values:[]},{menu:t,group:s,nameCol:d,valueCol:b}=l||{};if(!t.length||!s)return r;const{mainKey:h,group:v,nameCol:y,valueCol:c,isSelfDetail:C}=n||{};return h&&v&&pl.isNumber(y)&&pl.isNumber(c)?await Lh({menu:t,mainKey:h,detailGroup:v,detailNameCol:y,detailValueCol:c,isSelfDetail:C}):pl.isNumber(d)&&pl.isNumber(b)?await Vh({menu:t,group:s,nameCol:d,valueCol:b}):r},Rh=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;v.xAxis.data=y;const C=h({data:c});return v.series.push(C),v},$h=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;v.xAxis.data=y;const C=h({data:c});return v.series.push(C),v},Ph=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;const C=[];for(let L=0;L<y.length;L++){const x=y[L],Y=c[L];C.push({name:x,value:Y})}const M=h({data:C});return v.series.push(M),v},Fh=async(l=[])=>{var b,h,v;const n=((b=l==null?void 0:l.find(y=>y.key==="chartBaseConfig"))==null?void 0:b.contents)??{},r=((h=l==null?void 0:l.find(y=>y.key==="chartDataConfig"))==null?void 0:h.contents)??{},t=((v=l==null?void 0:l.find(y=>y.key==="chartDetailConfig"))==null?void 0:v.contents)??{},{type:s}=n;let d={};return s==="line"&&(d=await Rh({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),s==="bar"&&(d=await $h({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),s==="pie"&&(d=await Ph({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),d},jh=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const n=l,r=a.ref({});a.onMounted(async()=>{const s=n==null?void 0:n.itemData;r.value=await Fh(s)});const t=a.computed(()=>(n==null?void 0:n.height)||"300px");return(s,d)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:t.value})},[a.createVNode(yu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),Hh=Kl._export_sfc(jh,[["__scopeId","data-v-d4c081e8"]]),Uh={class:"chart-module layout"},qh={class:"chart-module content"},Kh={class:"chart-module content"},Wh={class:"form-content"},Yh={class:"dialog-footer"},Jh={class:"form-content"},Gh={class:"dialog-footer"},Xh={class:"form-content"},Zh={class:"dialog-footer"},Qh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),d=a.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=a.ref({}),v=()=>{var Pe;d.value=b(),(Pe=d.value)==null||Pe.forEach(Ee=>{var We;const Le=Ee==null?void 0:Ee.prop;Ee.value=(We=h==null?void 0:h.value)==null?void 0:We[Le]}),s.visible=!0},y=Pe=>{h.value=Pe},c=()=>{var Pe;s.visible=!1,t("change",(Pe=Re())==null?void 0:Pe.compData)},C=a.reactive({visible:!1,width:"840",title:"数据配置"}),M=a.ref([]),L=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],x=a.ref({}),Y=()=>{const Pe=M.value,Ee=A.cloneDeep(Pe);return Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=x.value)==null?void 0:Ua[We]}),Ee},w=Pe=>{var Le;x.value=Pe;const Ee=Y();M.value=Ee,t("change",(Le=Re())==null?void 0:Le.compData)},z=async()=>{const Pe=await ua.getMenusContent(),Ee=Y();Ee==null||Ee.forEach(Le=>{(Le==null?void 0:Le.prop)==="menu"&&(Le.contents=Pe)}),M.value=Ee,C.visible=!0,await la(x.value.menu),await ae(x.value.group)},ee=a.reactive({visible:!1,width:"840",title:"详情页配置"}),S=a.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],T=a.ref({}),k=()=>{const Pe=S.value,Ee=A.cloneDeep(Pe);return Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=T.value)==null?void 0:Ua[We]}),Ee},g=Pe=>{var Le;T.value=Pe;const Ee=k();S.value=Ee,t("change",(Le=Re())==null?void 0:Le.compData)},j=async()=>{await te();const Pe=A.cloneDeep(q.value),Ee=k();Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=T==null?void 0:T.value)==null?void 0:Ua[We],We==="mainKey"&&(Le.contents=Pe)}),S.value=Ee,ee.visible=!0},q=a.ref([]),J=a.ref([]),me=a.ref({}),ze=a.ref({}),xe=()=>{const{compData:Pe}=ge.value||{},Ee=Pe==null?void 0:Pe.find(X=>{const{key:R}=X;return R==="header"}),Le=(Ee==null?void 0:Ee.contents)||[],We=Le==null?void 0:Le.filter((X,R)=>{const{label:W}=X;return W!=="操作"}),Ua=We==null?void 0:We.findIndex((X,R)=>{const{isMainKey:W}=X;return W});if(Ua<0)return[];const Oa=Pe==null?void 0:Pe.find(X=>{const{key:R}=X;return R==="tableContents"}),P=(Oa==null?void 0:Oa.contents)||[];return P==null?void 0:P.map(X=>{const R=X==null?void 0:X[0];let W=Ua;Qa.isObject(R)&&(R!=null&&R.id)&&(W=W+1);const Ie=X==null?void 0:X[W];return{label:Ie,value:Ie}})},te=async()=>{const Pe=await xe();q.value=Pe},be=async Pe=>{const Ee=sessionStorage.getItem("systemKey");return await ua.getItemData(Pe,Ee,"")},Q=async Pe=>{const Ee=Pe;J.value=Ee==null?void 0:Ee.map(Le=>{const{name:We}=Le;return me.value[We]=Le,{label:We,value:We}})},de=Pe=>{const{comp:Ee,compData:Le}=ze.value||{};if(Ee==="Table"){let We=k();We=We.filter(Ua=>{const{prop:Oa}=Ua;return Oa!=="formItems"}),ya(We,Le),S.value=We}},Ke=async()=>{var Le,We;const Pe=(Le=T==null?void 0:T.value)==null?void 0:Le.mainKey,Ee=(We=x==null?void 0:x.value)==null?void 0:We.menu;if(Pe){const Oa=`${Ee==null?void 0:Ee.join("/")}^${Pe}`,P=await be(Oa);await Q(P);const F=k();F==null||F.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=J.value)}),S.value=F}};a.watch(()=>{var Pe;return(Pe=T==null?void 0:T.value)==null?void 0:Pe.mainKey},async(Pe,Ee)=>{Pe!=Ee&&Pe&&await Ke()});const wa=async Pe=>{const Ee=me.value[Pe];ze.value=Ee,await de()};a.watch(()=>{var Pe;return(Pe=T==null?void 0:T.value)==null?void 0:Pe.group},async(Pe,Ee)=>{Pe!=Ee&&Pe&&wa(Pe)});const oe=async()=>{var Ee;await Ke();const Pe=(Ee=T.value)==null?void 0:Ee.group;await wa(Pe)},D=a.ref([]),ne=a.ref({}),ge=a.ref({}),se=async Pe=>{const Ee=Pe==null?void 0:Pe.join("/"),Le=sessionStorage.getItem("systemKey");return await ua.getItemData(Ee,Le,"")},we=async Pe=>{const Ee=await se(Pe);D.value=Ee==null?void 0:Ee.map(Le=>{const{name:We}=Le;return ne.value[We]=Le,{label:We,value:We}})},la=async(Pe,Ee)=>{await we(Pe);const Le=Y();Le==null||Le.forEach(We=>{(We==null?void 0:We.prop)==="group"&&(We.contents=D.value)}),M.value=Le};a.watch(()=>{var Pe;return(Pe=x==null?void 0:x.value)==null?void 0:Pe.menu},async(Pe,Ee)=>{const Le=Pe==null?void 0:Pe.join("/"),We=Ee==null?void 0:Ee.join("/");Le!=We&&await la(Pe)});const ya=(Pe,Ee)=>{const Le=Ee==null?void 0:Ee.find(P=>{const{key:F}=P;return F==="header"}),We=(Le==null?void 0:Le.contents)||[],Ua=We==null?void 0:We.filter((P,F)=>{const{label:X}=P;return X!=="操作"}),Oa=Ua==null?void 0:Ua.map((P,F)=>{const{label:X}=P;return{label:X,value:F}});Pe==null||Pe.forEach(P=>{const F=P==null?void 0:P.prop;(F==="nameCol"||F==="valueCol")&&(P.contents=Oa)})},Va=Pe=>{const{comp:Ee,compData:Le}=ge.value||{};if(Ee==="Table"){x.value.formItems=[];let We=Y();We=We.filter(Ua=>{const{prop:Oa}=Ua;return Oa!=="formItems"}),ya(We,Le),M.value=We}},ae=async Pe=>{const Ee=ne.value[Pe];ge.value=Ee,await Va()};a.watch(()=>{var Pe;return(Pe=x==null?void 0:x.value)==null?void 0:Pe.group},async(Pe,Ee)=>{Pe!=Ee&&ae(Pe)});const ea=async()=>{var Le,We;const Pe=(Le=x.value)==null?void 0:Le.menu;await la(Pe);const Ee=(We=x.value)==null?void 0:We.group;await ae(Ee)},Re=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:x.value},{key:"chartDetailConfig",contents:T.value}]}),ma=()=>{s.visible=!1,C.visible=!1,ee.visible=!1};return a.onMounted(async()=>{var Ee,Le,We;M.value=L(),S.value=$();const Pe=r==null?void 0:r.itemContents;h.value=((Ee=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartBaseConfig"))==null?void 0:Ee.contents)??{},x.value=((Le=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartDataConfig"))==null?void 0:Le.contents)??{},await ea(),T.value=((We=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartDetailConfig"))==null?void 0:We.contents)??{},await oe()}),(Pe,Ee)=>{const Le=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Uh,[Ee[4]||(Ee[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[0]||(Ee[0]=We=>v())},{default:a.withCtx(()=>Ee[3]||(Ee[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",qh,[Ee[6]||(Ee[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[1]||(Ee[1]=We=>z())},{default:a.withCtx(()=>Ee[5]||(Ee[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",Kh,[Ee[8]||(Ee[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[2]||(Ee[2]=We=>j())},{default:a.withCtx(()=>Ee[7]||(Ee[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(yr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:ma,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",Wh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Yh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[9]||(Ee[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Le,{class:"ok-button button",onClick:c,id:"themeButton"},{default:a.withCtx(()=>Ee[10]||(Ee[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(yr.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:ma,width:C.width},{default:a.withCtx(()=>[a.createElementVNode("div",Jh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Gh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[11]||(Ee[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Le,{class:"ok-button button",onClick:ma,id:"themeButton"},{default:a.withCtx(()=>Ee[12]||(Ee[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(yr.ssDialog,{visible:ee.visible,title:ee.title,onBeforeDestroy:ma,width:ee.width},{default:a.withCtx(()=>[a.createElementVNode("div",Xh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Zh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[13]||(Ee[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Le,{class:"ok-button button",onClick:ma,id:"themeButton"},{default:a.withCtx(()=>Ee[14]||(Ee[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),e4=Kl._export_sfc(Qh,[["__scopeId","data-v-fe119645"]]),a4={class:"layout"},l4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:n}){const r=n,t=l;a.onMounted(async()=>{});const s=a.computed(()=>A.cloneDeep(t==null?void 0:t.itemData)||[]),d=a.computed(()=>{var c;const y=(c=s==null?void 0:s.value)==null?void 0:c.find(C=>{const{key:M}=C;return M==="baseConfig"});return y==null?void 0:y.contents}),b=a.computed(()=>{var c;const y=(c=s==null?void 0:s.value)==null?void 0:c.find(C=>{const{key:M}=C;return M==="children"});return y==null?void 0:y.contents}),h=a.computed(()=>{let y=A.cloneDeep(b.value)||[];const c=y.length;let C=0;const M=[];if(y=y.map(L=>{const x=L.span;return x?(L.span=Number(x),C=C+L.span):M.push(L),L}),C<24){const L=Math.floor((24-C)/c);M.forEach(x=>{x.span=L})}return y}),v=y=>{r("rowClick",y)};return(y,c)=>{var L;const C=a.resolveComponent("el-col"),M=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",a4,[a.createVNode(M,{style:a.normalizeStyle({height:(L=d.value)==null?void 0:L.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(x,Y)=>(a.openBlock(),a.createBlock(C,{span:x==null?void 0:x.span},{default:a.withCtx(()=>{var w;return[a.unref(Ct)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(x.comp)),{key:a.unref($n),compName:x.name,index:(x==null?void 0:x.id)??Y,height:(w=d.value)==null?void 0:w.height,itemData:x==null?void 0:x.compData,childItemData:x==null?void 0:x.itemChildData,onChange:a.unref(wo),onContentChange:a.unref(Co),onPageChange:a.unref(Eo),onRowClick:v},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),r4=Kl._export_sfc(l4,[["__scopeId","data-v-ab9a36ed"]]),n4={class:"layout-operate"},t4={class:"layout-module"},o4={class:"collapse-title-item"},i4={class:"collapse-title"},s4={class:"icon-content"},c4=["onClick"],u4={class:"comp-child"},d4=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n;a.onMounted(()=>{Y()});const s=a.ref({}),d=a.ref({}),b=a.ref([]),h=T=>[{label:"高度",prop:"height",type:"input",value:T==null?void 0:T.height}],v=T=>{d.value=T,t("change",$(),!0)},y=a.ref([]),c=a.ref([]),C=T=>[{label:"占比",prop:"span",type:"input",value:T==null?void 0:T.span}],M=a.computed(()=>{const T=r==null?void 0:r.itemContents;return A.cloneDeep(T)}),L=a.computed(()=>{const T=M==null?void 0:M.value,k=T==null?void 0:T.find(g=>{const{key:j}=g;return j==="baseConfig"});return k==null?void 0:k.contents}),x=a.computed(()=>{const T=M==null?void 0:M.value,k=T==null?void 0:T.find(g=>{const{key:j}=g;return j==="children"});return k==null?void 0:k.contents}),Y=()=>{var T;s.value=M.value||{},y.value=(x==null?void 0:x.value)||[],b.value=h(),b.value=(T=b.value)==null?void 0:T.map(k=>{var j;const{prop:g}=k;return k.value=(j=L.value)==null?void 0:j[g],k})};a.watch(()=>{var T;return(T=x==null?void 0:x.value)==null?void 0:T.length},()=>{var T;y.value=(x==null?void 0:x.value)||[],c.value=(T=x.value)==null?void 0:T.map(k=>C(k))},{immediate:!0});const w=(T,k)=>{const g=A.cloneDeep(x==null?void 0:x.value);g[k].span=T.span,y.value=g,t("change",$(),!0)},z=T=>Et(T),ee=(T,k,g)=>{if(!T)return;const j=A.cloneDeep(x==null?void 0:x.value);j[g]&&(j[g].compData=T,y.value=j,t("change",$(),!0))},S=T=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=A.cloneDeep(x==null?void 0:x.value);k=k==null?void 0:k.filter((g,j)=>T!==j),y.value=k,t("change",$(),!0),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:y==null?void 0:y.value}]});return(T,k)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",n4,[a.createElementVNode("div",t4,[k[1]||(k[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(pl.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:k[0]||(k[0]=j=>v(j))},null,8,["rowContents"])])]),a.createVNode(js.default,{class:"collapse-content",collapseContents:x.value},{title:a.withCtx(({item:j,index:q})=>[a.createElementVNode("div",o4,[a.createElementVNode("div",i4,a.toDisplayString(j.name),1),a.createElementVNode("div",s4,[a.createElementVNode("div",{onClick:a.withModifiers(J=>S(q),["stop"]),class:"icon-content"},[a.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,c4)])])]),content:a.withCtx(({item:j,index:q})=>[a.createElementVNode("div",u4,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value[q],key:q,isEnableWrap:!0,onChange:J=>w(J,q)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(z(j.comp+"Operate")),{itemContents:j==null?void 0:j.compData,originalItemContents:j.compData,onChange:J=>ee(J,j,q)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),p4=Kl._export_sfc(d4,[["__scopeId","data-v-ba05456e"]]),f4=typeof window<"u";var vs;f4&&((vs=window==null?void 0:window.navigator)!=null&&vs.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ln(l){return l==null}function Cc(){}const h4=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(h4)));function v4(){const l=new Map;return{on(n,r){const t=l.get(n);t!=null&&t.add(r)||l.set(n,new Set([r]))},off(n,r){const t=l.get(n);t&&t.delete(r)},clear(n){const r=l.get(n);r&&r.clear()},clearAll(){l.clear()},emit(n,...r){const t=l.get(n);t&&t.forEach(s=>{s(...r)})}}}function ms(l,n=16){if(typeof l!="function")return Cc;const r=(...d)=>{l(...d)};if(n<=0)return Ec(r);let t=0,s;return function(...d){const b=Date.now(),h=b-t;clearTimeout(s),h>=n?(t=b,r(...d)):s=setTimeout(()=>{t=Date.now(),r(...d)},Math.max(0,n-h))}}function m4(l,n=100){if(typeof l!="function")return Cc;const r=(...s)=>{l(...s)};if(n<=0)return Ec(r);let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{r(...s)},n)}}function Ec(l){if(typeof l!="function")return l;let n=!1,r,t;return function(...s){return r=s,n||(n=!0,t=Promise.resolve().then(()=>(n=!1,t=void 0,l(...r)))),t}}const Vt=new Set,Sc=new WeakMap;function y4(){Vt.forEach(l=>{l(...Sc.get(l))}),Vt.clear()}function Hr(l,...n){if(typeof l!="function")return l;Sc.set(l,n),!Vt.has(l)&&(Vt.add(l),Vt.size===1&&Promise.resolve().then(y4))}const Dc=Symbol("LAYOUT_KEY"),Bc=Symbol("EMITTER_KEY");function g4(l){let n=0,r;for(let t=0,s=l.length;t<s;t++)r=l[t].y+l[t].h,r>n&&(n=r);return n}function mi(l){const n=Array(l.length);for(let r=0,t=l.length;r<t;r++)n[r]=b4(l[r]);return n}function b4(l){return{...l}}function Nc(l,n){return!(l===n||l.x+l.w<=n.x||l.x>=n.x+n.w||l.y+l.h<=n.y||l.y>=n.y+n.h)}function gt(l,n,r){const t=Ac(l),s=Mc(l),d=Array(l.length);for(let b=0,h=s.length;b<h;b++){let v=s[b];v.static||(v=k4(t,v,n,r),t.push(v)),d[l.findIndex(y=>y.i===v.i)]=v,v.moved=!1}return d}function k4(l,n,r,t){if(r)for(;n.y>0&&!Rt(l,n);)n.y--;else if(t){const d=t[n.i].y;for(;n.y>d&&!Rt(l,n);)n.y--}let s;for(;s=Rt(l,n);)n.y=s.y+s.h;return n}function x4(l,n){const r=Ac(l);for(let t=0,s=l.length;t<s;t++){const d=l[t];if(d.x+d.w>n.cols&&(d.x=n.cols-d.w),d.x<0&&(d.x=0,d.w=n.cols),!d.static)r.push(d);else for(;Rt(r,d);)d.y++}return l}function ys(l,n){for(let r=0,t=l.length;r<t;r++)if(l[r].i===n)return l[r]}function Rt(l,n){for(let r=0,t=l.length;r<t;r++)if(Nc(l[r],n))return l[r]}function Tc(l,n){return l.filter(r=>Nc(r,n))}function Ac(l){return l.filter(n=>n.static)}function yi(l,n,r,t,s=!1,d=!1){if(n.static)return l;const b=n.x,h=n.y,v=t&&n.y>t;typeof r=="number"&&(n.x=r),typeof t=="number"&&(n.y=t),n.moved=!0;let y=Mc(l);v&&(y=y.reverse());const c=Tc(y,n);if(d&&c.length)return n.x=b,n.y=h,n.moved=!1,l;for(let C=0,M=c.length;C<M;C++){const L=c[C];L.moved||n.y>L.y&&n.y-L.y>L.h/4||(L.static?l=gs(l,L,n,s):l=gs(l,n,L,s))}return l}function gs(l,n,r,t){if(t){const s={x:r.x,y:r.y,w:r.w,h:r.h};if(s.y=Math.max(n.y-r.h,0),!Rt(l,s))return yi(l,r,void 0,s.y,!1)}return yi(l,r,void 0,r.y+1,!1)}function _4(l,n,r,t){const s="translate3d("+n+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:t+"px",position:"absolute"}}function w4(l,n,r,t){const s="translate3d("+n*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:t+"px",position:"absolute"}}function C4(l,n,r,t){return{top:l+"px",left:n+"px",width:r+"px",height:t+"px",position:"absolute"}}function E4(l,n,r,t){return{top:l+"px",right:n+"px",width:r+"px",height:t+"px",position:"absolute"}}function Mc(l){return Array.from(l).sort(function(n,r){return n.y===r.y&&n.x===r.x?0:n.y>r.y||n.y===r.y&&n.x>r.x?1:-1})}function S4(l,n){n=n||"Layout";const r=["x","y","w","h"],t=[];if(!Array.isArray(l))throw new Error(n+" must be an array!");for(let s=0,d=l.length;s<d;s++){const b=l[s];for(let h=0;h<r.length;h++)if(typeof b[r[h]]!="number")throw new Error("VueGridLayout: "+n+"["+s+"]."+r[h]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+n+"["+s+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+n+"["+s+"].i must be a string or number!");if(t.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+n+"["+s+"].i must be unique!");if(t.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+n+"["+s+"].static must be a boolean!")}}function D4(l,n="vgl"){const r=()=>`${n}-${l}`;return{b:r,be:t=>`${r()}__${t}`,bm:t=>`${r()}--${t}`,bem:(t,s)=>`${r()}__${t}--${s}`}}function bs(l){return B4(l)}function B4(l){var n;const r=((n=l.target)==null?void 0:n.offsetParent)||document.body,t=l.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),s=l.clientX+r.scrollLeft-t.left,d=l.clientY+r.scrollTop-t.top;return{x:s,y:d}}function ks(l,n,r,t){return N4(l)?{deltaX:r-l,deltaY:t-n,lastX:l,lastY:n,x:r,y:t}:{deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}}function N4(l){return typeof l=="number"&&!Number.isNaN(l)}function T4(l,n){const r=Oc(l);let t=r[0];for(let s=1,d=r.length;s<d;s++){const b=r[s];n>l[b]&&(t=b)}return t}function zc(l,n){if(!n[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return n[l]}function A4(l,n,r,t,s,d,b){if(n[t])return mi(n[t]);let h=l;const v=Oc(r),y=v.slice(v.indexOf(t));for(let c=0,C=y.length;c<C;c++){const M=y[c];if(n[M]){h=n[M];break}}return h=mi(h||[]),gt(x4(h,{cols:d}),b)}function Oc(l){return Object.keys(l).sort((n,r)=>l[n]-l[r])}let M4="auto";function z4(){return typeof document<"u"}function xs(){return z4()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):M4}var Lt={exports:{}},O4=Lt.exports,_s;function I4(){return _s||(_s=1,function(l,n){(function(r,t){l.exports=t()})(O4,function(){function r(i,o){var p=Object.keys(i);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(i);o&&(m=m.filter(function(_){return Object.getOwnPropertyDescriptor(i,_).enumerable})),p.push.apply(p,m)}return p}function t(i){for(var o=1;o<arguments.length;o++){var p=arguments[o]!=null?arguments[o]:{};o%2?r(Object(p),!0).forEach(function(m){v(i,m,p[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(p)):r(Object(p)).forEach(function(m){Object.defineProperty(i,m,Object.getOwnPropertyDescriptor(p,m))})}return i}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(i)}function d(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function b(i,o){for(var p=0;p<o.length;p++){var m=o[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(i,Y(m.key),m)}}function h(i,o,p){return o&&b(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,o,p){return(o=Y(o))in i?Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0,writable:!0}):i[o]=p,i}function y(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),o&&C(i,o)}function c(i){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},c(i)}function C(i,o){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},C(i,o)}function M(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function L(i){var o=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 p,m=c(i);if(o){var _=c(this).constructor;p=Reflect.construct(m,arguments,_)}else p=m.apply(this,arguments);return function(I,U){if(U&&(typeof U=="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(I)}(this,p)}}function x(){return x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(i,o,p){var m=function(I,U){for(;!Object.prototype.hasOwnProperty.call(I,U)&&(I=c(I))!==null;);return I}(i,o);if(m){var _=Object.getOwnPropertyDescriptor(m,o);return _.get?_.get.call(arguments.length<3?i:p):_.value}},x.apply(this,arguments)}function Y(i){var o=function(p,m){if(typeof p!="object"||p===null)return p;var _=p[Symbol.toPrimitive];if(_!==void 0){var I=_.call(p,m);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(i,"string");return typeof o=="symbol"?o:o+""}var w=function(i){return!(!i||!i.Window)&&i instanceof i.Window},z=void 0,ee=void 0;function S(i){z=i;var o=i.document.createTextNode("");o.ownerDocument!==i.document&&typeof i.wrap=="function"&&i.wrap(o)===o&&(i=i.wrap(i)),ee=i}function $(i){return w(i)?i:(i.ownerDocument||i).defaultView||ee.window}typeof window<"u"&&window&&S(window);var T=function(i){return!!i&&s(i)==="object"},k=function(i){return typeof i=="function"},g={window:function(i){return i===ee||w(i)},docFrag:function(i){return T(i)&&i.nodeType===11},object:T,func:k,number:function(i){return typeof i=="number"},bool:function(i){return typeof i=="boolean"},string:function(i){return typeof i=="string"},element:function(i){if(!i||s(i)!=="object")return!1;var o=$(i)||ee;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?i instanceof Element||i instanceof o.Element:i.nodeType===1&&typeof i.nodeName=="string"},plainObject:function(i){return T(i)&&!!i.constructor&&/function Object\b/.test(i.constructor.toString())},array:function(i){return T(i)&&i.length!==void 0&&k(i.splice)}};function j(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.prepared.axis;p==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):p==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function q(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="drag"){var m=p.prepared.axis;if(m==="x"||m==="y"){var _=m==="x"?"y":"x";o.page[_]=p.coords.start.page[_],o.client[_]=p.coords.start.client[_],o.delta[_]=0}}}var J={id:"actions/drag",install:function(i){var o=i.actions,p=i.Interactable,m=i.defaults;p.prototype.draggable=J.draggable,o.map.drag=J,o.methodDict.drag="draggable",m.actions.drag=J.defaults},listeners:{"interactions:before-action-move":j,"interactions:action-resume":j,"interactions:action-move":q,"auto-start:check":function(i){var o=i.interaction,p=i.interactable,m=i.buttons,_=p.options.drag;if(_&&_.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(m&p.options.drag.mouseButtons)!=0))return i.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(i){return g.object(i)?(this.options.drag.enabled=i.enabled!==!1,this.setPerAction("drag",i),this.setOnEvents("drag",i),/^(xy|x|y|start)$/.test(i.lockAxis)&&(this.options.drag.lockAxis=i.lockAxis),/^(xy|x|y)$/.test(i.startAxis)&&(this.options.drag.startAxis=i.startAxis),this):g.bool(i)?(this.options.drag.enabled=i,this):this.options.drag},beforeMove:j,move:q,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(i){return i.search("drag")===0}},me=J,ze={init:function(i){var o=i;ze.document=o.document,ze.DocumentFragment=o.DocumentFragment||xe,ze.SVGElement=o.SVGElement||xe,ze.SVGSVGElement=o.SVGSVGElement||xe,ze.SVGElementInstance=o.SVGElementInstance||xe,ze.Element=o.Element||xe,ze.HTMLElement=o.HTMLElement||ze.Element,ze.Event=o.Event,ze.Touch=o.Touch||xe,ze.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function xe(){}var te=ze,be={init:function(i){var o=te.Element,p=i.navigator||{};be.supportsTouch="ontouchstart"in i||g.func(i.DocumentTouch)&&te.document instanceof i.DocumentTouch,be.supportsPointerEvent=p.pointerEnabled!==!1&&!!te.PointerEvent,be.isIOS=/iP(hone|od|ad)/.test(p.platform),be.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),be.isIe9=/MSIE 9/.test(p.userAgent),be.isOperaMobile=p.appName==="Opera"&&be.supportsTouch&&/Presto/.test(p.userAgent),be.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",be.pEventTypes=be.supportsPointerEvent?te.PointerEvent===i.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,be.wheelEvent=te.document&&"onmousewheel"in te.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Q=be;function de(i,o){if(i.contains)return i.contains(o);for(;o;){if(o===i)return!0;o=o.parentNode}return!1}function Ke(i,o){for(;g.element(i);){if(oe(i,o))return i;i=wa(i)}return null}function wa(i){var o=i.parentNode;if(g.docFrag(o)){for(;(o=o.host)&&g.docFrag(o););return o}return o}function oe(i,o){return ee!==z&&(o=o.replace(/\/deep\//g," ")),i[Q.prefixedMatchesSelector](o)}var D=function(i){return i.parentNode||i.host};function ne(i,o){for(var p,m=[],_=i;(p=D(_))&&_!==o&&p!==_.ownerDocument;)m.unshift(_),_=p;return m}function ge(i,o,p){for(;g.element(i);){if(oe(i,o))return!0;if((i=wa(i))===p)return oe(i,o)}return!1}function se(i){return i.correspondingUseElement||i}function we(i){var o=i instanceof te.SVGElement?i.getBoundingClientRect():i.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function la(i){var o,p=we(i);if(!Q.isIOS7&&p){var m={x:(o=(o=$(i))||ee).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};p.left+=m.x,p.right+=m.x,p.top+=m.y,p.bottom+=m.y}return p}function ya(i){for(var o=[];i;)o.push(i),i=wa(i);return o}function Va(i){return!!g.string(i)&&(te.document.querySelector(i),!0)}function ae(i,o){for(var p in o)i[p]=o[p];return i}function ea(i,o,p){return i==="parent"?wa(p):i==="self"?o.getRect(p):Ke(p,i)}function Re(i,o,p,m){var _=i;return g.string(_)?_=ea(_,o,p):g.func(_)&&(_=_.apply(void 0,m)),g.element(_)&&(_=la(_)),_}function ma(i){return i&&{x:"x"in i?i.x:i.left,y:"y"in i?i.y:i.top}}function Pe(i){return!i||"x"in i&&"y"in i||((i=ae({},i)).x=i.left||0,i.y=i.top||0,i.width=i.width||(i.right||0)-i.x,i.height=i.height||(i.bottom||0)-i.y),i}function Ee(i,o,p){i.left&&(o.left+=p.x),i.right&&(o.right+=p.x),i.top&&(o.top+=p.y),i.bottom&&(o.bottom+=p.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function Le(i,o,p){var m=p&&i.options[p];return ma(Re(m&&m.origin||i.options.origin,i,o,[i&&o]))||{x:0,y:0}}function We(i,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(pe){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},g.string(i)&&i.search(" ")!==-1&&(i=Ua(i)),g.array(i))return i.forEach(function(pe){return We(pe,o,p,m)}),m;if(g.object(i)&&(o=i,i=""),g.func(o)&&p(i))m[i]=m[i]||[],m[i].push(o);else if(g.array(o))for(var _=0,I=o;_<I.length;_++){var U=I[_];We(i,U,p,m)}else if(g.object(o))for(var G in o)We(Ua(G).map(function(pe){return"".concat(i).concat(pe)}),o[G],p,m);return m}function Ua(i){return i.trim().split(/ +/)}var Oa=function(i,o){return Math.sqrt(i*i+o*o)},P=["webkit","moz"];function F(i,o){i.__set||(i.__set={});var p=function(_){if(P.some(function(I){return _.indexOf(I)===0}))return 1;typeof i[_]!="function"&&_!=="__set"&&Object.defineProperty(i,_,{get:function(){return _ in i.__set?i.__set[_]:i.__set[_]=o[_]},set:function(I){i.__set[_]=I},configurable:!0})};for(var m in o)p(m);return i}function X(i,o){i.page=i.page||{},i.page.x=o.page.x,i.page.y=o.page.y,i.client=i.client||{},i.client.x=o.client.x,i.client.y=o.client.y,i.timeStamp=o.timeStamp}function R(i){i.page.x=0,i.page.y=0,i.client.x=0,i.client.y=0}function W(i){return i instanceof te.Event||i instanceof te.Touch}function Ie(i,o,p){return i=i||"page",(p=p||{}).x=o[i+"X"],p.y=o[i+"Y"],p}function Ne(i,o){return o=o||{x:0,y:0},Q.isOperaMobile&&W(i)?(Ie("screen",i,o),o.x+=window.scrollX,o.y+=window.scrollY):Ie("page",i,o),o}function Ce(i){return g.number(i.pointerId)?i.pointerId:i.identifier}function K(i,o,p){var m=o.length>1?Ve(o):o[0];Ne(m,i.page),function(_,I){I=I||{},Q.isOperaMobile&&W(_)?Ie("screen",_,I):Ie("client",_,I)}(m,i.client),i.timeStamp=p}function He(i){var o=[];return g.array(i)?(o[0]=i[0],o[1]=i[1]):i.type==="touchend"?i.touches.length===1?(o[0]=i.touches[0],o[1]=i.changedTouches[0]):i.touches.length===0&&(o[0]=i.changedTouches[0],o[1]=i.changedTouches[1]):(o[0]=i.touches[0],o[1]=i.touches[1]),o}function Ve(i){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<i.length;p++){var m=i[p];for(var _ in o)o[_]+=m[_]}for(var I in o)o[I]/=i.length;return o}function ra(i){if(!i.length)return null;var o=He(i),p=Math.min(o[0].pageX,o[1].pageX),m=Math.min(o[0].pageY,o[1].pageY),_=Math.max(o[0].pageX,o[1].pageX),I=Math.max(o[0].pageY,o[1].pageY);return{x:p,y:m,left:p,top:m,right:_,bottom:I,width:_-p,height:I-m}}function va(i,o){var p=o+"X",m=o+"Y",_=He(i),I=_[0][p]-_[1][p],U=_[0][m]-_[1][m];return Oa(I,U)}function $e(i,o){var p=o+"X",m=o+"Y",_=He(i),I=_[1][p]-_[0][p],U=_[1][m]-_[0][m];return 180*Math.atan2(U,I)/Math.PI}function ba(i){return g.string(i.pointerType)?i.pointerType:g.number(i.pointerType)?[void 0,void 0,"touch","pen","mouse"][i.pointerType]:/touch/.test(i.type||"")||i instanceof te.Touch?"touch":"mouse"}function Te(i){var o=g.func(i.composedPath)?i.composedPath():i.path;return[se(o?o[0]:i.target),se(i.currentTarget)]}var fa=function(){function i(o){d(this,i),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return h(i,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),i}();Object.defineProperty(fa.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Ue=function(i,o){for(var p=0;p<o.length;p++){var m=o[p];i.push(m)}return i},ga=function(i){return Ue([],i)},fe=function(i,o){for(var p=0;p<i.length;p++)if(o(i[p],p,i))return p;return-1},ka=function(i,o){return i[fe(i,o)]},Fe=function(i){y(p,i);var o=L(p);function p(m,_,I){var U;d(this,p),(U=o.call(this,_._interaction)).dropzone=void 0,U.dragEvent=void 0,U.relatedTarget=void 0,U.draggable=void 0,U.propagationStopped=!1,U.immediatePropagationStopped=!1;var G=I==="dragleave"?m.prev:m.cur,pe=G.element,Ae=G.dropzone;return U.type=I,U.target=pe,U.currentTarget=pe,U.dropzone=Ae,U.dragEvent=_,U.relatedTarget=_.target,U.draggable=_.interactable,U.timeStamp=_.timeStamp,U}return h(p,[{key:"reject",value:function(){var m=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 I=_.activeDrops,U=fe(I,function(pe){var Ae=pe.dropzone,he=pe.element;return Ae===m.dropzone&&he===m.target});_.activeDrops.splice(U,1);var G=new p(_,this.dragEvent,"dropdeactivate");G.dropzone=this.dropzone,G.target=this.target,this.dropzone.fire(G)}else this.dropzone.fire(new p(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p}(fa);function $a(i,o){for(var p=0,m=i.slice();p<m.length;p++){var _=m[p],I=_.dropzone,U=_.element;o.dropzone=I,o.target=U,I.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function Na(i,o){for(var p=function(I,U){for(var G=[],pe=0,Ae=I.interactables.list;pe<Ae.length;pe++){var he=Ae[pe];if(he.options.drop.enabled){var Je=he.options.drop.accept;if(!(g.element(Je)&&Je!==U||g.string(Je)&&!oe(U,Je)||g.func(Je)&&!Je({dropzone:he,draggableElement:U})))for(var Ba=0,ll=he.getAllElements();Ba<ll.length;Ba++){var Za=ll[Ba];Za!==U&&G.push({dropzone:he,element:Za,rect:he.getRect(Za)})}}}return G}(i,o),m=0;m<p.length;m++){var _=p[m];_.rect=_.dropzone.getRect(_.element)}return p}function Ye(i,o,p){for(var m=i.dropState,_=i.interactable,I=i.element,U=[],G=0,pe=m.activeDrops;G<pe.length;G++){var Ae=pe[G],he=Ae.dropzone,Je=Ae.element,Ba=Ae.rect,ll=he.dropCheck(o,p,_,I,Je,Ba);U.push(ll?Je:null)}var Za=function(il){for(var xl,sl,Al,Vl=[],Wl=0;Wl<il.length;Wl++){var Tl=il[Wl],Ul=il[xl];if(Tl&&Wl!==xl)if(Ul){var Or=D(Tl),gr=D(Ul);if(Or!==Tl.ownerDocument)if(gr!==Tl.ownerDocument)if(Or!==gr){Vl=Vl.length?Vl:ne(Ul);var jr=void 0;if(Ul instanceof te.HTMLElement&&Tl instanceof te.SVGElement&&!(Tl instanceof te.SVGSVGElement)){if(Tl===gr)continue;jr=Tl.ownerSVGElement}else jr=Tl;for(var Qr=ne(jr,Ul.ownerDocument),sn=0;Qr[sn]&&Qr[sn]===Vl[sn];)sn++;var ct=[Qr[sn-1],Qr[sn],Vl[sn]];if(ct[0])for(var Sn=ct[0].lastChild;Sn;){if(Sn===ct[1]){xl=Wl,Vl=Qr;break}if(Sn===ct[2])break;Sn=Sn.previousSibling}}else Al=Ul,(parseInt($(sl=Tl).getComputedStyle(sl).zIndex,10)||0)>=(parseInt($(Al).getComputedStyle(Al).zIndex,10)||0)&&(xl=Wl);else xl=Wl}else xl=Wl}return xl}(U);return m.activeDrops[Za]||null}function Oe(i,o,p){var m=i.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(_.activate=new Fe(m,p,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),p.type==="dragend"&&(_.deactivate=new Fe(m,p,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(_.leave=new Fe(m,p,"dragleave"),p.dragLeave=_.leave.target=m.prev.element,p.prevDropzone=_.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(_.enter=new Fe(m,p,"dragenter"),p.dragEnter=m.cur.element,p.dropzone=m.cur.dropzone)),p.type==="dragend"&&m.cur.dropzone&&(_.drop=new Fe(m,p,"drop"),p.dropzone=m.cur.dropzone,p.relatedTarget=m.cur.element),p.type==="dragmove"&&m.cur.dropzone&&(_.move=new Fe(m,p,"dropmove"),p.dropzone=m.cur.dropzone)),_}function ue(i,o){var p=i.dropState,m=p.activeDrops,_=p.cur,I=p.prev;o.leave&&I.dropzone.fire(o.leave),o.enter&&_.dropzone.fire(o.enter),o.move&&_.dropzone.fire(o.move),o.drop&&_.dropzone.fire(o.drop),o.deactivate&&$a(m,o.deactivate),p.prev.dropzone=_.dropzone,p.prev.element=_.element}function ie(i,o){var p=i.interaction,m=i.iEvent,_=i.event;if(m.type==="dragmove"||m.type==="dragend"){var I=p.dropState;o.dynamicDrop&&(I.activeDrops=Na(o,p.element));var U=m,G=Ye(p,U,_);I.rejected=I.rejected&&!!G&&G.dropzone===I.cur.dropzone&&G.element===I.cur.element,I.cur.dropzone=G&&G.dropzone,I.cur.element=G&&G.element,I.events=Oe(p,0,U)}}var na={id:"actions/drop",install:function(i){var o=i.actions,p=i.interactStatic,m=i.Interactable,_=i.defaults;i.usePlugin(me),m.prototype.dropzone=function(I){return function(U,G){if(g.object(G)){if(U.options.drop.enabled=G.enabled!==!1,G.listeners){var pe=We(G.listeners),Ae=Object.keys(pe).reduce(function(Je,Ba){return Je[/^(enter|leave)/.test(Ba)?"drag".concat(Ba):/^(activate|deactivate|move)/.test(Ba)?"drop".concat(Ba):Ba]=pe[Ba],Je},{}),he=U.options.drop.listeners;he&&U.off(he),U.on(Ae),U.options.drop.listeners=Ae}return g.func(G.ondrop)&&U.on("drop",G.ondrop),g.func(G.ondropactivate)&&U.on("dropactivate",G.ondropactivate),g.func(G.ondropdeactivate)&&U.on("dropdeactivate",G.ondropdeactivate),g.func(G.ondragenter)&&U.on("dragenter",G.ondragenter),g.func(G.ondragleave)&&U.on("dragleave",G.ondragleave),g.func(G.ondropmove)&&U.on("dropmove",G.ondropmove),/^(pointer|center)$/.test(G.overlap)?U.options.drop.overlap=G.overlap:g.number(G.overlap)&&(U.options.drop.overlap=Math.max(Math.min(1,G.overlap),0)),"accept"in G&&(U.options.drop.accept=G.accept),"checker"in G&&(U.options.drop.checker=G.checker),U}return g.bool(G)?(U.options.drop.enabled=G,U):U.options.drop}(this,I)},m.prototype.dropCheck=function(I,U,G,pe,Ae,he){return function(Je,Ba,ll,Za,il,xl,sl){var Al=!1;if(!(sl=sl||Je.getRect(xl)))return!!Je.options.drop.checker&&Je.options.drop.checker(Ba,ll,Al,Je,xl,Za,il);var Vl=Je.options.drop.overlap;if(Vl==="pointer"){var Wl=Le(Za,il,"drag"),Tl=Ne(Ba);Tl.x+=Wl.x,Tl.y+=Wl.y;var Ul=Tl.x>sl.left&&Tl.x<sl.right,Or=Tl.y>sl.top&&Tl.y<sl.bottom;Al=Ul&&Or}var gr=Za.getRect(il);if(gr&&Vl==="center"){var jr=gr.left+gr.width/2,Qr=gr.top+gr.height/2;Al=jr>=sl.left&&jr<=sl.right&&Qr>=sl.top&&Qr<=sl.bottom}return gr&&g.number(Vl)&&(Al=Math.max(0,Math.min(sl.right,gr.right)-Math.max(sl.left,gr.left))*Math.max(0,Math.min(sl.bottom,gr.bottom)-Math.max(sl.top,gr.top))/(gr.width*gr.height)>=Vl),Je.options.drop.checker&&(Al=Je.options.drop.checker(Ba,ll,Al,Je,xl,Za,il)),Al}(this,I,U,G,pe,Ae,he)},p.dynamicDrop=function(I){return g.bool(I)?(i.dynamicDrop=I,p):i.dynamicDrop},ae(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",i.dynamicDrop=!1,_.actions.drop=na.defaults},listeners:{"interactions:before-action-start":function(i){var o=i.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(i,o){var p=i.interaction,m=(i.event,i.iEvent);if(p.prepared.name==="drag"){var _=p.dropState;_.activeDrops=[],_.events={},_.activeDrops=Na(o,p.element),_.events=Oe(p,0,m),_.events.activate&&($a(_.activeDrops,_.events.activate),o.fire("actions/drop:start",{interaction:p,dragEvent:m}))}},"interactions:action-move":ie,"interactions:after-action-move":function(i,o){var p=i.interaction,m=i.iEvent;if(p.prepared.name==="drag"){var _=p.dropState;ue(p,_.events),o.fire("actions/drop:move",{interaction:p,dragEvent:m}),_.events={}}},"interactions:action-end":function(i,o){if(i.interaction.prepared.name==="drag"){var p=i.interaction,m=i.iEvent;ie(i,o),ue(p,p.dropState.events),o.fire("actions/drop:end",{interaction:p,dragEvent:m})}},"interactions:stop":function(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Na,getDrop:Ye,getDropEvents:Oe,fireDropEvents:ue,filterEventType:function(i){return i.search("drag")===0||i.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},qa=na;function rl(i){var o=i.interaction,p=i.iEvent,m=i.phase;if(o.prepared.name==="gesture"){var _=o.pointers.map(function(Ae){return Ae.pointer}),I=m==="start",U=m==="end",G=o.interactable.options.deltaSource;if(p.touches=[_[0],_[1]],I)p.distance=va(_,G),p.box=ra(_),p.scale=1,p.ds=0,p.angle=$e(_,G),p.da=0,o.gesture.startDistance=p.distance,o.gesture.startAngle=p.angle;else if(U||o.pointers.length<2){var pe=o.prevEvent;p.distance=pe.distance,p.box=pe.box,p.scale=pe.scale,p.ds=0,p.angle=pe.angle,p.da=0}else p.distance=va(_,G),p.box=ra(_),p.scale=p.distance/o.gesture.startDistance,p.angle=$e(_,G),p.ds=p.scale-o.gesture.scale,p.da=p.angle-o.gesture.angle;o.gesture.distance=p.distance,o.gesture.angle=p.angle,g.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(o.gesture.scale=p.scale)}}var Ml={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(i){var o=i.actions,p=i.Interactable,m=i.defaults;p.prototype.gesturable=function(_){return g.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):g.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},o.map.gesture=Ml,o.methodDict.gesture="gesturable",m.actions.gesture=Ml.defaults},listeners:{"interactions:action-start":rl,"interactions:action-move":rl,"interactions:action-end":rl,"interactions:new":function(i){i.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(i){if(!(i.interaction.pointers.length<2)){var o=i.interactable.options.gesture;if(o&&o.enabled)return i.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(i){return i.search("gesture")===0}},Fa=Ml;function nl(i,o,p,m,_,I,U){if(!o)return!1;if(o===!0){var G=g.number(I.width)?I.width:I.right-I.left,pe=g.number(I.height)?I.height:I.bottom-I.top;if(U=Math.min(U,Math.abs((i==="left"||i==="right"?G:pe)/2)),G<0&&(i==="left"?i="right":i==="right"&&(i="left")),pe<0&&(i==="top"?i="bottom":i==="bottom"&&(i="top")),i==="left"){var Ae=G>=0?I.left:I.right;return p.x<Ae+U}if(i==="top"){var he=pe>=0?I.top:I.bottom;return p.y<he+U}if(i==="right")return p.x>(G>=0?I.right:I.left)-U;if(i==="bottom")return p.y>(pe>=0?I.bottom:I.top)-U}return!!g.element(m)&&(g.element(o)?o===m:ge(m,o,_))}function Ca(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var m=o;p.interactable.options.resize.square?(p.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=p.resizeAxes,p.resizeAxes==="x"?m.delta.y=0:p.resizeAxes==="y"&&(m.delta.x=0))}}var aa,Se,Xa={id:"actions/resize",before:["actions/drag"],install:function(i){var o=i.actions,p=i.browser,m=i.Interactable,_=i.defaults;Xa.cursors=function(I){return I.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"}}(p),Xa.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,m.prototype.resizable=function(I){return function(U,G,pe){return g.object(G)?(U.options.resize.enabled=G.enabled!==!1,U.setPerAction("resize",G),U.setOnEvents("resize",G),g.string(G.axis)&&/^x$|^y$|^xy$/.test(G.axis)?U.options.resize.axis=G.axis:G.axis===null&&(U.options.resize.axis=pe.defaults.actions.resize.axis),g.bool(G.preserveAspectRatio)?U.options.resize.preserveAspectRatio=G.preserveAspectRatio:g.bool(G.square)&&(U.options.resize.square=G.square),U):g.bool(G)?(U.options.resize.enabled=G,U):U.options.resize}(this,I,i)},o.map.resize=Xa,o.methodDict.resize="resizable",_.actions.resize=Xa.defaults},listeners:{"interactions:new":function(i){i.interaction.resizeAxes="xy"},"interactions:action-start":function(i){(function(o){var p=o.iEvent,m=o.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var _=p,I=m.rect;m._rects={start:ae({},I),corrected:ae({},I),previous:ae({},I),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=m.prepared.edges,_.rect=m._rects.corrected,_.deltaRect=m._rects.delta}})(i),Ca(i)},"interactions:action-move":function(i){(function(o){var p=o.iEvent,m=o.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var _=p,I=m.interactable.options.resize.invert,U=I==="reposition"||I==="negate",G=m.rect,pe=m._rects,Ae=pe.start,he=pe.corrected,Je=pe.delta,Ba=pe.previous;if(ae(Ba,he),U){if(ae(he,G),I==="reposition"){if(he.top>he.bottom){var ll=he.top;he.top=he.bottom,he.bottom=ll}if(he.left>he.right){var Za=he.left;he.left=he.right,he.right=Za}}}else he.top=Math.min(G.top,Ae.bottom),he.bottom=Math.max(G.bottom,Ae.top),he.left=Math.min(G.left,Ae.right),he.right=Math.max(G.right,Ae.left);for(var il in he.width=he.right-he.left,he.height=he.bottom-he.top,he)Je[il]=he[il]-Ba[il];_.edges=m.prepared.edges,_.rect=he,_.deltaRect=Je}})(i),Ca(i)},"interactions:action-end":function(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var m=o;m.edges=p.prepared.edges,m.rect=p._rects.corrected,m.deltaRect=p._rects.delta}},"auto-start:check":function(i){var o=i.interaction,p=i.interactable,m=i.element,_=i.rect,I=i.buttons;if(_){var U=ae({},o.coords.cur.page),G=p.options.resize;if(G&&G.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(I&G.mouseButtons)!=0)){if(g.object(G.edges)){var pe={left:!1,right:!1,top:!1,bottom:!1};for(var Ae in pe)pe[Ae]=nl(Ae,G.edges[Ae],U,o._latestPointer.eventTarget,m,_,G.margin||Xa.defaultMargin);pe.left=pe.left&&!pe.right,pe.top=pe.top&&!pe.bottom,(pe.left||pe.right||pe.top||pe.bottom)&&(i.action={name:"resize",edges:pe})}else{var he=G.axis!=="y"&&U.x>_.right-Xa.defaultMargin,Je=G.axis!=="x"&&U.y>_.bottom-Xa.defaultMargin;(he||Je)&&(i.action={name:"resize",axes:(he?"x":"")+(Je?"y":"")})}return!i.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(i){var o=i.edges,p=i.axis,m=i.name,_=Xa.cursors,I=null;if(p)I=_[m+p];else if(o){for(var U="",G=0,pe=["top","bottom","left","right"];G<pe.length;G++){var Ae=pe[G];o[Ae]&&(U+=Ae)}I=_[U]}return I},filterEventType:function(i){return i.search("resize")===0},defaultMargin:null},Ya=Xa,tl={id:"actions",install:function(i){i.usePlugin(Fa),i.usePlugin(Ya),i.usePlugin(me),i.usePlugin(qa)}},Da=0,sa={request:function(i){return aa(i)},cancel:function(i){return Se(i)},init:function(i){if(aa=i.requestAnimationFrame,Se=i.cancelAnimationFrame,!aa)for(var o=["ms","moz","webkit","o"],p=0;p<o.length;p++){var m=o[p];aa=i["".concat(m,"RequestAnimationFrame")],Se=i["".concat(m,"CancelAnimationFrame")]||i["".concat(m,"CancelRequestAnimationFrame")]}aa=aa&&aa.bind(i),Se=Se&&Se.bind(i),aa||(aa=function(_){var I=Date.now(),U=Math.max(0,16-(I-Da)),G=i.setTimeout(function(){_(I+U)},U);return Da=I+U,G},Se=function(_){return clearTimeout(_)})}},Z={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(i){Z.isScrolling=!0,sa.cancel(Z.i),i.autoScroll=Z,Z.interaction=i,Z.prevTime=Z.now(),Z.i=sa.request(Z.scroll)},stop:function(){Z.isScrolling=!1,Z.interaction&&(Z.interaction.autoScroll=null),sa.cancel(Z.i)},scroll:function(){var i=Z.interaction,o=i.interactable,p=i.element,m=i.prepared.name,_=o.options[m].autoScroll,I=Ea(_.container,o,p),U=Z.now(),G=(U-Z.prevTime)/1e3,pe=_.speed*G;if(pe>=1){var Ae={x:Z.x*pe,y:Z.y*pe};if(Ae.x||Ae.y){var he=Pa(I);g.window(I)?I.scrollBy(Ae.x,Ae.y):I&&(I.scrollLeft+=Ae.x,I.scrollTop+=Ae.y);var Je=Pa(I),Ba={x:Je.x-he.x,y:Je.y-he.y};(Ba.x||Ba.y)&&o.fire({type:"autoscroll",target:p,interactable:o,delta:Ba,interaction:i,container:I})}Z.prevTime=U}Z.isScrolling&&(sa.cancel(Z.i),Z.i=sa.request(Z.scroll))},check:function(i,o){var p;return(p=i.options[o].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(i){var o=i.interaction,p=i.pointer;if(o.interacting()&&Z.check(o.interactable,o.prepared.name))if(o.simulation)Z.x=Z.y=0;else{var m,_,I,U,G=o.interactable,pe=o.element,Ae=o.prepared.name,he=G.options[Ae].autoScroll,Je=Ea(he.container,G,pe);if(g.window(Je))U=p.clientX<Z.margin,m=p.clientY<Z.margin,_=p.clientX>Je.innerWidth-Z.margin,I=p.clientY>Je.innerHeight-Z.margin;else{var Ba=we(Je);U=p.clientX<Ba.left+Z.margin,m=p.clientY<Ba.top+Z.margin,_=p.clientX>Ba.right-Z.margin,I=p.clientY>Ba.bottom-Z.margin}Z.x=_?1:U?-1:0,Z.y=I?1:m?-1:0,Z.isScrolling||(Z.margin=he.margin,Z.speed=he.speed,Z.start(o))}}};function Ea(i,o,p){return(g.string(i)?ea(i,o,p):i)||$(p)}function Pa(i){return g.window(i)&&(i=window.document.body),{x:i.scrollLeft,y:i.scrollTop}}var ul={id:"auto-scroll",install:function(i){var o=i.defaults,p=i.actions;i.autoScroll=Z,Z.now=function(){return i.now()},p.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=Z.defaults},listeners:{"interactions:new":function(i){i.interaction.autoScroll=null},"interactions:destroy":function(i){i.interaction.autoScroll=null,Z.stop(),Z.interaction&&(Z.interaction=null)},"interactions:stop":Z.stop,"interactions:action-move":function(i){return Z.onInteractionMove(i)}}},ol=ul;function xa(i,o){var p=!1;return function(){return p||(ee.console.warn(o),p=!0),i.apply(this,arguments)}}function pa(i,o){return i.name=o.name,i.axis=o.axis,i.edges=o.edges,i}function Aa(i){return g.bool(i)?(this.options.styleCursor=i,this):i===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Ze(i){return g.func(i)?(this.options.actionChecker=i,this):i===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ha={id:"auto-start/interactableMethods",install:function(i){var o=i.Interactable;o.prototype.getAction=function(p,m,_,I){var U=function(G,pe,Ae,he,Je){var Ba=G.getRect(he),ll=pe.buttons||{0:1,1:4,3:8,4:16}[pe.button],Za={action:null,interactable:G,interaction:Ae,element:he,rect:Ba,buttons:ll};return Je.fire("auto-start:check",Za),Za.action}(this,m,_,I,i);return this.options.actionChecker?this.options.actionChecker(p,m,U,this,I,_):U},o.prototype.ignoreFrom=xa(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=xa(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=Ze,o.prototype.styleCursor=Aa}};function La(i,o,p,m,_){return o.testIgnoreAllow(o.options[i.name],p,m)&&o.options[i.name].enabled&&Sl(o,p,i,_)?i:null}function Ja(i,o,p,m,_,I,U){for(var G=0,pe=m.length;G<pe;G++){var Ae=m[G],he=_[G],Je=Ae.getAction(o,p,i,he);if(Je){var Ba=La(Je,Ae,he,I,U);if(Ba)return{action:Ba,interactable:Ae,element:he}}}return{action:null,interactable:null,element:null}}function Ol(i,o,p,m,_){var I=[],U=[],G=m;function pe(he){I.push(he),U.push(G)}for(;g.element(G);){I=[],U=[],_.interactables.forEachMatch(G,pe);var Ae=Ja(i,o,p,I,U,m,_);if(Ae.action&&!Ae.interactable.options[Ae.action.name].manualStart)return Ae;G=wa(G)}return{action:null,interactable:null,element:null}}function El(i,o,p){var m=o.action,_=o.interactable,I=o.element;m=m||{name:null},i.interactable=_,i.element=I,pa(i.prepared,m),i.rect=_&&m.name?_.getRect(I):null,cl(i,p),p.fire("autoStart:prepared",{interaction:i})}function Sl(i,o,p,m){var _=i.options,I=_[p.name].max,U=_[p.name].maxPerElement,G=m.autoStart.maxInteractions,pe=0,Ae=0,he=0;if(!(I&&U&&G))return!1;for(var Je=0,Ba=m.interactions.list;Je<Ba.length;Je++){var ll=Ba[Je],Za=ll.prepared.name;if(ll.interacting()&&(++pe>=G||ll.interactable===i&&((Ae+=Za===p.name?1:0)>=I||ll.element===o&&(he++,Za===p.name&&he>=U))))return!1}return G>0}function wl(i,o){return g.number(i)?(o.autoStart.maxInteractions=i,this):o.autoStart.maxInteractions}function fl(i,o,p){var m=p.autoStart.cursorElement;m&&m!==i&&(m.style.cursor=""),i.ownerDocument.documentElement.style.cursor=o,i.style.cursor=o,p.autoStart.cursorElement=o?i:null}function cl(i,o){var p=i.interactable,m=i.element,_=i.prepared;if(i.pointerType==="mouse"&&p&&p.options.styleCursor){var I="";if(_.name){var U=p.options[_.name].cursorChecker;I=g.func(U)?U(_,p,m,i._interacting):o.actions.map[_.name].getCursor(_)}fl(i.element,I||"",o)}else o.autoStart.cursorElement&&fl(o.autoStart.cursorElement,"",o)}var kl={id:"auto-start/base",before:["actions"],install:function(i){var o=i.interactStatic,p=i.defaults;i.usePlugin(ha),p.base.actionChecker=null,p.base.styleCursor=!0,ae(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(m){return wl(m,i)},i.autoStart={maxInteractions:1/0,withinInteractionLimit:Sl,cursorElement:null}},listeners:{"interactions:down":function(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget;p.interacting()||El(p,Ol(p,m,_,I,o),o)},"interactions:move":function(i,o){(function(p,m){var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||El(_,Ol(_,I,U,G,m),m)})(i,o),function(p,m){var _=p.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){m.fire("autoStart:before-start",p);var I=_.interactable,U=_.prepared.name;U&&I&&(I.options[U].manualStart||!Sl(I,_.element,_.prepared,m)?_.stop():(_.start(_.prepared,I,_.element),cl(_,m)))}}(i,o)},"interactions:stop":function(i,o){var p=i.interaction,m=p.interactable;m&&m.options.styleCursor&&fl(p.element,"",o)}},maxInteractions:wl,withinInteractionLimit:Sl,validateAction:La},Dl=kl,$l={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(i,o){var p=i.interaction,m=i.eventTarget,_=i.dx,I=i.dy;if(p.prepared.name==="drag"){var U=Math.abs(_),G=Math.abs(I),pe=p.interactable.options.drag,Ae=pe.startAxis,he=U>G?"x":U<G?"y":"xy";if(p.prepared.axis=pe.lockAxis==="start"?he[0]:pe.lockAxis,he!=="xy"&&Ae!=="xy"&&Ae!==he){p.prepared.name=null;for(var Je=m,Ba=function(Za){if(Za!==p.interactable){var il=p.interactable.options.drag;if(!il.manualStart&&Za.testIgnoreAllow(il,Je,m)){var xl=Za.getAction(p.downPointer,p.downEvent,p,Je);if(xl&&xl.name==="drag"&&function(sl,Al){if(!Al)return!1;var Vl=Al.options.drag.startAxis;return sl==="xy"||Vl==="xy"||Vl===sl}(he,Za)&&Dl.validateAction(xl,Za,Je,m,o))return Za}}};g.element(Je);){var ll=o.interactables.forEachMatch(Je,Ba);if(ll){p.prepared.name="drag",p.interactable=ll,p.element=Je;break}Je=wa(Je)}}}}}};function or(i){var o=i.prepared&&i.prepared.name;if(!o)return null;var p=i.interactable.options;return p[o].hold||p[o].delay}var Cr={id:"auto-start/hold",install:function(i){var o=i.defaults;i.usePlugin(Dl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(i){i.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(i){var o=i.interaction,p=or(o);p>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},p))},"interactions:move":function(i){var o=i.interaction,p=i.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!p&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(i){var o=i.interaction;or(o)>0&&(o.prepared.name=null)}},getHoldDuration:or},Gr=Cr,Xr={id:"auto-start",install:function(i){i.usePlugin(Dl),i.usePlugin(Gr),i.usePlugin($l)}},Rr=function(i){return/^(always|never|auto)$/.test(i)?(this.options.preventDefault=i,this):g.bool(i)?(this.options.preventDefault=i?"always":"never",this):this.options.preventDefault};function nn(i){var o=i.interaction,p=i.event;o.interactable&&o.interactable.checkAndPreventDefault(p)}var qr={id:"core/interactablePreventDefault",install:function(i){var o=i.Interactable;o.prototype.preventDefault=Rr,o.prototype.checkAndPreventDefault=function(p){return function(m,_,I){var U=m.options.preventDefault;if(U!=="never")if(U!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(I.type)){var G=$(I.target).document,pe=_.getDocOptions(G);if(!pe||!pe.events||pe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(I.type)||g.element(I.target)&&oe(I.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||I.preventDefault()}else I.preventDefault()}(this,i,p)},i.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var m=0,_=i.interactions.list;m<_.length;m++){var I=_[m];if(I.element&&(I.element===p.target||de(I.element,p.target)))return void I.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce(function(i,o){return i["interactions:".concat(o)]=nn,i},{})};function rr(i,o){if(o.phaselessTypes[i])return!0;for(var p in o.map)if(i.indexOf(p)===0&&i.substr(p.length)in o.phases)return!0;return!1}function Nr(i){var o={};for(var p in i){var m=i[p];g.plainObject(m)?o[p]=Nr(m):g.array(m)?o[p]=ga(m):o[p]=m}return o}var Fr=function(){function i(o){d(this,i),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=o,this.result=_n(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(i,[{key:"start",value:function(o,p){var m,_,I=o.phase,U=this.interaction,G=function(Ae){var he=Ae.interactable.options[Ae.prepared.name],Je=he.modifiers;return Je&&Je.length?Je:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ba){var ll=he[Ba];return ll&&ll.enabled&&{options:ll,methods:ll._methods}}).filter(function(Ba){return!!Ba})}(U);this.prepareStates(G),this.startEdges=ae({},U.edges),this.edges=ae({},this.startEdges),this.startOffset=(m=U.rect,_=p,m?{left:_.x-m.left,top:_.y-m.top,right:m.right-_.x,bottom:m.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var pe=this.fillArg({phase:I,pageCoords:p,preEnd:!1});return this.result=_n(),this.startAll(pe),this.result=this.setAll(pe)}},{key:"fillArg",value:function(o){var p=this.interaction;return o.interaction=p,o.interactable=p.interactable,o.element=p.element,o.rect||(o.rect=p.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var p=0,m=this.states;p<m.length;p++){var _=m[p];_.methods.start&&(o.state=_,_.methods.start(o))}}},{key:"setAll",value:function(o){var p=o.phase,m=o.preEnd,_=o.skipModifiers,I=o.rect,U=o.edges;o.coords=ae({},o.pageCoords),o.rect=ae({},I),o.edges=ae({},U);for(var G=_?this.states.slice(_):this.states,pe=_n(o.coords,o.rect),Ae=0;Ae<G.length;Ae++){var he,Je=G[Ae],Ba=Je.options,ll=ae({},o.coords),Za=null;(he=Je.methods)!=null&&he.set&&this.shouldDo(Ba,m,p)&&(o.state=Je,Za=Je.methods.set(o),Ee(o.edges,o.rect,{x:o.coords.x-ll.x,y:o.coords.y-ll.y})),pe.eventProps.push(Za)}ae(this.edges,o.edges),pe.delta.x=o.coords.x-o.pageCoords.x,pe.delta.y=o.coords.y-o.pageCoords.y,pe.rectDelta.left=o.rect.left-I.left,pe.rectDelta.right=o.rect.right-I.right,pe.rectDelta.top=o.rect.top-I.top,pe.rectDelta.bottom=o.rect.bottom-I.bottom;var il=this.result.coords,xl=this.result.rect;if(il&&xl){var sl=pe.rect.left!==xl.left||pe.rect.right!==xl.right||pe.rect.top!==xl.top||pe.rect.bottom!==xl.bottom;pe.changed=sl||il.x!==pe.coords.x||il.y!==pe.coords.y}return pe}},{key:"applyToInteraction",value:function(o){var p=this.interaction,m=o.phase,_=p.coords.cur,I=p.coords.start,U=this.result,G=this.startDelta,pe=U.delta;m==="start"&&ae(this.startDelta,U.delta);for(var Ae=0,he=[[I,G],[_,pe]];Ae<he.length;Ae++){var Je=he[Ae],Ba=Je[0],ll=Je[1];Ba.page.x+=ll.x,Ba.page.y+=ll.y,Ba.client.x+=ll.x,Ba.client.y+=ll.y}var Za=this.result.rectDelta,il=o.rect||p.rect;il.left+=Za.left,il.right+=Za.right,il.top+=Za.top,il.bottom+=Za.bottom,il.width=il.right-il.left,il.height=il.bottom-il.top}},{key:"setAndApply",value:function(o){var p=this.interaction,m=o.phase,_=o.preEnd,I=o.skipModifiers,U=this.setAll(this.fillArg({preEnd:_,phase:m,pageCoords:o.modifiedCoords||p.coords.cur.page}));if(this.result=U,!U.changed&&(!I||I<this.states.length)&&p.interacting())return!1;if(o.modifiedCoords){var G=p.coords.cur.page,pe={x:o.modifiedCoords.x-G.x,y:o.modifiedCoords.y-G.y};U.coords.x+=pe.x,U.coords.y+=pe.y,U.delta.x+=pe.x,U.delta.y+=pe.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var p=o.interaction,m=o.event,_=this.states;if(_&&_.length){for(var I=!1,U=0;U<_.length;U++){var G=_[U];o.state=G;var pe=G.options,Ae=G.methods,he=Ae.beforeEnd&&Ae.beforeEnd(o);if(he)return this.endResult=he,!1;I=I||!I&&this.shouldDo(pe,!0,o.phase,!0)}I&&p.move({event:m,preEnd:!0})}}},{key:"stop",value:function(o){var p=o.interaction;if(this.states&&this.states.length){var m=ae({states:this.states,interactable:p.interactable,element:p.element,rect:null},o);this.fillArg(m);for(var _=0,I=this.states;_<I.length;_++){var U=I[_];m.state=U,U.methods.stop&&U.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var p=0;p<o.length;p++){var m=o[p],_=m.options,I=m.methods,U=m.name;this.states.push({options:_,methods:I,index:p,name:U})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var p=o.interaction,m=p.coords,_=p.rect,I=p.modification;if(I.result){for(var U=I.startDelta,G=I.result,pe=G.delta,Ae=G.rectDelta,he=0,Je=[[m.start,U],[m.cur,pe]];he<Je.length;he++){var Ba=Je[he],ll=Ba[0],Za=Ba[1];ll.page.x-=Za.x,ll.page.y-=Za.y,ll.client.x-=Za.x,ll.client.y-=Za.y}_.left-=Ae.left,_.right-=Ae.right,_.top-=Ae.top,_.bottom-=Ae.bottom}}},{key:"shouldDo",value:function(o,p,m,_){return!(!o||o.enabled===!1||_&&!o.endOnly||o.endOnly&&!p||m==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(p){return Nr(p)}),this.result=_n(ae({},o.result.coords),ae({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),i}();function _n(i,o){return{rect:o,coords:i,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Ar(i,o){var p=i.defaults,m={start:i.start,set:i.set,beforeEnd:i.beforeEnd,stop:i.stop},_=function(I){var U=I||{};for(var G in U.enabled=U.enabled!==!1,p)G in U||(U[G]=p[G]);var pe={options:U,methods:m,name:o,enable:function(){return U.enabled=!0,pe},disable:function(){return U.enabled=!1,pe}};return pe};return o&&typeof o=="string"&&(_._defaults=p,_._methods=m),_}function hn(i){var o=i.iEvent,p=i.interaction.modification.result;p&&(o.modifiers=p.eventProps)}var $r={id:"modifiers/base",before:["actions"],install:function(i){i.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(i){var o=i.interaction;o.modification=new Fr(o)},"interactions:before-action-start":function(i){var o=i.interaction,p=i.interaction.modification;p.start(i,o.coords.start.page),o.edges=p.edges,p.applyToInteraction(i)},"interactions:before-action-move":function(i){var o=i.interaction,p=o.modification,m=p.setAndApply(i);return o.edges=p.edges,m},"interactions:before-action-end":function(i){var o=i.interaction,p=o.modification,m=p.beforeEnd(i);return o.edges=p.startEdges,m},"interactions:action-start":hn,"interactions:action-move":hn,"interactions:action-end":hn,"interactions:after-action-start":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-move":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:stop":function(i){return i.interaction.modification.stop(i)}}},ir=$r,Pn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},tn=function(i){y(p,i);var o=L(p);function p(m,_,I,U,G,pe,Ae){var he;d(this,p),(he=o.call(this,m)).relatedTarget=null,he.screenX=void 0,he.screenY=void 0,he.button=void 0,he.buttons=void 0,he.ctrlKey=void 0,he.shiftKey=void 0,he.altKey=void 0,he.metaKey=void 0,he.page=void 0,he.client=void 0,he.delta=void 0,he.rect=void 0,he.x0=void 0,he.y0=void 0,he.t0=void 0,he.dt=void 0,he.duration=void 0,he.clientX0=void 0,he.clientY0=void 0,he.velocity=void 0,he.speed=void 0,he.swipe=void 0,he.axes=void 0,he.preEnd=void 0,G=G||m.element;var Je=m.interactable,Ba=(Je&&Je.options||Pn).deltaSource,ll=Le(Je,G,I),Za=U==="start",il=U==="end",xl=Za?M(he):m.prevEvent,sl=Za?m.coords.start:il?{page:xl.page,client:xl.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return he.page=ae({},sl.page),he.client=ae({},sl.client),he.rect=ae({},m.rect),he.timeStamp=sl.timeStamp,il||(he.page.x-=ll.x,he.page.y-=ll.y,he.client.x-=ll.x,he.client.y-=ll.y),he.ctrlKey=_.ctrlKey,he.altKey=_.altKey,he.shiftKey=_.shiftKey,he.metaKey=_.metaKey,he.button=_.button,he.buttons=_.buttons,he.target=G,he.currentTarget=G,he.preEnd=pe,he.type=Ae||I+(U||""),he.interactable=Je,he.t0=Za?m.pointers[m.pointers.length-1].downTime:xl.t0,he.x0=m.coords.start.page.x-ll.x,he.y0=m.coords.start.page.y-ll.y,he.clientX0=m.coords.start.client.x-ll.x,he.clientY0=m.coords.start.client.y-ll.y,he.delta=Za||il?{x:0,y:0}:{x:he[Ba].x-xl[Ba].x,y:he[Ba].y-xl[Ba].y},he.dt=m.coords.delta.timeStamp,he.duration=he.timeStamp-he.t0,he.velocity=ae({},m.coords.velocity[Ba]),he.speed=Oa(he.velocity.x,he.velocity.y),he.swipe=il||U==="inertiastart"?he.getSwipe():null,he}return h(p,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var I=112.5<=_&&_<247.5,U=202.5<=_&&_<337.5;return{up:U,down:!U&&22.5<=_&&_<157.5,left:I,right:!I&&(292.5<=_||_<67.5),angle:_,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(fa);Object.defineProperties(tn.prototype,{pageX:{get:function(){return this.page.x},set:function(i){this.page.x=i}},pageY:{get:function(){return this.page.y},set:function(i){this.page.y=i}},clientX:{get:function(){return this.client.x},set:function(i){this.client.x=i}},clientY:{get:function(){return this.client.y},set:function(i){this.client.y=i}},dx:{get:function(){return this.delta.x},set:function(i){this.delta.x=i}},dy:{get:function(){return this.delta.y},set:function(i){this.delta.y=i}},velocityX:{get:function(){return this.velocity.x},set:function(i){this.velocity.x=i}},velocityY:{get:function(){return this.velocity.y},set:function(i){this.velocity.y=i}}});var vn=h(function i(o,p,m,_,I){d(this,i),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=o,this.pointer=p,this.event=m,this.downTime=_,this.downTarget=I}),rt=function(i){return i.interactable="",i.element="",i.prepared="",i.pointerIsDown="",i.pointerWasMoved="",i._proxy="",i}({}),Fn=function(i){return i.start="",i.move="",i.end="",i.stop="",i.interacting="",i}({}),An=0,mn=function(){function i(o){var p=this,m=o.pointerType,_=o.scopeFire;d(this,i),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=xa(function(he){this.move(he)},"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=m;var I=this;this._proxy={};var U=function(he){Object.defineProperty(p._proxy,he,{get:function(){return I[he]}})};for(var G in rt)U(G);var pe=function(he){Object.defineProperty(p._proxy,he,{value:function(){return I[he].apply(I,arguments)}})};for(var Ae in Fn)pe(Ae);this._scopeFire("interactions:new",{interaction:this})}return h(i,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,p,m){var _=this.updatePointer(o,p,m,!0),I=this.pointers[_];this._scopeFire("interactions:down",{pointer:o,event:p,eventTarget:m,pointerIndex:_,pointerInfo:I,type:"down",interaction:this})}},{key:"start",value:function(o,p,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!p.options[o.name].enabled)&&(pa(this.prepared,o),this.interactable=p,this.element=m,this.rect=p.getRect(m),this.edges=this.prepared.edges?ae({},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(o,p,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,p,m,!1);var _,I,U=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,I=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Oa(_,I)>this.pointerMoveTolerance);var G,pe,Ae,he=this.getPointerIndex(o),Je={pointer:o,pointerIndex:he,pointerInfo:this.pointers[he],event:p,type:"move",eventTarget:m,dx:_,dy:I,duplicate:U,interaction:this};U||(G=this.coords.velocity,pe=this.coords.delta,Ae=Math.max(pe.timeStamp/1e3,.001),G.page.x=pe.page.x/Ae,G.page.y=pe.page.y/Ae,G.client.x=pe.client.x/Ae,G.client.y=pe.client.y/Ae,G.timeStamp=Ae),this._scopeFire("interactions:move",Je),U||this.simulation||(this.interacting()&&(Je.type=null,this.move(Je)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||R(this.coords.delta),(o=ae({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,p,m,_){var I=this.getPointerIndex(o);I===-1&&(I=this.updatePointer(o,p,m,!1));var U=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(U),{pointer:o,pointerIndex:I,pointerInfo:this.pointers[I],event:p,eventTarget:m,type:U,curEventTarget:_,interaction:this}),this.simulation||this.end(p),this.removePointer(o,p)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var p;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:o,interaction:this,phase:"end"})),this._ending=!1,p===!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(o){var p=Ce(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:fe(this.pointers,function(m){return m.id===p})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,p,m,_){var I,U,G,pe=Ce(o),Ae=this.getPointerIndex(o),he=this.pointers[Ae];return _=_!==!1&&(_||/(down|start)$/i.test(p.type)),he?he.pointer=o:(he=new vn(pe,o,p,null,null),Ae=this.pointers.length,this.pointers.push(he)),K(this.coords.cur,this.pointers.map(function(Je){return Je.pointer}),this._now()),I=this.coords.delta,U=this.coords.prev,G=this.coords.cur,I.page.x=G.page.x-U.page.x,I.page.y=G.page.y-U.page.y,I.client.x=G.client.x-U.client.x,I.client.y=G.client.y-U.client.y,I.timeStamp=G.timeStamp-U.timeStamp,_&&(this.pointerIsDown=!0,he.downTime=this.coords.cur.timeStamp,he.downTarget=m,F(this.downPointer,o),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(o,p,m),this._scopeFire("interactions:update-pointer",{pointer:o,event:p,eventTarget:m,down:_,pointerInfo:he,pointerIndex:Ae,interaction:this}),Ae}},{key:"removePointer",value:function(o,p){var m=this.getPointerIndex(o);if(m!==-1){var _=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:o,event:p,eventTarget:null,pointerIndex:m,pointerInfo:_,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,p,m){this._latestPointer.pointer=o,this._latestPointer.event=p,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,p,m,_){return new tn(this,o,this.prepared.name,p,this.element,m,_)}},{key:"_fireEvent",value:function(o){var p;(p=this.interactable)==null||p.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var p=o.event,m=o.phase,_=o.preEnd,I=o.type,U=this.rect;if(U&&m==="move"&&(Ee(this.edges,U,this.coords.delta[this.interactable.options.deltaSource]),U.width=U.right-U.left,U.height=U.bottom-U.top),this._scopeFire("interactions:before-action-".concat(m),o)===!1)return!1;var G=o.iEvent=this._createPreparedEvent(p,m,_,I);return this._scopeFire("interactions:action-".concat(m),o),m==="start"&&(this.prevEvent=G),this._fireEvent(G),this._scopeFire("interactions:after-action-".concat(m),o),!0}},{key:"_now",value:function(){return Date.now()}}]),i}();function Zl(i){xr(i.interaction)}function xr(i){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(i))return!1;var o=i.offset.pending;return ql(i.coords.cur,o),ql(i.coords.delta,o),Ee(i.edges,i.rect,o),o.x=0,o.y=0,!0}function Fl(i){var o=i.x,p=i.y;this.offset.pending.x+=o,this.offset.pending.y+=p,this.offset.total.x+=o,this.offset.total.y+=p}function ql(i,o){var p=i.page,m=i.client,_=o.x,I=o.y;p.x+=_,p.y+=I,m.x+=_,m.y+=I}Fn.offsetBy="";var Ll={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(i){i.Interaction.prototype.offsetBy=Fl},listeners:{"interactions:new":function(i){i.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(i){return function(o){o.pointerIsDown&&(ql(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(i.interaction)},"interactions:before-action-start":Zl,"interactions:before-action-move":Zl,"interactions:before-action-end":function(i){var o=i.interaction;if(xr(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(i){var o=i.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},dr=Ll,ar=function(){function i(o){d(this,i),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=o}return h(i,[{key:"start",value:function(o){var p=this.interaction,m=Hl(p);if(!m||!m.enabled)return!1;var _=p.coords.velocity.client,I=Oa(_.x,_.y),U=this.modification||(this.modification=new Fr(p));if(U.copyFrom(p.modification),this.t0=p._now(),this.allowResume=m.allowResume,this.v0=I,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=U.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&I>m.minSpeed&&I>m.endSpeed)this.startInertia();else{if(U.result=U.setAll(this.modifierArg),!U.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:o,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var o=this,p=this.interaction.coords.velocity.client,m=Hl(this.interaction),_=m.resistance,I=-Math.log(m.endSpeed/this.v0)/_;this.targetOffset={x:(p.x-I)/_,y:(p.y-I)/_},this.te=I,this.lambda_v0=_/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var U=this.modification,G=this.modifierArg;G.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},U.result=U.setAll(G),U.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+U.result.delta.x,y:this.targetOffset.y+U.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var p=this;this.timeout=sa.request(function(){p.active&&o()})}},{key:"inertiaTick",value:function(){var o,p,m,_,I,U,G,pe=this,Ae=this.interaction,he=Hl(Ae).resistance,Je=(Ae._now()-this.t0)/1e3;if(Je<this.te){var Ba,ll=1-(Math.exp(-he*Je)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,p=0,m=this.targetOffset.x,_=this.targetOffset.y,I=this.modifiedOffset.x,U=this.modifiedOffset.y,Ba={x:Mr(G=ll,o,m,I),y:Mr(G,p,_,U)}):Ba={x:this.targetOffset.x*ll,y:this.targetOffset.y*ll};var Za={x:Ba.x-this.currentOffset.x,y:Ba.y-this.currentOffset.y};this.currentOffset.x+=Za.x,this.currentOffset.y+=Za.y,Ae.offsetBy(Za),Ae.move(),this.onNextFrame(function(){return pe.inertiaTick()})}else Ae.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,p=this.interaction,m=p._now()-this.t0,_=Hl(p).smoothEndDuration;if(m<_){var I={x:yn(m,0,this.targetOffset.x,_),y:yn(m,0,this.targetOffset.y,_)},U={x:I.x-this.currentOffset.x,y:I.y-this.currentOffset.y};this.currentOffset.x+=U.x,this.currentOffset.y+=U.y,p.offsetBy(U),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var p=o.pointer,m=o.event,_=o.eventTarget,I=this.interaction;I.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),I.updatePointer(p,m,_,!0),I._doPhase({interaction:I,event:m,phase:"resume"}),X(I.coords.prev,I.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,sa.cancel(this.timeout)}}]),i}();function Hl(i){var o=i.interactable,p=i.prepared;return o&&o.options&&p.name&&o.options[p.name].inertia}var Tr={id:"inertia",before:["modifiers","actions"],install:function(i){var o=i.defaults;i.usePlugin(dr),i.usePlugin(ir),i.actions.phases.inertiastart=!0,i.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(i){var o=i.interaction;o.inertia=new ar(o)},"interactions:before-action-end":function(i){var o=i.interaction,p=i.event;return(!o._interacting||o.simulation||!o.inertia.start(p))&&null},"interactions:down":function(i){var o=i.interaction,p=i.eventTarget,m=o.inertia;if(m.active)for(var _=p;g.element(_);){if(_===o.element){m.resume(i);break}_=wa(_)}},"interactions:stop":function(i){var o=i.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(i){var o=i.interaction.modification;o.stop(i),o.start(i,i.interaction.coords.cur.page),o.applyToInteraction(i)},"interactions:before-action-inertiastart":function(i){return i.interaction.modification.setAndApply(i)},"interactions:action-resume":hn,"interactions:action-inertiastart":hn,"interactions:after-action-inertiastart":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-resume":function(i){return i.interaction.modification.restoreInteractionCoords(i)}}};function Mr(i,o,p,m){var _=1-i;return _*_*o+2*_*i*p+i*i*m}function yn(i,o,p,m){return-p*(i/=m)*(i-2)+o}var wn=Tr;function dn(i,o){for(var p=0;p<o.length;p++){var m=o[p];if(i.immediatePropagationStopped)break;m(i)}}var jn=function(){function i(o){d(this,i),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ae({},o||{})}return h(i,[{key:"fire",value:function(o){var p,m=this.global;(p=this.types[o.type])&&dn(o,p),!o.propagationStopped&&m&&(p=m[o.type])&&dn(o,p)}},{key:"on",value:function(o,p){var m=We(o,p);for(o in m)this.types[o]=Ue(this.types[o]||[],m[o])}},{key:"off",value:function(o,p){var m=We(o,p);for(o in m){var _=this.types[o];if(_&&_.length)for(var I=0,U=m[o];I<U.length;I++){var G=U[I],pe=_.indexOf(G);pe!==-1&&_.splice(pe,1)}}}},{key:"getRect",value:function(o){return null}}]),i}(),Mn=function(){function i(o){d(this,i),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,F(this,o)}return h(i,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),i}();function pn(i){return g.object(i)?{capture:!!i.capture,passive:!!i.passive}:{capture:!!i,passive:!1}}function Cn(i,o){return i===o||(typeof i=="boolean"?!!o.capture===i&&!o.passive:!!i.capture==!!o.capture&&!!i.passive==!!o.passive)}var zn={id:"events",install:function(i){var o,p=[],m={},_=[],I={add:U,remove:G,addDelegate:function(he,Je,Ba,ll,Za){var il=pn(Za);if(!m[Ba]){m[Ba]=[];for(var xl=0;xl<_.length;xl++){var sl=_[xl];U(sl,Ba,pe),U(sl,Ba,Ae,!0)}}var Al=m[Ba],Vl=ka(Al,function(Wl){return Wl.selector===he&&Wl.context===Je});Vl||(Vl={selector:he,context:Je,listeners:[]},Al.push(Vl)),Vl.listeners.push({func:ll,options:il})},removeDelegate:function(he,Je,Ba,ll,Za){var il,xl=pn(Za),sl=m[Ba],Al=!1;if(sl)for(il=sl.length-1;il>=0;il--){var Vl=sl[il];if(Vl.selector===he&&Vl.context===Je){for(var Wl=Vl.listeners,Tl=Wl.length-1;Tl>=0;Tl--){var Ul=Wl[Tl];if(Ul.func===ll&&Cn(Ul.options,xl)){Wl.splice(Tl,1),Wl.length||(sl.splice(il,1),G(Je,Ba,pe),G(Je,Ba,Ae,!0)),Al=!0;break}}if(Al)break}}},delegateListener:pe,delegateUseCapture:Ae,delegatedEvents:m,documents:_,targets:p,supportsOptions:!1,supportsPassive:!1};function U(he,Je,Ba,ll){if(he.addEventListener){var Za=pn(ll),il=ka(p,function(xl){return xl.eventTarget===he});il||(il={eventTarget:he,events:{}},p.push(il)),il.events[Je]||(il.events[Je]=[]),ka(il.events[Je],function(xl){return xl.func===Ba&&Cn(xl.options,Za)})||(he.addEventListener(Je,Ba,I.supportsOptions?Za:Za.capture),il.events[Je].push({func:Ba,options:Za}))}}function G(he,Je,Ba,ll){if(he.addEventListener&&he.removeEventListener){var Za=fe(p,function(Or){return Or.eventTarget===he}),il=p[Za];if(il&&il.events)if(Je!=="all"){var xl=!1,sl=il.events[Je];if(sl){if(Ba==="all"){for(var Al=sl.length-1;Al>=0;Al--){var Vl=sl[Al];G(he,Je,Vl.func,Vl.options)}return}for(var Wl=pn(ll),Tl=0;Tl<sl.length;Tl++){var Ul=sl[Tl];if(Ul.func===Ba&&Cn(Ul.options,Wl)){he.removeEventListener(Je,Ba,I.supportsOptions?Wl:Wl.capture),sl.splice(Tl,1),sl.length===0&&(delete il.events[Je],xl=!0);break}}}xl&&!Object.keys(il.events).length&&p.splice(Za,1)}else for(Je in il.events)il.events.hasOwnProperty(Je)&&G(he,Je,"all")}}function pe(he,Je){for(var Ba=pn(Je),ll=new Mn(he),Za=m[he.type],il=Te(he)[0],xl=il;g.element(xl);){for(var sl=0;sl<Za.length;sl++){var Al=Za[sl],Vl=Al.selector,Wl=Al.context;if(oe(xl,Vl)&&de(Wl,il)&&de(Wl,xl)){var Tl=Al.listeners;ll.currentTarget=xl;for(var Ul=0;Ul<Tl.length;Ul++){var Or=Tl[Ul];Cn(Or.options,Ba)&&Or.func(ll)}}}xl=wa(xl)}}function Ae(he){return pe(he,!0)}return(o=i.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return I.supportsOptions=!0},get passive(){return I.supportsPassive=!0}}),i.events=I,I}},Kr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(i){for(var o=0,p=Kr.methodOrder;o<p.length;o++){var m=p[o],_=Kr[m](i);if(_)return _}return null},simulationResume:function(i){var o=i.pointerType,p=i.eventType,m=i.eventTarget,_=i.scope;if(!/down|start/i.test(p))return null;for(var I=0,U=_.interactions.list;I<U.length;I++){var G=U[I],pe=m;if(G.simulation&&G.simulation.allowResume&&G.pointerType===o)for(;pe;){if(pe===G.element)return G;pe=wa(pe)}}return null},mouseOrPen:function(i){var o,p=i.pointerId,m=i.pointerType,_=i.eventType,I=i.scope;if(m!=="mouse"&&m!=="pen")return null;for(var U=0,G=I.interactions.list;U<G.length;U++){var pe=G[U];if(pe.pointerType===m){if(pe.simulation&&!En(pe,p))continue;if(pe.interacting())return pe;o||(o=pe)}}if(o)return o;for(var Ae=0,he=I.interactions.list;Ae<he.length;Ae++){var Je=he[Ae];if(!(Je.pointerType!==m||/down/i.test(_)&&Je.simulation))return Je}return null},hasPointer:function(i){for(var o=i.pointerId,p=0,m=i.scope.interactions.list;p<m.length;p++){var _=m[p];if(En(_,o))return _}return null},idle:function(i){for(var o=i.pointerType,p=0,m=i.scope.interactions.list;p<m.length;p++){var _=m[p];if(_.pointers.length===1){var I=_.interactable;if(I&&(!I.options.gesture||!I.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&o===_.pointerType)return _}return null}};function En(i,o){return i.pointers.some(function(p){return p.id===o})}var Hn=Kr,Sr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Un(i,o){return function(p){var m=o.interactions.list,_=ba(p),I=Te(p),U=I[0],G=I[1],pe=[];if(/^touch/.test(p.type)){o.prevTouchTime=o.now();for(var Ae=0,he=p.changedTouches;Ae<he.length;Ae++){var Je=he[Ae],Ba={pointer:Je,pointerId:Ce(Je),pointerType:_,eventType:p.type,eventTarget:U,curEventTarget:G,scope:o},ll=on(Ba);pe.push([Ba.pointer,Ba.eventTarget,Ba.curEventTarget,ll])}}else{var Za=!1;if(!Q.supportsPointerEvent&&/mouse/.test(p.type)){for(var il=0;il<m.length&&!Za;il++)Za=m[il].pointerType!=="mouse"&&m[il].pointerIsDown;Za=Za||o.now()-o.prevTouchTime<500||p.timeStamp===0}if(!Za){var xl={pointer:p,pointerId:Ce(p),pointerType:_,eventType:p.type,curEventTarget:G,eventTarget:U,scope:o},sl=on(xl);pe.push([xl.pointer,xl.eventTarget,xl.curEventTarget,sl])}}for(var Al=0;Al<pe.length;Al++){var Vl=pe[Al],Wl=Vl[0],Tl=Vl[1],Ul=Vl[2];Vl[3][i](Wl,p,Tl,Ul)}}}function on(i){var o=i.pointerType,p=i.scope,m={interaction:Hn.search(i),searchDetails:i};return p.fire("interactions:find",m),m.interaction||p.interactions.new({pointerType:o})}function St(i,o){var p=i.doc,m=i.scope,_=i.options,I=m.interactions.docEvents,U=m.events,G=U[o];for(var pe in m.browser.isIOS&&!_.events&&(_.events={passive:!1}),U.delegatedEvents)G(p,pe,U.delegateListener),G(p,pe,U.delegateUseCapture,!0);for(var Ae=_&&_.events,he=0;he<I.length;he++){var Je=I[he];G(p,Je.type,Je.listener,Ae)}}var To={id:"core/interactions",install:function(i){for(var o={},p=0;p<Sr.length;p++){var m=Sr[p];o[m]=Un(m,i)}var _,I=Q.pEventTypes;function U(){for(var G=0,pe=i.interactions.list;G<pe.length;G++){var Ae=pe[G];if(Ae.pointerIsDown&&Ae.pointerType==="touch"&&!Ae._interacting)for(var he=function(){var ll=Ba[Je];i.documents.some(function(Za){return de(Za.doc,ll.downTarget)})||Ae.removePointer(ll.pointer,ll.event)},Je=0,Ba=Ae.pointers;Je<Ba.length;Je++)he()}}(_=te.PointerEvent?[{type:I.down,listener:U},{type:I.down,listener:o.pointerDown},{type:I.move,listener:o.pointerMove},{type:I.up,listener:o.pointerUp},{type:I.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:U},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(G){for(var pe=0,Ae=i.interactions.list;pe<Ae.length;pe++)Ae[pe].documentBlur(G)}}),i.prevTouchTime=0,i.Interaction=function(G){y(Ae,G);var pe=L(Ae);function Ae(){return d(this,Ae),pe.apply(this,arguments)}return h(Ae,[{key:"pointerMoveTolerance",get:function(){return i.interactions.pointerMoveTolerance},set:function(he){i.interactions.pointerMoveTolerance=he}},{key:"_now",value:function(){return i.now()}}]),Ae}(mn),i.interactions={list:[],new:function(G){G.scopeFire=function(Ae,he){return i.fire(Ae,he)};var pe=new i.Interaction(G);return i.interactions.list.push(pe),pe},listeners:o,docEvents:_,pointerMoveTolerance:1},i.usePlugin(qr)},listeners:{"scope:add-document":function(i){return St(i,"add")},"scope:remove-document":function(i){return St(i,"remove")},"interactable:unset":function(i,o){for(var p=i.interactable,m=o.interactions.list.length-1;m>=0;m--){var _=o.interactions.list[m];_.interactable===p&&(_.stop(),o.fire("interactions:destroy",{interaction:_}),_.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(m,1))}}},onDocSignal:St,doOnInteractions:Un,methodNames:Sr},Ao=To,gn=function(i){return i[i.On=0]="On",i[i.Off=1]="Off",i}(gn||{}),Mo=function(){function i(o,p,m,_){d(this,i),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=p.actions,this.target=o,this._context=p.context||m,this._win=$(Va(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=_,this.set(p)}return h(i,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,p){return g.func(p.onstart)&&this.on("".concat(o,"start"),p.onstart),g.func(p.onmove)&&this.on("".concat(o,"move"),p.onmove),g.func(p.onend)&&this.on("".concat(o,"end"),p.onend),g.func(p.oninertiastart)&&this.on("".concat(o,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,p,m){var _,I=this,U=(_=this._actions.map[o])==null?void 0:_.filterEventType,G=function(pe){return(U==null||U(pe))&&rr(pe,I._actions)};(g.array(p)||g.object(p))&&this._onOff(gn.Off,o,p,void 0,G),(g.array(m)||g.object(m))&&this._onOff(gn.On,o,m,void 0,G)}},{key:"setPerAction",value:function(o,p){var m=this._defaults;for(var _ in p){var I=_,U=this.options[o],G=p[I];I==="listeners"&&this.updatePerActionListeners(o,U.listeners,G),g.array(G)?U[I]=ga(G):g.plainObject(G)?(U[I]=ae(U[I]||{},Nr(G)),g.object(m.perAction[I])&&"enabled"in m.perAction[I]&&(U[I].enabled=G.enabled!==!1)):g.bool(G)&&g.object(m.perAction[I])?U[I].enabled=G:U[I]=G}}},{key:"getRect",value:function(o){return o=o||(g.element(this.target)?this.target:null),g.string(this.target)&&(o=o||this._context.querySelector(this.target)),la(o)}},{key:"rectChecker",value:function(o){var p=this;return g.func(o)?(this.getRect=function(m){var _=ae({},o.apply(p,m));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,p){if(Va(p)||g.object(p)){for(var m in this.options[o]=p,this._actions.map)this.options[m][o]=p;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return g.string(o)?Array.from(this._context.querySelectorAll(o)):g.func(o)&&o.getAllElements?o.getAllElements():g.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||de(this._context,o)}},{key:"testIgnoreAllow",value:function(o,p,m){return!this.testIgnore(o.ignoreFrom,p,m)&&this.testAllow(o.allowFrom,p,m)}},{key:"testAllow",value:function(o,p,m){return!o||!!g.element(m)&&(g.string(o)?ge(m,o,p):!!g.element(o)&&de(o,m))}},{key:"testIgnore",value:function(o,p,m){return!(!o||!g.element(m))&&(g.string(o)?ge(m,o,p):!!g.element(o)&&de(o,m))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,p,m,_,I){g.object(p)&&!g.array(p)&&(_=m,m=null);var U=We(p,m,I);for(var G in U){G==="wheel"&&(G=Q.wheelEvent);for(var pe=0,Ae=U[G];pe<Ae.length;pe++){var he=Ae[pe];rr(G,this._actions)?this.events[o===gn.On?"on":"off"](G,he):g.string(this.target)?this._scopeEvents[o===gn.On?"addDelegate":"removeDelegate"](this.target,this._context,G,he,_):this._scopeEvents[o===gn.On?"add":"remove"](this.target,G,he,_)}}return this}},{key:"on",value:function(o,p,m){return this._onOff(gn.On,o,p,m)}},{key:"off",value:function(o,p,m){return this._onOff(gn.Off,o,p,m)}},{key:"set",value:function(o){var p=this._defaults;for(var m in g.object(o)||(o={}),this.options=Nr(p.base),this._actions.methodDict){var _=m,I=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ae(ae({},p.perAction),p.actions[_])),this[I](o[_])}for(var U in o)U!=="getRect"?g.func(this[U])&&this[U](o[U]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[o],m=p.length-1;m>=0;m--){var _=p[m],I=_.selector,U=_.context,G=_.listeners;I===this.target&&U===this._context&&p.splice(m,1);for(var pe=G.length-1;pe>=0;pe--)this._scopeEvents.removeDelegate(this.target,this._context,o,G[pe][0],G[pe][1])}else this._scopeEvents.remove(this.target,"all")}}]),i}(),zo=function(){function i(o){var p=this;d(this,i),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(m){var _=m.interactable,I=_.target,U=g.string(I)?p.selectorMap[I]:I[p.scope.id],G=fe(U,function(pe){return pe===_});U.splice(G,1)}})}return h(i,[{key:"new",value:function(o,p){p=ae(p||{},{actions:this.scope.actions});var m=new this.scope.Interactable(o,p,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),g.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(m)):(m.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:o,options:p,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(o,p){var m=p&&p.context||this.scope.document,_=g.string(o),I=_?this.selectorMap[o]:o[this.scope.id];if(I)return ka(I,function(U){return U._context===m&&(_||U.inContext(o))})}},{key:"forEachMatch",value:function(o,p){for(var m=0,_=this.list;m<_.length;m++){var I=_[m],U=void 0;if((g.string(I.target)?g.element(o)&&oe(o,I.target):o===I.target)&&I.inContext(o)&&(U=p(I)),U!==void 0)return U}}}]),i}(),Oo=function(){function i(){var o=this;d(this,i),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Q,this.defaults=Nr(Pn),this.Eventable=jn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var _=function I(U,G){var pe=m.interactables.getExisting(U,G);return pe||((pe=m.interactables.new(U,G)).events.global=I.globalEvents),pe};return _.getPointerAverage=Ve,_.getTouchBBox=ra,_.getTouchDistance=va,_.getTouchAngle=$e,_.getElementRect=la,_.getElementClientRect=we,_.matchesSelector=oe,_.closest=Ke,_.globalEvents={},_.version="1.10.27",_.scope=m,_.use=function(I,U){return this.scope.usePlugin(I,U),this},_.isSet=function(I,U){return!!this.scope.interactables.get(I,U&&U.context)},_.on=xa(function(I,U,G){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var pe=0,Ae=I;pe<Ae.length;pe++){var he=Ae[pe];this.on(he,U,G)}return this}if(g.object(I)){for(var Je in I)this.on(Je,I[Je],U);return this}return rr(I,this.scope.actions)?this.globalEvents[I]?this.globalEvents[I].push(U):this.globalEvents[I]=[U]:this.scope.events.add(this.scope.document,I,U,{options:G}),this},"The interact.on() method is being deprecated"),_.off=xa(function(I,U,G){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var pe=0,Ae=I;pe<Ae.length;pe++){var he=Ae[pe];this.off(he,U,G)}return this}if(g.object(I)){for(var Je in I)this.off(Je,I[Je],U);return this}var Ba;return rr(I,this.scope.actions)?I in this.globalEvents&&(Ba=this.globalEvents[I].indexOf(U))!==-1&&this.globalEvents[I].splice(Ba,1):this.scope.events.remove(this.scope.document,I,U,G),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return Q.supportsTouch},_.supportsPointerEvent=function(){return Q.supportsPointerEvent},_.stop=function(){for(var I=0,U=this.scope.interactions.list;I<U.length;I++)U[I].stop();return this},_.pointerMoveTolerance=function(I){return g.number(I)?(this.scope.interactions.pointerMoveTolerance=I,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(I,U){this.scope.addDocument(I,U)},_.removeDocument=function(I){this.scope.removeDocument(I)},_}(this),this.InteractEvent=tn,this.Interactable=void 0,this.interactables=new zo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return o.removeDocument(m.target)};var p=this;this.Interactable=function(m){y(I,m);var _=L(I);function I(){return d(this,I),_.apply(this,arguments)}return h(I,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(U){return x(c(I.prototype),"set",this).call(this,U),p.fire("interactable:set",{options:U,interactable:this}),this}},{key:"unset",value:function(){x(c(I.prototype),"unset",this).call(this);var U=p.interactables.list.indexOf(this);U<0||(p.interactables.list.splice(U,1),p.fire("interactable:unset",{interactable:this}))}}]),I}(Mo)}return h(i,[{key:"addListeners",value:function(o,p){this.listenerMaps.push({id:p,map:o})}},{key:"fire",value:function(o,p){for(var m=0,_=this.listenerMaps;m<_.length;m++){var I=_[m].map[o];if(I&&I(p,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(p,m){return p.isInitialized=!0,g.window(m)&&S(m),te.init(m),Q.init(m),sa.init(m),p.window=m,p.document=m.document,p.usePlugin(Ao),p.usePlugin(zn),p}(this,o)}},{key:"pluginIsInstalled",value:function(o){var p=o.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,p),o.listeners&&o.before){for(var m=0,_=this.listenerMaps.length,I=o.before.reduce(function(G,pe){return G[pe]=!0,G[Dt(pe)]=!0,G},{});m<_;m++){var U=this.listenerMaps[m].id;if(U&&(I[U]||I[Dt(U)]))break}this.listenerMaps.splice(m,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,p){if(this.getDocIndex(o)!==-1)return!1;var m=$(o);p=p?ae({},p):{},this.documents.push({doc:o,options:p}),this.events.documents.push(o),o!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:m,scope:this,options:p})}},{key:"removeDocument",value:function(o){var p=this.getDocIndex(o),m=$(o),_=this.documents[p].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:o,window:m,scope:this,options:_})}},{key:"getDocIndex",value:function(o){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===o)return p;return-1}},{key:"getDocOptions",value:function(o){var p=this.getDocIndex(o);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),i}();function Dt(i){return i&&i.replace(/\/.*$/,"")}var Ht=new Oo,zr=Ht.interactStatic,Io=typeof globalThis<"u"?globalThis:window;Ht.init(Io);var Lo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(i){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var _=m[0],I=m[1];return _ in i||I in i}),p=function(m,_){for(var I=i.range,U=i.limits,G=U===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:U,pe=i.offset,Ae=pe===void 0?{x:0,y:0}:pe,he={range:I,grid:i,x:null,y:null},Je=0;Je<o.length;Je++){var Ba=o[Je],ll=Ba[0],Za=Ba[1],il=Math.round((m-Ae.x)/i[ll]),xl=Math.round((_-Ae.y)/i[Za]);he[ll]=Math.max(G.left,Math.min(G.right,il*i[ll]+Ae.x)),he[Za]=Math.max(G.top,Math.min(G.bottom,xl*i[Za]+Ae.y))}return he};return p.grid=i,p.coordFields=o,p}}),Bt={id:"snappers",install:function(i){var o=i.interactStatic;o.snappers=ae(o.snappers||{},Lo),o.createSnapGrid=o.snappers.grid}},Vo=Bt,Nt={start:function(i){var o=i.state,p=i.rect,m=i.edges,_=i.pageCoords,I=o.options,U=I.ratio,G=I.enabled,pe=o.options,Ae=pe.equalDelta,he=pe.modifiers;U==="preserve"&&(U=p.width/p.height),o.startCoords=ae({},_),o.startRect=ae({},p),o.ratio=U,o.equalDelta=Ae;var Je=o.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(o.xIsPrimaryAxis=!(!m.left&&!m.right),o.equalDelta){var Ba=(Je.left?1:-1)*(Je.top?1:-1);o.edgeSign={x:Ba,y:Ba}}else o.edgeSign={x:Je.left?-1:1,y:Je.top?-1:1};if(G!==!1&&ae(m,Je),he!=null&&he.length){var ll=new Fr(i.interaction);ll.copyFrom(i.interaction.modification),ll.prepareStates(he),o.subModification=ll,ll.startAll(t({},i))}},set:function(i){var o=i.state,p=i.rect,m=i.coords,_=o.linkedEdges,I=ae({},m),U=o.equalDelta?Ut:qt;if(ae(i.edges,_),U(o,o.xIsPrimaryAxis,m,p),!o.subModification)return null;var G=ae({},p);Ee(_,G,{x:m.x-I.x,y:m.y-I.y});var pe=o.subModification.setAll(t(t({},i),{},{rect:G,edges:_,pageCoords:m,prevCoords:m,prevRect:G})),Ae=pe.delta;return pe.changed&&(U(o,Math.abs(Ae.x)>Math.abs(Ae.y),pe.coords,pe.rect),ae(m,pe.coords)),pe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Ut(i,o,p){var m=i.startCoords,_=i.edgeSign;o?p.y=m.y+(p.x-m.x)*_.y:p.x=m.x+(p.y-m.y)*_.x}function qt(i,o,p,m){var _=i.startRect,I=i.startCoords,U=i.ratio,G=i.edgeSign;if(o){var pe=m.width/U;p.y=I.y+(pe-_.height)*G.y}else{var Ae=m.height*U;p.x=I.x+(Ae-_.width)*G.x}}var Ro=Ar(Nt,"aspectRatio"),Kt=function(){};Kt._defaults={};var nt=Kt;function Zr(i,o,p){return g.func(i)?Re(i,o.interactable,o.element,[p.x,p.y,o]):Re(i,o.interactable,o.element)}var qn={start:function(i){var o=i.rect,p=i.startOffset,m=i.state,_=i.interaction,I=i.pageCoords,U=m.options,G=U.elementRect,pe=ae({left:0,top:0,right:0,bottom:0},U.offset||{});if(o&&G){var Ae=Zr(U.restriction,_,I);if(Ae){var he=Ae.right-Ae.left-o.width,Je=Ae.bottom-Ae.top-o.height;he<0&&(pe.left+=he,pe.right+=he),Je<0&&(pe.top+=Je,pe.bottom+=Je)}pe.left+=p.left-o.width*G.left,pe.top+=p.top-o.height*G.top,pe.right+=p.right-o.width*(1-G.right),pe.bottom+=p.bottom-o.height*(1-G.bottom)}m.offset=pe},set:function(i){var o=i.coords,p=i.interaction,m=i.state,_=m.options,I=m.offset,U=Zr(_.restriction,p,o);if(U){var G=function(pe){return!pe||"left"in pe&&"top"in pe||((pe=ae({},pe)).left=pe.x||0,pe.top=pe.y||0,pe.right=pe.right||pe.left+pe.width,pe.bottom=pe.bottom||pe.top+pe.height),pe}(U);o.x=Math.max(Math.min(G.right-I.right,o.x),G.left+I.left),o.y=Math.max(Math.min(G.bottom-I.bottom,o.y),G.top+I.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Tt=Ar(qn,"restrict"),Wt={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Yt={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Jt(i,o){for(var p=0,m=["top","left","bottom","right"];p<m.length;p++){var _=m[p];_ in i||(i[_]=o[_])}return i}var Kn={noInner:Wt,noOuter:Yt,start:function(i){var o,p=i.interaction,m=i.startOffset,_=i.state,I=_.options;I&&(o=ma(Zr(I.offset,p,p.coords.start.page))),o=o||{x:0,y:0},_.offset={top:o.y+m.top,left:o.x+m.left,bottom:o.y-m.bottom,right:o.x-m.right}},set:function(i){var o=i.coords,p=i.edges,m=i.interaction,_=i.state,I=_.offset,U=_.options;if(p){var G=ae({},o),pe=Zr(U.inner,m,G)||{},Ae=Zr(U.outer,m,G)||{};Jt(pe,Wt),Jt(Ae,Yt),p.top?o.y=Math.min(Math.max(Ae.top+I.top,G.y),pe.top+I.top):p.bottom&&(o.y=Math.max(Math.min(Ae.bottom+I.bottom,G.y),pe.bottom+I.bottom)),p.left?o.x=Math.min(Math.max(Ae.left+I.left,G.x),pe.left+I.left):p.right&&(o.x=Math.max(Math.min(Ae.right+I.right,G.x),pe.right+I.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Gt=Ar(Kn,"restrictEdges"),Wn=ae({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(i){}},qn.defaults),Xt=Ar({start:qn.start,set:qn.set,defaults:Wn},"restrictRect"),Zt={width:-1/0,height:-1/0},Yn={width:1/0,height:1/0},Qt=Ar({start:function(i){return Kn.start(i)},set:function(i){var o=i.interaction,p=i.state,m=i.rect,_=i.edges,I=p.options;if(_){var U=Pe(Zr(I.min,o,i.coords))||Zt,G=Pe(Zr(I.max,o,i.coords))||Yn;p.options={endOnly:I.endOnly,inner:ae({},Kn.noInner),outer:ae({},Kn.noOuter)},_.top?(p.options.inner.top=m.bottom-U.height,p.options.outer.top=m.bottom-G.height):_.bottom&&(p.options.inner.bottom=m.top+U.height,p.options.outer.bottom=m.top+G.height),_.left?(p.options.inner.left=m.right-U.width,p.options.outer.left=m.right-G.width):_.right&&(p.options.inner.right=m.left+U.width,p.options.outer.right=m.left+G.width),Kn.set(i),p.options=I}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),tt={start:function(i){var o,p=i.interaction,m=i.interactable,_=i.element,I=i.rect,U=i.state,G=i.startOffset,pe=U.options,Ae=pe.offsetWithOrigin?function(Ba){var ll=Ba.interaction.element,Za=ma(Re(Ba.state.options.origin,null,null,[ll])),il=Za||Le(Ba.interactable,ll,Ba.interaction.prepared.name);return il}(i):{x:0,y:0};if(pe.offset==="startCoords")o={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var he=Re(pe.offset,m,_,[p]);(o=ma(he)||{x:0,y:0}).x+=Ae.x,o.y+=Ae.y}var Je=pe.relativePoints;U.offsets=I&&Je&&Je.length?Je.map(function(Ba,ll){return{index:ll,relativePoint:Ba,x:G.left-I.width*Ba.x+o.x,y:G.top-I.height*Ba.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(i){var o=i.interaction,p=i.coords,m=i.state,_=m.options,I=m.offsets,U=Le(o.interactable,o.element,o.prepared.name),G=ae({},p),pe=[];_.offsetWithOrigin||(G.x-=U.x,G.y-=U.y);for(var Ae=0,he=I;Ae<he.length;Ae++)for(var Je=he[Ae],Ba=G.x-Je.x,ll=G.y-Je.y,Za=0,il=_.targets.length;Za<il;Za++){var xl=_.targets[Za],sl=void 0;(sl=g.func(xl)?xl(Ba,ll,o._proxy,Je,Za):xl)&&pe.push({x:(g.number(sl.x)?sl.x:Ba)+Je.x,y:(g.number(sl.y)?sl.y:ll)+Je.y,range:g.number(sl.range)?sl.range:_.range,source:xl,index:Za,offset:Je})}for(var Al={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Vl=0;Vl<pe.length;Vl++){var Wl=pe[Vl],Tl=Wl.range,Ul=Wl.x-G.x,Or=Wl.y-G.y,gr=Oa(Ul,Or),jr=gr<=Tl;Tl===1/0&&Al.inRange&&Al.range!==1/0&&(jr=!1),Al.target&&!(jr?Al.inRange&&Tl!==1/0?gr/Tl<Al.distance/Al.range:Tl===1/0&&Al.range!==1/0||gr<Al.distance:!Al.inRange&&gr<Al.distance)||(Al.target=Wl,Al.distance=gr,Al.range=Tl,Al.inRange=jr,Al.delta.x=Ul,Al.delta.y=Or)}return Al.inRange&&(p.x=Al.target.x,p.y=Al.target.y),m.closest=Al,Al},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},$o=Ar(tt,"snap"),ot={start:function(i){var o=i.state,p=i.edges,m=o.options;if(!p)return null;i.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],tt.start(i),o.offsets=i.state.offsets,i.state=o},set:function(i){var o=i.interaction,p=i.state,m=i.coords,_=p.options,I=p.offsets,U={x:m.x-I[0].x,y:m.y-I[0].y};p.options=ae({},_),p.options.targets=[];for(var G=0,pe=_.targets||[];G<pe.length;G++){var Ae=pe[G],he=void 0;if(he=g.func(Ae)?Ae(U.x,U.y,o):Ae){for(var Je=0,Ba=p.targetFields;Je<Ba.length;Je++){var ll=Ba[Je],Za=ll[0],il=ll[1];if(Za in he||il in he){he.x=he[Za],he.y=he[il];break}}p.options.targets.push(he)}}var xl=tt.set(i);return p.options=_,xl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Po=Ar(ot,"snapSize"),At={aspectRatio:Ro,restrictEdges:Gt,restrict:Tt,restrictRect:Xt,restrictSize:Qt,snapEdges:Ar({start:function(i){var o=i.edges;return o?(i.state.targetFields=i.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],ot.start(i)):null},set:ot.set,defaults:ae(Nr(ot.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:$o,snapSize:Po,spring:nt,avoid:nt,transform:nt,rubberband:nt},Fo={id:"modifiers",install:function(i){var o=i.interactStatic;for(var p in i.usePlugin(ir),i.usePlugin(Vo),o.modifiers=At,At){var m=At[p],_=m._defaults,I=m._methods;_._methods=I,i.defaults.perAction[p]=_}}},jo=Fo,eo=function(i){y(p,i);var o=L(p);function p(m,_,I,U,G,pe){var Ae;if(d(this,p),F(M(Ae=o.call(this,G)),I),I!==_&&F(M(Ae),_),Ae.timeStamp=pe,Ae.originalEvent=I,Ae.type=m,Ae.pointerId=Ce(_),Ae.pointerType=ba(_),Ae.target=U,Ae.currentTarget=null,m==="tap"){var he=G.getPointerIndex(_);Ae.dt=Ae.timeStamp-G.pointers[he].downTime;var Je=Ae.timeStamp-G.tapTime;Ae.double=!!G.prevTap&&G.prevTap.type!=="doubletap"&&G.prevTap.target===Ae.target&&Je<500}else m==="doubletap"&&(Ae.dt=_.timeStamp-G.tapTime,Ae.double=!0);return Ae}return h(p,[{key:"_subtractOrigin",value:function(m){var _=m.x,I=m.y;return this.pageX-=_,this.pageY-=I,this.clientX-=_,this.clientY-=I,this}},{key:"_addOrigin",value:function(m){var _=m.x,I=m.y;return this.pageX+=_,this.pageY+=I,this.clientX+=_,this.clientY+=I,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(fa),On={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(i){i.pointerEvents=On,i.defaults.actions.pointerEvents=On.defaults,ae(i.actions.phaselessTypes,On.types)},listeners:{"interactions:new":function(i){var o=i.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(i){var o=i.down,p=i.pointerInfo;!o&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget;i.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&Mt(i),bn({interaction:p,pointer:m,event:_,eventTarget:I,type:"move"},o))},"interactions:down":function(i,o){(function(p,m){for(var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget,pe=p.pointerIndex,Ae=_.pointers[pe].hold,he=ya(G),Je={interaction:_,pointer:I,event:U,eventTarget:G,type:"hold",targets:[],path:he,node:null},Ba=0;Ba<he.length;Ba++){var ll=he[Ba];Je.node=ll,m.fire("pointerEvents:collect-targets",Je)}if(Je.targets.length){for(var Za=1/0,il=0,xl=Je.targets;il<xl.length;il++){var sl=xl[il].eventable.options.holdDuration;sl<Za&&(Za=sl)}Ae.duration=Za,Ae.timeout=setTimeout(function(){bn({interaction:_,eventTarget:G,pointer:I,event:U,type:"hold"},m)},Za)}})(i,o),bn(i,o)},"interactions:up":function(i,o){Mt(i),bn(i,o),function(p,m){var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget;_.pointerWasMoved||bn({interaction:_,eventTarget:G,pointer:I,event:U,type:"tap"},m)}(i,o)},"interactions:cancel":function(i,o){Mt(i),bn(i,o)}},PointerEvent:eo,fire:bn,collectEventTargets:ao,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 bn(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget,U=i.type,G=i.targets,pe=G===void 0?ao(i,o):G,Ae=new eo(U,m,_,I,p,o.now());o.fire("pointerEvents:new",{pointerEvent:Ae});for(var he={interaction:p,pointer:m,event:_,eventTarget:I,targets:pe,type:U,pointerEvent:Ae},Je=0;Je<pe.length;Je++){var Ba=pe[Je];for(var ll in Ba.props||{})Ae[ll]=Ba.props[ll];var Za=Le(Ba.eventable,Ba.node);if(Ae._subtractOrigin(Za),Ae.eventable=Ba.eventable,Ae.currentTarget=Ba.node,Ba.eventable.fire(Ae),Ae._addOrigin(Za),Ae.immediatePropagationStopped||Ae.propagationStopped&&Je+1<pe.length&&pe[Je+1].node!==Ae.currentTarget)break}if(o.fire("pointerEvents:fired",he),U==="tap"){var il=Ae.double?bn({interaction:p,pointer:m,event:_,eventTarget:I,type:"doubletap"},o):Ae;p.prevTap=il,p.tapTime=il.timeStamp}return Ae}function ao(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget,U=i.type,G=p.getPointerIndex(m),pe=p.pointers[G];if(U==="tap"&&(p.pointerWasMoved||!pe||pe.downTarget!==I))return[];for(var Ae=ya(I),he={interaction:p,pointer:m,event:_,eventTarget:I,type:U,path:Ae,targets:[],node:null},Je=0;Je<Ae.length;Je++){var Ba=Ae[Je];he.node=Ba,o.fire("pointerEvents:collect-targets",he)}return U==="hold"&&(he.targets=he.targets.filter(function(ll){var Za,il;return ll.eventable.options.holdDuration===((Za=p.pointers[G])==null||(il=Za.hold)==null?void 0:il.duration)})),he.targets}function Mt(i){var o=i.interaction,p=i.pointerIndex,m=o.pointers[p].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var Ho=Object.freeze({__proto__:null,default:On});function it(i){var o=i.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var Uo={id:"pointer-events/holdRepeat",install:function(i){i.usePlugin(On);var o=i.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=i.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(i,o){return i["pointerEvents:".concat(o)]=it,i},{"pointerEvents:new":function(i){var o=i.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(i,o){var p=i.interaction,m=i.pointerEvent,_=i.eventTarget,I=i.targets;if(m.type==="hold"&&I.length){var U=I[0].eventable.options.holdRepeatInterval;U<=0||(p.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:p,eventTarget:_,type:"hold",pointer:m,event:m},o)},U))}}})},qo=Uo,Ko={id:"pointer-events/interactableTargets",install:function(i){var o=i.Interactable;o.prototype.pointerEvents=function(m){return ae(this.events.options,m),this};var p=o.prototype._backCompatOption;o.prototype._backCompatOption=function(m,_){var I=p.call(this,m,_);return I===this&&(this.events.options[m]=_),I}},listeners:{"pointerEvents:collect-targets":function(i,o){var p=i.targets,m=i.node,_=i.type,I=i.eventTarget;o.interactables.forEachMatch(m,function(U){var G=U.events,pe=G.options;G.types[_]&&G.types[_].length&&U.testIgnoreAllow(pe,m,I)&&p.push({node:m,eventable:G,props:{interactable:U}})})},"interactable:new":function(i){var o=i.interactable;o.events.getRect=function(p){return o.getRect(p)}},"interactable:set":function(i,o){var p=i.interactable,m=i.options;ae(p.events.options,o.pointerEvents.defaults),ae(p.events.options,m.pointerEvents||{})}}},Wo=Ko,lo={id:"pointer-events",install:function(i){i.usePlugin(Ho),i.usePlugin(qo),i.usePlugin(Wo)}},st=lo,Yo={id:"reflow",install:function(i){var o=i.Interactable;i.actions.phases.reflow=!0,o.prototype.reflow=function(p){return function(m,_,I){for(var U=m.getAllElements(),G=I.window.Promise,pe=G?[]:null,Ae=function(){var Je=U[he],Ba=m.getRect(Je);if(!Ba)return 1;var ll,Za=ka(I.interactions.list,function(sl){return sl.interacting()&&sl.interactable===m&&sl.element===Je&&sl.prepared.name===_.name});if(Za)Za.move(),pe&&(ll=Za._reflowPromise||new G(function(sl){Za._reflowResolve=sl}));else{var il=Pe(Ba),xl=function(sl){return{coords:sl,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:il.x,y:il.y},client:{x:il.x,y:il.y},timeStamp:I.now()});ll=function(sl,Al,Vl,Wl,Tl){var Ul=sl.interactions.new({pointerType:"reflow"}),Or={interaction:Ul,event:Tl,pointer:Tl,eventTarget:Vl,phase:"reflow"};Ul.interactable=Al,Ul.element=Vl,Ul.prevEvent=Tl,Ul.updatePointer(Tl,Tl,Vl,!0),R(Ul.coords.delta),pa(Ul.prepared,Wl),Ul._doPhase(Or);var gr=sl.window,jr=gr.Promise,Qr=jr?new jr(function(sn){Ul._reflowResolve=sn}):void 0;return Ul._reflowPromise=Qr,Ul.start(Wl,Al,Vl),Ul._interacting?(Ul.move(Or),Ul.end(Tl)):(Ul.stop(),Ul._reflowResolve()),Ul.removePointer(Tl,Tl),Qr}(I,m,Je,_,xl)}pe&&pe.push(ll)},he=0;he<U.length&&!Ae();he++);return pe&&G.all(pe).then(function(){return m})}(this,p,i)}},listeners:{"interactions:stop":function(i,o){var p=i.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(m,_){m.splice(m.indexOf(_),1)}(o.interactions.list,p))}}},Jo=Yo;if(zr.use(qr),zr.use(dr),zr.use(st),zr.use(wn),zr.use(jo),zr.use(Xr),zr.use(tl),zr.use(ol),zr.use(Jo),zr.default=zr,s(l)==="object"&&l)try{l.exports=zr}catch{}return zr.default=zr,zr})}(Lt,Lt.exports)),Lt.exports}var L4=I4();const ws=A.getDefaultExportFromCjs(L4),Do=a.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(l,{expose:n,emit:r}){const t=l,s=r,d=a.inject(Dc),b=a.inject(Bc);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=a.shallowRef(null),v=a.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 y=!1,c=!1,C=NaN,M=NaN,L=NaN,x=NaN,Y=-1,w=-1,z=-1,ee=-1,S=t.x,$=t.y,T=t.w,k=t.h;const g=a.ref(),j=a.reactive({i:a.toRef(t,"i"),state:v,wrapper:g,calcXY:Re});function q(W){We(W)}function J(){Ua()}function me(W){ln(t.isDraggable)&&(v.draggable=W)}function ze(W){ln(t.isResizable)&&(v.resizable=W)}function xe(W){ln(t.isBounded)&&(v.bounded=W)}function te(W){v.transformScale=W}function be(W){v.rowHeight=W}function Q(W){v.maxRows=W}function de(){v.rtl=xs()==="rtl",Ua()}function Ke(W){v.cols=Math.floor(W)}d.increaseItem(j),a.onBeforeMount(()=>{v.rtl=xs()==="rtl"}),a.onMounted(()=>{d.responsive&&d.lastBreakpoint?v.cols=zc(d.lastBreakpoint,d.cols):v.cols=d.colNum,v.rowHeight=d.rowHeight,v.containerWidth=d.width!==null?d.width:100,v.margin=d.margin!==void 0?d.margin.map(Number):[10,10],v.maxRows=d.maxRows,ln(t.isDraggable)?v.draggable=d.isDraggable:v.draggable=t.isDraggable,ln(t.isResizable)?v.resizable=d.isResizable:v.resizable=t.isResizable,ln(t.isBounded)?v.bounded=d.isBounded:v.bounded=t.isBounded,v.transformScale=d.transformScale,v.useCssTransforms=d.useCssTransforms,v.useStyleCursor=d.useStyleCursor,a.watchEffect(()=>{S=t.x,$=t.y,k=t.h,T=t.w,Hr(la)}),b.on("updateWidth",q),b.on("compact",J),b.on("setDraggable",me),b.on("setResizable",ze),b.on("setBounded",xe),b.on("setTransformScale",te),b.on("setRowHeight",be),b.on("setMaxRows",Q),b.on("directionchange",de),b.on("setColNum",Ke)}),a.onBeforeUnmount(()=>{b.off("updateWidth",q),b.off("compact",J),b.off("setDraggable",me),b.off("setResizable",ze),b.off("setBounded",xe),b.off("setTransformScale",te),b.off("setRowHeight",be),b.off("setMaxRows",Q),b.off("directionchange",de),b.off("setColNum",Ke),h.value&&(h.value.unset(),h.value=null),d.decreaseItem(j)}),n({state:v,wrapper:g});const wa=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,oe=a.computed(()=>v.resizable&&!t.static),D=a.computed(()=>d.isMirrored?!v.rtl:v.rtl),ne=a.computed(()=>(v.draggable||v.resizable)&&!t.static),ge=D4("item"),se=a.computed(()=>({[ge.b()]:!0,[ge.bm("resizable")]:oe.value,[ge.bm("static")]:t.static,[ge.bm("resizing")]:v.isResizing,[ge.bm("dragging")]:v.isDragging,[ge.bm("transform")]:v.useCssTransforms,[ge.bm("rtl")]:D.value,[ge.bm("no-touch")]:wa&&ne.value})),we=a.computed(()=>[ge.be("resizer"),D.value&&ge.bem("resizer","rtl")].filter(Boolean));a.watch(()=>t.isDraggable,W=>{v.draggable=W}),a.watch(()=>t.static,()=>{Hr(F),Hr(R)}),a.watch(()=>v.draggable,()=>{Hr(F)}),a.watch(()=>t.isResizable,W=>{v.resizable=W}),a.watch(()=>t.isBounded,W=>{v.bounded=W}),a.watch(()=>v.resizable,()=>{Hr(R)}),a.watch(()=>v.rowHeight,()=>{Hr(la),Hr(ya)}),a.watch([()=>v.cols,()=>v.containerWidth],()=>{Hr(R),Hr(la),Hr(ya)}),a.watch([()=>t.minH,()=>t.maxH,()=>t.minW,()=>t.maxW],()=>{Hr(R)}),a.watch(D,()=>{Hr(R),Hr(la)}),a.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const W=d.margin;!W||W[0]===v.margin[0]&&W[1]===v.margin[1]||(v.margin=W.map(Number),Hr(la),Hr(ya))});function la(){t.x+t.w>v.cols?(S=0,T=t.w>v.cols?v.cols:t.w):(S=t.x,T=t.w);const W=ea(S,$,T,k);v.isDragging&&(W.top=v.dragging.top,D.value?W.right=v.dragging.left:W.left=v.dragging.left),v.isResizing&&(W.width=v.resizing.width,W.height=v.resizing.height);let Ie;v.useCssTransforms?D.value?Ie=w4(W.top,W.right,W.width,W.height):Ie=_4(W.top,W.left,W.width,W.height):D.value?Ie=E4(W.top,W.right,W.width,W.height):Ie=C4(W.top,W.left,W.width,W.height),v.style=Ie}function ya(){const W={};for(const Ie of["width","height"]){const Ne=v.style[Ie].match(/^(\d+)px$/);if(!Ne)return;W[Ie]=Ne[1]}s("container-resized",t.i,t.h,t.w,W.height,W.width)}function Va(W){if(t.static)return;const Ie=W.type;if(Ie==="resizestart"&&v.isResizing||Ie!=="resizestart"&&!v.isResizing)return;const Ne=bs(W);if(ln(Ne))return;const{x:Ce,y:K}=Ne,He={width:0,height:0};let Ve;switch(Ie){case"resizestart":{R(),Y=T,w=k,Ve=ea(S,$,T,k),He.width=Ve.width,He.height=Ve.height,v.resizing=He,v.isResizing=!0;break}case"resizemove":{!W.edges.right&&!W.edges.left&&(L=Ce),!W.edges.top&&!W.edges.bottom&&(x=K);const ra=ks(L,x,Ce,K);D.value?He.width=v.resizing.width-ra.deltaX/v.transformScale:He.width=v.resizing.width+ra.deltaX/v.transformScale,He.height=v.resizing.height+ra.deltaY/v.transformScale,v.resizing=He;break}case"resizeend":{Ve=ea(S,$,T,k),He.width=Ve.width,He.height=Ve.height,v.resizing={width:-1,height:-1},v.isResizing=!1;break}}Ve=Le(He.height,He.width),Ve.w<t.minW&&(Ve.w=t.minW),Ve.w>t.maxW&&(Ve.w=t.maxW),Ve.h<t.minH&&(Ve.h=t.minH),Ve.h>t.maxH&&(Ve.h=t.maxH),Ve.h<1&&(Ve.h=1),Ve.w<1&&(Ve.w=1),L=Ce,x=K,(T!==Ve.w||k!==Ve.h)&&s("resize",t.i,Ve.h,Ve.w,He.height,He.width),W.type==="resizeend"&&(Y!==T||w!==k)&&s("resized",t.i,Ve.h,Ve.w,He.height,He.width),b.emit("resizeEvent",W.type,t.i,S,$,Ve.h,Ve.w)}function ae(W){if(t.static||v.isResizing)return;const Ie=W.type;if(Ie==="dragstart"&&v.isDragging||Ie!=="dragstart"&&!v.isDragging)return;const Ne=bs(W);if(ln(Ne))return;const{x:Ce,y:K}=Ne,He=W.target;if(!He.offsetParent)return;const Ve={top:0,left:0};switch(Ie){case"dragstart":{z=S,ee=$;const va=He.offsetParent.getBoundingClientRect(),$e=He.getBoundingClientRect(),ba=$e.left/v.transformScale,Te=va.left/v.transformScale,fa=$e.right/v.transformScale,Ue=va.right/v.transformScale,ga=$e.top/v.transformScale,fe=va.top/v.transformScale;D.value?Ve.left=(fa-Ue)*-1:Ve.left=ba-Te,Ve.top=ga-fe,v.dragging=Ve,v.isDragging=!0;break}case"dragmove":{const va=ks(C,M,Ce,K);if(D.value?Ve.left=v.dragging.left-va.deltaX/v.transformScale:Ve.left=v.dragging.left+va.deltaX/v.transformScale,Ve.top=v.dragging.top+va.deltaY/v.transformScale,v.bounded){const $e=He.offsetParent.clientHeight-Pe(t.h,v.rowHeight,v.margin[1]);Ve.top=Ee(Ve.top,0,$e);const ba=ma(),Te=v.containerWidth-Pe(t.w,ba,v.margin[0]);Ve.left=Ee(Ve.left,0,Te)}v.dragging=Ve;break}case"dragend":{const va=He.offsetParent.getBoundingClientRect(),$e=He.getBoundingClientRect(),ba=$e.left/v.transformScale,Te=va.left/v.transformScale,fa=$e.right/v.transformScale,Ue=va.right/v.transformScale,ga=$e.top/v.transformScale,fe=va.top/v.transformScale;D.value?Ve.left=(fa-Ue)*-1:Ve.left=ba-Te,Ve.top=ga-fe,v.dragging={top:-1,left:-1},v.isDragging=!1;break}}let ra;D.value,ra=Re(Ve.top,Ve.left),C=Ce,M=K,(S!==ra.x||$!==ra.y)&&s("move",t.i,ra.x,ra.y),W.type==="dragend"&&(z!==S||ee!==$)&&s("moved",t.i,ra.x,ra.y),b.emit("dragEvent",W.type,t.i,ra.x,ra.y,k,T)}function ea(W,Ie,Ne,Ce){const K=ma();let He;return D.value?He={right:Math.round(K*W+(W+1)*v.margin[0]),top:Math.round(v.rowHeight*Ie+(Ie+1)*v.margin[1]),width:Ne===1/0?Ne:Math.round(K*Ne+Math.max(0,Ne-1)*v.margin[0]),height:Ce===1/0?Ce:Math.round(v.rowHeight*Ce+Math.max(0,Ce-1)*v.margin[1])}:He={left:Math.round(K*W+(W+1)*v.margin[0]),top:Math.round(v.rowHeight*Ie+(Ie+1)*v.margin[1]),width:Ne===1/0?Ne:Math.round(K*Ne+Math.max(0,Ne-1)*v.margin[0]),height:Ce===1/0?Ce:Math.round(v.rowHeight*Ce+Math.max(0,Ce-1)*v.margin[1])},He}function Re(W,Ie){const Ne=ma();let Ce=Math.round((Ie-v.margin[0])/(Ne+v.margin[0])),K=Math.round((W-v.margin[1])/(v.rowHeight+v.margin[1]));return Ce=Math.max(Math.min(Ce,v.cols-T),0),K=Math.max(Math.min(K,v.maxRows-k),0),{x:Ce,y:K}}function ma(){return(v.containerWidth-v.margin[0]*(v.cols+1))/v.cols}function Pe(W,Ie,Ne){return Number.isFinite(W)?Math.round(Ie*W+Math.max(0,W-1)*Ne):W}function Ee(W,Ie,Ne){return Math.max(Math.min(W,Ne),Ie)}function Le(W,Ie,Ne=!1){const Ce=ma();let K=Math.round((Ie+v.margin[0])/(Ce+v.margin[0])),He=0;return Ne?He=Math.ceil((W+v.margin[1])/(v.rowHeight+v.margin[1])):He=Math.round((W+v.margin[1])/(v.rowHeight+v.margin[1])),K=Math.max(Math.min(K,v.cols-S),0),He=Math.max(Math.min(He,v.maxRows-$),0),{w:K,h:He}}function We(W,Ie){v.containerWidth=W}function Ua(){la()}function Oa(){!h.value&&g.value&&(h.value=ws(g.value),v.useStyleCursor||h.value.styleCursor(!1))}const P=ms(ae);function F(){if(Oa(),!!h.value)if(v.draggable&&!t.static){const W={ignoreFrom:t.dragIgnoreFrom,allowFrom:t.dragAllowFrom,...t.dragOption};h.value.draggable(W),y||(y=!0,h.value.on("dragstart dragmove dragend",Ie=>{Ie.type==="dragmove"?P(Ie):ae(Ie)}))}else h.value.draggable({enabled:!1})}const X=ms(Va);function R(){if(Oa(),!!h.value)if(v.resizable&&!t.static){const W=ea(0,0,t.maxW,t.maxH),Ie=ea(0,0,t.minW,t.minH),Ne={edges:{left:D.value?`.${we.value[0]}`:!1,right:D.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:t.resizeIgnoreFrom,restrictSize:{min:{height:Ie.height*v.transformScale,width:Ie.width*v.transformScale},max:{height:W.height*v.transformScale,width:W.width*v.transformScale}},...t.resizeOption};t.preserveAspectRatio&&(Ne.modifiers=[ws.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(Ne),c||(c=!0,h.value.on("resizestart resizemove resizeend",Ce=>{Ce.type==="resizemove"?X(Ce):Va(Ce)}))}else h.value.resizable({enabled:!1})}return(W,Ie)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:g,class:a.normalizeClass(se.value),style:a.normalizeStyle(v.style)},[a.renderSlot(W.$slots,"default"),oe.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(we.value)},null,2)):a.createCommentVNode("",!0)],6))}}),lt=typeof window<"u";var Cs;lt&&(Cs=window==null?void 0:window.navigator)!=null&&Cs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Es(l){return l!=null}function Ss(){}const V4=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(V4)));const R4=lt&&("ontouchstart"in window||P4()>0),$4=R4?"pointerdown":"click";function P4(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function F4(l,n,r=window.Event){const{type:t,bubbles:s=!1,cancelable:d=!1,...b}=n;if(!Es(t)||t==="")return!1;let h;return Es(r)?h=new r(t,{bubbles:s,cancelable:d}):(h=document.createEvent("HTMLEvents"),h.initEvent(t,s,d)),Object.assign(h,b),l.dispatchEvent(h)}const j4="clickoutside",H4=new Set;lt&&document.addEventListener($4,l=>{const n=l.target,r=l.composedPath&&l.composedPath();H4.forEach(t=>{t!==n&&(r?!r.includes(t):!t.contains(n))&&(!t.__transferElement||t.__transferElement!==n&&!t.__transferElement.contains(n))&&F4(t,{type:j4})})},!0);const U4=[["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 yo;if(lt){for(const l of U4)if(l[1]in document){yo=l;break}}a.computed(()=>!1);const q4=new Set,K4=new WeakMap;if(lt&&yo){const l=yo[2],n=yo[4];document.addEventListener(n,()=>{if(q4.forEach(r=>{r.value=!1}),document[l]){const r=K4.get(document[l]);r&&(r.value=!0)}},!1)}const Ic=new Map;Ic.set("x",0);Ic.set("y",0);var Qn=[],W4=function(){return Qn.some(function(l){return l.activeTargets.length>0})},Y4=function(){return Qn.some(function(l){return l.skippedTargets.length>0})},Ds="ResizeObserver loop completed with undelivered notifications.",J4=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:Ds}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=Ds),window.dispatchEvent(l)},jt;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(jt||(jt={}));var et=function(l){return Object.freeze(l)},G4=function(){function l(n,r){this.inlineSize=n,this.blockSize=r,et(this)}return l}(),Lc=function(){function l(n,r,t,s){return this.x=n,this.y=r,this.width=t,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,et(this)}return l.prototype.toJSON=function(){var n=this,r=n.x,t=n.y,s=n.top,d=n.right,b=n.bottom,h=n.left,v=n.width,y=n.height;return{x:r,y:t,top:s,right:d,bottom:b,left:h,width:v,height:y}},l.fromRect=function(n){return new l(n.x,n.y,n.width,n.height)},l}(),wi=function(l){return l instanceof SVGElement&&"getBBox"in l},Vc=function(l){if(wi(l)){var n=l.getBBox(),r=n.width,t=n.height;return!r&&!t}var s=l,d=s.offsetWidth,b=s.offsetHeight;return!(d||b||l.getClientRects().length)},Bs=function(l){var n;if(l instanceof Element)return!0;var r=(n=l==null?void 0:l.ownerDocument)===null||n===void 0?void 0:n.defaultView;return!!(r&&l instanceof r.Element)},X4=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},$t=typeof window<"u"?window:{},fo=new WeakMap,Ns=/auto|scroll/,Z4=/^tb|vertical/,Q4=/msie|trident/i.test($t.navigator&&$t.navigator.userAgent),xn=function(l){return parseFloat(l||"0")},_t=function(l,n,r){return l===void 0&&(l=0),n===void 0&&(n=0),r===void 0&&(r=!1),new G4((r?n:l)||0,(r?l:n)||0)},Ts=et({devicePixelContentBoxSize:_t(),borderBoxSize:_t(),contentBoxSize:_t(),contentRect:new Lc(0,0,0,0)}),Rc=function(l,n){if(n===void 0&&(n=!1),fo.has(l)&&!n)return fo.get(l);if(Vc(l))return fo.set(l,Ts),Ts;var r=getComputedStyle(l),t=wi(l)&&l.ownerSVGElement&&l.getBBox(),s=!Q4&&r.boxSizing==="border-box",d=Z4.test(r.writingMode||""),b=!t&&Ns.test(r.overflowY||""),h=!t&&Ns.test(r.overflowX||""),v=t?0:xn(r.paddingTop),y=t?0:xn(r.paddingRight),c=t?0:xn(r.paddingBottom),C=t?0:xn(r.paddingLeft),M=t?0:xn(r.borderTopWidth),L=t?0:xn(r.borderRightWidth),x=t?0:xn(r.borderBottomWidth),Y=t?0:xn(r.borderLeftWidth),w=C+y,z=v+c,ee=Y+L,S=M+x,$=h?l.offsetHeight-S-l.clientHeight:0,T=b?l.offsetWidth-ee-l.clientWidth:0,k=s?w+ee:0,g=s?z+S:0,j=t?t.width:xn(r.width)-k-T,q=t?t.height:xn(r.height)-g-$,J=j+w+T+ee,me=q+z+$+S,ze=et({devicePixelContentBoxSize:_t(Math.round(j*devicePixelRatio),Math.round(q*devicePixelRatio),d),borderBoxSize:_t(J,me,d),contentBoxSize:_t(j,q,d),contentRect:new Lc(C,v,j,q)});return fo.set(l,ze),ze},$c=function(l,n,r){var t=Rc(l,r),s=t.borderBoxSize,d=t.contentBoxSize,b=t.devicePixelContentBoxSize;switch(n){case jt.DEVICE_PIXEL_CONTENT_BOX:return b;case jt.BORDER_BOX:return s;default:return d}},e6=function(){function l(n){var r=Rc(n);this.target=n,this.contentRect=r.contentRect,this.borderBoxSize=et([r.borderBoxSize]),this.contentBoxSize=et([r.contentBoxSize]),this.devicePixelContentBoxSize=et([r.devicePixelContentBoxSize])}return l}(),Pc=function(l){if(Vc(l))return 1/0;for(var n=0,r=l.parentNode;r;)n+=1,r=r.parentNode;return n},a6=function(){var l=1/0,n=[];Qn.forEach(function(d){if(d.activeTargets.length!==0){var b=[];d.activeTargets.forEach(function(h){var v=new e6(h.target),y=Pc(h.target);b.push(v),h.lastReportedSize=$c(h.target,h.observedBox),y<l&&(l=y)}),n.push(function(){d.callback.call(d.observer,b,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var r=0,t=n;r<t.length;r++){var s=t[r];s()}return l},As=function(l){Qn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Pc(r.target)>l?n.activeTargets.push(r):n.skippedTargets.push(r))})})},l6=function(){var l=0;for(As(l);W4();)l=a6(),As(l);return Y4()&&J4(),l>0},li,Fc=[],r6=function(){return Fc.splice(0).forEach(function(l){return l()})},n6=function(l){if(!li){var n=0,r=document.createTextNode(""),t={characterData:!0};new MutationObserver(function(){return r6()}).observe(r,t),li=function(){r.textContent="".concat(n?n--:n++)}}Fc.push(l),li()},t6=function(l){n6(function(){requestAnimationFrame(l)})},go=0,o6=function(){return!!go},i6=250,s6={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ms=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],zs=function(l){return l===void 0&&(l=0),Date.now()+l},ri=!1,c6=function(){function l(){var n=this;this.stopped=!0,this.listener=function(){return n.schedule()}}return l.prototype.run=function(n){var r=this;if(n===void 0&&(n=i6),!ri){ri=!0;var t=zs(n);t6(function(){var s=!1;try{s=l6()}finally{if(ri=!1,n=t-zs(),!o6())return;s?r.run(1e3):n>0?r.run(n):r.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var n=this,r=function(){return n.observer&&n.observer.observe(document.body,s6)};document.body?r():$t.addEventListener("DOMContentLoaded",r)},l.prototype.start=function(){var n=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ms.forEach(function(r){return $t.addEventListener(r,n.listener,!0)}))},l.prototype.stop=function(){var n=this;this.stopped||(this.observer&&this.observer.disconnect(),Ms.forEach(function(r){return $t.removeEventListener(r,n.listener,!0)}),this.stopped=!0)},l}(),gi=new c6,Os=function(l){!go&&l>0&&gi.start(),go+=l,!go&&gi.stop()},u6=function(l){return!wi(l)&&!X4(l)&&getComputedStyle(l).display==="inline"},d6=function(){function l(n,r){this.target=n,this.observedBox=r||jt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var n=$c(this.target,this.observedBox,!0);return u6(this.target)&&(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},l}(),p6=function(){function l(n,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=n,this.callback=r}return l}(),ho=new WeakMap,Is=function(l,n){for(var r=0;r<l.length;r+=1)if(l[r].target===n)return r;return-1},vo=function(){function l(){}return l.connect=function(n,r){var t=new p6(n,r);ho.set(n,t)},l.observe=function(n,r,t){var s=ho.get(n),d=s.observationTargets.length===0;Is(s.observationTargets,r)<0&&(d&&Qn.push(s),s.observationTargets.push(new d6(r,t&&t.box)),Os(1),gi.schedule())},l.unobserve=function(n,r){var t=ho.get(n),s=Is(t.observationTargets,r),d=t.observationTargets.length===1;s>=0&&(d&&Qn.splice(Qn.indexOf(t),1),t.observationTargets.splice(s,1),Os(-1))},l.disconnect=function(n){var r=this,t=ho.get(n);t.observationTargets.slice().forEach(function(s){return r.unobserve(n,s.target)}),t.activeTargets.splice(0,t.activeTargets.length)},l}(),f6=function(){function l(n){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof n!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");vo.connect(this,n)}return l.prototype.observe=function(n,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Bs(n))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");vo.observe(this,n,r)},l.prototype.unobserve=function(n){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Bs(n))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");vo.unobserve(this,n)},l.prototype.disconnect=function(){vo.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const Bo=new WeakMap;function h6(l){var n;for(let r=0,t=l.length;r<t;++r){const s=l[r],d=Bo.get(s.target);if(typeof d=="function"){const{inlineSize:b,blockSize:h}=((n=s.borderBoxSize)==null?void 0:n[0])??{},{offsetWidth:v,offsetHeight:y}=s.target;d(Object.assign(s,{offsetWidth:v,offsetHeight:y,width:b??v,height:h??y}))}}}const jc=new(lt&&window.ResizeObserver||f6)(h6);function Ls(l,n){Bo.set(l,n),jc.observe(l)}function Vs(l){Bo.has(l)&&(jc.unobserve(l),Bo.delete(l))}function v6(l={}){let n=Ss;const r=a.watch(()=>a.unref(l.target),s=>{n(),!(!s||typeof l.onResize!="function")&&(Ls(s,l.onResize),n=()=>{Vs(s),n=Ss})},{immediate:!0}),t=()=>{r(),n()};return a.getCurrentScope()&&a.onScopeDispose(t),{observeResize:Ls,unobserveResize:Vs,unobserve:t}}const m6=a.ref(!1);a.computed(()=>m6.value);const Rs="__theme_style__",ni="__theme_observer__",$s=a.reactive(new Map),Ps=new Map;a.watch($s,()=>{if(!lt)return;Ps.clear();const l=document.head.querySelector(`#${Rs}`);l&&document.head.removeChild(l);const n=document.createElement("style");let r=`.${ni} { width: 1px }`,t=1;for(const[s,[d,b]]of $s.entries())r+=` html.${d} .${ni}, .${b} .${ni} { width: ${++t}px }`,Ps.set(t,s);n.textContent=r,n.id=Rs,document.head.appendChild(n)});const Hc=a.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(l,{expose:n,emit:r}){const t=l,s=r,d=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,h=a.ref(t.layout),v=a.ref(),{observeResize:y,unobserveResize:c}=v6(),C=v4();C.on("resizeEvent",M),C.on("dragEvent",L),a.onBeforeMount(()=>{s("layout-before-mount",h.value)}),a.onMounted(()=>{s("layout-mounted",h.value),a.nextTick(()=>{S4(h.value),d.originalLayout=h.value,a.nextTick(()=>{q(),v.value&&y(v.value,m4(S,16)),gt(h.value,t.verticalCompact),s("layout-updated",h.value),ee(),S()})})}),a.onBeforeUnmount(()=>{C.clearAll(),v.value&&c(v.value)});function M(me,ze,xe,te,be,Q){g(me,ze,xe,te,be,Q)}function L(me,ze,xe,te,be,Q){k(me,ze,xe,te,be,Q)}a.watch(()=>d.width,(me,ze)=>{a.nextTick(()=>{C.emit("updateWidth",me),ze===-1&&a.nextTick(()=>{s("layout-ready",h.value)}),ee()})}),a.watch(()=>[t.layout,t.layout.length],()=>{h.value=t.layout,z()}),a.watch(()=>t.colNum,me=>{C.emit("setColNum",me)}),a.watch(()=>t.rowHeight,me=>{C.emit("setRowHeight",me)}),a.watch(()=>t.isDraggable,me=>{C.emit("setDraggable",me)}),a.watch(()=>t.isResizable,me=>{C.emit("setResizable",me)}),a.watch(()=>t.isBounded,me=>{C.emit("setBounded",me)}),a.watch(()=>t.transformScale,me=>{C.emit("setTransformScale",me)}),a.watch(()=>t.responsive,me=>{me||(s("update:layout",d.originalLayout),C.emit("setColNum",t.colNum)),S()}),a.watch(()=>t.maxRows,me=>{C.emit("setMaxRows",me)}),a.watch([()=>t.margin,()=>t.margin[1]],ee),a.provide(Dc,a.reactive({...a.toRefs(t),...a.toRefs(d),increaseItem:x,decreaseItem:Y})),a.provide(Bc,C),n({state:d,getItem:w,resizeEvent:g,dragEvent:k,layoutUpdate:z});function x(me){b.set(me.i,me)}function Y(me){b.delete(me.i)}function w(me){return b.get(me)}function z(){if(!ln(h.value)&&!ln(d.originalLayout)){if(h.value.length!==d.originalLayout.length){const me=J(h.value,d.originalLayout);if(me.length>0)if(h.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(me);else{const ze=new Set(me.map(xe=>xe.i));d.originalLayout=d.originalLayout.filter(xe=>!ze.has(xe.i))}d.lastLayoutLength=h.value.length,q()}gt(h.value,t.verticalCompact),C.emit("updateWidth",d.width),ee(),s("layout-updated",h.value)}}function ee(){d.mergedStyle={height:$()}}function S(){v.value&&(d.width=v.value.offsetWidth),C.emit("resizeEvent")}function $(){if(!t.autoSize)return;const me=parseFloat(t.margin[1]);return g4(h.value)*(t.rowHeight+me)+me+"px"}let T;function k(me,ze,xe,te,be,Q){let de=ys(h.value,ze);ln(de)&&(de={h:0,w:0,x:0,y:0,i:""}),me==="dragstart"&&!t.verticalCompact&&(T=h.value.reduce((Ke,{i:wa,x:oe,y:D})=>({...Ke,[wa]:{x:oe,y:D}}),{})),me==="dragmove"||me==="dragstart"?(d.placeholder.i=ze,d.placeholder.x=de.x,d.placeholder.y=de.y,d.placeholder.w=Q,d.placeholder.h=be,a.nextTick(()=>{d.isDragging=!0}),C.emit("updateWidth",d.width)):a.nextTick(()=>{d.isDragging=!1}),h.value=yi(h.value,de,xe,te,!0,t.preventCollision),t.restoreOnDrag?(de.static=!0,gt(h.value,t.verticalCompact,T),de.static=!1):gt(h.value,t.verticalCompact),C.emit("compact"),ee(),me==="dragend"&&(T=void 0,s("layout-updated",h.value))}function g(me,ze,xe,te,be,Q){let de=ys(h.value,ze);ln(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Ke;if(t.preventCollision){const wa=Tc(h.value,{...de,w:Q,h:be}).filter(oe=>oe.i!==de.i);if(Ke=wa.length>0,Ke){let oe=1/0,D=1/0;wa.forEach(ne=>{ne.x>de.x&&(oe=Math.min(oe,ne.x)),ne.y>de.y&&(D=Math.min(D,ne.y))}),Number.isFinite(oe)&&(de.w=oe-de.x),Number.isFinite(D)&&(de.h=D-de.y)}}Ke||(de.w=Q,de.h=be),me==="resizestart"||me==="resizemove"?(d.placeholder.i=ze,d.placeholder.x=xe,d.placeholder.y=te,d.placeholder.w=de.w,d.placeholder.h=de.h,a.nextTick(()=>{d.isDragging=!0}),C.emit("updateWidth",d.width)):me&&a.nextTick(()=>{d.isDragging=!1}),t.responsive&&j(),gt(h.value,t.verticalCompact),C.emit("compact"),ee(),me==="resizeend"&&s("layout-updated",h.value)}function j(){const me=T4(t.breakpoints,d.width);if(me===d.lastBreakpoint)return;const ze=zc(me,t.cols);!ln(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mi(h.value));const xe=A4(d.originalLayout,d.layouts,t.breakpoints,me,d.lastBreakpoint,ze,t.verticalCompact);d.layouts[me]=xe,d.lastBreakpoint!==me&&s("breakpoint-changed",me,xe),h.value=xe,s("update:layout",xe),d.lastBreakpoint=me,C.emit("setColNum",ze)}function q(){d.layouts=Object.assign({},t.responsiveLayouts)}function J(me,ze){const xe=new Set(ze.map(de=>de.i)),te=new Set(me.map(de=>de.i)),be=me.filter(de=>!xe.has(de.i)),Q=ze.filter(de=>!te.has(de.i));return be.concat(Q)}return(me,ze)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:v,class:"vgl-layout",style:a.normalizeStyle(d.mergedStyle)},[me.$slots.default?a.renderSlot(me.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h.value,xe=>(a.openBlock(),a.createBlock(Do,a.mergeProps({key:xe.i,ref_for:!0},xe),{default:a.withCtx(()=>[a.renderSlot(me.$slots,"item",{item:xe})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Do,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.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(l)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const y6={key:0,class:"item-view-group"},g6={key:0,class:"item-view-group"},b6=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:n}){const r=A.useModelComp(A.pinia),{isEdit:t}=A.storeToRefs(r),s=n,d=l,b=a.computed(()=>d==null?void 0:d.children),h=a.computed(()=>{var x,Y,w,z;return((x=d==null?void 0:d.children)==null?void 0:x.length)>0&&((Y=d==null?void 0:d.children)!=null&&Y.every(ee=>ee==null?void 0:ee.layout))?(z=(w=d==null?void 0:d.children)==null?void 0:w[0])==null?void 0:z.layout:"vertical"}),v=x=>{s("radioChange",x)},y=a.computed(()=>{var x,Y;return((Y=(x=d==null?void 0:d.children)==null?void 0:x[0])==null?void 0:Y.isGridLayout)||!1}),c=a.ref((d==null?void 0:d.level)+1),C=a.computed(()=>{if(!(d!=null&&d.children)||!Array.isArray(d.children)||d.children.length<2)return!1;const x=d.children.some(w=>(w==null?void 0:w.name)==="测量系统配置表"&&(w==null?void 0:w.comp)==="ParentItem"),Y=d.children.some(w=>(w==null?void 0:w.name)==="测量系统传递表"&&(w==null?void 0:w.comp)==="ParentItem");return x&&Y});a.watch(()=>d==null?void 0:d.children,()=>{C.value},{deep:!0});const M=x=>{s("rowClick",x)},L=(x,Y)=>{s("routeUrl",x,Y)};return(x,Y)=>y.value?(a.openBlock(),a.createBlock(a.unref(Hc),{key:0,layout:b.value,"onUpdate:layout":Y[0]||(Y[0]=w=>b.value=w),"is-draggable":a.unref(t)==="edit","is-resizable":a.unref(t)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(w,z)=>(a.openBlock(),a.createBlock(a.unref(Do),{key:w.i,x:w.x,y:w.y,"min-h":w.minH,"max-h":w.maxH,"min-w":w.minW,w:w.w,h:w.h,i:w.i},{default:a.withCtx(()=>{var ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:z===((ee=d==null?void 0:d.children)==null?void 0:ee.length)-1?"0px":"24px"})},[(($=(S=w==null?void 0:w.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((T=w==null?void 0:w.component)!=null&&T.name)?(a.openBlock(),a.createElementBlock("div",y6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.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"})},a.toDisplayString((k=w==null?void 0:w.component)==null?void 0:k.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)((g=w==null?void 0:w.component)==null?void 0:g.comp)),{pageLayout:h.value,config:{showIndex:(j=a.unref(Xl)[z])==null?void 0:j.showIndex,allowMove:(q=a.unref(Xl)[z])==null?void 0:q.allowMove,viewport:(J=a.unref(Xl)[z])==null?void 0:J.viewport,status:(me=a.unref(Xl)[z])==null?void 0:me.status},related:w==null?void 0:w.relatedTables,compName:w==null?void 0:w.component.name,compNames:a.unref(sc),itemData:(ze=w==null?void 0:w.component)==null?void 0:ze.compData,childItemData:(xe=w==null?void 0:w.component)==null?void 0:xe.itemChildData,key:a.unref($n),cacheNewData:a.unref(ic),onChange:a.unref(wo),index:(w==null?void 0:w.id)??z,onContentChange:a.unref(Co),onPageChange:a.unref(Eo),parentTableId:(te=w==null?void 0:w.component)==null?void 0:te.tableId,allMapContents:a.unref(hi),children:(be=w==null?void 0:w.component)==null?void 0:be.children,level:c.value,onRowClick:M,onRouteUrl:L,onClickTrigger:a.unref(cc),onClickMainKey:a.unref(uc)},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"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(d==null?void 0:d.children,(w,z)=>{var ee,S;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(w==null?void 0:w.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(z)===((ee=d==null?void 0:d.children)==null?void 0:ee.length)-1?"0px":"24px"})},[((S=w==null?void 0:w.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&w.name?(a.openBlock(),a.createElementBlock("div",g6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.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"})},a.toDisplayString(w.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(w.comp)),{compName:w.name,config:{showIndex:w==null?void 0:w.showIndex,allowMove:w==null?void 0:w.allowMove,viewport:w==null?void 0:w.viewport,status:w==null?void 0:w.status},itemData:w==null?void 0:w.compData,related:w==null?void 0:w.relatedTables,childItemData:w==null?void 0:w.itemChildData,key:a.unref($n),onChange:a.unref(wo),index:(w==null?void 0:w.id)??z,onContentChange:a.unref(Co),onPageChange:a.unref(Eo),parentTableId:w==null?void 0:w.tableId,allMapContents:a.unref(hi),children:w==null?void 0:w.children,level:c.value,onRowClick:M,onRouteUrl:L,onRadioChange:v},null,40,["compName","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),k6=Kl._export_sfc(b6,[["__scopeId","data-v-ed72c7ff"]]),x6={class:"radio-group-container"},_6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(),d=at(A.pinia),{selectTab:b}=A.storeToRefs(d);a.watch(()=>r==null?void 0:r.itemData,()=>{s.value=b.value},{immediate:!0,deep:!0});const h=v=>{s.value=v,t("radioChange",s.value)};return(v,y)=>(a.openBlock(),a.createElementBlock("div",x6,[a.createVNode(pl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=c=>s.value=c),content:r==null?void 0:r.itemData,onChange:h},null,8,["modelValue","content"])]))}}),w6=Kl._export_sfc(_6,[["__scopeId","data-v-177d64c3"]]),Uc=a.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"}]),C6={TABLE:hc,FORM:ps,STATICFORM:vc,TABLEOPERATE:y1,TABLESTYLE:z1,TABLEEXTEND:I1,TABLEINTERACTION:R1,FORMOPERATE:fs,FOLD:h2,CALCULATOR:k2,METHODBUTTON:w2,AVATARUPLOAD:Yi.ssAvatar,SIGNATURE:Yi.ssSignature,FORMTOP:ps,STEP:I2,STEPOPERATE:t2,TIMELINE:F2,TIMELINEOPERATE:d2,FORMTOPOPERATE:fs,SIGNATUREOPERATE:M2,AVATARUPLOADOPERATE:S2,TABS:U2,TABSOPERATE:Nh,CHART:Hh,CHARTOPERATE:e4,LAYOUT:r4,LAYOUTOPERATE:p4,PARENTITEM:k6,RADIO:w6};function Et(l){return C6[l==null?void 0:l.toUpperCase()]||null}exports.De=Hc;exports.activeStepInfo=bt;exports.addContents=Pt;exports.addVisibleDialog=xi;exports.affixItems=Uf;exports.allMapContents=hi;exports.analyzeFilter=kt;exports.analyzeForm=Sd;exports.analyzeQuoteForm=Ed;exports.analyzeTable=Bd;exports.cacheNewData=ic;exports.clickMainKey=uc;exports.clickSavePage=Hf;exports.clickStep=pc;exports.clickTrigger=cc;exports.compId=$n;exports.compNames=sc;exports.compShow=Ct;exports.createRobotContent=ec;exports.existLayouts=Zf;exports.generateLayouts=N1;exports.getComponent=Et;exports.getComponents=Ft;exports.getPageData=Pr;exports.getSliceContLength=r0;exports.gridRowHeight=C1;exports.isStepLayout=fc;exports.onBack=Ff;exports.onButtonChange=Yf;exports.onChange=wo;exports.onClick=jf;exports.onContentChange=Co;exports.onExtendTaskEnd=Xf;exports.onOk=Jf;exports.onPageBack=e0;exports.onPageChange=Eo;exports.onSelectFixContent=Pf;exports.renderShowItems=tc;exports.robotFile=mf;exports.showItems=Xl;exports.sliceTableLength=oc;exports.slotContent=Uc;exports.ssTable=hc;exports.ssTag=Us;exports.st=Do;exports.stepItems=n0;exports.tabChange=Qf;exports.toolBar=Gf;exports.useFormComp=bi;exports.useModelLoader=Pp;exports.verifyButton=a0;
|
|
25
|
+
${cr}`,duration:5e3,showClose:!0})}else Qa.ElMessage.success("导出成功")}else Qa.ElMessage.error(((Ra=Pl==null?void 0:Pl.data)==null?void 0:Ra.message)||"导出失败")}catch(ce){console.error("导出paraform失败:",ce),Qa.ElMessage.error("导出失败:"+((ce==null?void 0:ce.message)||"未知错误"))}finally{oa.close()}}else if(u!=null&&u.includes("导出")&&u!=="导出paraform"){if(u==="导出选中"&&((Ge=ar.value)==null?void 0:Ge.length)===0)return Qa.ElMessage.warning(`请先勾选${u}的数据`);if(u==="导出全部"&&((Ia=K.value)==null?void 0:Ia.length)===0)return Qa.ElMessage.warning("暂无数据导出");let oa=["序号",...(ke=(za=xe.value)==null?void 0:za.map(ye=>ye==null?void 0:ye.prop))==null?void 0:ke.filter(ye=>ye!=="操作")],ce=u==="导出全部"?K.value:ar.value;const E=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id"];ce=ce==null?void 0:ce.map(ye=>Object.fromEntries(Object.entries(ye).filter(([Qe])=>!E.includes(Qe)))),oa=["序号",...oa],ce=ce==null?void 0:ce.map((ye,Qe)=>({序号:Qe+1,...ye}));let Me=(c==null?void 0:c.compName)||"表格信息";Oo(ce,Me,oa,Me)}else if(u==="OCR识别")Xa.value=!0,tl.value=[],Ea.value=1,Pa.value.clear(),ul.value.clear(),ol.value=0;else if(u==="迁移")i.selectRow=f,i.show=!0;else if(u==="生成方法"){let oa=await yf(f),ce;f!==""?ce=[f]:ce=A.cloneDeep(K.value),ce=ce==null?void 0:ce.map(Me=>(Me.输出值=oa,Me));const E={fixContent:ce,buttonName:"编辑",relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};ze("change",E)}else if(((_a=N==null?void 0:N.extra)==null?void 0:_a.type)==="methodButton"){let oa;f!==""?oa=[f]:oa=A.cloneDeep(K.value);const E={fixContent:await ci(oa,xe==null?void 0:xe.value,"Manual",K.value),buttonName:"methodButton",relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};ze("change",E)}}},qc=async(u,f)=>{var N,O,V,B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za;try{let ke,_a;const oa=(N=R.value[ma.value+k])==null?void 0:N.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="structureMethod"}),ce=(O=R.value[ma.value+k])==null?void 0:O.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="structure"}),E=oa==null?void 0:oa.find(Ma=>{var dl,Ga;return((Ga=(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.pageData)==null?void 0:Ga.method)==="保存"});if(!E)return;const Me=(le=(re=R.value[(B=(V=E==null?void 0:E.value)==null?void 0:V.pageData)==null?void 0:B.path])==null?void 0:re.filter(Ma=>{var dl;return((dl=Ma==null?void 0:Ma.key)==null?void 0:dl.type)==="data"}))==null?void 0:le.find(Ma=>{var dl,Ga,ml,yl;return((Ga=(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.tableData)==null?void 0:Ga.算法名称)===((yl=(ml=E==null?void 0:E.value)==null?void 0:ml.pageData)==null?void 0:yl.method)});if(!Me)return;const ye={buttonName:(ve=(H=E==null?void 0:E.value)==null?void 0:H.pageData)==null?void 0:ve.method,api:(De=(_e=Me==null?void 0:Me.value)==null?void 0:_e.tableData)==null?void 0:De.算法体,content:ce==null?void 0:ce.map(Ma=>{var dl;return(dl=Ma==null?void 0:Ma.value)==null?void 0:dl.pageData}),extraContent:[],extraValues:(je=(Be=E==null?void 0:E.value)==null?void 0:Be.pageData)==null?void 0:je.data,methodName:(Ha=(ca=E==null?void 0:E.value)==null?void 0:ca.pageData)==null?void 0:Ha.path};if(!u)return;const Qe={...u,compData:(Sa=u==null?void 0:u.compData)==null?void 0:Sa.map(Ma=>{var dl;return(Ma==null?void 0:Ma.key)==="formContent"?{...Ma,contents:(dl=Ma==null?void 0:Ma.contents)==null?void 0:dl.map(Ga=>(Ga==null?void 0:Ga.prop)===f?{...Ga,value:""}:Ga)}:Ma})},ta={key:{pageKey:ma.value+k,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:Qe}},da=await Qa.axios.post(ye.api,ta,{headers:{"Content-Type":"application/json"}});return((Xe=da==null?void 0:da.data)==null?void 0:Xe.code)===200&&(ke=(Ge=(Ra=da==null?void 0:da.data)==null?void 0:Ra.result)==null?void 0:Ge.latestReportCode,_a=(za=(Ia=da==null?void 0:da.data)==null?void 0:Ia.result)==null?void 0:za.status),{newMainKeyValue:ke,newStatus:_a}}catch(ke){throw Qa.ElMessage.error(ke),new Error(ke)}},Ci=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const Kc=async(u,f,N)=>{var H,ve;let O=u==null?void 0:u[f==null?void 0:f.prop],V=1,B,re;const le=A.cloneDeep(ma).value+k+O;if(le){Ci.value="",B=(H=R.value[le])==null?void 0:H.filter(Be=>{var je;return((je=Be==null?void 0:Be.key)==null?void 0:je.type)==="structure"});const _e=B==null?void 0:B.find(Be=>{var je,ca,Ha;return((Ha=(ca=(je=Be==null?void 0:Be.value)==null?void 0:je.pageData)==null?void 0:ca.comp)==null?void 0:Ha.toUpperCase())==="FORM"});re={...(ve=_e==null?void 0:_e.value)==null?void 0:ve.pageData,id:_e==null?void 0:_e.id};const De=await qc(re,f==null?void 0:f.prop);if(Ci.value=De==null?void 0:De.newStatus,De!=null&&De.newMainKeyValue)return De==null?void 0:De.newMainKeyValue}if(K.value.some(_e=>(_e==null?void 0:_e[f==null?void 0:f.prop])===O)){const _e=O;for(;K.value.some(De=>(De==null?void 0:De[f==null?void 0:f.prop])===`${_e}(${V})`);)V++;O=`${_e}(${V})`}return O},Wc=async(u,f,N)=>{var B,re,le,H;let O,V;if(await Kc(N==null?void 0:N.data,N==null?void 0:N.firstCol),O=A.cloneDeep(ma).value+k,V=A.cloneDeep(O)+`loading${((B=Fl.value)==null?void 0:B.account)||((re=Fl.value)==null?void 0:re.账号)}`,f){const ve=(H=(le=R.value[V])==null?void 0:le.filter(_e=>{var De;return((De=_e==null?void 0:_e.key)==null?void 0:De.parentTable)===""}))==null?void 0:H.map(_e=>{var De;return{id:_e==null?void 0:_e.id,...(De=_e==null?void 0:_e.value)==null?void 0:De.pageData}});(ve==null?void 0:ve.length)>0||await ua.loadingConstruct(O,V,null,null,null),We.setRouteToChildPath(A.cloneDeep(ma).value),ea.setActiveMenuPath(V)}else We.setRouteToChildPath(A.cloneDeep(ma).value),ea.setActiveMenuPath(V)},Yc=()=>{Ke.value=!1,Ye.value=[],wa.value=!1},zt=u=>{var B,re,le,H,ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce;const f=[];de.value=A.cloneDeep(xe.value),(re=ua.getColumnChild((B=A.cloneDeep(xe.value))==null?void 0:B.filter(E=>(E==null?void 0:E.label)!=="操作")))==null||re.forEach((E,Me)=>{var ye,Qe,ta;E!=null&&E.formType&&((ye=E==null?void 0:E.formType)==null?void 0:ye.toUpperCase())==="SELECT"||E!=null&&E.menuId?f.push({label:(Qe=E==null?void 0:E.prop)!=null&&Qe.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",name:(E==null?void 0:E.prop)??"t"+Me,prop:E==null?void 0:E.prop,type:"Select",value:(u==null?void 0:u[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??Me,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,relatedValueId:E==null?void 0:E.relatedValueId,disabled:E==null?void 0:E.disabled,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,allSelectionContents:(E==null?void 0:E.allSelectionContents)??[],filterContent:E==null?void 0:E.filterContent,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter}):f.push({label:(ta=E==null?void 0:E.prop)!=null&&ta.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",prop:E==null?void 0:E.prop,name:(E==null?void 0:E.prop)??"t"+Me,type:!(E!=null&&E.formType)||(E==null?void 0:E.formType)===""?"Input":E==null?void 0:E.formType,value:(E==null?void 0:E.formType)==="Upload"?(u==null?void 0:u[E==null?void 0:E.prop])??"{}":(u==null?void 0:u[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??Me,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,relatedValueId:E==null?void 0:E.relatedValueId,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter})}),u===""||!u||(ra.value=(u==null?void 0:u.id)??"");let N=ua.getColumnChild((le=A.cloneDeep(xe.value))==null?void 0:le.filter(E=>(E==null?void 0:E.label)!=="操作"));Fe.value&&((H=Fe.value)==null?void 0:H.length)>0&&(Fe.value=(ve=A.cloneDeep(Fe).value)==null?void 0:ve.map(E=>{var ye;let Me=(E==null?void 0:E.prop)||((ye=N==null?void 0:N.find(Qe=>(Qe==null?void 0:Qe.label)===(E==null?void 0:E.label)))==null?void 0:ye.prop);return Me&&(E.value=u[Me]),E})),ie.value=Fe.value&&((_e=Fe.value)==null?void 0:_e.length)>0?ua.getTableFormToForm(Fe.value):f,ie.value=((De=ie.value)==null?void 0:De.map(E=>({...E,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled})))??ie.value;let O=[],V=((ca=(je=(Be=c.itemData)==null?void 0:Be.filter(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:je[0])==null?void 0:ca.contents)??"";if(V=Ta.analyzeSplitToContent(V,","),(V==null?void 0:V.length)>0&&(O=V.flat()),(O==null?void 0:O.length)>0){let E=O==null?void 0:O.filter(da=>da==null?void 0:da.includes("@Type"));if(E=E==null?void 0:E[(E==null?void 0:E.length)-1],(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){let da=(Sa=(Ha=E==null?void 0:E.replace("=",$))==null?void 0:Ha.split($))==null?void 0:Sa[1];((Xe=da==null?void 0:da.trim())==null?void 0:Xe.toUpperCase())==="MANUAL"&&(c==null||c.index,ie.value=(Ra=ie.value)==null?void 0:Ra.map((Ma,dl)=>Ma))}let Me=(Ge=ie.value)==null?void 0:Ge.filter(da=>da==null?void 0:da.mainKey),ye;Me==null||Me.forEach(da=>{var dl;if(ye!==void 0)return;let Ma=da==null?void 0:da.menus;((dl=Me==null?void 0:Me.filter(Ga=>Ga==null?void 0:Ga.mainKey))==null?void 0:dl.length)>1&&(ye=Ma,da==null||da.groups)});let Qe=[],ta=new Map;if(Me==null||Me.forEach(da=>{var Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il;if((Ma=da==null?void 0:da.prop)!=null&&Ma.includes(".")){let Bl=[];ta.get(((Ga=(dl=da==null?void 0:da.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])+(da!=null&&da.isMainPath?0:1)+((ml=da==null?void 0:da.groups)==null?void 0:ml[0]))&&(Bl=ta.get(((jl=(yl=da==null?void 0:da.prop)==null?void 0:yl.split("."))==null?void 0:jl[0])+(da!=null&&da.isMainPath?0:1)+((Wa=da==null?void 0:da.groups)==null?void 0:Wa[0]))),Bl.push(da),ta.set(((Ka=(_l=da==null?void 0:da.prop)==null?void 0:_l.split("."))==null?void 0:Ka[0])+(da!=null&&da.isMainPath?0:1)+((hl=da==null?void 0:da.groups)==null?void 0:hl[0]),Bl)}else{let Bl=[];ta.get("normal"+(da!=null&&da.isMainPath?0:1)+((el=da==null?void 0:da.groups)==null?void 0:el[0]))&&(Bl=ta.get("normal"+(da!=null&&da.isMainPath?0:1)+((vl=da==null?void 0:da.groups)==null?void 0:vl[0]))),Bl.push(da),ta.set("normal"+(da!=null&&da.isMainPath?0:1)+((Il=da==null?void 0:da.groups)==null?void 0:Il[0]),Bl)}}),Qe=Array.from(ta.values()),(Qe==null?void 0:Qe.length)>0)for(let da in Qe){let Ma=Qe==null?void 0:Qe[da];if((Ma==null?void 0:Ma.length)!==1){if((Ma==null?void 0:Ma.length)>1){let dl=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.prop),Ga=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.label),ml=Ma==null?void 0:Ma.map(hl=>hl==null?void 0:hl.value),yl=(Ia=A.cloneDeep(Ma))==null?void 0:Ia[0],jl=(za=ie.value)==null?void 0:za.findIndex(hl=>(hl==null?void 0:hl.prop)===(yl==null?void 0:yl.prop)),Wa=(ke=ie.value)==null?void 0:ke.slice(0,jl),_l=(oa=ie.value)==null?void 0:oa.slice(jl,(_a=ie.value)==null?void 0:_a.length);yl.label=Ga==null?void 0:Ga.join("·"),yl.value=ml==null?void 0:ml.join(" "),yl.value.trim()===""&&(yl.value=""),yl.prop=dl==null?void 0:dl.join("·");let Ka=Ma==null?void 0:Ma.map(hl=>{var el;return(el=hl==null?void 0:hl.words)==null?void 0:el.join(".")});yl.relatedWords=Ka,yl.usingType="parent",_l.unshift(yl),ie.value=[...Wa,..._l],ie.value=(ce=ie.value)==null?void 0:ce.map(hl=>(dl!=null&&dl.find(el=>el===(hl==null?void 0:hl.prop))&&(hl.isFormColHidden=!0,hl.relatedWords=Ka),hl))}}}}},Jc=()=>{var f;const u=(f=s.value)==null?void 0:f.$el;u&&Ta.Sortable.create(u,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:N=>{var re;const{oldIndex:O,newIndex:V}=N;if(O===V)return;const B=Zr.value.splice(O,1)[0];Zr.value.splice(V,0,B),xe.value=(re=xe.value)==null?void 0:re.slice().sort((le,H)=>{if(le.label==="操作")return 1;if(H.label==="操作")return-1;const ve=Zr.value.findIndex(De=>De.label===le.label),_e=Zr.value.findIndex(De=>De.label===H.label);return ve-_e})}})};a.onMounted(()=>{ka.value=window.innerWidth-240*2,window.addEventListener("keydown",Ut)});const Gc=()=>{a.nextTick(()=>{Jc()})},Go=(u,f)=>{var O;if(!u&&!(u!=null&&u.children))return{contents:u,currentSelectContents:void 0};let N;return u.children=(O=u.children)==null?void 0:O.map(V=>{var B,re;if((V==null?void 0:V.id)===ra.value){let le={};for(let H in V){let ve=(B=f==null?void 0:f.find(_e=>(_e==null?void 0:_e.prop)===H))==null?void 0:B.label;ve?le[H]=(re=ir.value)==null?void 0:re[ve]:le[H]=V[H]??""}V=Object.assign(le,ir.value),N=V}else{let le=Go(V,f);V=le==null?void 0:le.contents,N=le==null?void 0:le.currentSelectContents}return V}),{contents:u,currentSelectContents:N}},Ei=(u,f)=>{let N,O;return u!=null&&u.find(V=>(V==null?void 0:V.id)===ra.value)?N=u==null?void 0:u.map(V=>{var B,re,le;if((V==null?void 0:V.id)===ra.value){let H={};for(let _e in V){let De=(B=f==null?void 0:f.find(Be=>(Be==null?void 0:Be.prop)===_e))==null?void 0:B.label;De?H[_e]=((re=ir.value)==null?void 0:re[De])??"":H[_e]=V[_e]??""}let ve=ir.value;for(let _e in H)(le=ir.value)!=null&&le[_e]||(ve[_e]=(H==null?void 0:H[_e])??"");V=ve,O=V}return V}):N=u==null?void 0:u.map(V=>{var B,re,le,H;if((V==null?void 0:V.id)===ra.value){let ve={};for(let _e in V){let De=(B=f==null?void 0:f.find(Be=>(Be==null?void 0:Be.prop)===_e))==null?void 0:B.label;De?ve[_e]=(re=ir.value)==null?void 0:re[De]:ve[_e]=V[_e]??""}V=Object.assign(ve,ir.value),O=V}else V=(le=Go(V,f))==null?void 0:le.contents,O=(H=Go(V,f))==null?void 0:H.currentSelectContents;return V}),{newContents:N,currentSelectContents:O}},Si=(u,f,N)=>{var O,V;return u[f==null?void 0:f.prop]=N,typeof u.id=="number"&&(u.id=(O=u.id)==null?void 0:O.toString()),u.children&&((V=u.children)==null?void 0:V.length)>0&&(u.children=u.children.map(Si)),u},Di=u=>{var N;const f=[];return f.push({...u}),u!=null&&u.children&&Array.isArray(u.children)&&((N=u.children)==null||N.forEach(O=>{f.push(...Di(O))})),(f==null?void 0:f.length)>0?f==null?void 0:f.map(O=>{const V={...O};return delete V.children,V}):[]},ro=["Pacific6000数据采集装置.通道号","通道号"],Ot=u=>{if(!u)return"";const f=ro.map(N=>u==null?void 0:u[N]).find(N=>N!=null&&String(N).trim()!=="");return f==null?"":String(f).trim()},Xo=async(u,f=void 0)=>{if(!u)return!1;try{const N=je=>{var ca,Ha,Sa;return je?typeof(je==null?void 0:je.value)=="string"?je.value:((Sa=(Ha=(ca=je==null?void 0:je._custom)==null?void 0:ca.value)==null?void 0:Ha.value)==null?void 0:Sa.value)||"":""},O=Array.isArray(mn.value)?mn.value:[],V=N(O.find(je=>(je==null?void 0:je.condition)==="child")),B=(ma.value||"").replace(/\/+$/,""),re=V?`${B}/${V}`:B,le=await Pr(re||ma.value,!1),H=String(Ie.value||"").trim(),ve=je=>String(je||"").trim(),_e=(je,ca=[],Ha="")=>{if(!Array.isArray(je))return ca;for(const Sa of je){const Xe=ve((Sa==null?void 0:Sa.choiceName)||(Sa==null?void 0:Sa.name0)||Ha);(Sa==null?void 0:Sa.comp)==="Table"&&(!H||Xe===H)&&ca.push(Sa),Array.isArray(Sa==null?void 0:Sa.children)&&_e(Sa.children,ca,Xe),Array.isArray(Sa==null?void 0:Sa.tab)&&_e(Sa.tab,ca,Xe),Array.isArray(Sa==null?void 0:Sa.choice)&&_e(Sa.choice,ca,Xe)}return ca},De=_e(le||[]),Be=String((c==null?void 0:c.compName)||"");return De.some(je=>{var Ha,Sa;const ca=((Sa=(Ha=je==null?void 0:je.compData)==null?void 0:Ha.find(Xe=>(Xe==null?void 0:Xe.key)==="tableContents"))==null?void 0:Sa.contents)||[];return!Array.isArray(ca)||ca.length===0?!1:ca.some(Xe=>{if(String((je==null?void 0:je.name)||"")===Be&&(Xe==null?void 0:Xe.id)===f)return!1;const Ge=Ot(Xe);return!!Ge&&Ge===u})})}catch{return(K.value||[]).some(O=>{if((O==null?void 0:O.id)===f)return!1;const V=Ot(O);return!!V&&V===u})}},It=async(u=!0,f,N)=>{var ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l;if(ir.value){const Ka=(_e=ua.getColumnChild((ve=A.cloneDeep(xe.value))==null?void 0:ve.filter(el=>(el==null?void 0:el.label)!=="操作")))==null?void 0:_e.filter(el=>(el==null?void 0:el.required)===!0);for(let el=0;el<((Ka==null?void 0:Ka.length)??0);el++){const vl=Ka[el],Il=vl==null?void 0:vl.prop,Bl=(vl==null?void 0:vl.label)??Il,pr=(De=ir.value)==null?void 0:De[Il];if(pr===""||pr===null||pr===void 0||Array.isArray(pr)&&pr.length===0){Qa.ElMessage.error(`${Bl}不能为空`);return}}const hl=Ot(ir.value);if(hl&&await Xo(hl,ra.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let O=ua.getColumnChild((Be=A.cloneDeep(xe.value))==null?void 0:Be.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")),V,B=A.cloneDeep(K.value);if(!ir.value){fa.value=!1;return}if(ra.value===""){$e.value++;let Ka;Ka={id:$e.value.toString()},Ka!=null&&Ka.children&&(Ka={...Ka,children:(je=Ka.children)==null?void 0:je.map(hl=>Si(hl,f,N))}),B.push(Object.assign(ir.value,Ka)),V=Object.assign(ir.value,Ka)}else B=(ca=Ei(B,O))==null?void 0:ca.newContents,V=(Ha=Ei(B,O))==null?void 0:Ha.currentSelectContents;const re=(Sa=c.itemData)==null?void 0:Sa.filter(Ka=>(Ka==null?void 0:Ka.key)==="childTree")[0];if(((Xe=re==null?void 0:re.contents)==null?void 0:Xe.length)>0){Te.value="编辑";const Ka=[];B==null||B.forEach((vl,Il)=>{var pr;let Bl={};if(Array.isArray(vl)){let Pl=[];vl==null||vl.filter(bl=>!(bl!=null&&bl.id)).forEach((bl,zl)=>{var Yl,Rl,fr,hr,Jl,sr,Lr;if((Rl=(Yl=$r.value)==null?void 0:Yl[zl])!=null&&Rl.prop&&!Array.isArray(bl)){let cr={};cr[$r.value[zl].column]=bl,Oa!=null&&Oa.value&&((fr=Oa==null?void 0:Oa.value)==null?void 0:fr.length)>0&&((hr=Oa==null?void 0:Oa.value)!=null&&hr.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(cr)))&&(Pl=(Jl=Oa==null?void 0:Oa.value)==null?void 0:Jl.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(cr))),Pl&&Pl.length>0?Bl[$r.value[zl].prop]=Pl!=null&&Pl.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===$r.value[zl].column})?(sr=Pl==null?void 0:Pl.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===$r.value[zl].column}))==null?void 0:sr[$r.value[zl].column]:bl:Bl[$r.value[zl].prop]=bl}else Array.isArray(bl)&&((Lr=$r.value[zl])!=null&&Lr.prop?Bl[$r.value[zl].prop]=bl:Bl.children=ui(bl,$r.value))})}else Bl=vl;if(Array.isArray(vl)&&vl.some(Pl=>Pl==null?void 0:Pl.id)){const Pl=(pr=vl==null?void 0:vl.find(bl=>bl.id))==null?void 0:pr.id;Ka.push(Object.assign(Bl,{id:Zt(Pl)}))}else Bl.id?Ka.push(Bl):Ka.push(Object.assign(Bl,{id:Il.toString()}))});const hl=(K.value||[]).map(vl=>String(vl==null?void 0:vl.id)),el=Qt(Ka,hl);K.value=Ai(el,re,xe.value)}Ni(K.value),tn.value=K.value;const le=Qp(tn.value,An.value,B);let H=[];if(P.value?(H=(Ra=A.cloneDeep(P).value.singleContent)==null?void 0:Ra.filter(Ka=>(Ka==null?void 0:Ka.id)!==(V==null?void 0:V.id)),H.push(V)):H=[V],Ll.value){const Ka={content:le,singleContent:((Ge=re==null?void 0:re.contents)==null?void 0:Ge.length)>0?H==null?void 0:H.flatMap(Di):H,index:c==null?void 0:c.index,buttonName:"编辑",column:xe.value,parentTableId:c==null?void 0:c.parentTableId};We.setCacheUpdatingData(Ka)}if((Ia=xe.value)==null||Ia.forEach(Ka=>{(Ka==null?void 0:Ka.formType)==="Upload"&&(V[Ka.prop]=V[Ka.prop]===""?"{}":typeof V[Ka.prop]!="string"?JSON.stringify(V[Ka.prop]):V[Ka.prop])}),u){(oa=(_a=(ke=(za=c.itemData)==null?void 0:za.find(el=>(el==null?void 0:el.key)==="filterAllType"))==null?void 0:ke.value)==null?void 0:_a.find(el=>(el==null?void 0:el.value)==="onConditionContents"))==null||oa.content;let Ka=(ce=c.itemData)==null?void 0:ce.filter(el=>(el==null?void 0:el.key)==="filterAllType");Ka=Array.from(new Map(Ka.filter(Boolean).map((el,vl)=>[el.value,{...el,_idx:vl}])).values()).sort((el,vl)=>el._idx-vl._idx).map(({_idx:el,...vl})=>vl),Ka=(E=Ka==null?void 0:Ka[(Ka==null?void 0:Ka.length)-1])==null?void 0:E.value;const hl={fixContent:[V],buttonName:Te.value,relatedContents:c==null?void 0:c.related,columns:xe.value,name:c==null?void 0:c.compName};We.setTableLoading(c==null?void 0:c.index),fa.value=!1,ir.value=void 0,ze("change",hl)}if((Qe=(ye=(Me=ie.value)==null?void 0:Me[0])==null?void 0:ye.optionUrl)!=null&&Qe.menuId){fa.value=!1;let Ka=(ta=c.itemData)==null?void 0:ta.filter(hl=>(hl==null?void 0:hl.key)==="filterAllType");if((Ka==null?void 0:Ka.length)>0){let hl=Ka==null?void 0:Ka.map(Il=>Il==null?void 0:Il.value),el=(dl=(Ma=(da=hl.flat().find(Il=>{var Bl;return(Bl=Il==null?void 0:Il.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:da.content)==null?void 0:Ma.split(":"))==null?void 0:dl[1];((yl=(ml=(Ga=hl.flat().find(Il=>{var Bl;return(Bl=Il==null?void 0:Il.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:Ga.content)==null?void 0:ml.split(":"))==null?void 0:yl[1])!=="Manual"&&(el=parseInt(el),K.value=(_l=K.value)==null?void 0:_l.slice(((jl=K.value)==null?void 0:jl.length)-el,(Wa=K.value)==null?void 0:Wa.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Ut),xe.value=[],K.value=[],de.value=[],ya.value=[],Fe.value=[],$a.value=[],Ye.value=[],Oe.value=[],ie.value=[],ar.value=[],s.value=null,Mn.value=""});const no=async(u,f,N)=>{var je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce;Hl.value=(N==null?void 0:N.prop)??(N==null?void 0:N.property);const O=A.cloneDeep(c.itemData),V=((je=O==null?void 0:O.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:je.contents)??[];let B=V==null?void 0:V.find((E,Me)=>{var ye,Qe,ta;return(E==null?void 0:E.prop)===Hl.value||(E==null?void 0:E.label)===Hl.value||(Me==null?void 0:Me.toString())===((ta=(Qe=(ye=Hl.value)==null?void 0:ye.split("a"))==null?void 0:Qe[1])==null?void 0:ta.toString())});const re=ua.getColumnChild((ca=A.cloneDeep(xe.value))==null?void 0:ca.filter(E=>(E==null?void 0:E.label)!=="操作"));if(B||(B=re==null?void 0:re.find(E=>(E==null?void 0:E.prop)===Hl.value||(E==null?void 0:E.label)===Hl.value)),B&&!((Ha=B==null?void 0:B.menus)!=null&&Ha.length)&&!((Sa=B==null?void 0:B.groups)!=null&&Sa.length)&&!((Xe=B==null?void 0:B.words)!=null&&Xe.length)){const E=(Ra=ie.value)==null?void 0:Ra.find(Me=>(Me==null?void 0:Me.prop)===Hl.value);E&&(B={...B,menus:(E==null?void 0:E.menus)??(B==null?void 0:B.menus),groups:(E==null?void 0:E.groups)??(B==null?void 0:B.groups),words:(E==null?void 0:E.words)??(B==null?void 0:B.words),bindMenus:(E==null?void 0:E.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(E==null?void 0:E.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(E==null?void 0:E.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(E==null?void 0:E.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((Ge=ie==null?void 0:ie.value)==null||Ge.forEach(E=>{var Me,ye,Qe,ta,da;(E==null?void 0:E.prop)===(B==null?void 0:B.prop)&&(E!=null&&E.endChildMenu)&&((Me=B==null?void 0:B.prop)!=null&&Me.includes(".")&&((Qe=(ye=B==null?void 0:B.prop)==null?void 0:ye.split("."))==null?void 0:Qe[0])!==((da=(ta=E==null?void 0:E.prop)==null?void 0:ta.split("."))==null?void 0:da[0])?B.endChildMenu=E==null?void 0:E.value:B.endChildMenu=E==null?void 0:E.endChildMenu)})),!B)return;const le=Hl.value,H=(Ia=K.value)==null?void 0:Ia.findIndex(E=>(E==null?void 0:E.id)===(f==null?void 0:f.id));H!==-1&&le&&(K.value[H]={...K.value[H],[le]:u});const ve=E=>{Array.isArray(E)&&E.forEach(Me=>{Array.isArray(Me==null?void 0:Me.allSelectionContents)&&Me.allSelectionContents.length>0&&(Me.contactValue=K.value[H]??f),Array.isArray(Me==null?void 0:Me.children)&&Me.children.length>0&&ve(Me.children)})};ve(xe.value),B.value=u,B.endChildMenu=B.endChildMenu||"";let _e=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const De=E=>{Array.isArray(E)&&E.forEach(Me=>{var Qe,ta;if(((Me==null?void 0:Me.type)==="Select"||(Me==null?void 0:Me.formType)&&Me.formType.toUpperCase()==="SELECT"||(Me==null?void 0:Me.columnType)&&Me.columnType.toUpperCase()==="SELECT")&&Array.isArray(Me==null?void 0:Me.menus)&&Me.menus.length>0&&Me.menus[Me.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const da=(Qe=Me==null?void 0:Me.prop)!=null&&Qe.includes(".")?Me.prop.split(".")[0]:null,Ma=(ta=B==null?void 0:B.prop)!=null&&ta.includes(".")?B.prop.split(".")[0]:null;(!da||!Ma||da===Ma)&&(Me.endChildMenu=_e)}Array.isArray(Me==null?void 0:Me.children)&&Me.children.length>0&&De(Me.children)})};if(De(xe.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let E=B!=null&&B.relatedContents&&((za=B==null?void 0:B.relatedContents)==null?void 0:za.length)>0?(ke=B==null?void 0:B.relatedContents)==null?void 0:ke.find(Me=>{var ye,Qe,ta,da;return(Me==null?void 0:Me[(da=(ye=B==null?void 0:B.prop)==null?void 0:ye.split("."))==null?void 0:da[((ta=(Qe=B==null?void 0:B.prop)==null?void 0:Qe.split("."))==null?void 0:ta.length)-1]])===(B==null?void 0:B.value)}):await as(B);if(E){const Me={...f};re==null||re.forEach(ye=>{var Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il;(ye==null?void 0:ye.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((Qe=B==null?void 0:B.relatedContents)==null?void 0:Qe.length)>0?(ta=ye==null?void 0:ye.prop)!=null&&ta.includes(".")&&((Ma=(da=ye==null?void 0:ye.prop)==null?void 0:da.split("."))==null?void 0:Ma[0])===((Ga=(dl=B==null?void 0:B.prop)==null?void 0:dl.split("."))==null?void 0:Ga[0])?Me[ye.prop]=E[(Wa=(ml=ye==null?void 0:ye.prop)==null?void 0:ml.split("."))==null?void 0:Wa[((jl=(yl=ye==null?void 0:ye.prop)==null?void 0:yl.split("."))==null?void 0:jl.length)-1]]??Me[ye.prop]:Me[ye.prop]=(E==null?void 0:E[ye.prop])??Me[ye.prop]:Ta.same((B==null?void 0:B.menus)??[],(ye==null?void 0:ye.menus)??[])&&Ta.same((B==null?void 0:B.groups)??[],(ye==null?void 0:ye.groups)??[])&&!Ta.same((B==null?void 0:B.words)??[],(ye==null?void 0:ye.words)??[])?(_l=ye==null?void 0:ye.prop)!=null&&_l.includes(".")&&((hl=(Ka=ye==null?void 0:ye.prop)==null?void 0:Ka.split("."))==null?void 0:hl[0])!==((vl=(el=B==null?void 0:B.prop)==null?void 0:el.split("."))==null?void 0:vl[0])||(Me[ye.prop]=(E==null?void 0:E[(Il=ye==null?void 0:ye.words)==null?void 0:Il.join(".")])??(E==null?void 0:E[ye.prop])??Me[ye.prop]):(!(ye!=null&&ye.isMainPath)&&Ta.same((B==null?void 0:B.bindMenus)??[],(ye==null?void 0:ye.bindMenus)??[]),Me[ye.prop]=(E==null?void 0:E[ye.prop])??Me[ye.prop]))}),K.value=(_a=A.cloneDeep(K.value))==null?void 0:_a.map(ye=>(ye==null?void 0:ye.id)===(f==null?void 0:f.id)?{...Me,id:ye==null?void 0:ye.id}:ye)}}if((oa=B==null?void 0:B.optionUrl)!=null&&oa.menuSelect){let E="";re==null||re.forEach(Qe=>{var ta,da,Ma,dl,Ga;E===""&&((Ma=(da=(ta=Qe==null?void 0:Qe.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:da[1])!=null&&Ma.includes("["))&&(E=(Ga=(dl=Qe==null?void 0:Qe.optionUrl)==null?void 0:dl.groupSelect)==null?void 0:Ga[1])});let Me=await di(B),ye;if(Me==null||Me.forEach(Qe=>{var ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l;E===((da=(ta=B==null?void 0:B.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:da[1])&&((Ga=(dl=(Ma=B==null?void 0:B.optionUrl)==null?void 0:Ma.groupSelect)==null?void 0:dl[1])!=null&&Ga.includes("["))&&((_l=A.cloneDeep(Qe))==null?void 0:_l[(Wa=(jl=(yl=(ml=B==null?void 0:B.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])==null?void 0:jl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])===(B==null?void 0:B.value)&&(ye=Qe)}),ye){const Qe={...f};re==null||re.forEach(ta=>{var da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl;(ye!=null&&ye[ta==null?void 0:ta.label]||ye!=null&&ye[(Ga=(dl=(Ma=(da=ta==null?void 0:ta.optionUrl)==null?void 0:da.groupSelect)==null?void 0:Ma[1])==null?void 0:dl.replaceAll("[",""))==null?void 0:Ga.replaceAll("]","")])&&((jl=(yl=(ml=ta==null?void 0:ta.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])!=null&&jl.includes("["))&&(Qe[ta.prop]=(ye==null?void 0:ye[ta==null?void 0:ta.label])||(ye==null?void 0:ye[(hl=(Ka=(_l=(Wa=ta==null?void 0:ta.optionUrl)==null?void 0:Wa.groupSelect)==null?void 0:_l[1])==null?void 0:Ka.replaceAll("[",""))==null?void 0:hl.replaceAll("]","")]))}),K.value=(ce=A.cloneDeep(K.value))==null?void 0:ce.map(ta=>(ta==null?void 0:ta.id)===(f==null?void 0:f.id)?{...Qe,id:ta==null?void 0:ta.id}:ta)}}},Xc=async u=>{var je,ca,Ha,Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa;if(!u)return;const f=A.cloneDeep(ir.value||{});ir.value=u;const N=Ot(f),O=Ot(ir.value);if(O&&O!==N&&await Xo(O,ra.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),ro.forEach(E=>{if(Object.prototype.hasOwnProperty.call(ir.value||{},E)||Object.prototype.hasOwnProperty.call(f||{},E)){const Me=(f==null?void 0:f[E])??"";ir.value[E]=Me,u[E]=Me}}),ie.value=(ie.value||[]).map(E=>{if(!(E!=null&&E.prop)||!ro.includes(E.prop))return E;const Me=(f==null?void 0:f[E.prop])??"";return{...E,value:Me,selectValue:Me===""?[]:[Me]}});return}let V=A.cloneDeep(c.itemData);V==null||V.map(ce=>{var E,Me,ye,Qe;return(ce==null?void 0:ce.key)==="header"&&(Array.isArray((E=ce.contents)==null?void 0:E[0])?ce.contents=(ye=ua.getColumnChild((Me=ce.contents)==null?void 0:Me[0]))==null?void 0:ye.map((ta,da)=>{var Ma,dl,Ga,ml,yl,jl;return((Ga=(dl=(Ma=ie.value)==null?void 0:Ma.find(Wa=>(Wa==null?void 0:Wa.prop)===(ta==null?void 0:ta.prop)))==null?void 0:dl.optionUrl)==null?void 0:Ga.multiple)===!0&&!Array.isArray((ml=Object.values(u))==null?void 0:ml[da])?ta.value=[(yl=Object.values(u))==null?void 0:yl[da]]:ta.value=(jl=Object.values(u))==null?void 0:jl[da],ta}):ce.contents=(Qe=ce.contents)==null?void 0:Qe.map((ta,da)=>{var Ma,dl,Ga,ml,yl,jl;return((Ga=(dl=(Ma=ie.value)==null?void 0:Ma.find(Wa=>(Wa==null?void 0:Wa.prop)===(ta==null?void 0:ta.prop)))==null?void 0:dl.optionUrl)==null?void 0:Ga.multiple)===!0&&!Array.isArray((ml=Object.values(u))==null?void 0:ml[da])?ta.value=[(yl=Object.values(u))==null?void 0:yl[da]]:ta.value=(jl=Object.values(u))==null?void 0:jl[da],ta})),ce});let B=ie.value,re=(je=V==null?void 0:V.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:je.contents;if(B=B==null?void 0:B.map(ce=>{var E;return ce.value=ce.value??((E=re==null?void 0:re.find((Me,ye)=>(Me==null?void 0:Me.prop)===(ce==null?void 0:ce.name)))==null?void 0:E.value),ce}),!Tr.value)return;let le=A.cloneDeep(Hl.value);(ca=Hl.value)!=null&&ca.includes("·")&&(Hl.value=(Sa=(Ha=Hl.value)==null?void 0:Ha.split("·"))==null?void 0:Sa[0]);let H=(Ra=(Xe=V==null?void 0:V.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:Xe.contents)==null?void 0:Ra.find((ce,E)=>(ce==null?void 0:ce.prop)===Hl.value);(Ge=ie==null?void 0:ie.value)==null||Ge.forEach(ce=>{var E,Me,ye,Qe,ta,da,Ma,dl,Ga;(ce==null?void 0:ce.prop)===(H==null?void 0:H.prop)&&(ce!=null&&ce.endChildMenu)&&((E=H==null?void 0:H.prop)!=null&&E.includes(".")&&((ye=(Me=H==null?void 0:H.prop)==null?void 0:Me.split("."))==null?void 0:ye[0])!==((ta=(Qe=ce==null?void 0:ce.prop)==null?void 0:Qe.split("."))==null?void 0:ta[0])?H.endChildMenu=(Ma=(da=ce==null?void 0:ce.value)==null?void 0:da.split(" "))==null?void 0:Ma[0]:H.endChildMenu=(Ga=(dl=ce==null?void 0:ce.endChildMenu)==null?void 0:dl.split(" "))==null?void 0:Ga[0])});let ve=H!=null&&H.isMainPath&&(H!=null&&H.mainKey)?H==null?void 0:H.value:"",_e=A.cloneDeep(B),De=be.value;if(De!=null&&De.find(ce=>(H==null?void 0:H.prop)===(ce==null?void 0:ce.key))&&(De=De==null?void 0:De.filter(ce=>(H==null?void 0:H.prop)!==(ce==null?void 0:ce.key))),De!=null&&De.find(ce=>le===(ce==null?void 0:ce.key))&&(De=De==null?void 0:De.filter(ce=>le!==(ce==null?void 0:ce.key))),_e=_e==null?void 0:_e.map(ce=>{var E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl;return(ce==null?void 0:ce.type)==="Select"&&(((E=ce==null?void 0:ce.allSelectionContents)==null?void 0:E.length)>0&&(ce.contactValue=u),((H==null?void 0:H.prop)===(ce==null?void 0:ce.prop)||le===(ce==null?void 0:ce.prop))&&H&&(Array.isArray(H.value)&&((Me=H.value)==null?void 0:Me.length)>0&&((ye=H.value)!=null&&ye.every(el=>typeof el=="string"))?(De.push({key:ce==null?void 0:ce.prop,value:[(ta=H.value)==null?void 0:ta[((Qe=H.value)==null?void 0:Qe.length)-1]]}),ce.selectValue=(da=De==null?void 0:De.find(el=>(el==null?void 0:el.key)===(ce==null?void 0:ce.prop)))==null?void 0:da.value):Array.isArray(H.value)&&((Ma=H.value)==null?void 0:Ma.length)===0?(De=[],ce.selectValue=[],u[ce==null?void 0:ce.prop]=""):Array.isArray(ce.value)&&De.push({key:ce==null?void 0:ce.prop,value:[(dl=ce.value)==null?void 0:dl[(ce==null?void 0:ce.length)-1]]})),((ml=ce==null?void 0:ce.menus)==null?void 0:ml[((Ga=ce==null?void 0:ce.menus)==null?void 0:Ga.length)-1])===""&&(H!=null&&H.isMainPath)&&(H!=null&&H.mainKey)&&((yl=ce==null?void 0:ce.prop)!=null&&yl.includes(".")&&((Wa=(jl=ce==null?void 0:ce.prop)==null?void 0:jl.split("."))==null?void 0:Wa[0])!==((Ka=(_l=H==null?void 0:H.prop)==null?void 0:_l.split("."))==null?void 0:Ka[0])||(ce.endChildMenu=(hl=ve==null?void 0:ve.split(" "))==null?void 0:hl[0]))),ce.value=(u==null?void 0:u[ce==null?void 0:ce.prop])??(ce==null?void 0:ce.value),ce}),be.value=De,_e!=null&&_e.some(ce=>(ce==null?void 0:ce.functionName)&&(ce==null?void 0:ce.functionName)!=="")){let ce=await ci([u],xe==null?void 0:xe.value,"Auto",K.value);_e=_e==null?void 0:_e.map(E=>{var Me;return E.value=((Me=ce==null?void 0:ce[0])==null?void 0:Me[E==null?void 0:E.prop])??E.value,E}),ir.value=ce==null?void 0:ce[0]}if(ie.value=A.cloneDeep(_e),H=Object.assign({},H??{},{relatedWords:(za=(Ia=ie==null?void 0:ie.value)==null?void 0:Ia.find(ce=>(ce==null?void 0:ce.prop)===(H==null?void 0:H.prop)))==null?void 0:za.relatedWords}),(H==null?void 0:H.mainKey)&&(H!=null&&H.value)&&(H==null?void 0:H.value)!==""){let ce=H!=null&&H.relatedContents&&((ke=H==null?void 0:H.relatedContents)==null?void 0:ke.length)>0?(_a=H==null?void 0:H.relatedContents)==null?void 0:_a.find(E=>{var Me,ye,Qe,ta;return(E==null?void 0:E[(ta=(Me=H==null?void 0:H.prop)==null?void 0:Me.split("."))==null?void 0:ta[((Qe=(ye=H==null?void 0:H.prop)==null?void 0:ye.split("."))==null?void 0:Qe.length)-1]])===(H==null?void 0:H.value)}):await as(H);if(ce&&JSON.stringify(ce)!=="{}"){let E=_e;E=E==null?void 0:E.map(ye=>{var Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il,Bl,pr,Pl,bl,zl;return(H==null?void 0:H.prop)===(ye==null?void 0:ye.prop)?ye.value=(ce==null?void 0:ce[(Qe=ye==null?void 0:ye.words)==null?void 0:Qe.join(".")])??(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ce[(dl=(ta=ye==null?void 0:ye.prop)==null?void 0:ta.split("."))==null?void 0:dl[((Ma=(da=ye==null?void 0:ye.prop)==null?void 0:da.split("."))==null?void 0:Ma.length)-1]]:H!=null&&H.relatedContents&&((Ga=H==null?void 0:H.relatedContents)==null?void 0:Ga.length)>0?ye.value=(ml=ye==null?void 0:ye.prop)!=null&&ml.includes(".")&&((jl=(yl=ye==null?void 0:ye.prop)==null?void 0:yl.split("."))==null?void 0:jl[0])===((_l=(Wa=H==null?void 0:H.prop)==null?void 0:Wa.split("."))==null?void 0:_l[0])?ce[(vl=(Ka=ye==null?void 0:ye.prop)==null?void 0:Ka.split("."))==null?void 0:vl[((el=(hl=ye==null?void 0:ye.prop)==null?void 0:hl.split("."))==null?void 0:el.length)-1]]:(ce==null?void 0:ce[ye==null?void 0:ye.prop])??(ye==null?void 0:ye.value):Ta.same((H==null?void 0:H.menus)??[],(ye==null?void 0:ye.menus)??[])&&Ta.same((H==null?void 0:H.groups)??[],(ye==null?void 0:ye.groups)??[])&&!Ta.same((H==null?void 0:H.words)??[],(ye==null?void 0:ye.words)??[])?(Il=ye==null?void 0:ye.prop)!=null&&Il.includes(".")&&((pr=(Bl=ye==null?void 0:ye.prop)==null?void 0:Bl.split("."))==null?void 0:pr[0])!==((bl=(Pl=H==null?void 0:H.prop)==null?void 0:Pl.split("."))==null?void 0:bl[0])||(ye.value=(ce==null?void 0:ce[(zl=ye==null?void 0:ye.words)==null?void 0:zl.join(".")])??(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ye.value):(!(ye!=null&&ye.isMainPath)&&Ta.same((H==null?void 0:H.bindMenus)??[],(ye==null?void 0:ye.bindMenus)??[]),ye.value=(ce==null?void 0:ce[ye==null?void 0:ye.prop])??ye.value),ye}),ie.value=E;let Me={};(oa=ie.value)==null||oa.forEach(ye=>{Me[ye.prop]=ye==null?void 0:ye.value}),ir.value=Me}}Tr.value=!0,Y.value=!1},Zc=u=>u?(u==null?void 0:u.toUpperCase())==="INPUT"?"TEXTAREA":u:"TEXTAREA",Qc=u=>{var B,re;const f=(re=(B=Fe.value)==null?void 0:B.find(le=>(le==null?void 0:le.label)===(u==null?void 0:u.label)))==null?void 0:re.multiple,N=u==null?void 0:u.prop;if((u==null?void 0:u.formType)!="Select")return;K.value.forEach(le=>{const H=le==null?void 0:le[N];f&&ko.isString(H)&&(le[N]=[H]),!f&&!ko.isString(H)&&(le[N]="")})},Bi=(u,f)=>{var N;return f==null||f.forEach(O=>{u[O==null?void 0:O.prop]=O==null?void 0:O.value}),u.children&&((N=u.children)==null?void 0:N.length)>0&&(u.children=u.children.map(O=>Bi(O,f))),u},Zo=u=>{var N,O,V,B,re,le;zt("");const f=(N=ie.value)==null?void 0:N.reduce((H,ve)=>(H[ve.name]=ve.value,H),{});if(((O=Object.keys(f))==null?void 0:O.length)>0){ir.value=f,ra.value="",$e.value=(V=K.value)==null?void 0:V.length,Oe.value=(B=ue.value)==null?void 0:B.filter(ve=>(ve==null?void 0:ve.label)!=="新增");const H=(le=(re=de.value)==null?void 0:re.filter(ve=>(ve==null?void 0:ve.label)!=="操作"))==null?void 0:le.map(ve=>{var De,Be,je;const _e=(Be=(De=Fe.value)==null?void 0:De.find(ca=>(ca==null?void 0:ca.label)===(ve==null?void 0:ve.label)))==null?void 0:Be.multiple;return Qc(ve),{...ve,contents:(ve==null?void 0:ve.options)??[],optionUrl:ve!=null&&ve.formMenuSelect&&((je=ve==null?void 0:ve.formMenuSelect)==null?void 0:je.length)>0?{groupSelect:ve==null?void 0:ve.groupSelect,menuSelect:ve==null?void 0:ve.formMenuSelect,selectRelateType:"",type:ve==null?void 0:ve.formType,multiple:_e}:null}});xe.value=H==null?void 0:H.map(ve=>Bi(ve,[{prop:"type",value:"edit"},{prop:"columnType",value:Zc(ve==null?void 0:ve.formType)||(ve==null?void 0:ve.columnType)}])),u==="createClick"&&(Te.value="新增",It(!0))}},ut={START:"开始时间",END:"结束时间",HOURS:"工时"},eu=(u,f)=>Number(A.dayjs(f).diff(A.dayjs(u),"day",!0).toFixed(1)),Ni=u=>{var B;const f=c.itemData,N=(B=f==null?void 0:f.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:B.contents,O=new Map;return N==null||N.forEach((re,le)=>{const{label:H}=re;O.set(H,le)}),!O.has(ut.START)||!O.has(ut.END)||!O.has(ut.HOURS)?u:u==null?void 0:u.map(re=>{const le=re==null?void 0:re[ut.START],H=re==null?void 0:re[ut.END],ve=eu(le,H);return le&&H&&(re[ut.HOURS]=`${ve}天`),re})},Ti=(u,f,N=0)=>{if(N>((f==null?void 0:f.length)??""))return u;const O=f==null?void 0:f[N],V=new Map;for(const re of u){const le=re[O];V.has(le)||V.set(le,[]),V.get(le)&&V.get(le).push(re)}const B=[];for(const[re,le]of V){const[H,...ve]=le,_e={...H};N+1===((f==null?void 0:f.length)??"")?_e.children=le==null?void 0:le.map(De=>(De.level=A.cloneDeep(N)+1,De)).filter((De,Be)=>Be!==0):ve.length>0&&(_e.children=Ti(ve,f,N+1)),_e.level=N,B.push(_e)}return B},Ai=(u,f,N)=>{var V;if(!(f!=null&&f.contents)||((V=f==null?void 0:f.contents)==null?void 0:V.length)===0)return u;let O=[];return O=Ti(u,f==null?void 0:f.contents,0),O},Mi=async(u,f)=>{var Sa,Xe,Ra,Ge,Ia,za,ke,_a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el,vl,Il,Bl,pr,Pl,bl,zl,Yl,Rl,fr,hr,Jl,sr,Lr,cr,lr,nr,Oi,Ii,Li;const N=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="header");u==null||u.filter(ia=>(ia==null?void 0:ia.key)==="tableIndexColumn")[0];const O=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="childTree")[0];let V=!0;if((Ra=(Xe=(Sa=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:Sa.value)==null?void 0:Xe.find(ia=>(ia==null?void 0:ia.value)==="onPamButtonContents"))!=null&&Ra.content){let ia=(za=(Ia=(Ge=u==null?void 0:u.find(Nl=>(Nl==null?void 0:Nl.key)==="filterAllType"))==null?void 0:Ge.value)==null?void 0:Ia.find(Nl=>(Nl==null?void 0:Nl.value)==="onPamButtonContents"))==null?void 0:za.content;ia=(ke=ia==null?void 0:ia.split(":"))==null?void 0:ke[1],ia=(_a=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:_a.split(","),V=!!(ia!=null&&ia.find(Nl=>Nl==="操作"))}const B=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="page"),re=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="rowButton"),le=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="extraButton"),H=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableContents"),ve=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="bottomButton"),_e=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableIndex");Fe.value=(ce=(oa=u==null?void 0:u.filter(ia=>(ia==null?void 0:ia.key)==="tableToForm"))==null?void 0:oa[0])==null?void 0:ce.contents,ba.value=(B==null?void 0:B.contents)??!0;let De=[];Zl.value===""?De=N==null?void 0:N[0]:De=(N==null?void 0:N.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+Zl.value+")"))??(N==null?void 0:N.find(ia=>!(ia!=null&&ia.selectLabel)));let Be=[];Zl.value===""?Be=_e==null?void 0:_e[0]:Be=(_e==null?void 0:_e.find(ia=>(ia==null?void 0:ia.selectLabel)==="("+Zl.value+")"))??(_e==null?void 0:_e.find(ia=>!(ia!=null&&ia.selectLabel)));let je=[],ca=[];if(((E=De==null?void 0:De.contents)==null?void 0:E.length)>0){let ia=[],Nl=De==null?void 0:De.contents;if(Array.isArray(Nl==null?void 0:Nl[0])&&((Me=Nl==null?void 0:Nl[0])!=null&&Me.every(al=>!(al!=null&&al.children)))&&(Nl=Nl==null?void 0:Nl[0]),Nl.some(al=>Array.isArray(al)&&(al==null?void 0:al.find(qe=>qe.children))))ia=(ye=ua.getGradeColumns(Nl,V))==null?void 0:ye[0],ia!=null&&ia.find(al=>(al==null?void 0:al.label)==="操作")||ia.push({label:"操作",prop:"operate",type:"operate"});else{let al=Nl.some(qe=>Array.isArray(qe))?Nl==null?void 0:Nl[0]:Nl;al!=null&&al.find(qe=>(qe==null?void 0:qe.label)==="操作")||al.push({label:"操作",prop:"operate",type:"operate"}),al==null||al.forEach((qe,Gl)=>{var Dr,wr,Br,kr,Gn,ft,ht,vr,fn,In,vt,Yr,Ln,Pi,Fi,ji,Hi,Ui,qi,Ki;if((wr=(Dr=ma.value)==null?void 0:Dr.split("/"))==null||wr.forEach(Ql=>{var ur,kn,Wi;Ql!==""&&((Wi=(kn=(ur=Ql==null?void 0:Ql.split(k+"updateLoading"))==null?void 0:ur[0])==null?void 0:kn.split(k+"loading"))==null||Wi[0])}),qe!=null&&qe.methodContent){let Ql=(Gn=(kr=(Br=qe==null?void 0:qe.methodContent)==null?void 0:Br.replace("@","%%#"))==null?void 0:kr.split("%%#"))==null?void 0:Gn[1];if(Ql=Ql==null?void 0:Ql.slice(0,(Ql==null?void 0:Ql.length)-1),Ql=ua.contentTransArrayToAllNoExtra(Ql??"",","),(ft=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("@Button")))!=null&&ft.includes("Prop")&&((ht=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("Type")))!=null&&ht.includes("Manual"))){let ur=(fn=(vr=Ql==null?void 0:Ql.find(kn=>kn==null?void 0:kn.includes("@Button")))==null?void 0:vr.split(":"))==null?void 0:fn[1];ur=((Yr=(vt=(In=ur==null?void 0:ur.replaceAll("[",""))==null?void 0:In.replaceAll("]",""))==null?void 0:vt.split(","))==null?void 0:Yr[1])??"算法执行",je.push(ur)}else if((Ln=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("@Button")))!=null&&Ln.includes("Row")&&((Pi=Ql==null?void 0:Ql.find(ur=>ur==null?void 0:ur.includes("Type")))!=null&&Pi.includes("Manual"))){let ur=(ji=(Fi=Ql==null?void 0:Ql.find(kn=>kn==null?void 0:kn.includes("@Button")))==null?void 0:Fi.split(":"))==null?void 0:ji[1];ur=((qi=(Ui=(Hi=ur==null?void 0:ur.replaceAll("[",""))==null?void 0:Hi.replaceAll("]",""))==null?void 0:Ui.split(","))==null?void 0:qi[1])??"算法执行",ca.push(ur)}}(Ki=Fe.value)==null||Ki.find(Ql=>(Ql==null?void 0:Ql.prop)===(qe==null?void 0:qe.prop)),ia.push({label:(qe==null?void 0:qe.label)==="操作"?V?"操作":"":(qe==null?void 0:qe.label)??"",prop:(qe==null?void 0:qe.label)==="操作"?"operate":(qe==null?void 0:qe.prop)??"a"+Gl,width:qe!=null&&qe.width?parseInt(qe.width):"",fixed:(qe==null?void 0:qe.fixed)??void 0,sortable:(qe==null?void 0:qe.sortable)??!1,filterable:(qe==null?void 0:qe.filterable)??!1,operable:(qe==null?void 0:qe.operable)??!1,showSummary:(qe==null?void 0:qe.showSummary)??!1,align:(qe==null?void 0:qe.align)??"left",showOverflowTooltip:(qe==null?void 0:qe.showOverflowTooltip)??!0,isNotDrag:(qe==null?void 0:qe.isNotDrag)??!1,isEditCol:(qe==null?void 0:qe.isEditCol)??!1,isOperate:(qe==null?void 0:qe.isOperate)??!1,id:(qe==null?void 0:qe.id)??Gl,type:(qe==null?void 0:qe.label)==="操作"?"operate":void 0,formType:(qe==null?void 0:qe.formType)??(qe!=null&&qe.groupSelect?"Select":""),disabled:qe==null?void 0:qe.disabled,options:(qe==null?void 0:qe.options)??[],value:(qe==null?void 0:qe.value)??"",isExistChild:(qe==null?void 0:qe.isExistChild)??!1,mainKey:(qe==null?void 0:qe.mainKey)??Gl===0,allSelectionContents:(qe==null?void 0:qe.allContents)??[],filterContent:qe==null?void 0:qe.filterContents,menus:qe==null?void 0:qe.menus,groups:qe==null?void 0:qe.groups,words:qe==null?void 0:qe.words,filter:qe==null?void 0:qe.filter,bindMenus:qe==null?void 0:qe.bindMenus,fatherPath:qe==null?void 0:qe.fatherPath,isMainPath:qe==null?void 0:qe.isMainPath,required:(qe==null?void 0:qe.required)??!1,relatedContents:qe==null?void 0:qe.relatedContents,functionName:qe==null?void 0:qe.functionName,functionRelatedWords:qe==null?void 0:qe.functionRelatedWords,calculatorFilter:qe==null?void 0:qe.calculatorFilter})})}w.value=(Qe=ve==null?void 0:ve[0])==null?void 0:Qe.contents;const en=ua.getNewColumnChild(ia),Vi=al=>Array.isArray(al)?al.map(qe=>(Array.isArray(qe==null?void 0:qe.children)&&qe.children.length>0?(qe.sortable=!1,Vi(qe.children)):(qe==null?void 0:qe.prop)==="operate"||(qe==null?void 0:qe.label)==="操作"||(qe==null?void 0:qe.type)==="operate"||(qe.sortable=!1),qe)):al;Vi(en),await Wt(en),_f(te.value,en),xe.value=en,ya.value=en,r.value=(ta=xe.value)==null?void 0:ta.map(al=>al==null?void 0:al.label);let an=(Ma=(da=ua.getAllLeafNodes(xe.value))==null?void 0:da.filter(al=>(al==null?void 0:al.type)!=="operate"))==null?void 0:Ma.map((al,qe)=>({prop:(al==null?void 0:al.prop)??"a"+qe,column:al.label}));$r.value=an;let Wr=[];Zl.value===""?Wr=H==null?void 0:H[0]:Wr=(H==null?void 0:H.find(al=>(al==null?void 0:al.selectLabel)==="("+Zl.value+")"))??(H==null?void 0:H.find(al=>!(al!=null&&al.selectLabel)));let Jn=Array.isArray((dl=Wr==null?void 0:Wr.contents)==null?void 0:dl[0])&&((Ga=Wr==null?void 0:Wr.contents)!=null&&Ga[0].every(al=>Array.isArray(al)))?(ml=Wr==null?void 0:Wr.contents)==null?void 0:ml[0]:Wr==null?void 0:Wr.contents;Be!=null&&Be.contents&&((yl=Be==null?void 0:Be.contents)==null?void 0:yl.length)!==0&&(Jn=(jl=A.cloneDeep(Jn))==null?void 0:jl.map((al,qe)=>{if(!Array.isArray(al)){let Gl={};for(let Dr in al)Dr!=="id"&&Dr!=="index"&&(Gl[Dr]=al[Dr]);al=Object.values(Gl)}return al}));const fu=!!((Wa=xe.value)!=null&&Wa.find(al=>al.prop==="index"));Jn=Xs(Jn,Be==null?void 0:Be.contents,fu);const dt=[];Jn==null||Jn.forEach((al,qe)=>{var Dr;let Gl={};if(Array.isArray(al)){let wr=[];al==null||al.filter(Br=>!(Br!=null&&Br.id)).forEach((Br,kr)=>{var Gn,ft,ht,vr,fn,In;if((Gn=an==null?void 0:an[kr])!=null&&Gn.prop&&!Array.isArray(Br)){let vt={};vt[an[kr].column]=Br,Oa!=null&&Oa.value&&((ft=Oa==null?void 0:Oa.value)==null?void 0:ft.length)>0&&((ht=Oa==null?void 0:Oa.value)!=null&&ht.find(Yr=>JSON.stringify(Yr==null?void 0:Yr[0])===JSON.stringify(vt)))&&(wr=(vr=Oa==null?void 0:Oa.value)==null?void 0:vr.find(Yr=>JSON.stringify(Yr==null?void 0:Yr[0])===JSON.stringify(vt))),wr&&wr.length>0?Gl[an[kr].prop]=wr!=null&&wr.find(Yr=>{var Ln;return((Ln=Object.keys(Yr))==null?void 0:Ln[0])===an[kr].column})?(fn=wr==null?void 0:wr.find(Yr=>{var Ln;return((Ln=Object.keys(Yr))==null?void 0:Ln[0])===an[kr].column}))==null?void 0:fn[an[kr].column]:Br:Gl[an[kr].prop]=Br}else Array.isArray(Br)&&((In=an[kr])!=null&&In.prop?Gl[an[kr].prop]=Br:Gl.children=ui(Br,an))})}else Gl=al;if(Array.isArray(al)&&al.some(wr=>wr==null?void 0:wr.id)){const wr=(Dr=al==null?void 0:al.find(Br=>Br.id))==null?void 0:Dr.id;dt.push(Object.assign(Gl,{id:Zt(wr)}))}else Gl.id?dt.push(Gl):dt.push(Object.assign(Gl,{id:qe.toString()}))});try{const al=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),qe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Gl=al==null?void 0:al.tableId,Dr=al==null?void 0:al.compIndex;if(Gl&&Array.isArray(qe)&&qe.length>0&&String(Gl)===String(c==null?void 0:c.parentTableId)&&String(Dr)===String(c==null?void 0:c.index)){const wr=new Set(dt.map(kr=>String(kr==null?void 0:kr.id))),Br=qe.filter(kr=>!wr.has(String(kr)));if(Br.length>0){const kr=al==null?void 0:al.pageKey,Gn=kr!=null&&kr.startsWith("/")?kr.substring(1):kr;((f==null?void 0:f[kr])||(f==null?void 0:f[Gn])||[]).filter(vr=>{var fn,In;return((fn=vr==null?void 0:vr.key)==null?void 0:fn.type)==="data"&&String((In=vr==null?void 0:vr.key)==null?void 0:In.tableId)===String(Gl)&&Br.includes(vr==null?void 0:vr.id)}).forEach(vr=>{var fn;wr.has(String(vr==null?void 0:vr.id))||(dt.push({id:vr==null?void 0:vr.id,...((fn=vr==null?void 0:vr.value)==null?void 0:fn.tableData)||{}}),wr.add(String(vr==null?void 0:vr.id)))})}}}catch{}let pt=null;try{const al=`ocr_committed_temp_ids_v1:${String((c==null?void 0:c.parentTableId)??"")}:${String((c==null?void 0:c.index)??"")}`,qe=JSON.parse(sessionStorage.getItem(al)||"null");Array.isArray(qe)&&qe.length>0&&(pt=new Set(qe.map(Gl=>String(Gl))))}catch{}const Ri=Array.from(((_l=Ve.value)==null?void 0:_l.values())||[]).filter(al=>!(!(al!=null&&al._isOCRRow&&(al==null?void 0:al._ocrTableId)===(c==null?void 0:c.index))||pt&&pt.has(String(al==null?void 0:al.id)))),hu=(K.value||[]).map(al=>String(al==null?void 0:al.id)),$i=Qt(dt,hu);if(K.value=Ai($i,O,xe.value),He.value=$i,(Ka=He.value)==null||Ka.forEach(al=>{var qe;(qe=Ve.value)==null||qe.set(al.id,al)}),pt&&pt.size>0)try{const al=new Set(Array.from(pt.values()));K.value=(K.value||[]).filter(qe=>!al.has(String(qe==null?void 0:qe.id))),He.value=(He.value||[]).filter(qe=>!al.has(String(qe==null?void 0:qe.id))),al.forEach(qe=>{var Gl,Dr;try{(Dr=(Gl=Ve.value)==null?void 0:Gl.delete)==null||Dr.call(Gl,qe)}catch{}})}catch{}const to=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Qo=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(to&&Array.isArray(Qo)&&Qo.length>0&&String(to==null?void 0:to.compIndex)===String(c==null?void 0:c.index)){const al=new Set((He.value||[]).map(qe=>String(qe==null?void 0:qe.id)));Qo.filter(qe=>!al.has(String(qe)))}if(Ri.length>0){const al=new Set((K.value||[]).map(Gl=>Gl==null?void 0:Gl.id)),qe=Ri.filter(Gl=>!al.has(Gl.id));qe.length>0&&(K.value=[...K.value||[],...qe],He.value=[...He.value||[],...qe],qe.forEach(Gl=>{var Dr;return(Dr=Ve.value)==null?void 0:Dr.set(Gl.id,Gl)}))}}else xe.value=[],de.value=[],K.value=[],He.value=[],Ve.value=new Map;if(ca=[...new Set(ca)],ca=ca==null?void 0:ca.map(ia=>({label:ia,type:"methodButton"})),((hl=re==null?void 0:re.contents)==null?void 0:hl.length)>0?$a.value=re==null?void 0:re.contents:$a.value=[],$a.value=[...$a.value,...ca],je=[...new Set(je)],je=je==null?void 0:je.map(ia=>({label:ia,type:"methodButton"})),((el=le==null?void 0:le.contents)==null?void 0:el.length)>0)if((Bl=(Il=(vl=u==null?void 0:u.find(ia=>(ia==null?void 0:ia.key)==="filterAllType"))==null?void 0:vl.value)==null?void 0:Il.find(ia=>(ia==null?void 0:ia.value)==="onButtonContents"))!=null&&Bl.content){let ia=(bl=(Pl=(pr=u==null?void 0:u.find(Nl=>(Nl==null?void 0:Nl.key)==="filterAllType"))==null?void 0:pr.value)==null?void 0:Pl.find(Nl=>(Nl==null?void 0:Nl.value)==="onButtonContents"))==null?void 0:bl.content;if(ia=(zl=ia==null?void 0:ia.split(":"))==null?void 0:zl[1],ia=(Yl=ia.slice(1,(ia==null?void 0:ia.length)-1))==null?void 0:Yl.split(","),Oe.value=(Rl=le==null?void 0:le.contents)==null?void 0:Rl.filter(Nl=>ia==null?void 0:ia.find(en=>en===(Nl==null?void 0:Nl.label))),ue.value=(fr=le==null?void 0:le.contents)==null?void 0:fr.filter(Nl=>ia==null?void 0:ia.find(en=>en===(Nl==null?void 0:Nl.label))),(hr=le==null?void 0:le.contents)!=null&&hr.some(Nl=>(Nl==null?void 0:Nl.label)==="OCR识别")&&!((Jl=Oe.value)!=null&&Jl.some(Nl=>(Nl==null?void 0:Nl.label)==="OCR识别"))){const Nl=(sr=le==null?void 0:le.contents)==null?void 0:sr.find(en=>(en==null?void 0:en.label)==="OCR识别");Oe.value=[...Oe.value,Nl],ue.value=[...ue.value,Nl]}x.value=!!(ia!=null&&ia.find(Nl=>Nl==="搜索")),j.value=!!(ia!=null&&ia.find(Nl=>Nl==="块状显示"))}else Oe.value=le==null?void 0:le.contents,ue.value=le==null?void 0:le.contents;else Oe.value=[],ue.value=[];Oe.value=[...Oe.value,...je],ue.value=[...ue.value,...je],typeof ma.value=="string"&&ma.value==="设备管理/试验设备"&&(c==null?void 0:c.compName)==="设备列表"?((Lr=Oe.value)!=null&&Lr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}]),(cr=ue.value)!=null&&cr.some(ia=>(ia==null?void 0:ia.label)==="OCR识别")||(ue.value=[...ue.value||[],{label:"OCR识别"}])):(Oe.value=(Oe.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别"),ue.value=(ue.value||[]).filter(ia=>(ia==null?void 0:ia.label)!=="OCR识别")),(lr=Oe.value)!=null&&lr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),(nr=ue.value)!=null&&nr.some(ia=>(ia==null?void 0:ia.label)==="切换视图")||(ue.value=[...ue.value||[],{label:"切换视图"}]),$e.value=((Oi=K==null?void 0:K.value)==null?void 0:Oi.length)??0,Ni(K.value),tn.value=K.value,Ll.value&&(xe.value=(Li=(Ii=de.value)==null?void 0:Ii.filter(ia=>(ia==null?void 0:ia.label)!=="操作"))==null?void 0:Li.map(ia=>{var Nl;return{...ia,type:"edit",optionUrl:ia!=null&&ia.formMenuSelect&&((Nl=ia==null?void 0:ia.formMenuSelect)==null?void 0:Nl.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}}),Zo())};a.watch(()=>[c.itemData,Zl.value,Fn.value,An.value,Oa==null?void 0:Oa.value],async()=>{var u,f,N,O,V,B;if((u=c==null?void 0:c.itemData)!=null&&u.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((f=F.value)!=null&&f.find(re=>{var le,H;return(re==null?void 0:re.key)===((H=(le=c==null?void 0:c.itemData)==null?void 0:le.find(ve=>(ve==null?void 0:ve.key)==="columnPath"))==null?void 0:H.contents)}))){let re=F.value,le={key:(O=(N=c==null?void 0:c.itemData)==null?void 0:N.find(H=>(H==null?void 0:H.key)==="columnPath"))==null?void 0:O.contents,value:(B=(V=c==null?void 0:c.itemData)==null?void 0:V.find(H=>(H==null?void 0:H.key)==="columnUsingPath"))==null?void 0:B.contents};re!=null&&re.find(H=>(H==null?void 0:H.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(H=>((H==null?void 0:H.key)===(le==null?void 0:le.key)&&(H.value=le.value),H)):re.push(le),We.setTableViewContents(re)}await Mi(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.operatingForm,u=>{u!=null&&u.form&&(zt(u==null?void 0:u.form),Te.value=u==null?void 0:u.dialogTitle,Na.value=!0,fa.value=!0)},{immediate:!0,deep:!0});const au=()=>{var u;(u=L.value)!=null&&u.includes("read")&&(Ll.value=!Ll.value)},lu=()=>{dr.value=!dr.value};a.watch(()=>{var u;return(u=c==null?void 0:c.config)==null?void 0:u.viewport},u=>{var f;L.value=u,(u==null?void 0:u.length)===0?Ll.value=!1:(u!=null&&u.includes("read")||(Ll.value=!0),u!=null&&u.includes("edit")||(Ll.value=!1)),M.value=((f=c==null?void 0:c.config)==null?void 0:f.showIndex)||Ll.value},{immediate:!0}),a.watch(()=>Ll.value,u=>{var f;u?(Zo("viewChange"),We.setCacheUpdatingData(null)):(Oe.value=ue.value,xe.value=ya.value,P.value&&(We.setTableLoading(c==null?void 0:c.index),ze("change",P.value))),M.value=u||((f=c==null?void 0:c.config)==null?void 0:f.showIndex),ar.value=[]},{immediate:!0}),a.watch(()=>{var u;return(u=on.value)==null?void 0:u.length},u=>{u===0&&(me.currentPage=1)}),a.watch(()=>c==null?void 0:c.compNames,u=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:u||[],width:1}]},{immediate:!0}),a.ref(!1);const ru=(u,f)=>{var N;Zo("createClick"),f===me.pageSize&&(me.currentPage=Math.ceil(((N=K.value)==null?void 0:N.length)/me.pageSize))},nu=async(u,f,N)=>{var V,B,re,le,H;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop);if(O&&ro.includes(O)&&N!==void 0&&N!==null&&String(N).trim()!==""){const ve=String(N).trim();if(await Xo(ve,u==null?void 0:u.id)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const De=(V=K.value)==null?void 0:V.findIndex(je=>(je==null?void 0:je.id)===(u==null?void 0:u.id)),Be=De!==-1?(re=(B=K.value)==null?void 0:B[De])==null?void 0:re[O]:void 0;O&&(u[O]=Be??"");return}}if(Ll.value){const ve=u==null?void 0:u.id;ve!=null&&(b.value.has(ve)||b.value.set(ve,A.cloneDeep(u)),d.value.add(ve));const _e=(le=K.value)==null?void 0:le.findIndex(De=>(De==null?void 0:De.id)===(u==null?void 0:u.id));_e!==-1&&O&&(K.value[_e]={...K.value[_e],[O]:N}),no(N,u,f);return}no(N,u,f),ir.value=A.cloneDeep(u),ra.value=u==null?void 0:u.id,$e.value=(H=K.value)==null?void 0:H.length,Te.value=u!=null&&u._isTemp?"新增":"编辑",It(!1)},tu=async()=>{var u,f;try{const N=[];if(c!=null&&c.related&&Array.isArray(c.related)&&(console.log("props.related",c.related),c.related.forEach(O=>{if(typeof O=="string"&&O.includes("content_")){const V=O.split("_")[1];V&&(N.push(`content_${V}`),N.push(`struct_${V}`))}})),N.length===0&&(c!=null&&c.itemData)){const O=(f=(u=c.itemData)==null?void 0:u.find(V=>(V==null?void 0:V.key)==="contentTableId"))==null?void 0:f.contents;O&&(N.push(`content_${O}`),N.push(`struct_${O}`))}return N}catch(N){return console.error("获取 tableNames 失败:",N),[]}},ou=async(u,f,N)=>{var B,re;if(!N||typeof N!="string"||N.trim()===""){const le=(f==null?void 0:f.property)??(f==null?void 0:f.prop),H=`${u==null?void 0:u.id}:${le}`;h.value.delete(H),y.value.set(H,!1);return}const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),V=`${u==null?void 0:u.id}:${O}`;y.value.set(V,!0);try{const le=await tu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),h.value.delete(V),y.value.set(V,!1);return}const H=parseInt((B=Fl.value)==null?void 0:B.plat_id);if(!H){console.warn("platId 无效,跳过全局搜索"),h.value.delete(V),y.value.set(V,!1);return}const ve=await A.getAllTables({platId:H,tableNames:le}),_e=((re=ve==null?void 0:ve.data)==null?void 0:re.result)||[],De=[],Be=[];for(let je=0;je<_e.length;je+=2)je+1<_e.length&&Be.push([_e[je],_e[je+1]]);Be.forEach(([je,ca])=>{var Ia;if(!Array.isArray(je)||je.length===0||!Array.isArray(ca)||ca.length===0)return;const Ha=ca[0];let Sa=((Ia=Ha==null?void 0:Ha.结构)==null?void 0:Ia.contents)??[];if(!Array.isArray(Sa)||Sa.length===0)return;let Xe=A.cloneDeep(Sa);if(Array.isArray(Xe==null?void 0:Xe[0])&&(Xe=ua.getColumnChild(Xe[0])),!Array.isArray(Xe)||Xe.length===0||!Xe.some(za=>(za==null?void 0:za.prop)===O))return;[...je].sort((za,ke)=>{const _a=Number((za==null?void 0:za.update_time)??0);return Number((ke==null?void 0:ke.update_time)??0)-_a}).slice(0,20).forEach(za=>{const ke=za[O];if(ke!=null){const _a=String(ke);_a.toLowerCase().includes(N.toLowerCase())&&De.findIndex(ce=>{var E;return za.id&&((E=ce.rowData)==null?void 0:E.id)===za.id?!0:ce.label===_a})===-1&&De.push({label:_a,rowData:A.cloneDeep(za),sourceTable:(Ha==null?void 0:Ha.source_table)||""})}})}),h.value.set(V,De)}catch(le){console.error("全局搜索建议失败:",le),h.value.delete(V)}finally{y.value.set(V,!1)}},iu=(u,f,N)=>{if(!Ll.value)return;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),V=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"";if(V&&V.toUpperCase()!=="INPUT"&&V!=="")return;const B=`${u==null?void 0:u.id}:${O}`;if(v.has(B)&&clearTimeout(v.get(B)),!N||N.trim()===""){h.value.delete(B),y.value.set(B,!1);return}const re=setTimeout(()=>{ou(u,{prop:O,property:O},N),v.delete(B)},300);v.set(B,re)};function su(u,f){const N=`${u==null?void 0:u.id}:${(f==null?void 0:f.property)??(f==null?void 0:f.prop)}`;return h.value.get(N)||[]}const cu=(u,f,N)=>{var _e;if(!N||!N.rowData)return;const O=N.rowData,V=u==null?void 0:u.id,B=(f==null?void 0:f.property)??(f==null?void 0:f.prop),le=(ua.getAllLeafNodes(xe.value)||[]).filter(De=>(De==null?void 0:De.type)!=="operate"&&(De==null?void 0:De.label)!=="操作"&&(De==null?void 0:De.prop)!=="operate");le.forEach(De=>{const Be=De==null?void 0:De.prop;Be&&O[Be]!==void 0&&(u[Be]=O[Be])});const H=(_e=K.value)==null?void 0:_e.findIndex(De=>(De==null?void 0:De.id)===V);H!==-1&&le.forEach(De=>{const Be=De==null?void 0:De.prop;Be&&O[Be]!==void 0&&(K.value[H][Be]=O[Be])}),V!=null&&(b.value.has(V)||b.value.set(V,A.cloneDeep(u)),d.value.add(V));const ve=`${V}:${B}`;h.value.delete(ve),y.value.set(ve,!1),no(u[B],u,f)},Ir=u=>{var H,ve,_e,De,Be,je,ca,Ha,Sa,Xe;const{row:f,column:N,item:O,slotData:V}=u;let B=f!=null&&f[N==null?void 0:N.prop]||(f==null?void 0:f[N==null?void 0:N.prop])===0?((ve=(H=f==null?void 0:f[N==null?void 0:N.prop])==null?void 0:H[0])==null?void 0:ve.contents)??((f==null?void 0:f[N==null?void 0:N.prop])===0?"0":f==null?void 0:f[N==null?void 0:N.prop]):((De=(_e=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:_e[0])==null?void 0:De.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((je=(Be=V==null?void 0:V[O==null?void 0:O.prop])==null?void 0:Be[0])==null?void 0:je.contents)??(V==null?void 0:V[O==null?void 0:O.prop])??((Sa=(Ha=f==null?void 0:f[(ca=O==null?void 0:O.child)==null?void 0:ca.prop])==null?void 0:Ha[0])==null?void 0:Sa.contents)??(f==null?void 0:f[(Xe=O==null?void 0:O.child)==null?void 0:Xe.prop]),le=Array.isArray(B)&&!(B!=null&&B.every(Ra=>typeof Ra=="string"||typeof Ra=="number"))?"查看":B;if(le=Array.isArray(le)?le.join(","):le,(N==null?void 0:N.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const Ra=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=Ra.isValid()?Ra.format("YYYYMMDD"):le??""}return le},uu=u=>{var ve,_e,De,Be,je,ca,Ha,Sa,Xe,Ra;const{row:f,column:N,item:O,slotData:V}=u;let B=f!=null&&f[N==null?void 0:N.prop]?((_e=(ve=f==null?void 0:f[N==null?void 0:N.prop])==null?void 0:ve[0])==null?void 0:_e.contents)??(f==null?void 0:f[N==null?void 0:N.prop]):((Be=(De=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:De[0])==null?void 0:Be.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((ca=(je=V==null?void 0:V[O==null?void 0:O.prop])==null?void 0:je[0])==null?void 0:ca.contents)??(V==null?void 0:V[O==null?void 0:O.prop])??((Xe=(Sa=f==null?void 0:f[(Ha=O==null?void 0:O.child)==null?void 0:Ha.prop])==null?void 0:Sa[0])==null?void 0:Xe.contents)??(f==null?void 0:f[(Ra=O==null?void 0:O.child)==null?void 0:Ra.prop]);const le=Array.isArray(B)&&!(B!=null&&B.every(Ge=>typeof Ge=="string"||typeof Ge=="number")),H=Array.isArray(B)&&(B==null?void 0:B.find(Ge=>Ge==null?void 0:Ge.url));return le&&H},du=u=>{var V,B;if(!(u!=null&&u.column))return!1;const f=ma.value==="试验任务/任务管理",N=(c==null?void 0:c.compName)==="任务列表",O=((V=u==null?void 0:u.column)==null?void 0:V.label)==="任务状态"||((B=u==null?void 0:u.column)==null?void 0:B.prop)==="任务状态";return f&&N&&O},pu=(u,f)=>u.find(N=>Object.values(N).some(O=>O===f));return a.watch(()=>Ee.value,async u=>{if(u){ea.setContentLoading(!0),await a.nextTick();const f=pu(K.value,u==null?void 0:u.data);if(!f)return ea.setContentLoading(!1);await On(u==null?void 0:u.data,null,f,{data:u==null?void 0:u.data}),ea.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.cacheNewData,u=>{var f;u&&(Array.isArray(u)?u.forEach(N=>{var O,V,B,re,le;if(换,String(N==null?void 0:N.compId)===String(c==null?void 0:c.index)&&(N!=null&&N.resId)&&((O=N==null?void 0:N.data)!=null&&O.id)){const H=(V=N==null?void 0:N.data)==null?void 0:V.id,ve=N==null?void 0:N.resId;if(K.value=(B=K.value)==null?void 0:B.map(_e=>{if((_e==null?void 0:_e.id)===H){const De={..._e,id:ve};return delete De._isOCRRow,delete De._ocrTableId,De}return _e}),(le=(re=Ve.value)==null?void 0:re.has)!=null&&le.call(re,H)){const De={...Ve.value.get(H)||{},id:ve};delete De._isOCRRow,delete De._ocrTableId,Ve.value.delete(H),Ve.value.set(ve,De)}Se(c==null?void 0:c.index,H,ve)}}):String(u==null?void 0:u.compId)===String(c==null?void 0:c.index)&&(K.value=(f=K.value)==null?void 0:f.map(N=>{var O;if((N==null?void 0:N.id)===((O=u==null?void 0:u.data)==null?void 0:O.id)){const V={...N,id:u==null?void 0:u.resId};return delete V._isOCRRow,delete V._ocrTableId,V}return N})))},{immediate:!0,deep:!0}),(u,f)=>{var Ra,Ge,Ia,za;const N=a.resolveComponent("svg-icon"),O=a.resolveComponent("el-popover"),V=a.resolveComponent("el-switch"),B=a.resolveComponent("el-checkbox"),re=a.resolveComponent("el-radio"),le=a.resolveComponent("el-radio-group"),H=a.resolveComponent("el-checkbox-group"),ve=a.resolveComponent("el-button"),_e=a.resolveComponent("LookComponent"),De=a.resolveComponent("el-icon"),Be=a.resolveComponent("el-progress"),je=a.resolveComponent("el-alert"),ca=a.resolveComponent("el-table-column"),Ha=a.resolveComponent("el-table"),Sa=a.resolveComponent("el-upload"),Xe=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",o0,[Mr.value?(a.openBlock(),a.createBlock(pl.ssTable,{id:"excel-table",pageObj:me,showIndex:M.value,isTree:(Ra=l.compItem)==null?void 0:Ra.isTree,summaryInfo:J,columns:xe.value,defaultSort:Q,isCardViewport:dr.value,checkedColumns:r.value,key:vn.value+xe.value,tableData:on.value,isEditViewport:Ll.value,isShowPagination:ba.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:eo,extraButton:Oe.value,rowButton:$a.value,cacheExtraButtons:ue.value,isClearSelection:((Ge=ar.value)==null?void 0:Ge.length)===0,onDoCurrentChange:St,onDoSizeChange:To,onSortChange:Ao,onContentClick:On,onRowClick:ao,onSelectChange:Ro,onCellChange:nu,onCellInput:iu,onSelectSuggest:cu,onChange:no,onPreview:Gt,onSubmitEditingTable:qt,onHandleColEditChange:Ht,onHandleColTypeChange:zr,onClickButton:Sn,onAddNewRow:Io,bottomButton:w.value},a.createSlots({headerButton:a.withCtx(ke=>{var _a,oa;return[l.showHeader?(a.openBlock(),a.createBlock(Lp,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(W)===a.unref(ma),filterValues:Fo.value,selectNums:(_a=ar.value)==null?void 0:_a.length,dataNums:(oa=K.value)==null?void 0:oa.length,compName:l.compName,isDevMode:l.isDevMode,buttons:ke.buttons,onButtonClick:f[1]||(f[1]=(ce,E,Me)=>Sn(ce,E,{extra:Me})),columns:xe.value,onFilter:jo,onGetImportData:zo,level:l.level,filterShow:x.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var ke,_a,oa,ce;return[((ke=K.value)==null?void 0:ke.length)>0&&l.allowOperate&&j.value?(a.openBlock(),a.createElementBlock("div",c0,[(_a=L.value)!=null&&_a.includes("read")&&((oa=L.value)!=null&&oa.includes("edit"))&&((ce=$a.value)!=null&&ce.some(E=>(E==null?void 0:E.label)==="编辑"))&&!dr.value&&a.unref(W)!==a.unref(ma)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:au},[a.createVNode(N,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:ke,index:_a})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:oa=>ru(ke,_a)},[a.createVNode(N,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,u0)]),operateCol:a.withCtx(()=>[a.createVNode(O,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Gc},{reference:a.withCtx(()=>[a.createElementVNode("span",d0,[a.createVNode(N,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",p0,[f[21]||(f[21]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(V,{"model-value":g.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:f[2]||(f[2]=ke=>Yt(ke))},null,8,["model-value"]),f[22]||(f[22]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(H,{modelValue:r.value,"onUpdate:modelValue":f[3]||(f[3]=ke=>r.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Zr.value,ke=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[a.createVNode(B,{value:ke.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:ke.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(ke.label),9,f0)]),_:2},1032,["value"]),a.createVNode(O,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(N,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var _a;return[a.createElementVNode("div",h0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((_a=Object.keys(ke))==null?void 0:_a.filter(oa=>{var ce;return(ce=ee.value)==null?void 0:ce.find(E=>(E==null?void 0:E.value)===oa)}),oa=>{var ce,E;return a.openBlock(),a.createElementBlock("div",{key:oa},[z[oa]=="radio"?(a.openBlock(),a.createElementBlock("div",v0,[f[20]||(f[20]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(le,{"model-value":ke==null?void 0:ke[oa],onChange:Me=>qn(Me,oa,ke)},{default:a.withCtx(()=>{var Me,ye;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ye=(Me=ee.value)==null?void 0:Me.find(Qe=>(Qe==null?void 0:Qe.value)===oa))==null?void 0:ye.options,Qe=>(a.openBlock(),a.createBlock(re,{key:Qe==null?void 0:Qe.value,label:Qe==null?void 0:Qe.value,value:Qe==null?void 0:Qe.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Qe==null?void 0:Qe.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),z[oa]=="switch"?(a.openBlock(),a.createBlock(V,{key:1,"model-value":ke==null?void 0:ke[oa],"active-text":(E=(ce=ee.value)==null?void 0:ce.find(Me=>(Me==null?void 0:Me.value)===oa))==null?void 0:E.label,onChange:Me=>qn(Me,oa,ke)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",m0,[a.createVNode(N,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(ke=>{var _a,oa,ce,E,Me,ye,Qe,ta,da,Ma,dl,Ga,ml,yl,jl,Wa,_l,Ka,hl,el;return[((_a=ke==null?void 0:ke.column)==null?void 0:_a.label)==="证书附件"||((oa=ke==null?void 0:ke.column)==null?void 0:oa.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",y0,[a.createVNode(N,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(vl=>jr(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):uu(ke)?(a.openBlock(),a.createBlock(O,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",g0,a.toDisplayString(Ir(ke)),1)]),default:a.withCtx(()=>{var vl,Il;return[a.createElementVNode("div",b0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Il=ke==null?void 0:ke.row)==null?void 0:Il[(vl=ke==null?void 0:ke.column)==null?void 0:vl.prop],Bl=>(a.openBlock(),a.createElementBlock("div",k0,[a.createElementVNode("div",{class:"prop-url",title:Wn(Bl),onClick:pr=>$o(Bl)},a.toDisplayString(Wn(Bl)),9,x0),a.createElementVNode("div",{class:"prop-download",onClick:pr=>ot(Bl)}," 下载 ",8,_0)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[du(ke)?(a.openBlock(),a.createBlock(Us,{key:0,value:Ir(ke)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Ir(ke))&&((E=(ce=Ir(ke))==null?void 0:ce.toString())!=null&&E.includes(".txt")||(ye=(Me=Ir(ke))==null?void 0:Me.toString())!=null&&ye.includes(".cpt")||(ta=(Qe=Ir(ke))==null?void 0:Qe.toString())!=null&&ta.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ir(ke))&&((Ma=(da=Ir(ke))==null?void 0:da.toString())!=null&&Ma.includes(".txt")||(Ga=(dl=Ir(ke))==null?void 0:dl.toString())!=null&&Ga.includes(".cpt")||(yl=(ml=Ir(ke))==null?void 0:ml.toString())!=null&&yl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ir(ke))&&((Wa=(jl=Ir(ke))==null?void 0:jl.toString())!=null&&Wa.includes(".txt")||(Ka=(_l=Ir(ke))==null?void 0:_l.toString())!=null&&Ka.includes(".cpt")||(el=(hl=Ir(ke))==null?void 0:hl.toString())!=null&&el.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:vl=>Hn(Ir(ke))},a.toDisplayString(Ir(ke)===0?"0":Ir(ke)),13,w0))],64))]}),_:2},[((Ia=$a.value)==null?void 0:Ia.length)>0?{name:"actions",fn:a.withCtx(({item:ke,fIndex:_a})=>[a.createVNode(O,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(N,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:f[0]||(f[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",i0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Po($a.value,ke),(oa,ce)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:ce,onClick:a.withModifiers(E=>Sn(oa==null?void 0:oa.label,ke,{extra:oa}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:oa==null?void 0:oa.textColor}),class:"extra-button-label"},a.toDisplayString(oa==null?void 0:oa.label),5)],8,s0))),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"])):a.createCommentVNode("",!0),Ll.value?(a.openBlock(),a.createElementBlock("div",C0,[a.createVNode(ve,{id:"themeBorderButton",onClick:Vo},{default:a.withCtx(()=>f[23]||(f[23]=[a.createTextVNode("取消")])),_:1,__:[23]}),a.createVNode(ve,{class:"ok-button",id:"themeButton",onClick:Bt},{default:a.withCtx(()=>f[24]||(f[24]=[a.createTextVNode("保存")])),_:1,__:[24]})])):a.createCommentVNode("",!0),a.createVNode(yr.ssDialog,{title:Te.value,visible:fa.value,width:ql.value,onBeforeDestroy:Jt,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",E0,[a.createVNode(pl.ssForm,{ref_key:"formRef",ref:Ue,rowContents:ie.value,showOperator:!1,onChange:Xc,isEnableWrap:!1,onFixChangeValue:At,onClickTrigger:Kn,isEdit:va.value,onBlurChange:Kt,onCreate:nt,onTagChange:En},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Na.value?(a.openBlock(),a.createElementBlock("div",S0,[a.createVNode(ve,{onClick:f[4]||(f[4]=ke=>fa.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>f[25]||(f[25]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[25]}),a.createVNode(ve,{class:"ok-button",onClick:f[5]||(f[5]=ke=>It(!0)),id:"themeButton"},{default:a.withCtx(()=>f[26]||(f[26]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[26]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(yr.ssDialog,{title:Te.value,visible:fe.value,width:ka.value,onBeforeDestroy:f[7]||(f[7]=ke=>fe.value=!1)},{default:a.withCtx(()=>[a.createVNode(Gp)]),footer:a.withCtx(()=>[a.createElementVNode("div",D0,[a.createVNode(ve,{onClick:f[6]||(f[6]=ke=>fe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>f[27]||(f[27]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[27]}),a.createVNode(ve,{class:"ok-button",onClick:Mt,id:"themeButton"},{default:a.withCtx(()=>f[28]||(f[28]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[28]})])]),_:1},8,["title","visible","width"]),Va.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:2,fileDataList:ae.value,onDestroy:bn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ke.value?(a.openBlock(),a.createBlock(yr.ssDialog,{key:3,visible:Ke.value,onBeforeDestroy:Yc,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(bo.ThreeViewerHost,{files:Ye.value,threeData:oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(yr.ssDialog,{visible:u.componentVisible,onBeforeDestroy:f[8]||(f[8]=ke=>u.componentVisible=!1),width:ka.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(_e,{dialogItem:yn.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),a.createVNode(yr.ssDialog,{title:"OCR扫描录入",visible:Xa.value,"close-on-click-modal":!1,onBeforeDestroy:il,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[f[39]||(f[39]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",B0,[a.createElementVNode("div",N0,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===1}])},f[29]||(f[29]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),f[32]||(f[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===2}])},f[30]||(f[30]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),f[33]||(f[33]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:Ea.value===3}])},f[31]||(f[31]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Ea.value===1?(a.openBlock(),a.createElementBlock("div",T0,[a.createVNode(ve,{onClick:Yo,class:"ocr-action-btn",disabled:Ya.value,size:"default"},{default:a.withCtx(()=>f[34]||(f[34]=[a.createTextVNode("扫描文件 ")])),_:1,__:[34]},8,["disabled"]),a.createVNode(ve,{onClick:Ul,class:"ocr-action-btn",disabled:Ya.value,size:"default"},{default:a.withCtx(()=>f[35]||(f[35]=[a.createTextVNode("上传文件 ")])),_:1,__:[35]},8,["disabled"])])):a.createCommentVNode("",!0),Ea.value===1?(a.openBlock(),a.createElementBlock("div",A0,[a.createElementVNode("div",M0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(tl.value,(ke,_a)=>{var oa;return a.openBlock(),a.createElementBlock("div",{key:_a,class:"ocr-file-item"},[a.createElementVNode("div",z0,[ke.raw&&((oa=ke.raw.type)!=null&&oa.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:xl(ke),alt:"预览",class:"thumbnail-image"},null,8,O0)):(a.openBlock(),a.createElementBlock("div",I0,[a.createVNode(De,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:sl(ke)==="uploading",processing:sl(ke)==="processing",completed:sl(ke)==="completed"||sl(ke)==="uploaded",failed:sl(ke)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",L0,[f[36]||(f[36]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:sl(ke)==="completed"||sl(ke)==="uploaded",uploading:sl(ke)==="uploading",processing:sl(ke)==="processing",failed:sl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:sl(ke)==="failed"?"#f56c6c":sl(ke)==="completed"||sl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":sl(ke)==="completed"||sl(ke)==="uploaded"||sl(ke)==="failed"?3:2,"stroke-dasharray":Wl(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,V0)])),sl(ke)==="completed"||sl(ke)==="uploaded"?(a.openBlock(),a.createElementBlock("div",R0,[a.createVNode(De,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1})])):a.createCommentVNode("",!0),sl(ke)==="failed"?(a.openBlock(),a.createElementBlock("div",$0,[a.createVNode(De,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:ce=>ct(_a)},[a.createVNode(De,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.close_default))]),_:1})],8,P0)]),a.createElementVNode("div",F0,a.toDisplayString(ke.name||"文件名123"),1)])}),128))]),tl.value.length>0?(a.openBlock(),a.createElementBlock("div",j0,[a.createVNode(ve,{onClick:pe,class:"ocr-start-recognize-btn",disabled:Ya.value||tl.value.length===0,size:"default"},{default:a.withCtx(()=>f[37]||(f[37]=[a.createTextVNode("开始识别 ")])),_:1,__:[37]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),Ea.value===1?(a.openBlock(),a.createElementBlock("div",H0,[a.createVNode(Be,{percentage:ol.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),Ea.value===2?(a.openBlock(),a.createElementBlock("div",U0,[a.createElementVNode("div",q0,[a.createVNode(je,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",K0,[a.createVNode(Ha,{data:pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(ca,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Aa.value,ke=>(a.openBlock(),a.createBlock(ca,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",W0,[a.createElementVNode("span",null,a.toDisplayString(ke.label),1)])]),default:a.withCtx(({row:_a,$index:oa})=>{var ce,E,Me;return[ke.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:ll(_a[ke.prop]),fontWeight:500})},a.toDisplayString(Ba(_a[ke.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[El.value!==oa?(a.openBlock(),a.createElementBlock("span",Y0,a.toDisplayString(_a[ke.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ha(ke.prop)),{key:1,modelValue:_a[ke.prop],"onUpdate:modelValue":ye=>_a[ke.prop]=ye,size:"small",placeholder:"请输入"+ke.label,content:((ce=Ze(ke.prop))==null?void 0:ce.contents)??((E=Ze(ke.prop))==null?void 0:E.options)??[],optionUrl:(Me=Ze(ke.prop))==null?void 0:Me.optionUrl,onChange:ye=>Je(oa,ke.prop,ye),onFocus:ye=>Sl.value=ke.prop,onBlur:f[9]||(f[9]=ye=>Sl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(ca,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:ke})=>[El.value===ke?(a.openBlock(),a.createBlock(De,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(_a=>Za(ke),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(N,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(_a=>Za(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),Ea.value===3?(a.openBlock(),a.createElementBlock("div",J0,[a.createVNode(De,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1}),f[38]||(f[38]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(Sa,{ref:"ocrUploadRef","file-list":tl.value,"onUpdate:fileList":f[10]||(f[10]=ke=>tl.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":U,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[Ea.value!==3?(a.openBlock(),a.createElementBlock("div",G0,[a.createVNode(ve,{onClick:Or,class:"ocr-start-recognize-btn",disabled:Ea.value===1||Ya.value},{default:a.withCtx(()=>f[40]||(f[40]=[a.createTextVNode(" 上一步 ")])),_:1,__:[40]},8,["disabled"]),a.createVNode(ve,{onClick:gr,class:"ocr-start-recognize-btn",disabled:Ya.value},{default:a.withCtx(()=>f[41]||(f[41]=[a.createTextVNode(" 下一步 ")])),_:1,__:[41]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(vf,{visible:st.value,onConfirm:Jo,onCancel:f[11]||(f[11]=ke=>st.value=!1)},null,8,["visible"]),a.createVNode(nd,{visible:sa.value,"onUpdate:visible":f[12]||(f[12]=ke=>sa.value=ke),versions:Z.value},null,8,["visible","versions"]),a.createVNode(Uu,{visible:wl.value,"onUpdate:visible":f[13]||(f[13]=ke=>wl.value=ke),images:fl.value,"default-image-name":cl.value,"field-meta":El.value!==null?((za=pa.value[El.value])==null?void 0:za.__ocrFieldMeta)||{}:{},"focused-field-name":Sl.value,onClose:f[14]||(f[14]=ke=>wl.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(yd,{visible:kl.value,"onUpdate:visible":f[15]||(f[15]=ke=>kl.value=ke),candidates:Dl.value,"name-prop":Rr.value,"mfr-prop":nn.value,columns:xe.value,onSubmit:_n,onPreviewFile:Qr},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(Cd,{visible:xa.value,"onUpdate:visible":f[16]||(f[16]=ke=>xa.value=ke),ocrPreviewData:pa.value,"onUpdate:ocrPreviewData":f[17]||(f[17]=ke=>pa.value=ke),ocrSelectedFields:Ol.value,"onUpdate:ocrSelectedFields":f[18]||(f[18]=ke=>Ol.value=ke),ocrPreviewColumns:Aa.value,onConfirm:he,onFieldChange:f[19]||(f[19]=({rowIndex:ke,prop:_a,value:oa})=>Je(ke,_a,oa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(yr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:_},{default:a.withCtx(()=>[a.createElementVNode("div",X0,[a.createVNode(pl.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:va.value,isStartJustify:!1,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(yr.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:p},{header:a.withCtx(()=>[a.createVNode(Xe,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>f[42]||(f[42]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[42]})]),footer:a.withCtx(()=>[a.createElementVNode("div",Z0,[a.createVNode(Xe,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Mn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",Q0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,ke=>(a.openBlock(),a.createBlock(ve,{key:ke==null?void 0:ke.label,style:a.normalizeStyle({background:ke==null?void 0:ke.background,color:ke==null?void 0:ke.color}),onClick:_a=>m(ke==null?void 0:ke.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ke==null?void 0:ke.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(Vp,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:ke,item:_a,slotData:oa,scope:ce,column:E,columnProp:Me,$index:ye})=>[a.createTextVNode(a.toDisplayString((ke==null?void 0:ke[(E==null?void 0:E.prop)||(E==null?void 0:E.label)])||(oa==null?void 0:oa[E==null?void 0:E.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},hc=Kl._export_sfc(a3,[["__scopeId","data-v-3542d4e0"]]),l3={class:"static-form-card"},r3={key:0,class:"static-form-body"},n3={class:"static-form-label"},t3=["onClick"],o3={key:1},i3={key:1,class:"static-form-empty"},s3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1}},setup(l){const n=l,r=c=>{switch(c){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},t=a.computed(()=>{var L;const c=(L=n.itemData)==null?void 0:L.find(x=>(x==null?void 0:x.key)==="formContent"),C=(c==null?void 0:c.contents)||[];return(n.fields&&n.fields.length>0?n.fields:C).filter(x=>!(x!=null&&x.isFormColHidden)&&(x==null?void 0:x.label)).map(x=>{let Y=x==null?void 0:x.value;Array.isArray(Y)&&(Y=Y.map(S=>S==null?"":typeof S=="object"?S.label??S.value??S.name??JSON.stringify(S):String(S)).filter(Boolean).join(",")),Y!=null&&typeof Y=="object"&&(Y=Y.label??Y.value??Y.name??JSON.stringify(Y));const w=x.label??"",z=Y==null||Y===""?"-":String(Y),ee=w==="使用状态";return{label:w,value:z,isStatus:ee,tagType:ee?r(z):"",width:x.width??1,field:x}})}),s=a.ref(null),d=c=>pl.getComponent(c),b=c=>{if(!c)return;const C=c.querySelector("input, textarea, .el-input__inner");C&&typeof C.focus=="function"&&C.focus()},h=(c,C,M)=>{n.disabled||(s.value=C,a.nextTick(()=>{b(M.currentTarget)}))},v=()=>{s.value=null},y=c=>{const C=c!=null&&c.width&&c.width>0?c.width:1,L=`calc((100% - ${(C-1)*48}px) / ${C})`;return{flex:`0 0 ${L}`,maxWidth:L,minWidth:"0",boxSizing:"border-box"}};return(c,C)=>{const M=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",l3,[t.value.length?(a.openBlock(),a.createElementBlock("div",r3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(L,x)=>{var Y,w,z,ee,S,$,T,k;return a.openBlock(),a.createElementBlock("div",{key:x,class:"static-form-item",style:a.normalizeStyle(y(L))},[a.createElementVNode("div",n3,a.toDisplayString(L.label)+": ",1),a.createElementVNode("div",{class:"static-form-value",onClick:g=>h(L,x,g)},[s.value===x&&L.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d(((Y=L.field)==null?void 0:Y.type)??"Input")),{key:0,modelValue:L.field.value,"onUpdate:modelValue":g=>L.field.value=g,isEdit:!0,disabled:(w=L.field)==null?void 0:w.disabled,content:((z=L.field)==null?void 0:z.contents)??[],optionUrl:L.field,originalValue:(ee=L.field)==null?void 0:ee.value,config:(S=L.field)==null?void 0:S.config,configModel:(($=L.field)==null?void 0:$.prop)??((T=L.field)==null?void 0:T.name),selectedTagList:((k=L.field)==null?void 0:k.selectValue)??[],onBlur:v,onBlurChange:v},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[L.isStatus?(a.openBlock(),a.createBlock(M,{key:0,type:L.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(L.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",o3,a.toDisplayString(L.value??"-"),1))],64))],8,t3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",i3," 暂无数据 "))])}}}),vc=Kl._export_sfc(s3,[["__scopeId","data-v-c4ed3455"]]),c3={class:"form-content"},u3={title:"选择标签"},d3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},p3={class:"col-operate-wrap"},f3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},h3={__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(l,{emit:n}){const r=()=>{b.value=!1,h.value=!1,v.value=[]},t=l;a.computed(()=>{var Ve;const K=(Ve=D.value)==null?void 0:Ve.split("/");return(K==null?void 0:K.some(ra=>(ra==null?void 0:ra.includes("updateLoading"))||(ra==null?void 0:ra.includes("loading"))))?!1:te.value==="view"});const s=n,d=a.ref([]),b=a.ref(!1),h=a.ref(!1),v=a.ref([]),{getFileExtension:y}=bo.useThreeSystem(),c=a.ref(),C=a.ref(!1),M=a.ref(!1),L=A.useUnit(A.pinia),{chooseTitle:x}=A.storeToRefs(L),Y=a.ref([]),w=a.ref(),z=a.ref(!1),ee=a.ref([]),S=Gs(A.pinia),$=bi(A.pinia),T=a.ref(!1),k=a.ref(),g=A.useLoginState(A.pinia),{loginUserInfo:j}=A.storeToRefs(g),q=a.ref(),J=a.ref(!0),me=A.useModelComp(A.pinia),{tableViewContents:ze,itemData:xe,isEdit:te,routeToChildPath:be,lockingPage:Q}=A.storeToRefs(me),de=a.ref(null),Ke=a.ref(!1),wa=a.ref(!1),oe=A.useMenuState(),{activeMenuPath:D}=A.storeToRefs(oe),ne=ua.useOriginalState(A.pinia),{originalPath:ge}=A.storeToRefs(ne),{compType:se,hasEditable:we}=Fs.useRole(),la=()=>!we(t.config,{type:se.FORM});a.computed(()=>D.value==="设备管理/试验设备"&&t.compName==="设备概要");const ya=a.ref([]),Va=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ae=async K=>{wa.value=K,await We("disabled",null,K,!0)},ea=async K=>{await We("operable",null,K,!0)};a.watch(()=>D.value,async()=>{d.value=[],v.value=[]},{deep:!0,immediate:!0});const Re=()=>{a.nextTick(()=>{Le()})},ma=K=>{var He;d.value=(He=d.value)==null?void 0:He.map(Ve=>({...Ve,isFormColHidden:!(K!=null&&K.includes(Ve.label))}))};a.onUnmounted(()=>{de.value=null});const Pe=K=>{s("clickTrigger",K)},Ee=async K=>{var He,Ve,ra,va,$e,ba;if(K===""){let Te="";(He=d.value)==null||He.forEach(fe=>{fe!=null&&fe.isMain&&(Te=fe==null?void 0:fe.value)});let fa=await ua.getItemData(be.value,sessionStorage.getItem("systemKey"),"");Te=((ba=($e=(va=(ra=(Ve=fa==null?void 0:fa[0])==null?void 0:Ve.compData)==null?void 0:ra.find(fe=>(fe==null?void 0:fe.key)==="mainRouters"))==null?void 0:va.contents)==null?void 0:$e[0])==null?void 0:ba.routerContent)+ge.value+Te;let ga=await ua.getItemData(Te,sessionStorage.getItem("systemKey"),"");z.value=!0,ee.value=ga==null?void 0:ga.filter(fe=>(fe==null?void 0:fe.comp)!=="methodButton"),s("routeUrl",ee.value)}},Le=()=>{var He;const K=(He=de.value)==null?void 0:He.$el;K&&Ta.Sortable.create(K,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Ve=>{const{oldIndex:ra,newIndex:va}=Ve;if(ra===va)return;const $e=d.value.splice(ra,1)[0];d.value.splice(va,0,$e)}})},We=async(K,He,Ve,ra=!1)=>{try{me.setRefreshCurStructure(!1)}catch{Qa.ElMessage.error("编辑处理失败")}},Ua=async(K,He)=>{await We()},Oa=async(K,He)=>{K&&await We()},P=async(K,He,Ve)=>{await We(He,Ve,K,!1)},F=(K,He)=>{q.value===He?J.value=!1:J.value=!0,q.value=He==null?void 0:He.changeProp},X=async K=>{var Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye;let He=[];if((Ve=K==null?void 0:K.toString())!=null&&Ve.includes(".urdf")){if(K.includes(",")){Qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}v.value=[{url:K,extension:y(K)}],h.value=!0,b.value=!0;return}if((ra=K==null?void 0:K.toString())!=null&&ra.includes(".stl")||(va=K==null?void 0:K.toString())!=null&&va.includes(".STL")||($e=K==null?void 0:K.toString())!=null&&$e.includes(".obj")||(ba=K==null?void 0:K.toString())!=null&&ba.includes(".mtl")){const ue=((Te=K==null?void 0:K.toString())==null?void 0:Te.split(",")).map(ie=>({url:ie,extension:y(ie)}));v.value=ue,h.value=!1,b.value=!0;return}if((fa=K==null?void 0:K.toString())!=null&&fa.includes(".stl")||(Ue=K==null?void 0:K.toString())!=null&&Ue.includes(".STL")||(ga=K==null?void 0:K.toString())!=null&&ga.includes(".obj")||(fe=K==null?void 0:K.toString())!=null&&fe.includes(".mtl")){let Oe,ue=[],ie={};if(Array.isArray(K)?Oe=K:Oe=K==null?void 0:K.split(","),Oe==null||Oe.forEach(na=>{na.includes(".mtl")?ue.push(na):ie.blob=ie.blob?ie.blob+","+na:na}),(ue==null?void 0:ue.length)>0&&(ie.mtlBlobs=ue),(Fe=(ka=Object.values(ie))==null?void 0:ka[0])!=null&&Fe.includes("http:"))He.push(ie);else{const na=new Blob([ie.blob],{type:"application/octet-stream;charset=UTF-8"});let qa=URL.createObjectURL(na),rl="";($a=K==null?void 0:K.split("/"))==null||$a.forEach((Ml,Fa)=>{var nl;Fa===((nl=K==null?void 0:K.split("/"))==null?void 0:nl.length)-1&&(rl=Ml)}),(Na=ie.blob)!=null&&Na.includes(".stl")&&(rl=(rl==null?void 0:rl.replaceAll(">",""))+".urdf"),w.value=[{name:rl,blobUrl:qa}],M.value=!0}}else{const Oe=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ue=await Qa.axios.get(K,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Oe.close()}),ie=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"});let na=URL.createObjectURL(ie),qa="";(Ye=K==null?void 0:K.split("/"))==null||Ye.forEach((rl,Ml)=>{var Fa;Ml===((Fa=K==null?void 0:K.split("/"))==null?void 0:Fa.length)-1&&(qa=rl)}),w.value=[{name:qa,blobUrl:na}],M.value=!0}(He==null?void 0:He.length)>0&&$.setBlobUrls(He)},R=()=>{M.value=!1},W=K=>{var $e,ba,Te,fa;const He=(ba=($e=pl.safeClone(t.itemData))==null?void 0:$e.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:ba.contents,Ve=pl.safeClone(K.content);let ra={};Ve&&((Te=Object.values(Ve))==null?void 0:Te.length)>0&&((fa=Object.values(Ve))==null||fa.forEach((Ue,ga)=>{ra[He[ga].key]=Ue}));const va={content:ra,index:t==null?void 0:t.index,buttonName:K==null?void 0:K.buttonName};s("change",va)};a.computed(()=>"http://222.92.178.198:62001");const Ie=async K=>{var ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl,Ca,aa;if(!K)return;(Fe=(ka=t==null?void 0:t.itemData)==null?void 0:ka.find(Se=>(Se==null?void 0:Se.key)==="parentFormPath"))==null||Fe.contents;let He=ze.value;(He==null?void 0:He.length)>0&&(He=He==null?void 0:He.map(Se=>{var Ya,tl,Da,sa;let Xa=(Ya=Se==null?void 0:Se.key)==null?void 0:Ya.split("/");return(t==null?void 0:t.compName)===(Xa==null?void 0:Xa[0])&&(tl=d.value)!=null&&tl.find(Z=>(Z==null?void 0:Z.prop)===(Xa==null?void 0:Xa[1]))&&(Se.value=(sa=(Da=d.value)==null?void 0:Da.find(Z=>(Z==null?void 0:Z.prop)===(Xa==null?void 0:Xa[1])))==null?void 0:sa.value),Se}),me.setTableViewContents(He));const Ve=pl.safeClone(t.itemData);let ra=Ve==null?void 0:Ve.map(Se=>{var Xa;return(Se==null?void 0:Se.key)==="formContent"&&((Xa=Se.contents)==null||Xa.map((Ya,tl)=>{var Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El,Sl,wl,fl;return Ya.type=(sa=(Da=d.value)==null?void 0:Da.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:sa.type,Ya.options=Ya!=null&&Ya.options?Ya.options:((Pa=(Ea=(Z=Ya==null?void 0:Ya.key)==null?void 0:Z.split("$"))==null?void 0:Ea[1])==null?void 0:Pa.length)>0?(pa=(xa=xu((ol=(ul=Ya==null?void 0:Ya.key)==null?void 0:ul.split("$"))==null?void 0:ol[1]))==null?void 0:xa.split(","))==null?void 0:pa.map(cl=>({label:cl,value:cl})):[],(Aa=Ya==null?void 0:Ya.key)!=null&&Aa.includes("$")&&(Ya.key=(ha=(Ze=Ya==null?void 0:Ya.key)==null?void 0:Ze.split("$"))==null?void 0:ha[0]),Ya.signature=(Ja=(La=d.value)==null?void 0:La.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:Ja.signature,Ya.isLoginUser=(El=(Ol=d.value)==null?void 0:Ol.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:El.isLoginUser,Ya.value=(Sl=Object.values(K))==null?void 0:Sl[tl],Ya.isFormColHidden=(fl=(wl=d.value)==null?void 0:wl.find(cl=>(cl==null?void 0:cl.prop)===(Ya==null?void 0:Ya.prop)))==null?void 0:fl.isFormColHidden,Ya})),Se}),va=d.value,$e=(Na=($a=pl.safeClone(ra))==null?void 0:$a.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:Na.contents;if(va=va==null?void 0:va.map(Se=>{var Xa,Ya;return(Se==null?void 0:Se.type)==="Select"&&((Xa=Se==null?void 0:Se.allSelectionContents)==null?void 0:Xa.length)>0&&(Se.contactValue=K),Se.value=(Ya=$e==null?void 0:$e.find((tl,Da)=>((tl==null?void 0:tl.id)??Da)===(Se==null?void 0:Se.id)))==null?void 0:Ya.value,Se}),!J.value){s("contentChange",{contents:ra,index:t.index});return}let ba="",Te=(ue=(Oe=(Ye=pl.safeClone(ra))==null?void 0:Ye.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:Oe.contents)==null?void 0:ue.find((Se,Xa)=>{var Ya,tl,Da;return(Se==null?void 0:Se.label)===q.value||Xa.toString()===((Da=(tl=(Ya=q.value)==null?void 0:Ya.split("t"))==null?void 0:tl[1])==null?void 0:Da.toString())}),fa=(ie=Te==null?void 0:Te.optionUrl)==null?void 0:ie.menuSelect,Ue=!0;if((rl=(qa=(na=pl.safeClone(ra))==null?void 0:na.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:qa.contents)==null||rl.forEach(Se=>{var Xa,Ya,tl,Da,sa,Z;Ue&&((tl=(Ya=(Xa=Se==null?void 0:Se.optionUrl)==null?void 0:Xa.groupSelect)==null?void 0:Ya[1])!=null&&tl.includes("["))&&(ba=(sa=(Da=Se==null?void 0:Se.optionUrl)==null?void 0:Da.groupSelect)==null?void 0:sa[1],JSON.stringify(fa)===JSON.stringify((Z=Se==null?void 0:Se.optionUrl)==null?void 0:Z.menuSelect)&&(Ue=!1))}),(Ml=Te==null?void 0:Te.optionUrl)!=null&&Ml.menuSelect&&J.value){let Se=await di(Te),Xa,Ya=(Fa=Te==null?void 0:Te.optionUrl)==null?void 0:Fa.menuSelect;if(Se==null||Se.forEach(tl=>{var Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa;ba===((sa=(Da=Te==null?void 0:Te.optionUrl)==null?void 0:Da.groupSelect)==null?void 0:sa[1])&&((Pa=(Ea=(Z=Te==null?void 0:Te.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ea[1])!=null&&Pa.includes("["))&&((Aa=pl.safeClone(tl))==null?void 0:Aa[(pa=(xa=(ol=(ul=Te==null?void 0:Te.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:ol[1])==null?void 0:xa.replaceAll("[",""))==null?void 0:pa.replaceAll("]","")])===(Te==null?void 0:Te.value)&&(Xa=tl)}),Xa){let tl=pl.safeClone(va);tl=tl==null?void 0:tl.map(sa=>{var Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La;return(Xa!=null&&Xa[sa==null?void 0:sa.label]||Xa!=null&&Xa[(ul=(Pa=(Ea=(Z=sa==null?void 0:sa.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ea[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:ul.replaceAll("]","")])&&((pa=(xa=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:xa[1])!=null&&pa.includes("["))&&Ya!=null&&Ya.every(Ja=>{var Ol,El;return(El=(Ol=sa==null?void 0:sa.optionUrl)==null?void 0:Ol.menuSelect)==null?void 0:El.includes(Ja)})&&(sa.value=(Xa==null?void 0:Xa[sa==null?void 0:sa.label])||(Xa==null?void 0:Xa[(La=(ha=(Ze=(Aa=sa==null?void 0:sa.optionUrl)==null?void 0:Aa.groupSelect)==null?void 0:Ze[1])==null?void 0:ha.replaceAll("[",""))==null?void 0:La.replaceAll("]","")]),Array.isArray(sa.value)&&sa.value.every(Ja=>(Ja==null?void 0:Ja.url)&&(Ja==null?void 0:Ja.name))&&(sa.type="Upload")),sa}),tl=tl==null?void 0:tl.map(sa=>{var Z,Ea,Pa;return(Z=sa==null?void 0:sa.optionUrl)!=null&&Z.oldMenuSelect&&(sa.optionUrl.menuSelect=(Pa=(Ea=pl.safeClone(sa))==null?void 0:Ea.optionUrl)==null?void 0:Pa.oldMenuSelect),sa}),d.value=pl.safeClone(tl);let Da=pl.safeClone(tl);Da=Da==null?void 0:Da.map(sa=>{var Z,Ea,Pa,ul,ol,xa;return(Ea=(Z=sa==null?void 0:sa.optionUrl)==null?void 0:Z.menuSelect)!=null&&Ea.some(pa=>pa==null?void 0:pa.includes("["))&&(sa.optionUrl.oldMenuSelect=(ul=(Pa=pl.safeClone(sa))==null?void 0:Pa.optionUrl)==null?void 0:ul.menuSelect,sa.optionUrl.menuSelect=(xa=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.menuSelect)==null?void 0:xa.map(pa=>{var Aa,Ze,ha,La;if(pa!=null&&pa.includes("[")){let Ja=(Ze=(Aa=pa==null?void 0:pa.replaceAll("[","").replaceAll("]",""))==null?void 0:Aa.split(":"))==null?void 0:Ze[1];pa=(La=(ha=pl.safeClone(tl))==null?void 0:ha.find(Ol=>(Ol==null?void 0:Ol.label)===Ja))==null?void 0:La.value}return pa})),sa}),d.value=Da}else d.value=va;ra=ra==null?void 0:ra.map(tl=>{var Da;return(tl==null?void 0:tl.key)==="formContent"&&(tl.contents=(Da=tl.contents)==null?void 0:Da.map(sa=>{var Z,Ea,Pa,ul;return sa.value=((Ea=(Z=d.value)==null?void 0:Z.find(ol=>(ol==null?void 0:ol.label)===(sa==null?void 0:sa.key)))==null?void 0:Ea.value)??(sa==null?void 0:sa.value),sa.type=((ul=(Pa=d.value)==null?void 0:Pa.find(ol=>(ol==null?void 0:ol.prop)===(sa==null?void 0:sa.key)))==null?void 0:ul.type)??(sa==null?void 0:sa.type),sa})),tl})}J.value=!1,s("contentChange",{contents:ra,index:t.index});let ga=[],fe=[];if((Ca=pl.safeClone((nl=ra==null?void 0:ra.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:nl.contents))==null||Ca.forEach(Se=>{var Xa;Array.isArray(Se==null?void 0:Se.value)&&((Xa=Se==null?void 0:Se.value)!=null&&Xa.find(Ya=>{var tl;return(tl=Ya==null?void 0:Ya.url)==null?void 0:tl.includes(".obj")}))&&(fe=Se==null?void 0:Se.value)}),(fe==null?void 0:fe.length)>0){const Se=(aa=pl.safeClone(fe))==null?void 0:aa.filter(Xa=>{var Ya;return(Ya=Xa==null?void 0:Xa.url)==null?void 0:Ya.includes(".obj")});Se==null||Se.forEach(Xa=>{var tl,Da,sa,Z;const Ya=(tl=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:tl.map(Ea=>Ea==null?void 0:Ea.url);ga.push({objUrl:Xa==null?void 0:Xa.url,mtlUrls:((Da=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:Da.length)===1?(Z=(sa=fe==null?void 0:fe.filter(Ea=>{var Pa;return(Ea==null?void 0:Ea.name)===(Xa==null?void 0:Xa.name)&&((Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".mtl"))}))==null?void 0:sa[0])==null?void 0:Z.url:Ya})}),$.setObjUrl(ga)}},Ne=(K,He,Ve)=>{let ra="";const va=He==null?void 0:He.map($e=>{var ba;return(ba=$e==null?void 0:$e.value)==null?void 0:ba.pageData});return va==null||va.forEach($e=>{var ba;($e==null?void 0:$e.name)===(K==null?void 0:K[0])&&((ba=$e==null?void 0:$e.compData)==null||ba.forEach(Te=>{var fa;(Te==null?void 0:Te.key)==="formContent"&&((fa=Te==null?void 0:Te.contents)==null||fa.forEach(Ue=>{var ga;(Ue==null?void 0:Ue.prop)===(K==null?void 0:K[1])&&(ra=(Ue==null?void 0:Ue.value)===""?ua.judgeContents((ga=pl.safeClone(Ue))==null?void 0:ga.optionUrl,Ve):Ue==null?void 0:Ue.value)}))}))}),ra},Ce=(K,He,Ve,ra)=>{var Te,fa;let va="",$e="";(Te=pl.safeClone(He))==null||Te.forEach((Ue,ga)=>{Ue!=null&&Ue.includes("[")?$e=$e+ge.value+K[ga]:$e=$e===""?$e+Ue:$e+"/"+Ue});let ba=(fa=ra[$e])==null?void 0:fa.map(Ue=>{var ga;return(ga=Ue==null?void 0:Ue.value)==null?void 0:ga.pageData});return ba==null||ba.forEach(Ue=>{var ga;(Ue==null?void 0:Ue.name)===(Ve==null?void 0:Ve[0])&&((ga=Ue==null?void 0:Ue.compData)==null||ga.forEach(fe=>{var ka;(fe==null?void 0:fe.key)==="formContent"&&((ka=fe==null?void 0:fe.contents)==null||ka.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(Ve==null?void 0:Ve[1])&&(va=Fe==null?void 0:Fe.value)}))}))}),va};return a.watch(()=>t.itemData,async()=>{var Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl;const K=(Te=t.itemData)==null?void 0:Te.find(Ca=>(Ca==null?void 0:Ca.key)==="formContent"),He=(fa=pl.safeClone(t.itemData))==null?void 0:fa.find(Ca=>(Ca==null?void 0:Ca.key)==="formButton"),Ve=(Ue=pl.safeClone(t.itemData))==null?void 0:Ue.find(Ca=>(Ca==null?void 0:Ca.key)==="formFlex"),ra=(ga=pl.safeClone(t.itemData))==null?void 0:ga.find(Ca=>(Ca==null?void 0:Ca.key)==="formWrap"),va=(fe=pl.safeClone(t.itemData))==null?void 0:fe.find(Ca=>(Ca==null?void 0:Ca.key)==="enableWrap");(ra==null?void 0:ra.contents)==="纵向"?C.value=!1:C.value=!0;const $e=va==null?void 0:va.contents;if($e===void 0?T.value=Zn.BLOCK:typeof $e=="boolean"?T.value=$e?Zn.ORDINARY:Zn.BLOCK:T.value=$e,k.value=typeof(Ve==null?void 0:Ve.contents)!="boolean"?!(!(Ve!=null&&Ve.contents)===""||((ka=Ve==null?void 0:Ve.contents)==null?void 0:ka.toUpperCase())==="VERTICAL"):Ve==null?void 0:Ve.contents,((Fe=K==null?void 0:K.contents)==null?void 0:Fe.length)>0&&Array.isArray(K==null?void 0:K.contents)){let Ca=t.allMapContents;const aa=(Na=($a=pl.safeClone(K))==null?void 0:$a.contents)==null?void 0:Na.map((Z,Ea)=>{var wl,fl,cl,kl,Dl,$l,or,Cr,Gr,Xr,Rr,nn,qr;let Pa=(Z==null?void 0:Z.label)??(Z==null?void 0:Z.key)??"";Z==null||Z.type;let ul=(Z==null?void 0:Z.options)??[];if((wl=Z==null?void 0:Z.key)!=null&&wl.includes("$")&&(Pa=(fl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:fl[0],((kl=(cl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:cl[1])==null?void 0:kl.length)>0)){const[rr,Nr]=($l=(Dl=pl.safeClone(Z==null?void 0:Z.key).split("$"))==null?void 0:Dl[1])==null?void 0:$l.split(/[()]/);(or=ua.FormType.find(Fr=>(Fr==null?void 0:Fr.key)===rr))==null||or.value,((Cr=Nr==null?void 0:Nr.split(","))==null?void 0:Cr.length)>0&&(ul=(Gr=Nr==null?void 0:Nr.split(","))==null?void 0:Gr.map(Fr=>({label:Fr,value:Fr})))}let ol=Z==null?void 0:Z.options;((Xr=Z==null?void 0:Z.optionUrl)==null?void 0:Xr.selectRelateType)==="自定义绑定"&&(ol=(nn=(Rr=Z==null?void 0:Z.optionUrl)==null?void 0:Rr.defaultSelect)==null?void 0:nn.map(rr=>({label:rr,value:rr})));let xa=(Z==null?void 0:Z.menuPath)??[],pa=(Z==null?void 0:Z.groups)??[],Aa=(Z==null?void 0:Z.columns)??[],Ze=!1,ha=(Z==null?void 0:Z.isFormColHidden)??!1,La="",Ja=Z!=null&&Z.value?Z.value:(ol==null?void 0:ol.length)>0?(qr=ol==null?void 0:ol[0])==null?void 0:qr.value:(Z==null?void 0:Z.value)??"",Ol=!1,El="Input";return((ol==null?void 0:ol.length)>0||(xa==null?void 0:xa.length)>0)&&(El="Select"),(Array.isArray(La)&&(La!=null&&La.every(rr=>(rr==null?void 0:rr.name)&&(rr==null?void 0:rr.url)))||Array.isArray(Ja)&&(Ja!=null&&Ja.every(rr=>(rr==null?void 0:rr.name)&&(rr==null?void 0:rr.url))))&&(El="upload"),Z!=null&&Z.isMainUrl&&(El="Url"),{label:Pa??"",name:Pa??"t"+Ea,prop:Pa??pl.safeClone(Z==null?void 0:Z.key),type:(Z==null?void 0:Z.type)??El,value:(Z==null?void 0:Z.type)==="Date"&&Ja===""?new Date:Ja,id:(Z==null?void 0:Z.id)??Ea,contents:(ol==null?void 0:ol.length)>0?ol:ul??[],width:(Z==null?void 0:Z.width)??1,isLoginUser:Ze,config:Z==null?void 0:Z.config,optionUrl:(Z==null?void 0:Z.optionUrl)??Z,isFormColHidden:ha,signature:Ol,isMain:Z==null?void 0:Z.isMain,required:(Z==null?void 0:Z.required)??!1,isMainUrl:Z==null?void 0:Z.isMainUrl,operable:(Z==null?void 0:Z.operable)??!1,disabled:(Z==null?void 0:Z.disabled)??!1,isSync:Z==null?void 0:Z.isSync,menus:xa,groups:pa,words:Aa,allSelectionContents:Z==null?void 0:Z.allContents,filterContent:Z==null?void 0:Z.filterContents}}),Se=aa==null?void 0:aa.map(Z=>Z==null?void 0:Z.value);let Xa="";Se==null||Se.forEach(Z=>{Z!==""&&Z!==void 0&&(Xa=Xa===""?Z:Xa+"/"+Z)}),S.setSelectArray(Se),S.setSelectString(Xa);let Ya=(Ye=pl.safeClone(aa))==null?void 0:Ye.map(Z=>(Z!=null&&Z.value&&ua.IsJson(Z==null?void 0:Z.value)&&Array.isArray(JSON.parse(Z==null?void 0:Z.value))&&(Z.value=JSON.parse(Z.value)),Z)),tl={};Ya==null||Ya.forEach(Z=>{tl[Z.label]=Z==null?void 0:Z.value}),Ya=Ya==null?void 0:Ya.map(Z=>{var Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha;if((Z==null?void 0:Z.type)==="Select"&&((Ea=Z==null?void 0:Z.allSelectionContents)==null?void 0:Ea.length)>0&&(Z.contactValue=tl),(ul=(Pa=Z==null?void 0:Z.optionUrl)==null?void 0:Pa.menuSelect)!=null&&ul.some(La=>La==null?void 0:La.includes("["))){let La="";Z.optionUrl.oldMenuSelect=(xa=(ol=pl.safeClone(Z))==null?void 0:ol.optionUrl)==null?void 0:xa.menuSelect,Z.optionUrl.menuSelect=(Aa=(pa=Z==null?void 0:Z.optionUrl)==null?void 0:pa.menuSelect)==null?void 0:Aa.map(Ja=>{var Ol,El,Sl,wl,fl,cl;if(Ja!=null&&Ja.includes("[")){let kl=(El=(Ol=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:Ol.split(":"))==null?void 0:El[1];La=Ne((Sl=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:Sl.split(":"),Ca==null?void 0:Ca[D.value],Ca),Ja=((fl=(wl=pl.safeClone(Ya))==null?void 0:wl.find(Dl=>(Dl==null?void 0:Dl.label)===kl))==null?void 0:fl.value)||Ne((cl=Ja==null?void 0:Ja.replaceAll("[","").replaceAll("]",""))==null?void 0:cl.split(":"),Ca==null?void 0:Ca[D.value],Ca)}return Ja}),La!==""&&Z.value===""&&(Z.value=Ce(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(Ze=Z==null?void 0:Z.optionUrl)==null?void 0:Ze.groupSelect,Ca),Array.isArray(Z.value)&&((ha=Z.value)!=null&&ha.every(Ja=>Ja==null?void 0:Ja.url))&&(Z.type="UPLOAD"))}return Z}),d.value=Ya,wa.value=((Oe=d.value)==null?void 0:Oe.every(Z=>Z==null?void 0:Z.disabled))||Q.value===D.value,Ke.value=(ue=d.value)==null?void 0:ue.every(Z=>Z==null?void 0:Z.operable),ya.value=(ie=d.value)==null?void 0:ie.map(Z=>Z==null?void 0:Z.label);let Da=[],sa=[];if((na=pl.safeClone(d.value))==null||na.forEach(Z=>{var Ea;Array.isArray(Z==null?void 0:Z.value)&&((Ea=Z==null?void 0:Z.value)!=null&&Ea.find(Pa=>{var ul;return(ul=Pa==null?void 0:Pa.url)==null?void 0:ul.includes(".obj")}))&&(sa=Z==null?void 0:Z.value)}),(sa==null?void 0:sa.length)>0){const Z=(qa=pl.safeClone(sa))==null?void 0:qa.filter(Ea=>{var Pa;return(Pa=Ea==null?void 0:Ea.url)==null?void 0:Pa.includes(".obj")});Z==null||Z.forEach(Ea=>{var ul,ol,xa,pa;const Pa=(ul=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:ul.map(Aa=>Aa==null?void 0:Aa.url);Da.push({objUrl:Ea==null?void 0:Ea.url,mtlUrls:((ol=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:ol.length)===1?(pa=(xa=sa==null?void 0:sa.filter(Aa=>{var Ze;return(Aa==null?void 0:Aa.name)===(Ea==null?void 0:Ea.name)&&((Ze=Aa==null?void 0:Aa.url)==null?void 0:Ze.includes(".mtl"))}))==null?void 0:xa[0])==null?void 0:pa.url:Pa})}),$.setObjUrl(Da)}(rl=pl.safeClone(d.value))==null||rl.forEach(Z=>{var Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El;if((Pa=(Ea=Z==null?void 0:Z.value)==null?void 0:Ea.toString())!=null&&Pa.includes(".stl")||(ol=(ul=Z==null?void 0:Z.value)==null?void 0:ul.toString())!=null&&ol.includes(".STL")||(pa=(xa=Z==null?void 0:Z.value)==null?void 0:xa.toString())!=null&&pa.includes(".obj")||(Ze=(Aa=Z==null?void 0:Z.value)==null?void 0:Aa.toString())!=null&&Ze.includes(".mtl")||(La=(ha=Z==null?void 0:Z.value)==null?void 0:ha.toString())!=null&&La.includes(".urdf")){let Sl={},wl=[],fl;Array.isArray(Z==null?void 0:Z.value)?fl=Z==null?void 0:Z.value:fl=(Ja=Z==null?void 0:Z.value)==null?void 0:Ja.split(","),fl==null||fl.forEach(cl=>{cl.includes(".mtl")?wl.push(cl):Sl.blob=Sl.blob==="undefined"?cl:Sl.blob+","+cl}),(wl==null?void 0:wl.length)>0&&(Sl.mtlBlobs=wl),(El=(Ol=Object.values(Sl))==null?void 0:Ol[0])!=null&&El.includes("http:")}})}else d.value=[];let ba=ze.value;if((ba==null?void 0:ba.length)>0&&(ba=ba==null?void 0:ba.map(Ca=>{var Se,Xa,Ya,tl;let aa=(Se=Ca==null?void 0:Ca.key)==null?void 0:Se.split("/");return(t==null?void 0:t.compName)===(aa==null?void 0:aa[0])&&(Xa=d.value)!=null&&Xa.find(Da=>(Da==null?void 0:Da.prop)===(aa==null?void 0:aa[1]))&&(Ca.value=(tl=(Ya=d.value)==null?void 0:Ya.find(Da=>(Da==null?void 0:Da.prop)===(aa==null?void 0:aa[1])))==null?void 0:tl.value),Ca}),me.setTableViewContents(ba)),t!=null&&t.formRules)c.value=t==null?void 0:t.formRules;else{let Ca={};(Ml=pl.safeClone(d).value)==null||Ml.forEach(aa=>{((aa==null?void 0:aa.isMain)===!0||(aa==null?void 0:aa.required)===!0)&&(Ca[(aa==null?void 0:aa.prop)??(aa==null?void 0:aa.name)]=[{required:!0,message:`${(aa==null?void 0:aa.label)||(aa==null?void 0:aa.prop)||(aa==null?void 0:aa.name)}不能为空`}])}),c.value=Ca}if(((Fa=He==null?void 0:He.contents)==null?void 0:Fa.length)>0){const Ca=[];(nl=He==null?void 0:He.contents)==null||nl.forEach((aa,Se)=>{(aa==null?void 0:aa.label)!==""&&Ca.push({label:(aa==null?void 0:aa.label)??"",id:(aa==null?void 0:aa.id)??Se,type:(aa==null?void 0:aa.type)??"",background:aa==null?void 0:aa.background})}),Y.value=Ca}else Y.value=[]},{deep:!0,immediate:!0}),a.watch(()=>Q.value,K=>{wa.value=K===D.value},{immediate:!0}),(K,He)=>{var Te,fa;const Ve=a.resolveComponent("svg-icon"),ra=a.resolveComponent("el-switch"),va=a.resolveComponent("el-checkbox"),$e=a.resolveComponent("el-popover"),ba=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",c3,[T.value===a.unref(Zn).TEXT?(a.openBlock(),a.createBlock(vc,{key:0,itemData:l.itemData,compName:l.compName,fields:d.value,disabled:wa.value||la()},null,8,["itemData","compName","fields","disabled"])):T.value===a.unref(Zn).BLOCK?(a.openBlock(),a.createBlock(qp,{key:1,items:(fa=(Te=d.value)==null?void 0:Te.filter(Ue=>!(Ue!=null&&Ue.isFormColHidden)))==null?void 0:fa.map(Ue=>({label:Ue==null?void 0:Ue.label,value:Ue==null?void 0:Ue.value,width:(Ue==null?void 0:Ue.width)??1,field:Ue})),disabled:wa.value||la()},null,8,["items","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":T.value===a.unref(Zn).ORDINARY})},[a.createVNode(pl.ssForm,{rowContents:d.value,formRules:c.value,buttonValue:Y.value,isRowFlex:!1,isEnableWrap:!0,onOnButtonClick:W,onChange:Ie,formDisabled:wa.value||la(),formLabelsOperable:Ke.value,isButtonRow:C.value,onPreview:X,onBlurChange:F,onHandleColEditChange:Ua,onHandleColTypeChange:Oa,onRouteUrl:Ee,onClickTrigger:Pe},{operateCol:a.withCtx(({renderColumns:Ue,formDisabled:ga,formLabelsOperable:fe})=>[a.createVNode($e,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Re},{reference:a.withCtx(()=>[a.createElementVNode("span",u3,[a.createVNode(Ve,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",d3,[He[1]||(He[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(ra,{"model-value":ga,"active-text":"禁用","inactive-text":"",onChange:ae,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(ra,{"model-value":fe,"active-text":"编辑所有标签","inactive-text":"",onChange:ea},null,8,["model-value"]),He[2]||(He[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(ba,{modelValue:ya.value,"onUpdate:modelValue":He[0]||(He[0]=ka=>ya.value=ka),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:de,onChange:ma},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ue,ka=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ka.label},[a.createVNode(va,{value:ka.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(ka.label),1)]),_:2},1032,["value"]),a.createVNode($e,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(Ve,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Fe;return[a.createElementVNode("div",p3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Fe=Object.keys(ka))==null?void 0:Fe.filter($a=>{var Na;return(Na=Va.value)==null?void 0:Na.find(Ye=>(Ye==null?void 0:Ye.value)===$a)}),$a=>{var Na,Ye;return a.openBlock(),a.createElementBlock("div",{key:$a},[a.createVNode(pl._sfc_main$1,{value:ka==null?void 0:ka[$a],"active-text":(Ye=(Na=Va.value)==null?void 0:Na.find(Oe=>(Oe==null?void 0:Oe.value)===$a))==null?void 0:Ye.label,inactiveText:"",onChange:Oe=>P(Oe,$a,ka)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",f3,[a.createVNode(Ve,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","formDisabled","formLabelsOperable","isButtonRow"])],2)),M.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:3,fileDataList:w.value,onDestroy:R},null,8,["fileDataList"])):a.createCommentVNode("",!0),b.value?(a.openBlock(),a.createBlock(yr.ssDialog,{key:4,visible:b.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(bo.ThreeViewerHost,{files:v.value,onGetAnimationData:K.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ps=Kl._export_sfc(h3,[["__scopeId","data-v-b9cbe990"]]),So=a.ref(0),mc=l=>{var n;return!l||(l==null?void 0:l.length)===0?[]:(n=A.cloneDeep(l))==null?void 0:n.map(t=>(So.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??So.value,children:mc(t==null?void 0:t.children)},t))},v3=l=>{var r;return(r=A.cloneDeep(l))==null?void 0:r.map(t=>(So.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??So.value,children:mc(t==null?void 0:t.children)},t))},yc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===n)?(r=A.cloneDeep(l))==null?void 0:r.filter(s=>(s==null?void 0:s.id)!==n):(l=l==null?void 0:l.map(t=>(t.children=yc(t==null?void 0:t.children,n),t)),l)},gc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(n==null?void 0:n.id))?(r=A.cloneDeep(l))==null?void 0:r.map(s=>((s==null?void 0:s.id)===(n==null?void 0:n.id)&&(s=n),s)):(l=l==null?void 0:l.map(t=>(t.children=gc(t==null?void 0:t.children,n),t)),l)},bc=(l,n)=>{var r;return l!=null&&l.find(t=>{var s;return(t==null?void 0:t.id)===((s=n==null?void 0:n.contents)==null?void 0:s.id)})?(r=A.cloneDeep(l))==null?void 0:r.map(s=>{var d;return(s==null?void 0:s.id)===((d=n==null?void 0:n.contents)==null?void 0:d.id)&&(s=n==null?void 0:n.contents),s}):(l=l==null?void 0:l.map(t=>(t.children=bc(t==null?void 0:t.children,n),t)),l)},kc=(l,n)=>{var r;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(n==null?void 0:n.id))?(r=A.cloneDeep(l))==null?void 0:r.map(s=>((s==null?void 0:s.id)===(n==null?void 0:n.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(n.contents)),s)):(l=l==null?void 0:l.map(t=>(t.children=kc(t==null?void 0:t.children,n),t)),l)},er=[{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"}],m3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],y3=[{label:"新增",value:"add"}],Bn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:y3},{key:"background",label:"按钮背景色",type:"Color"}],Nn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:m3},{key:"textColor",label:"按钮颜色",type:"Color"}],g3={class:"table-header-child"},b3={class:"table-header-child-main"},k3={class:"table-header-child-content"},x3={class:"table-header-child-content-item"},_3={class:"fix-button"},w3={key:0},C3={class:"form-content"},E3={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref(""),b=ua.useTableComp(A.pinia),{tableIndex:h}=A.storeToRefs(b);a.ref(0);const v=a.ref(""),y=a.ref([]),c=a.ref([]),C=S=>{var T;s.value=!0;let $=[];er==null||er.forEach(k=>{let g=A.cloneDeep(h.value)+1;b.setTableIndex(g),$.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:h.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((T=S==null?void 0:S.children)==null?void 0:T.length)>0&&$.push({children:S==null?void 0:S.children,isFormColHidden:!0}),v.value=S==null?void 0:S.id,y.value=$,c.value=$},M=S=>{t("fixChange",A.cloneDeep(S))},L=S=>{t("deleteChange",A.cloneDeep(S))},x=S=>{s.value=!0;let $=[];er==null||er.forEach(T=>{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),$.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),d.value=S==null?void 0:S.id,y.value=$,c.value=$},Y=S=>{let $=A.cloneDeep(c.value);$=$==null?void 0:$.map(T=>(T.children||(T.value=S==null?void 0:S[T.name]),T)),c.value=$},w=()=>{var $,T;y.value=c.value;let S={};if(v.value!=="")S.id=v.value,($=y.value)==null||$.forEach(k=>{const g=er==null?void 0:er.find(j=>(j==null?void 0:j.label)===(k==null?void 0:k.label));g?S[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"fix"});else{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),S.id="id"+h.value,(T=y.value)==null||T.forEach(g=>{const j=er==null?void 0:er.find(q=>(q==null?void 0:q.label)===(g==null?void 0:g.label));j?S[j.key]=g.value:g!=null&&g.children&&g.children.length>0&&(S.children=g.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"add"})}v.value="",y.value=[],c.value=[]},z=()=>{s.value=!1,v.value="",d.value="",y.value=[],c.value=[]},ee=S=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",S),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(S,$)=>{const T=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",g3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(k,g)=>(a.openBlock(),a.createElementBlock("div",b3,[a.createElementVNode("div",k3,[a.createElementVNode("div",x3,a.toDisplayString(k.label),1),a.createElementVNode("div",_3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>x(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>C(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:j=>ee(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",w3,[a.createVNode(xc,{tableChildContents:k==null?void 0:k.children,onDeleteChange:L,onFixChange:M},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:z,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",C3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:z,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:w},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},S3=Kl._export_sfc(E3,[["__scopeId","data-v-e0fef72d"]]),D3={class:"table-header-child"},B3={class:"table-header-child-main"},N3={class:"table-header-child-content"},T3={class:"table-header-child-content-item"},A3={class:"fix-button"},M3={key:0},z3={class:"form-content"},O3={class:"dialog-footer"},I3={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref(""),b=ua.useTableComp(A.pinia),{tableIndex:h}=A.storeToRefs(b),v=a.ref(""),y=a.ref([]),c=a.ref([]),C=S=>{t("fixChange",A.cloneDeep(S))},M=S=>{var T;s.value=!0;let $=[];er==null||er.forEach(k=>{let g=A.cloneDeep(h.value)+1;b.setTableIndex(g),$.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:h.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((T=S==null?void 0:S.children)==null?void 0:T.length)>0&&$.push({children:S==null?void 0:S.children,isFormColHidden:!0}),v.value=S==null?void 0:S.id,y.value=$,c.value=$},L=S=>{s.value=!0;let $=[];er==null||er.forEach(T=>{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),$.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),d.value=S==null?void 0:S.id,y.value=$,c.value=$},x=S=>{let $=A.cloneDeep(c.value);$=$==null?void 0:$.map(T=>(T.children||(T.value=S==null?void 0:S[T.name]),T)),c.value=$},Y=()=>{var $,T;y.value=c.value;let S={};if(v.value!=="")S.id=v.value,($=y.value)==null||$.forEach(k=>{const g=er==null?void 0:er.find(j=>(j==null?void 0:j.label)===(k==null?void 0:k.label));g?S[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"fix"});else{let k=A.cloneDeep(h.value)+1;b.setTableIndex(k),S.id="idChild"+h.value,(T=y.value)==null||T.forEach(g=>{const j=er==null?void 0:er.find(q=>(q==null?void 0:q.label)===(g==null?void 0:g.label));j?S[j.key]=g.value:g!=null&&g.children&&g.children.length>0&&(S.children=g.children)}),s.value=!1,t("fixChange",{contents:A.cloneDeep(S),id:d.value,type:"add"})}v.value="",y.value=[],c.value=[]},w=()=>{s.value=!1,v.value="",d.value="",y.value=[],c.value=[]},z=S=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",S),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ee=S=>{t("deleteChange",S)};return(S,$)=>{const T=a.resolveComponent("svg-icon"),k=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",D3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(g,j)=>(a.openBlock(),a.createElementBlock("div",B3,[a.createElementVNode("div",N3,[a.createElementVNode("div",T3,a.toDisplayString(g.label),1),a.createElementVNode("div",A3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>L(g)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>M(g)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(a.openBlock(),a.createElementBlock("div",M3,[a.createVNode(S3,{tableChildContents:g==null?void 0:g.children,onDeleteChange:ee,onFixChange:C},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:w,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",z3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",O3,[a.createVNode(k,{onClick:w,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>$[0]||($[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(k,{class:"ok-button button",onClick:Y,id:"themeButton"},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},xc=Kl._export_sfc(I3,[["__scopeId","data-v-ebd68fa1"]]),L3={class:"table-operate-content"},V3={class:"table-operate-item"},R3={class:"operate-title"},$3={class:"operate-content"},P3={class:"fix-content"},F3={class:"fix-content-label"},j3={class:"fix-button"},H3={key:0},U3={class:"operate-title"},q3={class:"operate-content"},K3={class:"fix-content"},W3={class:"fix-content-label"},Y3={class:"fix-button"},J3={class:"operate-title"},G3={class:"operate-content"},X3={class:"fix-content"},Z3={class:"fix-content-label"},Q3={class:"fix-button"},e1={class:"operate-title"},a1={class:"operate-content"},l1={class:"fix-content"},r1={class:"fix-content-label"},n1={class:"fix-button"},o1={class:"operate-content"},i1={style:{display:"flex","justify-content":"space-between"}},s1={class:"form-content"},c1={class:"dialog-footer"},u1={class:"form-content"},d1={class:"dialog-footer"},p1={class:"form-content"},f1={class:"dialog-footer"},h1={class:"form-content"},v1={class:"dialog-footer"},m1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref(!1),b=a.ref(!1),h=a.ref([]),v=a.ref(!1),y=a.ref([]),c=a.ref(!1),C=a.ref([]),M=a.ref(""),L=a.ref(""),x=a.ref([]),Y=a.ref([]),w=a.ref([]),z=a.ref([]),ee=a.ref(!1),S=a.ref([]),$=a.ref([]),T=a.ref(0),k=a.ref([]),g=a.ref([]),j=a.ref([]),q=()=>{ee.value=!0;let P=[];Bn==null||Bn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:(F==null?void 0:F.key)==="background"?"var(--ssComponent-primary-color)":"",id:T.value,contents:F==null?void 0:F.options})}),S.value=P,$.value=P},J=()=>{var F,X,R;b.value=!0;let P=[];(R=(X=(F=ua.FormContent)==null?void 0:F.find(W=>(W==null?void 0:W.key)==="Input"))==null?void 0:X.value)==null||R.forEach(W=>{T.value++,P.push({label:W==null?void 0:W.label,name:(W==null?void 0:W.name)||(W==null?void 0:W.label),type:W.type,value:(W==null?void 0:W.label)==="类型"?"Input":"",id:T.value,contents:W==null?void 0:W.options})}),k.value=P,g.value=P},me=P=>{P||(k.value=g.value)},ze=async P=>{var F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va;if((P==null?void 0:P.类型)!==((X=(F=g.value)==null?void 0:F.find($e=>($e==null?void 0:$e.label)==="类型"))==null?void 0:X.value)){let $e=[],ba=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:W.value)==null?void 0:Ie.value)?await((Ve=(He=(K=ua.FormContent)==null?void 0:K.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:He.value)==null?void 0:Ve.value):(Ce=(Ne=ua.FormContent)==null?void 0:Ne.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ce.value;if(ba==null||ba.forEach(Te=>{T.value++,$e.push({label:Te==null?void 0:Te.label,name:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.label),type:Te.type,value:Te!=null&&Te.属性名?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):(P==null?void 0:P[Te.label])??"",id:T.value,contents:Te==null?void 0:Te.options,prop:(Te==null?void 0:Te.prop)||(Te==null?void 0:Te.name)||(Te==null?void 0:Te.label)})}),P!=null&&P.菜单选项&&((ra=P==null?void 0:P.菜单选项)==null?void 0:ra.length)>0){const Te=await ua.menuToContentType(P==null?void 0:P.菜单选项);$e=$e==null?void 0:$e.map(fa=>((fa==null?void 0:fa.name)==="组信息选项"&&(fa.contents=Te),fa))}g.value=await ua.selectToBase(A.cloneDeep($e)),k.value=await ua.selectToBase(A.cloneDeep($e))}else{let $e=A.cloneDeep(k.value);if($e=$e==null?void 0:$e.map(ba=>(ba.value=P==null?void 0:P[ba.name],ba)),P!=null&&P.菜单选项&&((va=P==null?void 0:P.菜单选项)==null?void 0:va.length)>0){const ba=await ua.menuToContentType(P==null?void 0:P.菜单选项);$e=$e==null?void 0:$e.map(Te=>((Te==null?void 0:Te.name)==="组信息选项"&&(Te.contents=ba),Te))}$e=ua.formToOptionsContents($e),g.value=await ua.selectToBase(A.cloneDeep($e))}},xe=async P=>{await ze(P),k.value=g.value},te=(P,F)=>{if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.selectRelateType)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.menuSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const X=F==null?void 0:F.optionUrl;return(X==null?void 0:X.groupSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(F==null?void 0:F.value)||F[P.key];if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const X=F[P.key];return Hs(X)?X:P.default}return(P==null?void 0:P.label)==="类型"&&F[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!F[P.key]?!1:F[P.key]},be=async P=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra;b.value=!0;let F=[];const X=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:W.value)==null?void 0:Ie.value)?await((Ve=(He=(K=ua.FormContent)==null?void 0:K.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:He.value)==null?void 0:Ve.value):(Ce=(Ne=ua.FormContent)==null?void 0:Ne.find(va=>(va==null?void 0:va.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ce.value;if(X==null||X.forEach(va=>{T.value++,F.push({label:va==null?void 0:va.label,name:(va==null?void 0:va.name)||(va==null?void 0:va.label),type:va.type,value:(va==null?void 0:va.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):te(va,P),id:T.value,contents:va==null?void 0:va.options})}),P!=null&&P.menuSelect&&((ra=P==null?void 0:P.menuSelect)==null?void 0:ra.length)>0){const va=await ua.menuToContentType(P==null?void 0:P.menuSelect);F=F==null?void 0:F.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=va),$e))}M.value=P==null?void 0:P.id,k.value=await ua.selectToBase(ua.formToOptionsContents(F)),g.value=await ua.selectToBase(ua.formToOptionsContents(F))},Q=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;j.value=(F=A.cloneDeep(j.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="tableToForm"&&(R.contents=j.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{b.value=!1,k.value=[],M.value=""},Ke=async()=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra,va;k.value=g.value;let P={};M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value);let F=await((Ie=(W=(R=ua.FormContent)==null?void 0:R.find($e=>{var ba,Te;return($e==null?void 0:$e.key)===(((Te=(ba=k.value)==null?void 0:ba.find(fa=>(fa==null?void 0:fa.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:W.value)==null?void 0:Ie.value)??((Ce=(Ne=ua.FormContent)==null?void 0:Ne.find($e=>{var ba,Te;return($e==null?void 0:$e.key)===(((Te=(ba=k.value)==null?void 0:ba.find(fa=>(fa==null?void 0:fa.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:Ce.value);if((K=k.value)==null||K.forEach($e=>{const ba=F==null?void 0:F.find(Te=>(Te==null?void 0:Te.label)===($e==null?void 0:$e.label));ba&&(P[ba.key]=$e.value)}),P.name=P.label,(He=j.value)!=null&&He.find($e=>$e.id===P.id))j.value=(Ve=j.value)==null?void 0:Ve.map($e=>($e.id===P.id&&($e=P),$e));else{let $e=A.cloneDeep(j.value);j.value||(j.value=[]),$e.push(P),j.value=$e}j.value=j.value.map(({id:$e,...ba})=>ba),b.value=!1,M.value="";let X=A.cloneDeep(r.originalItemContents);(ra=A.cloneDeep(r.originalItemContents))!=null&&ra.find($e=>($e==null?void 0:$e.key)==="tableToForm")?X=(va=A.cloneDeep(r.originalItemContents))==null?void 0:va.map($e=>(($e==null?void 0:$e.key)==="tableToForm"&&($e.contents=j.value),$e)):X.push({key:"tableToForm",contents:j.value}),t("change",X)},wa=P=>{ee.value=!0;let F=[];Bn==null||Bn.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:P[X.key],id:T.value,contents:X==null?void 0:X.options})}),M.value=P==null?void 0:P.id,S.value=F,$.value=F};a.watch(()=>c.value,()=>{var F,X;let P=A.cloneDeep(r.originalItemContents);(F=A.cloneDeep(r.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="page")?P=(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="page"&&(R.contents=c.value),R)):P.push({key:"page",contents:c.value}),t("change",P)},{deep:!0});const oe=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;Y.value=(F=A.cloneDeep(Y.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=Y.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=()=>{var X,R,W,Ie,Ne;S.value=$.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=S.value)==null||X.forEach(Ce=>{const K=Bn==null?void 0:Bn.find(He=>(He==null?void 0:He.label)===(Ce==null?void 0:Ce.label));K?P[K.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(P.children=Ce.children)}),(R=Y.value)!=null&&R.find(Ce=>Ce.id===P.id))Y.value=(W=Y.value)==null?void 0:W.map(Ce=>(Ce.id===P.id&&(Ce=P),Ce));else{let Ce=A.cloneDeep(Y.value)??[];Ce.push(P),Y.value=Ce}ee.value=!1,M.value="";let F=A.cloneDeep(r.originalItemContents);(Ie=A.cloneDeep(r.originalItemContents))!=null&&Ie.find(Ce=>(Ce==null?void 0:Ce.key)==="extraButton")?F=(Ne=A.cloneDeep(r.originalItemContents))==null?void 0:Ne.map(Ce=>((Ce==null?void 0:Ce.key)==="extraButton"&&(Ce.contents=Y.value),Ce)):F.push({key:"extraButton",contents:Y.value}),t("change",F)},ne=P=>{let F=A.cloneDeep($.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),$.value=F},ge=()=>{ee.value=!1,S.value=[],M.value=""},se=P=>{v.value=!0;let F=[];Nn==null||Nn.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:P[X.key],id:T.value,contents:X==null?void 0:X.options})}),M.value=P==null?void 0:P.id,w.value=F,z.value=F},we=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;x.value=(F=A.cloneDeep(x.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=x.value),R))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},la=()=>{d.value=!0;let P=[];er==null||er.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),y.value=P,C.value=P},ya=()=>{v.value=!0;let P=[];Nn==null||Nn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),w.value=P,z.value=P},Va=P=>{let F=A.cloneDeep(z.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),z.value=F},ae=()=>{var X,R,W,Ie,Ne;w.value=z.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=w.value)==null||X.forEach(Ce=>{const K=Nn==null?void 0:Nn.find(He=>(He==null?void 0:He.label)===(Ce==null?void 0:Ce.label));K?P[K.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(P.children=Ce.children)}),(R=x.value)!=null&&R.find(Ce=>Ce.id===P.id))x.value=(W=x.value)==null?void 0:W.map(Ce=>(Ce.id===P.id&&(Ce=P),Ce));else{let Ce=A.cloneDeep(x.value);Ce.push(P),x.value=Ce}v.value=!1,M.value="";let F=A.cloneDeep(r.originalItemContents);(Ie=A.cloneDeep(r.originalItemContents))!=null&&Ie.find(Ce=>(Ce==null?void 0:Ce.key)==="rowButton")?F=(Ne=A.cloneDeep(r.originalItemContents))==null?void 0:Ne.map(Ce=>((Ce==null?void 0:Ce.key)==="rowButton"&&(Ce.contents=x.value),Ce)):F.push({key:"rowButton",contents:x.value}),t("change",F)},ea=()=>{v.value=!1,M.value="",z.value=[],w.value=[]},Re=P=>{d.value=!0;let F=[];er==null||er.forEach(X=>{T.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:T.value,contents:X==null?void 0:X.options})}),y.value=F,L.value=P==null?void 0:P.id,C.value=F},ma=P=>{var F;h.value=yc(A.cloneDeep(h.value),P==null?void 0:P.id),t("change",(F=A.cloneDeep(r.originalItemContents))==null?void 0:F.map(X=>{var R;return(X==null?void 0:X.key)==="header"&&(X.contents=(R=h.value)!=null&&R.some(W=>W==null?void 0:W.children)?[h.value]:h.value),X}))},Pe=P=>{var X,R,W;P.type==="fix"?P.id!==""?h.value=bc(h.value,P):h.value=gc(h.value,P==null?void 0:P.contents):h.value=kc(h.value,P),h.value=(X=h.value)!=null&&X.some(Ie=>Ie==null?void 0:Ie.children)?[h.value]:h.value,M.value="";let F=A.cloneDeep(r.originalItemContents);(R=A.cloneDeep(r.originalItemContents))!=null&&R.find(Ie=>(Ie==null?void 0:Ie.key)==="header")?F=(W=A.cloneDeep(r.originalItemContents))==null?void 0:W.map(Ie=>((Ie==null?void 0:Ie.key)==="header"&&(Ie.contents=h.value),Ie)):F.push({key:"header",contents:h.value}),t("change",F)},Ee=P=>{var X;d.value=!0;let F=[];er==null||er.forEach(R=>{T.value++,F.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:P[R.key],id:T.value,contents:R==null?void 0:R.options})}),P!=null&&P.children&&((X=P==null?void 0:P.children)==null?void 0:X.length)>0&&F.push({children:P==null?void 0:P.children,isFormColHidden:!0}),M.value=P==null?void 0:P.id,L.value="",y.value=F,C.value=F},Le=P=>{let F=A.cloneDeep(C.value);F=F==null?void 0:F.map(X=>(X.children||(X.value=P==null?void 0:P[X.name]),X)),C.value=F},We=()=>{d.value=!1,M.value="",L.value="",C.value=[]},Ua=()=>{var X,R,W,Ie,Ne,Ce;y.value=C.value;let P={};if(M.value!==""?P.id=M.value:(T.value++,P.id="id"+T.value),(X=y.value)==null||X.forEach(K=>{const He=er==null?void 0:er.find(Ve=>(Ve==null?void 0:Ve.label)===(K==null?void 0:K.label));He?P[He.key]=K.value:K!=null&&K.children&&K.children.length>0&&(P.children=K.children)}),(R=h.value)!=null&&R.find(K=>K.id===P.id))h.value=(W=h.value)==null?void 0:W.map(K=>(K.id===P.id&&(K=P),K));else{let K=A.cloneDeep(h.value)??[];L.value===""?K.push(P):K=K==null?void 0:K.map(He=>(He.id===L.value&&(He.children||(He.children=[]),He.children.push(P)),He)),h.value=K}h.value=(Ie=h.value)!=null&&Ie.some(K=>K==null?void 0:K.children)?[h.value]:h.value,d.value=!1,M.value="",L.value="";let F=A.cloneDeep(r.originalItemContents);(Ne=A.cloneDeep(r.originalItemContents))!=null&&Ne.find(K=>(K==null?void 0:K.key)==="header")?F=(Ce=A.cloneDeep(r.originalItemContents))==null?void 0:Ce.map(K=>((K==null?void 0:K.key)==="header"&&(K.contents=h.value),K)):F.push({key:"header",contents:h.value}),t("change",F)},Oa=P=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,X;h.value=(F=A.cloneDeep(h.value))==null?void 0:F.filter(R=>(R==null?void 0:R.id)!==(P==null?void 0:P.id)),t("change",(X=A.cloneDeep(r.originalItemContents))==null?void 0:X.map(R=>{var W;return(R==null?void 0:R.key)==="header"&&(R.contents=(W=h.value)!=null&&W.some(Ie=>Ie==null?void 0:Ie.children)?[h.value]:h.value),R})),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>r.originalItemContents,()=>{var P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(s.value=A.cloneDeep(r.originalItemContents),h.value=(F=(P=s.value)==null?void 0:P.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:F.contents,x.value=(R=(X=s.value)==null?void 0:X.find(fe=>(fe==null?void 0:fe.key)==="rowButton"))==null?void 0:R.contents,Y.value=(Ie=(W=s.value)==null?void 0:W.find(fe=>(fe==null?void 0:fe.key)==="extraButton"))==null?void 0:Ie.contents,c.value=(Ce=(Ne=s.value)==null?void 0:Ne.find(fe=>(fe==null?void 0:fe.key)==="page"))!=null&&Ce.contents?!!((He=(K=s.value)==null?void 0:K.find(fe=>(fe==null?void 0:fe.key)==="page"))!=null&&He.contents):!1,j.value=(ra=(Ve=s.value)==null?void 0:Ve.find(fe=>(fe==null?void 0:fe.key)==="tableToForm"))==null?void 0:ra.contents,h.value=(va=h.value)==null?void 0:va.map((fe,ka)=>(Array.isArray(fe)?fe=v3(fe):fe={label:(fe==null?void 0:fe.label)??"",prop:(fe==null?void 0:fe.label)==="操作"?"operate":fe==null?void 0:fe.prop,width:fe!=null&&fe.width?parseInt(fe.width):"",fixed:(fe==null?void 0:fe.fixed)??void 0,sortable:(fe==null?void 0:fe.sortable)??!1,align:(fe==null?void 0:fe.align)??"left",showOverflowTooltip:(fe==null?void 0:fe.showOverflowTooltip)??!0,isNotDrag:(fe==null?void 0:fe.isNotDrag)??!1,isEditCol:(fe==null?void 0:fe.isEditCol)??!1,isOperate:(fe==null?void 0:fe.isOperate)??!1,id:(fe==null?void 0:fe.id)??ka,formMenuSelect:(fe==null?void 0:fe.formMenuSelect)??void 0,groupSelect:(fe==null?void 0:fe.groupSelect)??void 0},fe)),h.value=($e=h.value)!=null&&$e.every(fe=>Array.isArray(fe))?(ba=h.value)==null?void 0:ba[0]:h.value,x.value=(Te=x.value)==null?void 0:Te.map((fe,ka)=>fe={label:(fe==null?void 0:fe.label)??"",type:(fe==null?void 0:fe.type)??"",textColor:(fe==null?void 0:fe.textColor)??"#000000",id:(fe==null?void 0:fe.id)??ka}),Y.value=(fa=Y.value)==null?void 0:fa.map((fe,ka)=>fe={label:(fe==null?void 0:fe.label)??"",type:(fe==null?void 0:fe.type)??"",background:(fe==null?void 0:fe.background)??"var(--ssComponent-primary-color)",id:(fe==null?void 0:fe.id)??ka}),j.value)j.value=(ga=j.value)==null?void 0:ga.map(fe=>{T.value++;let ka=fe;return ka.id=T.value,ka});else{let fe=[];const ka=(Ue=ua.getColumnChild(A.cloneDeep(h.value)))==null?void 0:Ue.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="operate");ka==null||ka.forEach(Fe=>{var $a;T.value++,fe.push({label:Fe==null?void 0:Fe.label,name:(Fe==null?void 0:Fe.prop)||(Fe==null?void 0:Fe.label),type:Fe!=null&&Fe.groupSelect?"Select":"Input",value:"",id:T.value,contents:Fe==null?void 0:Fe.options,menuSelect:Fe==null?void 0:Fe.formMenuSelect,groupSelect:($a=Fe==null?void 0:Fe.groupSelect)==null?void 0:$a.split(":"),selectRelateType:"关联绑定列"})}),j.value=fe}},{deep:!0,immediate:!0}),(P,F)=>{const X=a.resolveComponent("svg-icon"),R=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",L3,[a.createElementVNode("div",V3,[a.createElementVNode("div",R3,[F[2]||(F[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(R,{class:"icon-content",onClick:la,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[1]||(F[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",$3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",P3,[a.createElementVNode("div",F3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",j3,[a.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Re(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Ee(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Oa(W)},null,8,["onClick"])])]),W!=null&&W.children&&W.children.length>0?(a.openBlock(),a.createElementBlock("div",H3,[a.createVNode(xc,{tableChildContents:W==null?void 0:W.children,onDeleteChange:ma,onFixChange:Pe},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",U3,[F[4]||(F[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:ya},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[3]||(F[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",q3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",K3,[a.createElementVNode("div",W3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",Y3,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>se(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>we(W)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",J3,[F[6]||(F[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:q},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[5]||(F[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",G3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Y.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",X3,[a.createElementVNode("div",Z3,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",Q3,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>wa(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>oe(W)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",e1,[F[8]||(F[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(R,{class:"icon-content",id:"themeButton",onClick:J},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[7]||(F[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",a1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,(W,Ie)=>(a.openBlock(),a.createElementBlock("div",{key:Ie},[a.createElementVNode("div",l1,[a.createElementVNode("div",r1,a.toDisplayString(W==null?void 0:W.label),1),a.createElementVNode("div",n1,[a.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ne=>be(W)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Q(W)},null,8,["onClick"])])])]))),128))]),F[10]||(F[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",o1,[a.createElementVNode("div",i1,[F[9]||(F[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:c.value,"onUpdate:modelValue":F[0]||(F[0]=W=>c.value=W)},null,8,["modelValue"])])])]),a.createVNode(yr.ssDialog,{visible:d.value,onBeforeDestroy:We,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",s1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Le},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",c1,[a.createVNode(R,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[11]||(F[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(R,{class:"ok-button button",onClick:Ua,id:"themeButton"},{default:a.withCtx(()=>F[12]||(F[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:v.value,onBeforeDestroy:ea,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",u1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Va},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",d1,[a.createVNode(R,{onClick:ea,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[13]||(F[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(R,{class:"ok-button button",onClick:ae,id:"themeButton"},{default:a.withCtx(()=>F[14]||(F[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:ee.value,onBeforeDestroy:ge,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",p1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:ne},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",f1,[a.createVNode(R,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[15]||(F[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(R,{class:"ok-button button",onClick:D,id:"themeButton"},{default:a.withCtx(()=>F[16]||(F[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:b.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",h1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:ze,onChangeVisible:me,onBlurChange:xe},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",v1,[a.createVNode(R,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[17]||(F[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(R,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:a.withCtx(()=>F[18]||(F[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},y1=Kl._export_sfc(m1,[["__scopeId","data-v-7a6b87b5"]]),g1=A.useModelComp(A.pinia),{pageMapState:b1}=A.storeToRefs(g1),k1=A.useMenuState(A.pinia),{activeMenuPath:x1}=A.storeToRefs(k1),_1=a.ref(24),w1=a.ref(6),C1=a.ref(70),E1=a.ref(.18),S1=a.ref(45),D1=(l,n,r,t)=>{var s,d,b,h,v,y,c,C,M,L,x,Y,w,z,ee,S;return{x:((d=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:d.x)||n%2*12,y:((h=(b=l==null?void 0:l.value)==null?void 0:b.tableData)==null?void 0:h.y)||n,w:((y=(v=l==null?void 0:l.value)==null?void 0:v.tableData)==null?void 0:y.w)||_1.value,h:((C=(c=l==null?void 0:l.value)==null?void 0:c.tableData)==null?void 0:C.h)||r,minW:((L=(M=l==null?void 0:l.value)==null?void 0:M.tableData)==null?void 0:L.minW)||w1.value,minH:((Y=(x=l==null?void 0:l.value)==null?void 0:x.tableData)==null?void 0:Y.minH)||E1.value,maxH:((z=(w=l==null?void 0:l.value)==null?void 0:w.tableData)==null?void 0:z.maxH)||S1.value,i:((S=(ee=l==null?void 0:l.value)==null?void 0:ee.tableData)==null?void 0:S.i)||n,id:(l==null?void 0:l.id)||n+"",component:t}},B1=(l,n)=>{var t,s,d,b,h,v,y,c;let r=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){if(((b=(d=(s=l==null?void 0:l.compData)==null?void 0:s.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:b.length)===0)return 2}else((h=l==null?void 0:l.comp)==null?void 0:h.toUpperCase())==="FORM"&&(r=((c=(y=(v=l==null?void 0:l.compData)==null?void 0:v.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:y.contents)==null?void 0:c.length)/5);return r*2},_c=(l,n,r)=>{var b,h;const t=(h=(b=b1.value)==null?void 0:b[x1.value])==null?void 0:h.filter(v=>{var y;return((y=v==null?void 0:v.key)==null?void 0:y.type)==="gridLayout"}),s=t==null?void 0:t.find(v=>{var y,c,C;return((C=(c=(y=v==null?void 0:v.value)==null?void 0:y.tableData)==null?void 0:c.component)==null?void 0:C.id)===l.id}),d=B1(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((v,y)=>_c(v,y))),{...D1(s,n,d,l)}},N1=(l,n)=>{if((l==null?void 0:l.length)===0)return[];const r=A.cloneDeep(l);return Array.isArray(l)?r==null?void 0:r.map((t,s)=>_c(t,s)):[]},T1=l=>({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}]}]}}),A1=(l,n)=>l==null?void 0:l.map(r=>{for(const t in n)if(t===(r==null?void 0:r.prop))return{...r,value:n[t]};return r}),M1=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]);a.watch(()=>r.compType,h=>{var c;const v=T1(r==null?void 0:r.optionItems),y=h?(c=v[h==null?void 0:h.toUpperCase()])==null?void 0:c[r==null?void 0:r.target]:[];s.value=y==null?void 0:y.map(C=>{for(const[M,L]of Object.entries((r==null?void 0:r.comp)||{}))if((C==null?void 0:C.prop)===M)return{...C,value:L};return C})},{immediate:!0});const d=h=>pl.getComponent(h),b=h=>{var v,y;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?s.value=(v=s.value)==null?void 0:v.map(c=>{var C;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(C=c==null?void 0:c.options)==null?void 0:C.map(M=>({...M,disabled:!0}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!0}:c}):s.value=(y=s.value)==null?void 0:y.map(c=>{var C;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(C=c==null?void 0:c.options)==null?void 0:C.map(M=>({...M,disabled:!1}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!1}:c}),t("change",{target:r==null?void 0:r.target,styleConfigs:s.value,prop:h==null?void 0:h.prop})};return(h,v)=>{const y=a.resolveComponent("el-col"),c=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,C=>(a.openBlock(),a.createBlock(c,{class:"style-row",key:C==null?void 0:C.prop},{default:a.withCtx(()=>[a.createVNode(y,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(C==null?void 0:C.label)+":",1)]),_:2},1024),a.createVNode(y,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d(C.type)),{modelValue:C.value,"onUpdate:modelValue":M=>C.value=M,content:C==null?void 0:C.options,optionUrl:C==null?void 0:C.optionUrl,disabled:C==null?void 0:C.disabled,activeText:C==null?void 0:C.activeText,inactiveText:C==null?void 0:C.inactiveText,onChange:M=>b(C)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),z1=Kl._export_sfc(M1,[["__scopeId","data-v-6c233914"]]),O1=a.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(l,{emit:n}){const r=l,t=n,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=a.ref([]),b=z=>z==null?void 0:z.reduce((ee,S)=>(ee[S==null?void 0:S.prop]=S==null?void 0:S.rule,ee),{}),h=a.computed(()=>({formRules:b(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),v=a.ref([]),y=a.ref(""),c=(z,ee,S)=>{var k;let $=[];(r==null?void 0:r.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:z},{label:"按钮名称",value:"按钮名称",children:ee}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(r==null?void 0:r.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(k=r==null?void 0:r.relatedData)==null?void 0:k.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let T;return S&&(S==null?void 0:S.length)>0?T=[...$,...C(z,ee,S)]:T=$,T},C=(z,ee,S)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return S?$==null?void 0:$.filter(T=>S==null?void 0:S.includes(T==null?void 0:T.prop)):$},M=(z,ee)=>{var g,j,q,J,me,ze,xe,te,be;const S=((me=(J=(q=(j=(g=r==null?void 0:r.comp)==null?void 0:g.compData)==null?void 0:j.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:q.contents)==null?void 0:J.filter(Q=>(Q==null?void 0:Q.label)!=="操作"))==null?void 0:me.map(Q=>({value:Q==null?void 0:Q.prop,label:Q.label})))||[],$=/button/i,T=((be=(te=(xe=(ze=r==null?void 0:r.comp)==null?void 0:ze.compData)==null?void 0:xe.filter(Q=>$.test(Q==null?void 0:Q.key)))==null?void 0:te.flatMap(Q=>Q==null?void 0:Q.contents))==null?void 0:be.map(Q=>({value:Q==null?void 0:Q.label,label:Q.label})))||[],k=c(S,T,z);v.value=ee?A1(k,ee):k,z&&(z==null?void 0:z.length)>0&&d.value.push(...z==null?void 0:z.map(Q=>({prop:Q,rule:s})))};a.onMounted(()=>{M(null,r==null?void 0:r.extendItem)});const L=z=>{const ee=z==null?void 0:z[y.value];if(y.value==="执行任务"){if(!(ee!=null&&ee.join("/")))return;const S=ee==null?void 0:ee.join("/");M(S==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:S==="进度设置/进度条"?["进度关键词"]:null,z)}},x=z=>{t("change",{target:r==null?void 0:r.target,extendConfigs:z})},Y=(z,ee)=>{y.value=ee==null?void 0:ee.changeProp,L(z)},w=z=>{t("onButtonClick",z)};return(z,ee)=>(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:x,onBlurChange:Y,onOnButtonClick:w},null,8,["rowContents","formRules","buttonValue"]))}}),I1=Kl._export_sfc(O1,[["__scopeId","data-v-7c660c1f"]]),L1={};function V1(l,n){return null}const R1=Kl._export_sfc(L1,[["render",V1]]),$1={class:"form-operate-content"},P1={class:"form-operate-item"},F1={class:"operate-title"},j1={class:"operate-content"},H1={class:"fix-content"},U1={class:"fix-button"},q1={class:"operate-title"},K1={class:"operate-content"},W1={class:"fix-content"},Y1={class:"fix-button"},J1={style:{display:"flex","justify-content":"space-between"}},G1={class:"form-content"},X1={class:"dialog-footer"},Z1={class:"form-content"},Q1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(!1),d=a.ref([]),b=a.ref([]),h=a.ref(!1),v=a.ref([]),y=a.ref([]),c=a.ref(""),C=a.ref(!1),M=a.ref(0),L=a.ref([]),x=a.ref([]),Y=(te,be)=>{if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="selectRelateType"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.selectRelateType)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="menuSelect"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.menuSelect)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="groupSelect"){const Q=be==null?void 0:be.optionUrl;return(Q==null?void 0:Q.groupSelect)||be[te.key]}if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="originalContent")return(be==null?void 0:be.value)||be[te.key];if((be==null?void 0:be.type)=="Select"&&(te==null?void 0:te.key)==="multiple"){const Q=be[te.key];return Hs(Q)?Q:te.default}return(te==null?void 0:te.label)==="类型"&&be[te.key]===""?"Input":(te==null?void 0:te.key)==="isFormColHidden"&&!be[te.key]?!1:be[te.key]},w=async te=>{var de,Ke,wa,oe,D,ne;s.value=!0;let be=[];const Q=await((wa=(Ke=(de=ua.FormContent)==null?void 0:de.find(ge=>(ge==null?void 0:ge.key)===((te==null?void 0:te.type)===""?"Input":te==null?void 0:te.type)))==null?void 0:Ke.value)==null?void 0:wa.value)??((D=(oe=ua.FormContent)==null?void 0:oe.find(ge=>(ge==null?void 0:ge.key)===((te==null?void 0:te.type)===""?"Input":te==null?void 0:te.type)))==null?void 0:D.value);if(Q==null||Q.forEach(ge=>{M.value++,be.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,prop:ge==null?void 0:ge.prop,value:Y(ge,te),id:M.value,contents:ge==null?void 0:ge.options,width:(te==null?void 0:te.width)??1})}),te!=null&&te.menuSelect&&((ne=te==null?void 0:te.menuSelect)==null?void 0:ne.length)>0){const ge=await ua.menuToContentType(te==null?void 0:te.menuSelect);be=be==null?void 0:be.map(se=>((se==null?void 0:se.name)==="组信息选项"&&(se.contents=ge),se))}c.value=te==null?void 0:te.id,d.value=await ua.selectToBase(ua.formToOptionsContents(be)),b.value=await ua.selectToBase(ua.formToOptionsContents(be))},z=te=>{var Q;h.value=!0;let be=[];(Q=ua.FormButton)==null||Q.forEach(de=>{M.value++,be.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&te[de.key]===""?"normal":te[de.key],id:M.value,contents:de==null?void 0:de.options})}),L.value=be,x.value=be,c.value=te==null?void 0:te.id};a.watch(()=>C.value,()=>{var be,Q;let te=A.cloneDeep(r.originalItemContents);(be=A.cloneDeep(r.originalItemContents))!=null&&be.find(de=>(de==null?void 0:de.key)==="enableWrap")?te=(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!C.value),de)):te.push({key:"enableWrap",contents:!C.value}),t("change",te)},{deep:!0});const ee=()=>{var Q,de,Ke,wa,oe;L.value=x.value;let te={};if(c.value!==""?te.id=c.value:(M.value++,te.id="id"+M.value),(Q=L.value)==null||Q.forEach(D=>{var ge;const ne=(ge=ua.FormButton)==null?void 0:ge.find(se=>(se==null?void 0:se.label)===(D==null?void 0:D.label));ne&&(te[ne.key]=D.value)}),(de=v.value)!=null&&de.find(D=>D.id===te.id))v.value=(Ke=v.value)==null?void 0:Ke.map(D=>(D.id===te.id&&(D=te),D));else{let D=A.cloneDeep(v.value);v.value||(v.value=[]),D.push(te),v.value=D}h.value=!1,c.value="";let be=A.cloneDeep(r.originalItemContents);(wa=A.cloneDeep(r.originalItemContents))!=null&&wa.find(D=>(D==null?void 0:D.key)==="formButton")?be=(oe=A.cloneDeep(r.originalItemContents))==null?void 0:oe.map(D=>((D==null?void 0:D.key)==="formButton"&&(D.contents=v.value),D)):be.push({key:"formButton",contents:v.value}),t("change",be)},S=te=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var be,Q;y.value=(be=A.cloneDeep(y.value))==null?void 0:be.filter(de=>(de==null?void 0:de.id)!==(te==null?void 0:te.id)),t("change",(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=y.value),de))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=te=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var be,Q;v.value=(be=A.cloneDeep(v.value))==null?void 0:be.filter(de=>(de==null?void 0:de.id)!==(te==null?void 0:te.id)),t("change",(Q=A.cloneDeep(r.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=v.value),de))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>{var be;h.value=!0;let te=[];(be=ua.FormButton)==null||be.forEach(Q=>{M.value++,te.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:(Q==null?void 0:Q.label)==="类型"?"normal":"",id:M.value,contents:Q==null?void 0:Q.options})}),L.value=te,x.value=te},k=()=>{var be,Q,de;s.value=!0;let te=[];(de=(Q=(be=ua.FormContent)==null?void 0:be.find(Ke=>(Ke==null?void 0:Ke.key)==="Input"))==null?void 0:Q.value)==null||de.forEach(Ke=>{M.value++,te.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,value:(Ke==null?void 0:Ke.label)==="类型"?"Input":"",id:M.value,contents:Ke==null?void 0:Ke.options})}),d.value=te,b.value=te},g=te=>{let be=A.cloneDeep(x.value);be=be==null?void 0:be.map(Q=>(Q.value=te==null?void 0:te[Q.name],Q)),x.value=be},j=te=>{const be=te.find(Ke=>(Ke==null?void 0:Ke.name)==="类型");if((be==null?void 0:be.value)!="Select")return;const Q=te.find(Ke=>(Ke==null?void 0:Ke.name)==="多选"),de=te.find(Ke=>(Ke==null?void 0:Ke.name)==="初始值");Q!=null&&Q.value&&ko.isString(de.value)&&(de.value=[de.value]),!(Q!=null&&Q.value)&&!ko.isString(de.value)&&(de.value="")},q=async te=>{var be,Q,de,Ke,wa,oe,D,ne,ge,se,we,la;if((te==null?void 0:te.类型)!==((Q=(be=b.value)==null?void 0:be.find(ya=>(ya==null?void 0:ya.label)==="类型"))==null?void 0:Q.value)){let ya=[];const Va=await((wa=(Ke=(de=ua.FormContent)==null?void 0:de.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:Ke.value)==null?void 0:wa.value)?await((se=(ge=(ne=ua.FormContent)==null?void 0:ne.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:ge.value)==null?void 0:se.value):(D=(oe=ua.FormContent)==null?void 0:oe.find(ae=>(ae==null?void 0:ae.key)===((te==null?void 0:te.类型)===""?"Input":te==null?void 0:te.类型)))==null?void 0:D.value;if(Va==null||Va.forEach(ae=>{var Re,ma;M.value++;const ea=ku(ae==null?void 0:ae.default)?(te==null?void 0:te[ae.label])??ae.value??"":ae==null?void 0:ae.default;ya.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:ea,prop:ae==null?void 0:ae.prop,id:M.value,contents:ae==null?void 0:ae.options,width:((ma=(Re=b.value)==null?void 0:Re[0])==null?void 0:ma.width)??1})}),te!=null&&te.菜单选项&&((we=te==null?void 0:te.菜单选项)==null?void 0:we.length)>0){const ae=await ua.menuToContentType(te==null?void 0:te.菜单选项);ya=ya==null?void 0:ya.map(ea=>((ea==null?void 0:ea.name)==="组信息选项"&&(ea.contents=ae),ea))}j(ya),b.value=await ua.selectToBase(A.cloneDeep(ya)),d.value=await ua.selectToBase(A.cloneDeep(ya))}else{let ya=A.cloneDeep(b.value);if(ya=ya==null?void 0:ya.map(Va=>(Va.value=te==null?void 0:te[Va.name],Va)),te!=null&&te.菜单选项&&((la=te==null?void 0:te.菜单选项)==null?void 0:la.length)>0){const Va=await ua.menuToContentType(te==null?void 0:te.菜单选项);ya=ya==null?void 0:ya.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Va),ae))}ya=ua.formToOptionsContents(ya),j(ya),b.value=await ua.selectToBase(A.cloneDeep(ya))}},J=te=>{te||(d.value=b.value)},me=async te=>{await q(te),d.value=b.value},ze=Ta.debounce(async()=>{var de,Ke,wa,oe,D,ne,ge,se,we,la,ya,Va;d.value=b.value;let te={};te.width=((Ke=(de=d.value)==null?void 0:de[0])==null?void 0:Ke.width)??1,c.value!==""?te.id=c.value:(M.value++,te.id="id"+M.value);let be=await((D=(oe=(wa=ua.FormContent)==null?void 0:wa.find(ae=>{var ea,Re;return(ae==null?void 0:ae.key)===(((Re=(ea=d.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:oe.value)==null?void 0:D.value)??((ge=(ne=ua.FormContent)==null?void 0:ne.find(ae=>{var ea,Re;return(ae==null?void 0:ae.key)===(((Re=(ea=d.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:ge.value);if((se=d.value)==null||se.forEach(ae=>{const ea=be==null?void 0:be.find(Re=>(Re==null?void 0:Re.label)===(ae==null?void 0:ae.label));ea&&(te[ea.key]=ae.value)}),te.width=te.width?te.width:1,te.key=te==null?void 0:te.label,te.isFormColHidden=te==null?void 0:te.isFormColHidden,(we=y.value)!=null&&we.find(ae=>ae.id===te.id))y.value=(la=y.value)==null?void 0:la.map(ae=>(ae.id===te.id&&(ae=te),ae));else{let ae=A.cloneDeep(y.value);ae.push(te),y.value=ae}y.value=y.value.map(({id:ae,...ea})=>ea),s.value=!1,c.value="";let Q=A.cloneDeep(r.originalItemContents);(ya=A.cloneDeep(r.originalItemContents))!=null&&ya.find(ae=>(ae==null?void 0:ae.key)==="formContent")?Q=(Va=A.cloneDeep(r.originalItemContents))==null?void 0:Va.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=y.value),ae)):Q.push({key:"formContent",contents:y.value}),t("change",Q)},300),xe=()=>{s.value=!1,h.value=!1,c.value="",b.value=[],x.value=[]};return a.watch(()=>r.originalItemContents,()=>{var be,Q,de,Ke,wa,oe;if(!r.originalItemContents||r.originalItemContents.length===0)return;const te=A.cloneDeep(r.originalItemContents);y.value=((be=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:be.contents)??[],v.value=((Q=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="formButton"))==null?void 0:Q.contents)??[],C.value=(de=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&de.contents?!((Ke=te==null?void 0:te.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&Ke.contents):!0,y.value=(wa=A.cloneDeep(y.value))==null?void 0:wa.map((D,ne)=>{var se;let ge=D;return ge.id=(D==null?void 0:D.id)??ne,D!=null&&D.label||(D.label=(D==null?void 0:D.key)??(D==null?void 0:D.label)??""),D!=null&&D.type||(D.type=(D==null?void 0:D.type)??""),D.contents=((se=D==null?void 0:D.options)==null?void 0:se.length)===0?(D==null?void 0:D.contents)??"":D==null?void 0:D.options,ge}),y.value=ua.formToOptionsContents(y.value),v.value=(oe=v.value)==null?void 0:oe.map((D,ne)=>D={label:(D==null?void 0:D.label)??"",type:(D==null?void 0:D.type)??"",background:(D==null?void 0:D.background)??"var(--ssComponent-primary-color)",id:ne})},{deep:!0,immediate:!0}),(te,be)=>{const Q=a.resolveComponent("svg-icon"),de=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",$1,[a.createElementVNode("div",P1,[a.createElementVNode("div",F1,[be[2]||(be[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:k},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[be[1]||(be[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",j1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(Ke,wa)=>(a.openBlock(),a.createElementBlock("div",{key:wa},[a.createElementVNode("div",H1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",U1,[a.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>w(Ke)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>S(Ke)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",q1,[be[4]||(be[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:T},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[be[3]||(be[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",K1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(Ke,wa)=>(a.openBlock(),a.createElementBlock("div",{key:wa},[a.createElementVNode("div",W1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",Y1,[a.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>z(Ke)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oe=>$(Ke)},null,8,["onClick"])])])]))),128))]),be[6]||(be[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",J1,[be[5]||(be[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":be[0]||(be[0]=Ke=>C.value=Ke)},null,8,["modelValue"])])]),a.createVNode(yr.ssDialog,{visible:s.value,onBeforeDestroy:xe,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",G1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:q,onChangeVisible:J,onBlurChange:me},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",X1,[a.createVNode(de,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>be[7]||(be[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(de,{class:"ok-button button",onClick:a.unref(ze),id:"themeButton"},{default:a.withCtx(()=>be[8]||(be[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(yr.ssDialog,{visible:h.value,onBeforeDestroy:xe,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Z1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:L.value,key:L.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:xe,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:ee},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},fs=Kl._export_sfc(Q1,[["__scopeId","data-v-20850524"]]),e2={class:"step-module content"},a2={class:"module-data"},l2={class:"step-module layout"},r2={class:"form-content"},n2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.reactive({visible:!1,width:"40%",title:"步骤条"}),v=a.ref("create"),y=a.ref({}),c=a.ref([]),C=w=>{var z;y.value=w,t("change",(z=x())==null?void 0:z.compData)},M=(w,z)=>{var ee,S;switch(w){case"create":(ee=d.value)==null||ee.forEach($=>{$.value=""}),v.value="create",h.visible=!0;break;case"update":(S=d.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),v.value="update",h.visible=!0;break;case"delete":c.value.splice(z,1),v.value="delete";break}},L=w=>{var z,ee,S;if((w==null?void 0:w.buttonName)==="确认"){const $=A.cloneDeep(w==null?void 0:w.content);switch(Object.keys($).forEach(T=>{$[T]===""&&delete $[T]}),v.value){case"create":c.value.push({...$,index:((z=c.value)==null?void 0:z.length)+1});break;case"update":c.value=(ee=c.value)==null?void 0:ee.map(T=>T.index===($==null?void 0:$.index)?{...T,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:T);break}t("change",(S=x())==null?void 0:S.compData),h.visible=!1}else h.visible=!1},x=()=>({comp:"Step",compData:[{key:"stepList",contents:c.value},{key:"stepConfig",contents:y.value}]}),Y=()=>{h.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(y.value=((z=w==null?void 0:w.find(S=>S.key==="stepConfig"))==null?void 0:z.contents)??{},c.value=((ee=w==null?void 0:w.find(S=>S.key==="stepList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",e2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>M("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",a2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.title),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>M("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>M("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",l2,[z[5]||(z[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:s.value,onChange:C},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Y,width:h.width},{default:a.withCtx(()=>[a.createElementVNode("div",r2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),t2=Kl._export_sfc(n2,[["__scopeId","data-v-7dbd17f2"]]),o2={class:"step-module content"},i2={class:"module-data"},s2={class:"step-module layout"},c2={class:"form-content"},u2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref("create"),d=a.ref({}),b=a.ref([]),h=a.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}]),v=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=a.reactive({visible:!1,width:"40%",title:"时间线"}),C=w=>{var z;d.value=w,t("change",(z=x())==null?void 0:z.compData)},M=(w,z)=>{var ee,S;switch(w){case"create":(ee=v.value)==null||ee.forEach($=>{$.value=""}),s.value="create",c.visible=!0;break;case"update":(S=v.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),s.value="update",c.visible=!0;break;case"delete":b.value.splice(z,1),s.value="delete";break}},L=w=>{var z,ee,S,$;if((w==null?void 0:w.buttonName)==="确认"){const T=A.cloneDeep(w==null?void 0:w.content);switch(Object.keys(T).forEach(k=>{T[k]===""&&delete T[k]}),s.value){case"create":(ee=b.value)==null||ee.push({...T,index:((z=b.value)==null?void 0:z.length)+1});break;case"update":b.value=(S=b.value)==null?void 0:S.map(k=>k.index===(T==null?void 0:T.index)?{...k,content:T==null?void 0:T.content,timestamp:T==null?void 0:T.timestamp}:k);break}t("change",($=x())==null?void 0:$.compData),c.visible=!1}else c.visible=!1},x=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:d.value}]}),Y=()=>{c.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(d.value=((z=w==null?void 0:w.find(S=>S.key==="timeLineConfig"))==null?void 0:z.contents)??{},b.value=((ee=w==null?void 0:w.find(S=>S.key==="timeLineList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",o2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>M("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",i2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.content),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>M("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>M("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",s2,[z[5]||(z[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:h.value,onChange:C},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Y,width:c.width},{default:a.withCtx(()=>[a.createElementVNode("div",c2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),d2=Kl._export_sfc(u2,[["__scopeId","data-v-39ffc861"]]),p2={};function f2(l,n){return a.openBlock(),a.createElementBlock("div")}const h2=Kl._export_sfc(p2,[["render",f2]]),v2={class:"extra-content"},m2={key:0},y2={key:1},g2={class:"dialog-footer"},b2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:n}){const r=l,t=a.ref(0),s=a.ref(),d=a.ref(),b=n,h=a.ref(!1),v=a.ref({}),y=a.ref({}),c=a.ref();a.watch(()=>[r.itemData],()=>{var $;const S=A.cloneDeep(r.itemData);s.value=($=A.cloneDeep(S))==null?void 0:$.map(T=>{var k;if(T.key==="extra"){let g=[];(k=T.value)==null||k.forEach(j=>{var q;g.push((q=Object.values(j))==null?void 0:q[0])}),T.value=g}return T})},{deep:!0,immediate:!0});const C=(S,$,T,k)=>{var j;let g={};((j=S==null?void 0:S[0])==null?void 0:j.contents)==="详情"&&(h.value=!0,g[$]=S,d.value=S==null?void 0:S.filter(q=>(q==null?void 0:q.key)!=="tableContentName"),v.value=g,y.value=T,c.value=k.id)},M=S=>{var q,J,me,ze;const $=(J=(q=Object.values(A.cloneDeep(v.value)))==null?void 0:q[0])==null?void 0:J.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),T=(ze=(me=Object.values(A.cloneDeep(v.value)))==null?void 0:me[0])==null?void 0:ze.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),k=T==null?void 0:T.map((xe,te)=>{var be;return te===S.index&&(xe==null?void 0:xe.comp)==="Table"&&(xe.compData=(be=xe.compData)==null?void 0:be.map(Q=>{var de,Ke;return(Q==null?void 0:Q.key)==="tableContents"&&(Q.contents=(Ke=(de=S.content)==null?void 0:de.map(wa=>{let oe={};for(let D in wa)D!=="id"&&(oe[D]=wa[D]);return oe}))==null?void 0:Ke.map(wa=>Object.values(wa))),Q})),xe});k.unshift($==null?void 0:$[0]);let g=A.cloneDeep(v.value),j={};for(let xe in g)j[xe]=k;v.value=j},L=()=>{h.value=!1,v.value={},y.value={},c.value=void 0,t.value++},x=S=>{var q,J,me,ze;const $=(J=(q=Object.values(A.cloneDeep(v.value)))==null?void 0:q[0])==null?void 0:J.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),T=(ze=(me=Object.values(A.cloneDeep(v.value)))==null?void 0:me[0])==null?void 0:ze.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),k=T==null?void 0:T.map((xe,te)=>(te===S.index&&(xe.compData=S.contents),xe));k.unshift($==null?void 0:$[0]);let g=A.cloneDeep(v.value),j={};for(let xe in g)j[xe]=k;v.value=j},Y=()=>{var $,T;let S={};for(let k in y.value)k===(($=Object.keys(v.value))==null?void 0:$[0])?S[k]=(T=Object.values(v.value))==null?void 0:T[0]:S[k]=y.value[k];b("change",{buttonName:"编辑",index:c.value,singleContent:S},"methodData"),h.value=!1,v.value={},y.value={},c.value=void 0},w=()=>{h.value=!1,v.value={},y.value={},c.value=void 0},z=S=>{b("change",S,"methodData")},ee=S=>Et(S);return(S,$)=>{const T=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",v2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:t.value},[(k==null?void 0:k.key)==="extra"?(a.openBlock(),a.createElementBlock("div",m2)):(a.openBlock(),a.createElementBlock("div",y2,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ee(k.comp)),{itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,key:g,index:(k==null?void 0:k.id)??g,onContentClick:C,onChange:z},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(yr.ssDialog,{visible:h.value,onBeforeDestroy:w},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:g,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ee(k.comp)),{itemData:k==null?void 0:k.compData,onChange:M,childItemData:k==null?void 0:k.itemChildData,key:g,onContentChange:x,index:(k==null?void 0:k.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",g2,[a.createVNode(T,{class:"cancel-button footer-button",onClick:L,id:"themeBorderButton"},{default:a.withCtx(()=>$[0]||($[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(T,{class:"confirm-button footer-button",onClick:Y,id:"themeButton"},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},k2=Kl._export_sfc(b2,[["__scopeId","data-v-2d9c5ab2"]]),x2={key:0,class:"method-content"},_2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const n=a.ref([]),r=ua.useOriginalState(A.pinia),{originalPath:t}=A.storeToRefs(r),s=l,d=a.ref(!1),b=a.ref(),h=ua.useTableComp(A.pinia),{multipleTableConst:v}=A.storeToRefs(h),y=A.useModelComp(A.pinia),c=a.ref(!1),C=A.useMenuState(A.pinia),M=A.useLoginState(A.pinia),{itemData:L,isEdit:x,routeToChildPath:Y,tableViewContents:w,lockingPage:z,payloadTypes:ee}=A.storeToRefs(y),{activeMenuPath:S,platform:$,childMenu:T}=A.storeToRefs(C),{loginUserInfo:k}=A.storeToRefs(M),g=a.ref(!1),j=async()=>{var oe,D;(oe=n.value)!=null&&oe.find(ne=>(ne==null?void 0:ne.buttonName)==="保存")&&await Q((D=n.value)==null?void 0:D.find(ne=>(ne==null?void 0:ne.buttonName)==="保存")),await ua.onSaveBack()};a.watch(()=>L.value,async()=>{x.value==="view"&&!g.value&&await wa(A.cloneDeep(s.itemData)),g.value=!1},{deep:!0});const q=()=>{d.value=!1,b.value=void 0},J=oe=>oe.map(D=>{const ne={};for(const ge in D){const se=D[ge];if(ge.includes(v.value)){const we=ge.split(v.value);let la=ne;we.forEach((ya,Va)=>{Va===we.length-1?la[ya]=se:(la[ya]||(la[ya]={}),la=la[ya])})}else ne[ge]=se}return ne}),me=async(oe,D,ne=[])=>{var se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa;let ge=(se=A.cloneDeep(D))==null?void 0:se.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(oe!=null&&oe.includes("[")){let P=(ae=(Va=(ya=(la=(we=A.cloneDeep(oe))==null?void 0:we.split("["))==null?void 0:la[1])==null?void 0:ya.split("]"))==null?void 0:Va[0])==null?void 0:ae.split(":"),F="";if(P!=null&&P[0]){let X=(ea=ge==null?void 0:ge.find(R=>(R==null?void 0:R.name)===(P==null?void 0:P[0])))==null?void 0:ea.compData;if(!X){let R=(Re=oe==null?void 0:oe.split("["))==null?void 0:Re[0],W=await ua.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",ne);X=(ma=W==null?void 0:W.find(Ie=>(Ie==null?void 0:Ie.name)===(P==null?void 0:P[0])))==null?void 0:ma.compData}X==null||X.forEach(R=>{var W,Ie,Ne,Ce,K,He;if((R==null?void 0:R.key)==="formContent")(W=R==null?void 0:R.contents)==null||W.forEach(Ve=>{var ra;(Ve==null?void 0:Ve.key)===(P==null?void 0:P[1])&&(Array.isArray(Ve==null?void 0:Ve.value)?F=Ve==null?void 0:Ve.value:F=(ra=Ve==null?void 0:Ve.value)==null?void 0:ra.toString())});else if((R==null?void 0:R.key)==="tableContents"){let Ve=[],ra=(Ie=X==null?void 0:X.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:Ie.contents,va=(P==null?void 0:P[1])??"";if(ra!=null&&ra.every($e=>Array.isArray($e))){let $e=ua.getColumnChild((K=ra==null?void 0:ra[0])==null?void 0:K.filter(ba=>(ba==null?void 0:ba.label)!=="操作"));(He=R.contents)==null||He.forEach(ba=>{let Te={};ba=ba==null?void 0:ba.filter(fa=>!(fa!=null&&fa.id)),$e==null||$e.forEach((fa,Ue)=>{let ga=ba[Ue];typeof ba[Ue]=="number"&&(ga=ba[Ue].toString()),(va===""||va===fa.prop)&&(Te[fa.prop]=ga)}),Ve.push(Te)}),Ve=J(Ve)}else{let $e=(Ne=ra==null?void 0:ra.map(ba=>ba==null?void 0:ba.label))==null?void 0:Ne.filter(ba=>ba!=="操作");(Ce=R.contents)==null||Ce.forEach(ba=>{let Te={};ba=ba==null?void 0:ba.filter(fa=>!(fa!=null&&fa.id)),$e==null||$e.forEach((fa,Ue)=>{let ga=ba[Ue];typeof ba[Ue]=="number"&&(ga=ba[Ue].toString()),(va===""||va===fa)&&(Te[fa]=ga)}),Ve.push(Te)})}F=Ve}})}return F}else if(oe!=null&&oe.includes("/")){let P={};return(Pe=A.cloneDeep(ge))==null||Pe.forEach((F,X)=>{var R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe;if((F==null?void 0:F.comp)==="Table"){let $a=Array.isArray((Ie=(W=(R=F==null?void 0:F.compData)==null?void 0:R.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:W.contents)==null?void 0:Ie[0])?(He=(K=(Ce=(Ne=F==null?void 0:F.compData)==null?void 0:Ne.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Ce.contents)==null?void 0:K[0])==null?void 0:He.some(ue=>ue==null?void 0:ue.children):[],Na=(va=(ra=(Ve=F==null?void 0:F.compData)==null?void 0:Ve.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:ra.contents)==null?void 0:va.map(ue=>(ue!=null&&ue.find(ie=>ie==null?void 0:ie.id)&&(ue=ue.slice(1)),ue)),Ye=(Ue=(fa=(Te=(ba=($e=F==null?void 0:F.compData)==null?void 0:$e.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:ba.contents)==null?void 0:Te[0])==null?void 0:fa[0])==null?void 0:Ue.label,Oe=(fe=(ga=F==null?void 0:F.compData)==null?void 0:ga.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:fe.contents;if($a)($a==null?void 0:$a.length)===0?P[F.name]=P!=null&&P[F.name]?P[F.name]:ua.tableToForm(Na,Oe):P[Ye]=ua.tableToForm(Na,Oe);else{const ue=[];Oe=Oe.slice(1,Oe.length-1),Oe==null||Oe.forEach((ie,na)=>{Na==null||Na.forEach(qa=>{ue.push({key:ie.label+qa[0],value:qa[na+1]})})}),P["form"+X]=ue}}else{const $a=(Fe=(ka=F.compData)==null?void 0:ka.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:Fe.contents;P!=null&&P.form||(P.form=[]);const Na=[];$a==null||$a.forEach(Ye=>{Ye.key!==""&&(Ye={key:(Ye==null?void 0:Ye.key)??(Ye==null?void 0:Ye.label),value:Ye==null?void 0:Ye.value},Na.push(Ye))}),P.form=[...Na,...A.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(oe==="createInsofDataApi"){let P=(Ee=A.cloneDeep(D))==null?void 0:Ee[0];return P={comp:(Le=A.cloneDeep(P))==null?void 0:Le.comp,compData:(We=A.cloneDeep(P))==null?void 0:We.compData,name:(Ua=A.cloneDeep(P))==null?void 0:Ua.name,isShow:(Oa=A.cloneDeep(P))==null?void 0:Oa.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:S.value},value:{pageData:P}}}return oe}},ze=async(oe,D,ne)=>{var we,la,ya;let ge=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),se=ge==null?void 0:ge.find(Va=>(Va==null?void 0:Va.name)===(ne==null?void 0:ne[0]));if(se){if((se==null?void 0:se.comp)==="Table"){let Va={};for(let Le in A.cloneDeep(oe))A.cloneDeep(oe)[Le]!=="loginUser"?Va[Le]=A.cloneDeep(oe)[Le]:Va[Le]=((we=k.value)==null?void 0:we.account)||((la=k.value)==null?void 0:la.账号);let ae=[],ea=Va;Array.isArray(oe)||(ea=[Va]),ea==null||ea.forEach(Le=>{ae.push({[Le[ne[1]]]:Le})});let Re=[],ma=ae==null?void 0:ae.map(Le=>{var We;return(We=Object.keys(Le))==null?void 0:We[0]});ge==null||ge.forEach(Le=>{var We;(Le==null?void 0:Le.name)===(ne==null?void 0:ne[0])&&((We=Le==null?void 0:Le.compData)==null||We.forEach(Ua=>{var Oa;(Ua==null?void 0:Ua.key)==="tableContents"&&((Oa=Ua==null?void 0:Ua.contents)==null||Oa.forEach(P=>{P!=null&&P.some(F=>ma.includes(F))&&Re.push({[P.find(F=>F.id).id]:P.find(F=>ma.includes(F))})}))}))});let Pe=Re==null?void 0:Re.map(Le=>{var We;return(We=Object.keys(Le))==null?void 0:We[0]}),Ee=[];if(Pe==null||Pe.forEach(Le=>{var Oa;let We=(Oa=Re==null?void 0:Re.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0].toString())===Le.toString()}))==null?void 0:Oa[Le],Ua=ae==null?void 0:ae.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0])===We});Ee.push({id:parseInt(Le),value:{tableData:Ua[We]}})}),(Ee==null?void 0:Ee.length)>0)return Ee}else if((se==null?void 0:se.comp)==="Form"){let Va=A.cloneDeep(se);Va.compData=(ya=Va.compData)==null?void 0:ya.map(Re=>{var ma;return(Re==null?void 0:Re.key)==="formContent"&&(Re.contents=(ma=Re.contents)==null?void 0:ma.map(Pe=>((Pe==null?void 0:Pe.key)===(ne==null?void 0:ne[1])&&(Pe.value=(oe==null?void 0:oe[Pe==null?void 0:Pe.prop])||oe),Pe))),Re});let ae={};for(let Re in Va)Re!=="id"&&(ae[Re]=Va[Re]);let ea=[];if(ea.push({id:se==null?void 0:se.id,keyType:ne==null?void 0:ne[1],value:{pageData:ae}}),(ea==null?void 0:ea.length)>0)return ea}}},xe=async(oe,D,ne)=>{var we,la,ya,Va,ae,ea,Re,ma,Pe,Ee;let ge=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),se=ge==null?void 0:ge.find(Le=>(Le==null?void 0:Le.name)===(ne==null?void 0:ne[0]));if(se){if((se==null?void 0:se.comp)==="Table"){let Le={};for(let We in A.cloneDeep(oe))A.cloneDeep(oe)[We]!=="loginUser"?Le[We]=A.cloneDeep(oe)[We]:Le[We]=((we=k.value)==null?void 0:we.account)||((la=k.value)==null?void 0:la.账号);await br.createInsofDataApi({key:{type:"data",pageKey:D,tableId:se==null?void 0:se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Le}})}else if((se==null?void 0:se.comp)==="Form"){let Le=A.cloneDeep(se),We=Object.keys(oe),Ua="";(Va=(ya=A.cloneDeep(Le))==null?void 0:ya.compData)==null||Va.forEach(W=>{var Ie,Ne;(W==null?void 0:W.key)==="formContent"&&((Ne=(Ie=A.cloneDeep(W))==null?void 0:Ie.contents)==null||Ne.forEach(Ce=>{var K;We.includes(Ce==null?void 0:Ce.key)&&(Ce==null?void 0:Ce.value)===((K=k.value)==null?void 0:K.姓名)&&(Ua=Ce==null?void 0:Ce.key)}))});let Oa=[];(ae=Object.values(oe[Ua]))==null||ae.forEach(W=>{W!=null&&W.includes("(")&&Oa.push(W)}),Oa=[...new Set(Oa)];const P=Oa==null?void 0:Oa.map(async W=>{var He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka;let Ie="";(ba=($e=(va=(ra=(Ve=(He=A.cloneDeep(W))==null?void 0:He.split("("))==null?void 0:Ve[1])==null?void 0:ra.split(")"))==null?void 0:va[0])==null?void 0:$e.split(":"))==null||ba.forEach(Fe=>{Ie=Ie===""?Ie+Fe.replaceAll("'",""):Ie+"/"+Fe.replaceAll("'","")});let Ne=[];(ka=(fe=(ga=(Ue=(fa=(Te=A.cloneDeep(W))==null?void 0:Te.split("<"))==null?void 0:fa[1])==null?void 0:Ue.split(">"))==null?void 0:ga[0])==null?void 0:fe.split(":"))==null||ka.forEach(Fe=>{Ne.push(Fe.replaceAll("'",""))});const Ce=await ua.getItemData(Ie,sessionStorage.getItem("systemKey"),"");let K="";return Ce==null||Ce.forEach(Fe=>{var $a;Fe.name===(Ne==null?void 0:Ne[0])&&(($a=Fe==null?void 0:Fe.compData)==null||$a.forEach(Na=>{var Ye;(Na==null?void 0:Na.key)==="formContent"&&((Ye=Na.contents)==null||Ye.forEach(Oe=>{(Oe==null?void 0:Oe.key)===(Ne==null?void 0:Ne[1])&&(K=Oe==null?void 0:Oe.value)}))}))}),{[W]:K}}),F=await Promise.all(P);Le.compData=(Re=(ea=A.cloneDeep(Le))==null?void 0:ea.compData)==null?void 0:Re.map(W=>{var Ie,Ne;return(W==null?void 0:W.key)==="formContent"&&(W.contents=(Ne=(Ie=A.cloneDeep(W))==null?void 0:Ie.contents)==null?void 0:Ne.map(Ce=>{var K,He,Ve,ra;return(K=oe[Ua])!=null&&K[Ce==null?void 0:Ce.key]&&(oe[Ua][Ce==null?void 0:Ce.key].includes("(")?Ce.value=(He=F==null?void 0:F.find(va=>{var $e;return(($e=Object.keys(va))==null?void 0:$e[0])===oe[Ua][Ce==null?void 0:Ce.key]}))==null?void 0:He[oe[Ua][Ce==null?void 0:Ce.key]]:Ce.value=(ra=(Ve=A.cloneDeep(oe))==null?void 0:Ve[Ua])==null?void 0:ra[Ce==null?void 0:Ce.key]),Ce})),W});const X=await br.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let R="";((ma=X==null?void 0:X.data)==null?void 0:ma.type)==="success"&&((Ee=(Pe=X==null?void 0:X.data)==null?void 0:Pe.result)==null||Ee.forEach(W=>{var Ie,Ne;((Ne=(Ie=W==null?void 0:W.value)==null?void 0:Ie.pageData)==null?void 0:Ne.name)===(ne==null?void 0:ne[0])&&(R=W.id)}),await br.updateInsofDataApi({id:R,value:{pageData:Le}}))}}},te=(oe,D="",ne={})=>{for(const[ge,se]of Object.entries(oe)){const we=D?`${D}.${ge}`:ge;se!==null&&typeof se=="object"&&!Array.isArray(se)&&Object.prototype.toString.call(se)!=="[object Date]"?te(se,we,ne):ne[we]=se}return ne},be=async(oe,D,ne,ge)=>{var la,ya,Va,ae,ea,Re,ma,Pe,Ee,Le,We,Ua,Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra;let se=await ua.getItemData(D,sessionStorage.getItem("systemKey"),""),we=se==null?void 0:se.find(va=>(va==null?void 0:va.name)===(ne==null?void 0:ne[0]));if(we){if(!(ne!=null&&ne[1])&&(we==null?void 0:we.comp)==="Table"){let va={},$e=[],ba=(ya=(la=we==null?void 0:we.compData)==null?void 0:la.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ya.contents;ba!=null&&ba.every(Ue=>Array.isArray(Ue))?$e=(ae=ua.getColumnChild((Va=ba==null?void 0:ba[0])==null?void 0:Va.filter(Ue=>(Ue==null?void 0:Ue.label)!=="操作")))==null?void 0:ae.map(Ue=>Ue==null?void 0:Ue.prop):$e=ba==null?void 0:ba.map(Ue=>Ue==null?void 0:Ue.label);for(let Ue in A.cloneDeep(oe))if(A.cloneDeep(oe)[Ue]!=="loginUser"){let ga=te(A.cloneDeep(oe)[Ue]),fe={};for(let ka in ga)if($e!=null&&$e.find(Fe=>Fe===ka))fe[ka]=ga[ka];else if($e!=null&&$e.find(Fe=>(Fe==null?void 0:Fe.toUpperCase())===(ka==null?void 0:ka.toUpperCase()))){let Fe=$e==null?void 0:$e.find($a=>($a==null?void 0:$a.toUpperCase())===(ka==null?void 0:ka.toUpperCase()));fe[Fe]=ga[ka]}va[Ue]=fe}else va[Ue]=((ea=k.value)==null?void 0:ea.account)||((Re=k.value)==null?void 0:Re.账号);let Te=await br.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((Pe=(ma=Te==null?void 0:Te.data)==null?void 0:ma.result)==null?void 0:Pe.length)>0){let Ue=(Le=(Ee=Te==null?void 0:Te.data)==null?void 0:Ee.result)==null?void 0:Le.map(ga=>ga==null?void 0:ga.id);(Ue==null?void 0:Ue.length)>0&&await br.batchDeleteInsofDataApi({ids:Ue})}let fa=[];if((We=we==null?void 0:we.compData)!=null&&We.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")&&((P=(Oa=(Ua=we==null?void 0:we.compData)==null?void 0:Ua.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn"))==null?void 0:Oa.contents)!=null&&P.includes("["))){const Ue=await br.getInsofDataApi({id:we==null?void 0:we.tableId});let ga=((W=(R=(X=(F=Ue==null?void 0:Ue.data)==null?void 0:F.result)==null?void 0:X[0])==null?void 0:R.key)==null?void 0:W.pageKey)??"";(Ie=Object.values(va))==null||Ie.forEach(fe=>{fa.push({key:{type:"data",pageKey:ga,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})})}else(Ne=Object.values(va))==null||Ne.forEach(Ue=>{fa.push({key:{type:"data",pageKey:D,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ue}})});(fa==null?void 0:fa.length)>0&&await br.batchAddInsofDataApi({dataList:fa})}else if(!(ne!=null&&ne[1])&&(we==null?void 0:we.comp)==="Form"){let va=A.cloneDeep(we);va.compData=(K=(Ce=A.cloneDeep(va))==null?void 0:Ce.compData)==null?void 0:K.map(Te=>{var fa,Ue;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(Ue=(fa=A.cloneDeep(Te))==null?void 0:fa.contents)==null?void 0:Ue.map(ga=>{var fe,ka;return(fe=A.cloneDeep(oe))!=null&&fe[ga==null?void 0:ga.key]&&(ga.value=(ka=A.cloneDeep(oe))==null?void 0:ka[ga==null?void 0:ga.key]),ga})),Te});const $e=await br.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let ba="";((He=$e==null?void 0:$e.data)==null?void 0:He.type)==="success"&&((ra=(Ve=$e==null?void 0:$e.data)==null?void 0:Ve.result)==null||ra.forEach(Te=>{var fa,Ue;((Ue=(fa=Te==null?void 0:Te.value)==null?void 0:fa.pageData)==null?void 0:Ue.name)===(ne==null?void 0:ne[0])&&(ba=Te.id)}),await br.updateInsofDataApi({id:ba,value:{pageData:va}}))}}},Q=async oe=>{var D,ne,ge,se,we,la,ya,Va,ae,ea,Re,ma,Pe,Ee;C.setImportLoading(!0);try{if(oe.api){let Le=new WeakMap,We=await ua.getItemData((T==null?void 0:T.value)===""?S.value:T==null?void 0:T.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le),Ua="";if(We=We==null?void 0:We.map(Ne=>{var Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga;if((Ne==null?void 0:Ne.comp)==="Form")Ne.compData=(Ce=Ne.compData)==null?void 0:Ce.map(fe=>{var ka;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(ka=fe.contents)==null?void 0:ka.map(Fe=>{var $a;if((Fe==null?void 0:Fe.value)===""&&(Fe==null?void 0:Fe.type)==="Select"){let Na=ua.judgeContents(($a=A.cloneDeep(Fe))==null?void 0:$a.optionUrl,Le);Fe.value=Fe.value||Na}return Fe})),fe});else if((Ne==null?void 0:Ne.comp)==="Table"&&(K=Ne.compData)!=null&&K.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")){let fe=(Ve=(He=Ne.compData)==null?void 0:He.find(Na=>(Na==null?void 0:Na.key)==="pageColumn"))==null?void 0:Ve.contents,ka=((va=(ra=Ne.compData)==null?void 0:ra.find(Na=>(Na==null?void 0:Na.key)==="pageGroup"))==null?void 0:va.contents)??"",Fe=(Te=(ba=($e=fe==null?void 0:fe.split("["))==null?void 0:$e[1])==null?void 0:ba.split("]"))==null?void 0:Te[0];Ua=((fa=fe==null?void 0:fe.split("["))==null?void 0:fa[0])+((ga=(Ue=w.value)==null?void 0:Ue.find(Na=>(Na==null?void 0:Na.key)===Fe))==null?void 0:ga.value)}return Ne}),!(Ua===""||Ua==="")){const Ne=await ua.getItemData(Ua,sessionStorage.getItem("systemKey"),"",!1,"","",Le);We=We==null?void 0:We.map(Ce=>{var K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka;if((Ce==null?void 0:Ce.comp)==="Table"&&(K=Ce.compData)!=null&&K.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")){let Fe=(Ve=(He=Ce.compData)==null?void 0:He.find(ue=>(ue==null?void 0:ue.key)==="pageColumn"))==null?void 0:Ve.contents,$a=((va=(ra=Ce.compData)==null?void 0:ra.find(ue=>(ue==null?void 0:ue.key)==="pageGroup"))==null?void 0:va.contents)??"",Na=(Te=(ba=($e=Fe==null?void 0:Fe.split("["))==null?void 0:$e[1])==null?void 0:ba.split("]"))==null?void 0:Te[0],Ye=((fa=Fe==null?void 0:Fe.split("["))==null?void 0:fa[0])+((ga=(Ue=w.value)==null?void 0:Ue.find(ue=>(ue==null?void 0:ue.key)===Na))==null?void 0:ga.value),Oe=(fe=Ne==null?void 0:Ne.find(ue=>(ue==null?void 0:ue.name)===($a===""?s==null?void 0:s.compName:$a)))==null?void 0:fe.compData;Ce.compData=(ka=Ce.compData)==null?void 0:ka.map(ue=>{var ie;return(ue==null?void 0:ue.key)==="tableContents"&&(ue.contents=(ie=Oe==null?void 0:Oe.find(na=>(na==null?void 0:na.key)==="tableContents"))==null?void 0:ie.contents),ue})}return Ce})}let Oa={};if(((ne=(D=oe==null?void 0:oe.extraValues)==null?void 0:D.input)==null?void 0:ne.length)>0){const Ne=(se=(ge=oe==null?void 0:oe.extraValues)==null?void 0:ge.input)==null?void 0:se.map(async Ce=>{var K;de!=null&&de.find(He=>He===Ce)?Oa=await me(Ce,We):Oa[Object.keys(Ce)[0]]=await me((K=Object.values(Ce))==null?void 0:K[0],We,Le)});await Promise.all(Ne)}else Oa=await me("/",We);let P=!1;(la=(we=oe==null?void 0:oe.extraValues)==null?void 0:we.output)==null||la.forEach(Ne=>{var Ce,K;(K=(Ce=Object.values(Ne))==null?void 0:Ce[0])!=null&&K.includes(".doc")&&(P=!0)});let F;if(P){const Ne=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});F=await Qa.axios.post(oe.api,Oa,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ne.close()})}else F=await Qa.axios.post(oe.api,Oa,{headers:{"Content-Type":"application/json"}});let X=(ea=(ae=(Va=(ya=A.cloneDeep(oe))==null?void 0:ya.extraValues)==null?void 0:Va.output)==null?void 0:ae.map(Ne=>{var Ce,K,He,Ve,ra,va,$e,ba,Te,fa,Ue,ga,fe,ka,Fe,$a;if(!((K=(Ce=Object.values(Ne))==null?void 0:Ce[0])!=null&&K.includes(".doc"))){let Na=(fa=(Te=(ba=(Ve=A.cloneDeep((He=Object.values(Ne))==null?void 0:He[0]))==null?void 0:Ve.split("["))==null?void 0:ba[(($e=(va=A.cloneDeep((ra=Object.values(Ne))==null?void 0:ra[0]))==null?void 0:va.split("["))==null?void 0:$e.length)-1])==null?void 0:Te.split("]"))==null?void 0:fa[0],Ye=Na==null?void 0:Na.split(":"),Oe=(fe=A.cloneDeep((Ue=Object.values(Ne))==null?void 0:Ue[0]))==null?void 0:fe.substring(0,A.cloneDeep((ga=Object.values(Ne))==null?void 0:ga[0]).lastIndexOf("["));if(Oe=(Fe=A.cloneDeep(Oe))==null?void 0:Fe.slice(0,((ka=A.cloneDeep(Oe))==null?void 0:ka.length)-1),Oe!=null&&Oe.includes("[")){let ue="";if(($a=ua.contentTransArrayToAll(Oe,"/"))==null||$a.forEach(ie=>{var na,qa,rl,Ml,Fa,nl,Ca;if(!(ie!=null&&ie.includes("[")))ue=ue===""?ue+ie.replaceAll("/",""):ue+"/"+ie.replaceAll("/","");else{let aa=A.cloneDeep(ie).slice(1,((na=A.cloneDeep(ie))==null?void 0:na.length)-1),Se=(nl=(Fa=(Ml=(rl=(qa=A.cloneDeep(aa))==null?void 0:qa.split("["))==null?void 0:rl[1])==null?void 0:Ml.split("]"))==null?void 0:Fa[0])==null?void 0:nl.split(":"),Xa="",Ya=(Ca=We==null?void 0:We.find(tl=>(tl==null?void 0:tl.name)===(Se==null?void 0:Se[0])))==null?void 0:Ca.compData;Ya==null||Ya.forEach(tl=>{var Da;(tl==null?void 0:tl.key)==="formContent"&&((Da=tl==null?void 0:tl.contents)==null||Da.forEach(sa=>{(sa==null?void 0:sa.key)===(Se==null?void 0:Se[1])&&(Xa=sa==null?void 0:sa.value)}))}),ue=ue===""?ue+Xa.replaceAll("/",""):ue+"/"+Xa.replaceAll("/","")}}),Oe=ue,Oe[(Oe==null?void 0:Oe.length)-1]!=="/")return Oe}}}))==null?void 0:ea.filter(Ne=>Ne);X=[...new Set(A.cloneDeep(X))];let R=X==null?void 0:X.map(async Ne=>{let Ce=await ua.getItemData(Ne,sessionStorage.getItem("systemKey"),"",!1,"","",Le);if((Ce==null?void 0:Ce.length)===0)return await ua.getParentContents(Ne)});await Promise.all(R);let W=[],Ie=(Pe=(ma=(Re=A.cloneDeep(oe))==null?void 0:Re.extraValues)==null?void 0:ma.output)==null?void 0:Pe.map(async Ne=>{var ba,Te,fa,Ue,ga,fe,ka,Fe,$a,Na,Ye,Oe,ue,ie,na,qa,rl,Ml,Fa,nl,Ca,aa,Se,Xa,Ya,tl,Da,sa,Z,Ea,Pa,ul,ol,xa,pa,Aa,Ze,ha,La,Ja,Ol,El,Sl,wl,fl,cl,kl,Dl,$l,or,Cr,Gr,Xr,Rr,nn,qr,rr,Nr,Fr,_n,Ar,hn,$r,ir,Pn,tn,vn,rt,Fn,An;if((Te=(ba=Object.values(Ne))==null?void 0:ba[0])!=null&&Te.includes(".doc")){var Ce=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"}),K=F.headers["content-disposition"],He=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Ve=He.exec(K),ra=Ve==null?void 0:Ve[1],va=document.createElement("a"),$e=window.URL.createObjectURL(Ce);b.value=[{name:ra,blobUrl:$e}],d.value=!0}else{let mn=(Na=($a=(Fe=(Ue=A.cloneDeep((fa=Object.values(Ne))==null?void 0:fa[0]))==null?void 0:Ue.split("["))==null?void 0:Fe[((ka=(fe=A.cloneDeep((ga=Object.values(Ne))==null?void 0:ga[0]))==null?void 0:fe.split("["))==null?void 0:ka.length)-1])==null?void 0:$a.split("]"))==null?void 0:Na[0],Zl=mn==null?void 0:mn.split(":"),xr=(ue=A.cloneDeep((Ye=Object.values(Ne))==null?void 0:Ye[0]))==null?void 0:ue.substring(0,A.cloneDeep((Oe=Object.values(Ne))==null?void 0:Oe[0]).lastIndexOf("["));if(xr!=null&&xr.includes("[")?xr=(na=A.cloneDeep(xr))==null?void 0:na.slice(0,((ie=A.cloneDeep(xr))==null?void 0:ie.length)-1):xr===""&&(xr=S.value),xr=xr.replaceAll("<","[").replaceAll(">","]"),xr!=null&&xr.includes("[")){let ql="";(qa=ua.contentTransArrayToAll(xr,"/"))==null||qa.forEach((Ll,dr)=>{var ar,Hl,Tr,Mr,yn,wn,dn,jn,Mn,pn,Cn;if(!(Ll!=null&&Ll.includes("[")))ql=ql===""?ql+Ll.replaceAll("/",""):ql+"/"+Ll.replaceAll("/","");else{let zn="",Kr="";(ar=A.cloneDeep(Ll))!=null&&ar.includes("]")?(zn=A.cloneDeep(Ll).slice(1,((Hl=A.cloneDeep(Ll))==null?void 0:Hl.length)-1),Kr=(dn=(wn=(yn=(Mr=(Tr=A.cloneDeep(zn))==null?void 0:Tr.split("["))==null?void 0:Mr[1])==null?void 0:yn.split("]"))==null?void 0:wn[0])==null?void 0:dn.split(":")):(zn=A.cloneDeep(Ll).slice(1,(jn=A.cloneDeep(Ll))==null?void 0:jn.length),Kr=(Mn=A.cloneDeep(zn))==null?void 0:Mn.split("/"));let En="",Hn=(pn=We==null?void 0:We.find(Sr=>(Sr==null?void 0:Sr.name)===(Kr==null?void 0:Kr[0])))==null?void 0:pn.compData;Hn==null||Hn.forEach(Sr=>{var Un;(Sr==null?void 0:Sr.key)==="formContent"&&((Un=Sr==null?void 0:Sr.contents)==null||Un.forEach(on=>{(on==null?void 0:on.key)===(Kr==null?void 0:Kr[1])&&(En=on==null?void 0:on.value)}))}),((Cn=ua.contentTransArrayToAll(xr,"/"))==null?void 0:Cn.length)-1!==dr?ql=ql===""?ql+En.replaceAll("/",""):ql+"/"+En.replaceAll("/",""):ql=ql+t.value+En.replaceAll("/","")}}),(rl=S.value)!=null&&rl.includes(ql)?xr=S.value:xr=ql}let Fl=A.cloneDeep((Ml=Object.keys(Ne))==null?void 0:Ml[0]);if(((Fa=F==null?void 0:F.data)==null?void 0:Fa.statusCode)===200||((nl=F==null?void 0:F.data)==null?void 0:nl.code)===200){if(((aa=(Ca=F==null?void 0:F.data)==null?void 0:Ca.data)!=null&&aa[Fl]||(Xa=(Se=F==null?void 0:F.data)==null?void 0:Se.result)!=null&&Xa[Fl])&&(Zl==null?void 0:Zl.length)===1)return await be(((tl=(Ya=F==null?void 0:F.data)==null?void 0:Ya.data)==null?void 0:tl[Fl])||((sa=(Da=F==null?void 0:F.data)==null?void 0:Da.result)==null?void 0:sa[Fl]),A.cloneDeep(xr),Zl,Ua);if((Ea=(Z=F==null?void 0:F.data)==null?void 0:Z.data)!=null&&Ea[Fl]||(ul=(Pa=F==null?void 0:F.data)==null?void 0:Pa.result)!=null&&ul[Fl]){let ql=await ze(((xa=(ol=F==null?void 0:F.data)==null?void 0:ol.data)==null?void 0:xa[Fl])||((Aa=(pa=F==null?void 0:F.data)==null?void 0:pa.result)==null?void 0:Aa[Fl]),A.cloneDeep(xr),Zl);return ql&&(W=[...W,...ql]),ql}else{if(!((Ze=F==null?void 0:F.data)!=null&&Ze.data)){let ql=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le);ql=ql==null?void 0:ql.map(dr=>{var ar;return(dr==null?void 0:dr.name)===(Zl==null?void 0:Zl[0])&&(dr.compData=(ar=dr.compData)==null?void 0:ar.map(Hl=>{var Tr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(Tr=Hl.contents)==null?void 0:Tr.map(Mr=>{var yn,wn;return(Mr==null?void 0:Mr.key)===(Zl==null?void 0:Zl[1])&&(Mr.value=(wn=(yn=F==null?void 0:F.data)==null?void 0:yn.result)==null?void 0:wn[Fl==null?void 0:Fl.replaceAll(":","")]),Mr})),Hl})),dr});let Ll=[];(ha=ql==null?void 0:ql.filter(dr=>(dr==null?void 0:dr.comp)==="Form"))==null||ha.forEach(async dr=>{let ar={};for(let Hl in dr)Hl!=="id"&&(ar[Hl]=dr[Hl]);Ll.push({id:dr==null?void 0:dr.id,value:{pageData:ar}})}),(Ll==null?void 0:Ll.length)>0&&await br.batchUpdateInsofDataApi({dataList:Ll});return}if((Zl==null?void 0:Zl.length)===1){const ql=(Ol=(Ja=(La=F==null?void 0:F.data)==null?void 0:La.data)==null?void 0:Ja.path)==null?void 0:Ol.path;let Ll="";(cl=(fl=(wl=(Sl=(El=ql==null?void 0:ql.split("("))==null?void 0:El[1])==null?void 0:Sl.split(")"))==null?void 0:wl[0])==null?void 0:fl.split(":"))==null||cl.forEach(Hl=>{var Tr,Mr;Ll=Ll===""?Ll+((Tr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:Tr.trim()):Ll+"/"+((Mr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:Mr.trim())});let dr=[(Cr=(or=($l=(Dl=(kl=ql==null?void 0:ql.split("<"))==null?void 0:kl[1])==null?void 0:Dl.split(">"))==null?void 0:$l[0])==null?void 0:or.replaceAll("'",""))==null?void 0:Cr.trim()],ar;return(Rr=(Xr=(Gr=F==null?void 0:F.data)==null?void 0:Gr.data)==null?void 0:Xr.data)!=null&&Rr[Zl==null?void 0:Zl[0]]?ar=await be((rr=(qr=(nn=F==null?void 0:F.data)==null?void 0:nn.data)==null?void 0:qr.data)==null?void 0:rr[Zl==null?void 0:Zl[0]],Ll,Zl,Ua):ar=await xe((Fr=(Nr=F==null?void 0:F.data)==null?void 0:Nr.data)==null?void 0:Fr.data,Ll,dr,Le),ar}else{const ql=(hn=(Ar=(_n=F==null?void 0:F.data)==null?void 0:_n.data)==null?void 0:Ar.path)==null?void 0:hn.path;let Ll="";return(vn=(tn=(Pn=(ir=($r=ql==null?void 0:ql.split("("))==null?void 0:$r[1])==null?void 0:ir.split(")"))==null?void 0:Pn[0])==null?void 0:tn.split(":"))==null||vn.forEach(ar=>{var Hl,Tr;Ll=Ll===""?Ll+((Hl=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:Hl.trim()):Ll+"/"+((Tr=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:Tr.trim())}),await ze((An=(Fn=(rt=F==null?void 0:F.data)==null?void 0:rt.data)==null?void 0:Fn.data)==null?void 0:An[Zl==null?void 0:Zl[0]],Ll,Zl)}}}}});if(await Promise.all(Ie),(W==null?void 0:W.length)>0){let Ne=[];W==null||W.forEach(He=>{Ne!=null&&Ne.find(Ve=>{var ra,va,$e,ba;return((va=(ra=Ve==null?void 0:Ve.value)==null?void 0:ra.pageData)==null?void 0:va.name)===((ba=($e=He==null?void 0:He.value)==null?void 0:$e.pageData)==null?void 0:ba.name)})||Ne.push(He)});let Ce=[];Ne==null||Ne.forEach(He=>{var va,$e,ba,Te;let Ve=A.cloneDeep(He);Ve.value.pageData.compData=(va=Ve.value.pageData.compData)==null?void 0:va.map(fa=>{var Ue;return(fa==null?void 0:fa.key)==="formContent"&&(fa.contents=(Ue=fa.contents)==null?void 0:Ue.map(ga=>{var ka,Fe,$a,Na;let fe=(ka=A.cloneDeep(W))==null?void 0:ka.find(Ye=>(Ye==null?void 0:Ye.keyType)===(ga==null?void 0:ga.key));if(fe){let Ye=(Na=($a=(Fe=fe.value.pageData.compData)==null?void 0:Fe.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:$a.contents)==null?void 0:Na.find(Oe=>(Oe==null?void 0:Oe.key)===(ga==null?void 0:ga.key));ga.value=Ye==null?void 0:Ye.value}return ga})),fa}),Ce.push({id:Ve==null?void 0:Ve.id,value:Ve==null?void 0:Ve.value});let ra=[];(Te=(ba=($e=Ve==null?void 0:Ve.value)==null?void 0:$e.pageData)==null?void 0:ba.compData)==null||Te.forEach(fa=>{var Ue;(fa==null?void 0:fa.key)==="formContent"&&((Ue=fa==null?void 0:fa.contents)==null||Ue.forEach(ga=>{var fe,ka,Fe,$a,Na,Ye;if((ka=(fe=ga==null?void 0:ga.optionUrl)==null?void 0:fe.menuSelect)!=null&&ka.find(Oe=>Oe==null?void 0:Oe.includes("[")))if(ra!=null&&ra.find(Oe=>{var ue,ie,na;return((ue=Oe==null?void 0:Oe.key)==null?void 0:ue.join(","))===((na=(ie=ga==null?void 0:ga.optionUrl)==null?void 0:ie.menuSelect)==null?void 0:na.join(","))})){let Oe=(Fe=ra==null?void 0:ra.find(ue=>{var ie,na,qa;return((ie=ue==null?void 0:ue.key)==null?void 0:ie.join(","))===((qa=(na=ga==null?void 0:ga.optionUrl)==null?void 0:na.menuSelect)==null?void 0:qa.join(","))}))==null?void 0:Fe.value;Oe.push({key:ga==null?void 0:ga.prop,groups:($a=ga==null?void 0:ga.optionUrl)==null?void 0:$a.groupSelect,value:ga==null?void 0:ga.value}),ra=ra==null?void 0:ra.map(ue=>{var ie,na,qa;return((ie=ue==null?void 0:ue.key)==null?void 0:ie.join(","))===((qa=(na=ga==null?void 0:ga.optionUrl)==null?void 0:na.menuSelect)==null?void 0:qa.join(","))&&(ue.value=Oe),ue})}else ra.push({key:(Na=ga==null?void 0:ga.optionUrl)==null?void 0:Na.menuSelect,value:[{key:ga==null?void 0:ga.prop,groups:(Ye=ga==null?void 0:ga.optionUrl)==null?void 0:Ye.groupSelect,value:ga==null?void 0:ga.value}]})}))}),(ra==null?void 0:ra.length)>0&&(ra=ra==null?void 0:ra.map(fa=>{var ga;let Ue="";return(ga=fa==null?void 0:fa.key)==null||ga.forEach(fe=>{var ka;if(!(fe!=null&&fe.includes("[")))Ue=Ue===""?Ue+fe:Ue+"/"+fe;else{let Fe="",$a=(ka=fe==null?void 0:fe.replaceAll("[","").replaceAll("]",""))==null?void 0:ka.split(":");We==null||We.forEach(Na=>{var Ye;(Na==null?void 0:Na.name)===($a==null?void 0:$a[0])&&((Ye=Na==null?void 0:Na.compData)==null||Ye.forEach(Oe=>{var ue;(Oe==null?void 0:Oe.key)==="formContent"&&((ue=Oe==null?void 0:Oe.contents)==null||ue.forEach(ie=>{(ie==null?void 0:ie.prop)===($a==null?void 0:$a[1])&&(Fe=ie==null?void 0:ie.value)}))}))}),Ue=Ue+t.value+Fe}}),fa.key=Ue,fa})),ra==null||ra.forEach(fa=>{var ka,Fe,$a;let Ue=(ka=Le[fa.key])==null?void 0:ka.find(Na=>{var Ye,Oe,ue,ie,na,qa,rl;return((Oe=(Ye=Na==null?void 0:Na.value)==null?void 0:Ye.pageData)==null?void 0:Oe.name)===((na=(ie=(ue=fa==null?void 0:fa.value)==null?void 0:ue[0])==null?void 0:ie.groups)==null?void 0:na[0])&&((rl=(qa=Na==null?void 0:Na.value)==null?void 0:qa.pageData)==null?void 0:rl.name)!==void 0}),ga=Ue==null?void 0:Ue.id,fe=(Fe=Ue==null?void 0:Ue.value)==null?void 0:Fe.pageData;fe.compData=($a=fe.compData)==null?void 0:$a.map(Na=>{var Ye;return(Na==null?void 0:Na.key)==="formContent"&&(Na.contents=(Ye=Na.contents)==null?void 0:Ye.map(Oe=>{var ie;let ue=(ie=fa.value)==null?void 0:ie.find(na=>(na==null?void 0:na.key)===(Oe==null?void 0:Oe.prop));return ue&&(Oe.value=ue.value),Oe})),Na}),Ce.push({id:ga,value:{pageData:fe}})})});let K=(Ee=A.cloneDeep(W))==null?void 0:Ee[0];(Ce==null?void 0:Ce.length)>0&&await br.batchUpdateInsofDataApi({dataList:Ce})}y.setFreshContent(!0)}C.setImportLoading(!1)}catch{Qa.ElMessage.error("方法执行错误,请查看方法!"),C.setImportLoading(!1)}g.value=!0},de=["createInsofDataApi"],Ke=Ta.debounce(async oe=>{Q(oe)},100),wa=async oe=>{var la,ya,Va;const D=A.cloneDeep(oe);let ne,ge=new WeakMap;oe!=null&&oe[0].path&&(ne=await(D==null?void 0:D.map(async(ae,ea)=>{var Oa,P,F,X,R,W,Ie,Ne,Ce,K,He,Ve,ra,va,$e,ba;const ma=(Oa=ge[ae==null?void 0:ae.path])==null?void 0:Oa.filter(Te=>{var fa;return((fa=Te==null?void 0:Te.key)==null?void 0:fa.type)==="data"});let Pe="";const Ee=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);ma==null||ma.forEach(Te=>{var fa,Ue,ga,fe,ka;((Ue=(fa=Te==null?void 0:Te.value)==null?void 0:fa.tableData)==null?void 0:Ue.算法名称)===((ga=D==null?void 0:D[ea])==null?void 0:ga.method)&&(Pe=(ka=(fe=Te==null?void 0:Te.value)==null?void 0:fe.tableData)==null?void 0:ka.算法体)});const Le=await ua.getItemData(ae==null?void 0:ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);let We="",Ua=(R=(X=(F=(P=Le==null?void 0:Le[0])==null?void 0:P.compData)==null?void 0:F.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:X.contents)==null?void 0:R.findIndex(Te=>(Te==null?void 0:Te.prop)==="算法体");return(Ie=(W=Le==null?void 0:Le[0])==null?void 0:W.compData)==null||Ie.forEach(Te=>{var fa;(Te==null?void 0:Te.key)==="tableContents"&&((fa=Te==null?void 0:Te.contents)==null||fa.forEach(Ue=>{Ue!=null&&Ue.find(ga=>ga===(ae==null?void 0:ae.method))&&(We=Ue[Ua])}))}),{buttonName:((Ne=D==null?void 0:D[ea])==null?void 0:Ne.method)||((He=(K=(Ce=ma==null?void 0:ma[0])==null?void 0:Ce.value)==null?void 0:K.tableData)==null?void 0:He.算法名称),api:(Pe===""?(va=(ra=(Ve=ma==null?void 0:ma[0])==null?void 0:Ve.value)==null?void 0:ra.tableData)==null?void 0:va.算法体:Pe)||We,content:Ee==null?void 0:Ee.filter(Te=>Te.comp!=="methodButton"),extraContent:($e=A.cloneDeep(ae.value))==null?void 0:$e.slice(1),methodName:(ae==null?void 0:ae.path)??"",extraValues:(ba=D==null?void 0:D[ea])==null?void 0:ba.data}})));const se=D==null?void 0:D.map(async ae=>{var Le,We,Ua,Oa,P,F;const ea=(Le=resAll.data.result)==null?void 0:Le.filter(X=>{var R,W,Ie;return((R=X==null?void 0:X.key)==null?void 0:R.parentTable)===""&&((W=X==null?void 0:X.key)==null?void 0:W.type)==="method"&&((Ie=X==null?void 0:X.key)==null?void 0:Ie.methodName)===X.method}),Re=ea==null?void 0:ea[0],ma=(We=resAll.data.result)==null?void 0:We.filter(X=>{var R,W;return((R=X==null?void 0:X.key)==null?void 0:R.type)==="methodData"&&((W=X==null?void 0:X.key)==null?void 0:W.tableId)===(Re==null?void 0:Re.id)}),Pe=await ua.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge),Ee=ma==null?void 0:ma[0];return{buttonName:(Ua=Re==null?void 0:Re.key)==null?void 0:Ua.methodKey,api:(P=(Oa=Ee==null?void 0:Ee.value)==null?void 0:Oa.tableData)==null?void 0:P[0],content:Pe==null?void 0:Pe.filter(X=>X.comp!=="methodButton"),extraContent:(F=A.cloneDeep(ae.value))==null?void 0:F.slice(1),methodName:(ae==null?void 0:ae.method)??""}}),we=(la=oe==null?void 0:oe[0])!=null&&la.path&&((ya=oe==null?void 0:oe[0])==null?void 0:ya.path)!==""?await Promise.all(ne):await Promise.all(se);n.value=we==null?void 0:we.filter(ae=>ae==null?void 0:ae.extraContent),(Va=n.value)==null||Va.forEach(ae=>{var ea;ae.api===""&&((ea=ae.content)==null||ea.forEach(Re=>{var ma;Re.comp=="Table"&&y.setExtraContents(ua.methodTableToContent(Re.compData,(ma=ae.extraContent)==null?void 0:ma[0]))}))})};return a.watch(()=>s.itemData,async()=>{x.value=="view"&&!g.value&&await wa(A.cloneDeep(s.itemData)),g.value=!1},{immediate:!0,deep:!0}),(oe,D)=>{var ne,ge,se;return a.unref(x)!=="edit"?(a.openBlock(),a.createElementBlock("div",x2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ne=n.value)==null?void 0:ne.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var la;return a.openBlock(),a.createElementBlock("div",null,[we.api!==""?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,disabled:a.unref(z)===a.unref(S)&&!((la=we==null?void 0:we.buttonName)!=null&&la.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:ya=>a.unref(Ke)(we),loading:c.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(Y)!==""&&((se=a.unref(S))==null?void 0:se[((ge=a.unref(S))==null?void 0:ge.length)-1])!==a.unref(t)?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,class:"calculator-content",onClickTrigger:j,modelValue:"保存"})):a.createCommentVNode("",!0)]),d.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:q},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},w2=Kl._export_sfc(_2,[["__scopeId","data-v-063aa9af"]]),C2={};function E2(l,n){return" 567 "}const S2=Kl._export_sfc(C2,[["render",E2]]),D2={class:"module content"},B2={class:"module data"},N2={class:"module layout"},T2={class:"form-content"},A2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),d=a.ref("create"),b=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.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}]),v=a.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:""}]),y=a.ref({}),c=a.ref([]),C=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:c.value},{key:"signConfig",contents:y.value}]}),M=w=>{var z;y.value=A.cloneDeep(w),t("change",(z=C())==null?void 0:z.compData)},L=w=>{var z,ee;if((w==null?void 0:w.buttonName)==="确认"){const S=A.cloneDeep(w==null?void 0:w.content);switch(d.value){case"create":c.value.push({...S,index:((z=c.value)==null?void 0:z.length)+1});break}t("change",(ee=C())==null?void 0:ee.compData),s.visible=!1}else s.visible=!1},x=(w,z)=>{var ee,S;switch(w){case"create":(ee=v.value)==null||ee.forEach($=>{$.value=""}),d.value="create",s.visible=!0;break;case"update":(S=v.value)==null||S.forEach($=>{$.value=z[$==null?void 0:$.prop]}),d.value="update",s.visible=!0;break;case"delete":c.value.splice(z,1),d.value="delete";break}},Y=()=>{s.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,w=>{var z,ee;w&&(y.value=((z=w==null?void 0:w.find(S=>S.key==="signConfig"))==null?void 0:z.contents)??{},c.value=((ee=w==null?void 0:w.find(S=>S.key==="signTypeList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(w,z)=>{const ee=a.resolveComponent("svg-icon"),S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",D2,[z[2]||(z[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(S,{class:"module-icon",id:"themeButton",onClick:z[0]||(z[0]=$=>x("create"))},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[z[1]||(z[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",B2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString($==null?void 0:$.label),1),a.createElementVNode("div",null,[a.createVNode(S,{type:"primary",size:"small",onClick:k=>x("update",{...$,index:T+1})},{default:a.withCtx(()=>z[3]||(z[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(S,{type:"danger",size:"small",onClick:k=>x("delete",T)},{default:a.withCtx(()=>z[4]||(z[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",N2,[a.createVNode(pl.ssForm,{rowContents:h.value,onChange:M},null,8,["rowContents"])])]),a.createVNode(yr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:Y,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",T2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),M2=Kl._export_sfc(A2,[["__scopeId","data-v-487e0536"]]),z2=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(1),d=a.computed(()=>{var C,M;return(C=r==null?void 0:r.stepConfig)!=null&&C.allowTrigger?s.value:(M=r==null?void 0:r.stepConfig)==null?void 0:M.active}),b=(C,M)=>{s.value=M,t("clickStep",C,M)},h=C=>pl.getComponent(C),v=()=>{var M;const C=(M=r==null?void 0:r.stepList)==null?void 0:M.find((L,x)=>x+1===d.value);return console.log("findStep",C),C?C==null?void 0:C.children:[]},y=C=>{t("clickTrigger",C)},c=C=>{t("changeTrigger",C)};return(C,M)=>{var Y,w,z,ee,S;const L=a.resolveComponent("el-step"),x=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(x,{direction:(Y=l.stepConfig)==null?void 0:Y.direction,active:d.value,"finish-status":"success",simple:(w=l.stepConfig)==null?void 0:w.simple,"align-center":((z=l.stepConfig)==null?void 0:z.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,($,T)=>(a.openBlock(),a.createBlock(L,{key:T,class:"step-item",onClick:k=>b($,T+1)},{title:a.withCtx(()=>[a.renderSlot(C.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(C.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ee=l.stepConfig)!=null&&ee.allowTrigger&&((S=l.stepConfig)!=null&&S.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(v(),($,T)=>(a.openBlock(),a.createElementBlock("div",{key:T,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":k=>$.value=k,onClickTrigger:y,onChangeTrigger:c,content:$==null?void 0:$.content},a.createSlots({_:2},[a.renderList(C.$slots,(k,g)=>({name:g,fn:a.withCtx(j=>[a.renderSlot(C.$slots,g,a.mergeProps({ref_for:!0},j||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),O2=Kl._export_sfc(z2,[["__scopeId","data-v-d7c99969"]]),I2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:n}){const r=l,t=n,s=a.ref({}),d=a.ref([]),b=(h,v)=>{t("clickStep",h,v)};return a.watch(()=>r==null?void 0:r.itemData,h=>{var v,y;d.value=(v=h==null?void 0:h.find(c=>(c==null?void 0:c.key)==="stepList"))==null?void 0:v.contents,s.value=(y=h==null?void 0:h.find(c=>(c==null?void 0:c.key)==="stepConfig"))==null?void 0:y.contents},{immediate:!0,deep:!0}),(h,v)=>{const y=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(O2,{stepConfig:s.value,stepList:d.value,onClickStep:b},{icon:a.withCtx(()=>[a.createVNode(y,{name:"import"})]),title:a.withCtx(({title:c})=>[a.createTextVNode(a.toDisplayString(c),1)]),description:a.withCtx(({description:c})=>[a.createTextVNode(a.toDisplayString(c),1)]),_:1},8,["stepConfig","stepList"])}}}),L2=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(n,r)=>{const t=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(d,b)=>(a.openBlock(),a.createBlock(t,{key:b,timestamp:d.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(n.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),V2=Kl._export_sfc(L2,[["__scopeId","data-v-4172a886"]]),R2={class:"line-content"},$2={class:"line-time"},P2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const n=l,r=a.ref({}),t=a.ref([]);return a.watch(()=>n==null?void 0:n.itemData,s=>{var d,b;t.value=(d=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:d.contents,r.value=(b=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(s,d)=>(a.openBlock(),a.createBlock(V2,{activities:t.value,timeLineConfig:r.value},{content:a.withCtx(({content:b,timestamp:h})=>[a.createElementVNode("span",R2,a.toDisplayString(b),1),a.createElementVNode("span",$2,a.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),F2=Kl._export_sfc(P2,[["__scopeId","data-v-b4d9deed"]]),j2={class:"tabs-content"},H2=a.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(l,{emit:n}){const r=l,t=n,s=a.ref();a.watch(()=>r==null?void 0:r.itemData,()=>{s.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const d=M=>{t("change",M)},b=(M,L)=>{t("contentChange",M,L)},h=M=>{t("pageChange",M)},v=M=>{t("rowClick",M)},y=(M,L)=>{t("routeUrl",M,L)},c=M=>{t("clickTrigger",M)},C=(M,L)=>{t("clickMainKey",M,L)};return(M,L)=>{var x,Y;return a.openBlock(),a.createElementBlock("div",j2,[(x=s.value)!=null&&x.length?(a.openBlock(),a.createBlock(pl.ssTab,{tabsContents:s.value,key:(Y=s.value)==null?void 0:Y.length},{pane:a.withCtx(({tab:w,index:z})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(w==null?void 0:w.comp)),{related:w==null?void 0:w.relatedTables,compNames:r==null?void 0:r.compNames,compName:w==null?void 0:w.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:l.isDevMode,itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,onChange:d,index:(w==null?void 0:w.id)??z,config:{showIndex:w==null?void 0:w.showIndex,allowMove:w==null?void 0:w.allowMove,viewport:w==null?void 0:w.viewport},onContentChange:b,onPageChange:h,onRowClick:v,onRouteUrl:y,parentTableId:w==null?void 0:w.tableId,allMapContents:l.allMapContents,children:w==null?void 0:w.children,level:1,onClickTrigger:c,onClickMainKey:C},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),U2=Kl._export_sfc(H2,[["__scopeId","data-v-ded4e0d9"]]),q2={class:"type-select"},K2=["onClick"],W2={class:"list-icon"},Y2={__name:"modelSelect",setup(l){const n=at(A.pinia),{itemData:r}=A.storeToRefs(n),t=s=>{const d=A.cloneDeep(r.value);d.push({comp:s.comp,name:s.name,compData:[]}),n.setItemData(d)};return(s,d)=>{const b=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",q2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Uc),(h,v)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:v},[a.createElementVNode("div",{class:"list-content",onClick:y=>t(h)},[a.createElementVNode("div",W2,[a.createVNode(b,{name:h.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(h.name),1)],8,K2)]))),128))])}}},J2=Kl._export_sfc(Y2,[["__scopeId","data-v-91799bf8"]]),G2={class:"fill-content"},X2={class:"operate-content"},Z2={class:"collapse-title-content"},Q2={class:"collapse-title-item"},eh={key:1},ah=["onClick"],lh={class:"icon-content"},rh={key:0,class:"edit-content"},nh=["onClick"],th={class:"comp-child"},oh={__name:"modelFill",setup(l){const n=at(A.pinia),{itemData:r,originalData:t}=A.storeToRefs(n),s=a.ref([]);a.ref([]);const d=a.ref([]),b=a.ref([]),h=L=>{var Y;let x=(Y=A.cloneDeep(b.value))==null?void 0:Y.map((w,z)=>(L===z&&(w.content=!0),w));b.value=x},v=L=>{var Y;let x=(Y=A.cloneDeep(b.value))==null?void 0:Y.map((w,z)=>(L===z&&(w.content=!1),w));b.value=x,s.value=A.cloneDeep(r.value)},y=(L,x)=>{var ee;let Y=(ee=A.cloneDeep(b.value))==null?void 0:ee.map((S,$)=>(L===$&&(S.content=!1),S));b.value=Y;const w=A.cloneDeep(r.value),z=w==null?void 0:w.filter((S,$)=>($===L&&(S.name=x),S));n.setOriginalData(z),n.setItemData(z)};a.watch(()=>r.value,()=>{var L,x,Y;!r.value||((L=r.value)==null?void 0:L.length)===0?s.value=[]:s.value=(x=A.cloneDeep(r.value))==null?void 0:x.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),d.value=s.value,b.value=(Y=A.cloneDeep(d.value))==null?void 0:Y.map((w,z)=>({id:z,content:!1}))},{deep:!0,immediate:!0});const c=L=>Et(L),C=(L,x,Y)=>{var z,ee;if(!L)return;let w=A.cloneDeep(r.value);w=(z=w==null?void 0:w.map((S,$)=>($===Y&&(S.compData=L),S)))==null?void 0:z.filter(S=>(S==null?void 0:S.comp)!=="methodButton"),b.value=(ee=A.cloneDeep(w))==null?void 0:ee.map((S,$)=>({id:$,content:!1})),n.setOriginalData(w),n.setItemData(w)},M=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const x=A.cloneDeep(r.value),Y=x==null?void 0:x.filter((w,z)=>z!==L);n.setOriginalData(Y),n.setItemData(Y),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(L,x)=>{const Y=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",G2,[x[1]||(x[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",X2,[a.createVNode(js.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:w,index:z})=>{var ee,S,$,T,k,g,j,q,J,me;return[a.createElementVNode("div",Z2,[a.createElementVNode("div",Q2,[(S=(ee=b.value)==null?void 0:ee.find(ze=>ze.id===z))!=null&&S.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:w.name&&w.name!==""?"8px":"0px"})},a.toDisplayString(w.name),5)),(T=($=b.value)==null?void 0:$.find(ze=>ze.id===z))!=null&&T.content?(a.openBlock(),a.createElementBlock("div",eh,[a.createVNode(pl.ssInput,{modelValue:w.name,"onUpdate:modelValue":ze=>w.name=ze,onClick:x[0]||(x[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(g=(k=b.value)==null?void 0:k.find(ze=>ze.id===z))!=null&&g.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(ze=>h(z),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ah))]),a.createElementVNode("div",lh,[(q=(j=b.value)==null?void 0:j.find(ze=>ze.id===z))!=null&&q.content?(a.openBlock(),a.createElementBlock("div",rh,[a.createVNode(Y,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(ze=>v(z),["stop"])},null,8,["onClick"]),a.createVNode(Y,{name:"Save",onClick:a.withModifiers(ze=>y(z,w.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(me=(J=b.value)==null?void 0:J.find(ze=>ze.id===z))!=null&&me.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(ze=>M(z),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,nh))])])]}),content:a.withCtx(({item:w,index:z})=>{var ee,S;return[a.createElementVNode("div",th,[a.createTextVNode(a.toDisplayString(c(w.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(w.comp+"Operate")),{itemContents:w==null?void 0:w.compData,originalItemContents:(S=(ee=d.value)==null?void 0:ee.find(($,T)=>T===z))==null?void 0:S.compData,onChange:$=>C($,w,z)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},ih=Kl._export_sfc(oh,[["__scopeId","data-v-a46a44b9"]]),sh={key:0,class:"show-content"},ch={style:{display:"flex"}},uh={__name:"modelShow",setup(l){const n=at(A.pinia),{itemData:r}=A.storeToRefs(n),t=a.ref([]);a.watch(()=>r.value,()=>{var d;!r.value||((d=r.value)==null?void 0:d.length)===0?t.value=[]:t.value=A.cloneDeep(r.value)},{deep:!0,immediate:!0});const s=d=>Et(d);return(d,b)=>{var h;return((h=t.value)==null?void 0:h.length)>0?(a.openBlock(),a.createElementBlock("div",sh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(v,y)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:y},[a.createElementVNode("div",ch,a.toDisplayString(v.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(v.comp)),{itemData:v==null?void 0:v.compData,childItemData:v==null?void 0:v.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},dh=Kl._export_sfc(uh,[["__scopeId","data-v-3f3e863e"]]),ph={class:"tabs-header"},fh={class:"tabs-list"},hh={class:"tab-name"},vh={class:"tab-actions"},mh=["onClick"],yh=["onClick"],gh=["onClick"],bh={class:"model-operate"},kh={class:"model-select",style:{display:"unset"}},xh={class:"existing-components"},_h={class:"component-list"},wh=["onClick"],Ch={class:"component-info"},Eh={class:"component-type"},Sh={class:"component-name"},Dh={class:"model-fill"},Bh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.ref([]),d=a.ref(!1),b=a.ref(""),h=a.ref({title:""}),v=a.ref(-1),y=a.ref(!1),c=a.ref(-1),C=a.ref(new WeakMap),M=a.ref(null),L=at(A.pinia),{itemData:x}=A.storeToRefs(L),Y=()=>{b.value="新增标签页",h.value.title="",v.value=-1,d.value=!0},w=oe=>{b.value="修改标签页",h.value.title=s.value[oe].title,v.value=oe,d.value=!0},z=oe=>{const D=$(oe);C.value.delete(D),s.value.splice(oe,1),wa()},ee=()=>{if(h.value.title.trim()){if(v.value===-1){const oe={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:S()};s.value.push(oe)}else s.value[v.value].title=h.value.title,s.value[v.value].value=h.value.title,s.value[v.value].label=h.value.title;d.value=!1,wa()}},S=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=oe=>{const D=s.value[oe];return D.id||(D.id=S()),D.id},T=oe=>{var ge;c.value=oe;const D=$(oe);M.value=A.cloneDeep(x.value);let ne=C.value.get(D);!ne&&((ge=s.value[oe].children)==null?void 0:ge.length)>0&&(ne=q(s.value[oe].children)),ne?L.setItemData(A.cloneDeep(ne)):L.setItemData([]),y.value=!0},k=a.computed(()=>{const oe=A.useModelComp(A.pinia),D=A.storeToRefs(oe).itemData.value;return console.log("可用组件数据",D),!D||!Array.isArray(D)?[]:D.filter(ne=>{var ge;if(ne.comp==="Tabs"&&c.value>=0){const se=$(c.value);if((ge=ne.compData)==null?void 0:ge.some(la=>{var ya;return la.key==="stepList"&&((ya=la.contents)==null?void 0:ya.some(Va=>Va.id===se))}))return!1}return!0})}),g=oe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[oe]||oe,j=oe=>{var D;try{const ne=A.cloneDeep(oe);ne.id=Date.now()+Math.random(),ne.comp==="Tabs"&&((D=ne.compData)==null||D.forEach(se=>{se.key==="stepList"&&se.contents&&se.contents.forEach(we=>{we.id=S()})}));const ge=A.cloneDeep(x.value);ge.push(ne),L.setItemData(ge)}catch(ne){console.error("添加组件失败:",ne)}},q=oe=>oe.map(D=>{var ne;switch(D.type){case"form":return{comp:"Form",name:D.value||"表单",compData:J(D.content)};case"table":return{comp:"Table",name:D.value||"表格",compData:me(D.content)};default:return{comp:"Unknown",name:D.value||"",compData:((ne=D.content)==null?void 0:ne.originalData)||[]}}}),J=oe=>{if(!oe)return[];const D=[];return oe.rowContents&&D.push({key:"formContent",contents:oe.rowContents}),oe.buttonValue&&D.push({key:"formButton",contents:oe.buttonValue}),typeof oe.isEnableWrap<"u"&&D.push({key:"enableWrap",contents:oe.isEnableWrap}),D},me=oe=>[],ze=()=>{if(c.value>=0&&c.value<s.value.length){const oe=$(c.value);C.value.set(oe,A.cloneDeep(x.value)),s.value[c.value].children=be(x.value),console.log("保存后的数据",be(x.value))}y.value=!1,c.value=-1,M.value=null,wa()},xe=()=>{M.value&&L.setItemData(A.cloneDeep(M.value)),y.value=!1,c.value=-1,M.value=null},te=()=>{y.value&&xe()},be=oe=>{if(!Array.isArray(oe))throw new Error("sourceData must be an array");return oe.map((D,ne)=>{if(!D||typeof D!="object")return D;const{comp:ge,name:se,compData:we}=D;switch(ge){case"Form":return{type:"form",content:Q(we||[]),value:"表单"};case"Table":return{type:"table",content:de(we||[]),value:"表格"};default:return{type:"xxx",content:Ke(we||[]),value:""}}})},Q=oe=>{const D={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ne={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return oe.forEach((ge,se)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${se}:`,ge);return}const{key:we,contents:la}=ge,ya=ne[we];if(!ya){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?D[ya]=!!la:D[ya]=Array.isArray(la)?la:[]}),D},de=oe=>{const D={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ne={header:"columns",tableContents:"tableData"};return oe.forEach((ge,se)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${se}:`,ge);return}const{key:we,contents:la}=ge,ya=ne[we];if(!ya){console.warn(`Unknown Table config key: ${we}`);return}D[ya]=Array.isArray(la)?la:[]}),D},Ke=oe=>(console.log("Default conversion logic - to be implemented"),{originalData:oe,processed:!1,componentType:"unknown"}),wa=()=>{const oe=[{key:"stepList",contents:s.value}];t("change",oe)};return a.watch(()=>r.itemContents,oe=>{if(oe&&oe.length>0){const D=oe.find(ne=>ne.key==="stepList");D&&D.contents&&(s.value=D.contents.map(ne=>({title:ne.title||"",value:ne.value||ne.title||"",label:ne.label||ne.title||"",children:ne.children||[],id:ne.id||S()})))}},{immediate:!0,deep:!0}),(oe,D)=>{const ne=a.resolveComponent("svg-icon"),ge=a.resolveComponent("el-input"),se=a.resolveComponent("el-form-item"),we=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",ph,[D[6]||(D[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:Y},[a.createVNode(ne,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),D[5]||(D[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",fh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(la,ya)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:ya},[a.createElementVNode("span",hh,a.toDisplayString(la.title),1),a.createElementVNode("div",vh,[a.createElementVNode("button",{onClick:Va=>w(ya)},"修改标题",8,mh),a.createElementVNode("button",{onClick:Va=>T(ya)},"布局调整",8,yh),a.createElementVNode("button",{onClick:Va=>z(ya)},"删除",8,gh)])]))),128))]),a.createVNode(yr.ssDialog,{modelValue:d.value,"onUpdate:modelValue":D[2]||(D[2]=la=>d.value=la),title:b.value,onBeforeDestroy:D[3]||(D[3]=la=>d.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:D[1]||(D[1]=la=>d.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:ee},"确定")]),default:a.withCtx(()=>[a.createVNode(we,{model:h.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(se,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(ge,{modelValue:h.value.title,"onUpdate:modelValue":D[0]||(D[0]=la=>h.value.title=la),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(yr.ssDialog,{modelValue:y.value,"onUpdate:modelValue":D[4]||(D[4]=la=>y.value=la),title:"布局调整",fullScreen:"",onBeforeDestroy:te},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:xe},"取消"),a.createElementVNode("button",{onClick:ze},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",bh,[a.createElementVNode("div",kh,[a.createVNode(J2),a.createElementVNode("div",xh,[D[8]||(D[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",_h,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k.value,la=>(a.openBlock(),a.createElementBlock("div",{key:la.id,class:"component-item",onClick:ya=>j(la)},[a.createElementVNode("div",Ch,[a.createElementVNode("span",Eh,a.toDisplayString(g(la.comp)),1),a.createElementVNode("span",Sh,a.toDisplayString(la.name),1)]),D[7]||(D[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,wh))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:oe.innerWidth},[a.createVNode(dh)])),a.createElementVNode("div",Dh,[a.createVNode(ih)])])]),_:1},8,["modelValue"])])}}},Nh=Kl._export_sfc(Bh,[["__scopeId","data-v-9096ed0d"]]);function Th(){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 Ah(l){return{type:"line",...l}}function Mh(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function zh(l){return{type:"bar",barWidth:"60%",...l}}function Oh(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ih(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const Tn={line:{initBaseoptions:Th,initSeries:Ah},bar:{initBaseoptions:Mh,initSeries:zh},pie:{initBaseoptions:Oh,initSeries:Ih}},hs=A.useMenuState(A.pinia),wc=(l,n)=>{var c;const r=[],t=[],{group:s,nameCol:d,valueCol:b}=n||{},h=l==null?void 0:l.find(C=>{const{name:M}=C;return M===s});if(!h)return{names:r,values:t};const v=(c=h==null?void 0:h.compData)==null?void 0:c.find(C=>{const{key:M}=C;return M==="tableContents"});return((v==null?void 0:v.contents)||[]).forEach(C=>{const M=C==null?void 0:C[0];let L=!1;Qa.isObject(M)&&(M!=null&&M.id)&&(L=!0);let x=d,Y=b;L&&(x=x+1,Y=Y+1);const w=C==null?void 0:C[x],z=C==null?void 0:C[Y];r.push(w),t.push(z)}),{names:r,values:t}},Lh=async l=>{const{menu:n,mainKey:r,detailGroup:t,detailNameCol:s,detailValueCol:d,isSelfDetail:b}=l||{};let h=null;const v=sessionStorage.getItem("systemKey");if(b&&hs.activeMenuPath&&(h=await ua.getItemData(`${hs.activeMenuPath}`,v,"")),!b){const y=n==null?void 0:n.join("/");h=await ua.getItemData(`${y}^${r}`,v,"")}return wc(h,{group:t,nameCol:s,valueCol:d})},Vh=async l=>{const{menu:n,group:r,nameCol:t,valueCol:s}=l||{},d=n==null?void 0:n.join("/"),b=sessionStorage.getItem("systemKey"),h=await ua.getItemData(d,b,"");return wc(h,{group:r,nameCol:t,valueCol:s})},_i=async(l,n)=>{const r={names:[],values:[]},{menu:t,group:s,nameCol:d,valueCol:b}=l||{};if(!t.length||!s)return r;const{mainKey:h,group:v,nameCol:y,valueCol:c,isSelfDetail:C}=n||{};return h&&v&&pl.isNumber(y)&&pl.isNumber(c)?await Lh({menu:t,mainKey:h,detailGroup:v,detailNameCol:y,detailValueCol:c,isSelfDetail:C}):pl.isNumber(d)&&pl.isNumber(b)?await Vh({menu:t,group:s,nameCol:d,valueCol:b}):r},Rh=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;v.xAxis.data=y;const C=h({data:c});return v.series.push(C),v},$h=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;v.xAxis.data=y;const C=h({data:c});return v.series.push(C),v},Ph=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:t,title:s}=l||{},d=Tn==null?void 0:Tn[t];if(!d)return;const{initBaseoptions:b,initSeries:h}=d,v=b();v.title.text=s??"";const{names:y,values:c}=await _i(n,r);if(!y||!c)return v;const C=[];for(let L=0;L<y.length;L++){const x=y[L],Y=c[L];C.push({name:x,value:Y})}const M=h({data:C});return v.series.push(M),v},Fh=async(l=[])=>{var b,h,v;const n=((b=l==null?void 0:l.find(y=>y.key==="chartBaseConfig"))==null?void 0:b.contents)??{},r=((h=l==null?void 0:l.find(y=>y.key==="chartDataConfig"))==null?void 0:h.contents)??{},t=((v=l==null?void 0:l.find(y=>y.key==="chartDetailConfig"))==null?void 0:v.contents)??{},{type:s}=n;let d={};return s==="line"&&(d=await Rh({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),s==="bar"&&(d=await $h({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),s==="pie"&&(d=await Ph({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:t})),d},jh=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const n=l,r=a.ref({});a.onMounted(async()=>{const s=n==null?void 0:n.itemData;r.value=await Fh(s)});const t=a.computed(()=>(n==null?void 0:n.height)||"300px");return(s,d)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:t.value})},[a.createVNode(yu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),Hh=Kl._export_sfc(jh,[["__scopeId","data-v-d4c081e8"]]),Uh={class:"chart-module layout"},qh={class:"chart-module content"},Kh={class:"chart-module content"},Wh={class:"form-content"},Yh={class:"dialog-footer"},Jh={class:"form-content"},Gh={class:"dialog-footer"},Xh={class:"form-content"},Zh={class:"dialog-footer"},Qh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),d=a.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=a.ref({}),v=()=>{var Pe;d.value=b(),(Pe=d.value)==null||Pe.forEach(Ee=>{var We;const Le=Ee==null?void 0:Ee.prop;Ee.value=(We=h==null?void 0:h.value)==null?void 0:We[Le]}),s.visible=!0},y=Pe=>{h.value=Pe},c=()=>{var Pe;s.visible=!1,t("change",(Pe=Re())==null?void 0:Pe.compData)},C=a.reactive({visible:!1,width:"840",title:"数据配置"}),M=a.ref([]),L=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],x=a.ref({}),Y=()=>{const Pe=M.value,Ee=A.cloneDeep(Pe);return Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=x.value)==null?void 0:Ua[We]}),Ee},w=Pe=>{var Le;x.value=Pe;const Ee=Y();M.value=Ee,t("change",(Le=Re())==null?void 0:Le.compData)},z=async()=>{const Pe=await ua.getMenusContent(),Ee=Y();Ee==null||Ee.forEach(Le=>{(Le==null?void 0:Le.prop)==="menu"&&(Le.contents=Pe)}),M.value=Ee,C.visible=!0,await la(x.value.menu),await ae(x.value.group)},ee=a.reactive({visible:!1,width:"840",title:"详情页配置"}),S=a.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],T=a.ref({}),k=()=>{const Pe=S.value,Ee=A.cloneDeep(Pe);return Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=T.value)==null?void 0:Ua[We]}),Ee},g=Pe=>{var Le;T.value=Pe;const Ee=k();S.value=Ee,t("change",(Le=Re())==null?void 0:Le.compData)},j=async()=>{await te();const Pe=A.cloneDeep(q.value),Ee=k();Ee==null||Ee.forEach(Le=>{var Ua;const We=Le==null?void 0:Le.prop;Le.value=(Ua=T==null?void 0:T.value)==null?void 0:Ua[We],We==="mainKey"&&(Le.contents=Pe)}),S.value=Ee,ee.visible=!0},q=a.ref([]),J=a.ref([]),me=a.ref({}),ze=a.ref({}),xe=()=>{const{compData:Pe}=ge.value||{},Ee=Pe==null?void 0:Pe.find(X=>{const{key:R}=X;return R==="header"}),Le=(Ee==null?void 0:Ee.contents)||[],We=Le==null?void 0:Le.filter((X,R)=>{const{label:W}=X;return W!=="操作"}),Ua=We==null?void 0:We.findIndex((X,R)=>{const{isMainKey:W}=X;return W});if(Ua<0)return[];const Oa=Pe==null?void 0:Pe.find(X=>{const{key:R}=X;return R==="tableContents"}),P=(Oa==null?void 0:Oa.contents)||[];return P==null?void 0:P.map(X=>{const R=X==null?void 0:X[0];let W=Ua;Qa.isObject(R)&&(R!=null&&R.id)&&(W=W+1);const Ie=X==null?void 0:X[W];return{label:Ie,value:Ie}})},te=async()=>{const Pe=await xe();q.value=Pe},be=async Pe=>{const Ee=sessionStorage.getItem("systemKey");return await ua.getItemData(Pe,Ee,"")},Q=async Pe=>{const Ee=Pe;J.value=Ee==null?void 0:Ee.map(Le=>{const{name:We}=Le;return me.value[We]=Le,{label:We,value:We}})},de=Pe=>{const{comp:Ee,compData:Le}=ze.value||{};if(Ee==="Table"){let We=k();We=We.filter(Ua=>{const{prop:Oa}=Ua;return Oa!=="formItems"}),ya(We,Le),S.value=We}},Ke=async()=>{var Le,We;const Pe=(Le=T==null?void 0:T.value)==null?void 0:Le.mainKey,Ee=(We=x==null?void 0:x.value)==null?void 0:We.menu;if(Pe){const Oa=`${Ee==null?void 0:Ee.join("/")}^${Pe}`,P=await be(Oa);await Q(P);const F=k();F==null||F.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=J.value)}),S.value=F}};a.watch(()=>{var Pe;return(Pe=T==null?void 0:T.value)==null?void 0:Pe.mainKey},async(Pe,Ee)=>{Pe!=Ee&&Pe&&await Ke()});const wa=async Pe=>{const Ee=me.value[Pe];ze.value=Ee,await de()};a.watch(()=>{var Pe;return(Pe=T==null?void 0:T.value)==null?void 0:Pe.group},async(Pe,Ee)=>{Pe!=Ee&&Pe&&wa(Pe)});const oe=async()=>{var Ee;await Ke();const Pe=(Ee=T.value)==null?void 0:Ee.group;await wa(Pe)},D=a.ref([]),ne=a.ref({}),ge=a.ref({}),se=async Pe=>{const Ee=Pe==null?void 0:Pe.join("/"),Le=sessionStorage.getItem("systemKey");return await ua.getItemData(Ee,Le,"")},we=async Pe=>{const Ee=await se(Pe);D.value=Ee==null?void 0:Ee.map(Le=>{const{name:We}=Le;return ne.value[We]=Le,{label:We,value:We}})},la=async(Pe,Ee)=>{await we(Pe);const Le=Y();Le==null||Le.forEach(We=>{(We==null?void 0:We.prop)==="group"&&(We.contents=D.value)}),M.value=Le};a.watch(()=>{var Pe;return(Pe=x==null?void 0:x.value)==null?void 0:Pe.menu},async(Pe,Ee)=>{const Le=Pe==null?void 0:Pe.join("/"),We=Ee==null?void 0:Ee.join("/");Le!=We&&await la(Pe)});const ya=(Pe,Ee)=>{const Le=Ee==null?void 0:Ee.find(P=>{const{key:F}=P;return F==="header"}),We=(Le==null?void 0:Le.contents)||[],Ua=We==null?void 0:We.filter((P,F)=>{const{label:X}=P;return X!=="操作"}),Oa=Ua==null?void 0:Ua.map((P,F)=>{const{label:X}=P;return{label:X,value:F}});Pe==null||Pe.forEach(P=>{const F=P==null?void 0:P.prop;(F==="nameCol"||F==="valueCol")&&(P.contents=Oa)})},Va=Pe=>{const{comp:Ee,compData:Le}=ge.value||{};if(Ee==="Table"){x.value.formItems=[];let We=Y();We=We.filter(Ua=>{const{prop:Oa}=Ua;return Oa!=="formItems"}),ya(We,Le),M.value=We}},ae=async Pe=>{const Ee=ne.value[Pe];ge.value=Ee,await Va()};a.watch(()=>{var Pe;return(Pe=x==null?void 0:x.value)==null?void 0:Pe.group},async(Pe,Ee)=>{Pe!=Ee&&ae(Pe)});const ea=async()=>{var Le,We;const Pe=(Le=x.value)==null?void 0:Le.menu;await la(Pe);const Ee=(We=x.value)==null?void 0:We.group;await ae(Ee)},Re=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:x.value},{key:"chartDetailConfig",contents:T.value}]}),ma=()=>{s.visible=!1,C.visible=!1,ee.visible=!1};return a.onMounted(async()=>{var Ee,Le,We;M.value=L(),S.value=$();const Pe=r==null?void 0:r.itemContents;h.value=((Ee=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartBaseConfig"))==null?void 0:Ee.contents)??{},x.value=((Le=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartDataConfig"))==null?void 0:Le.contents)??{},await ea(),T.value=((We=Pe==null?void 0:Pe.find(Ua=>Ua.key==="chartDetailConfig"))==null?void 0:We.contents)??{},await oe()}),(Pe,Ee)=>{const Le=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Uh,[Ee[4]||(Ee[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[0]||(Ee[0]=We=>v())},{default:a.withCtx(()=>Ee[3]||(Ee[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",qh,[Ee[6]||(Ee[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[1]||(Ee[1]=We=>z())},{default:a.withCtx(()=>Ee[5]||(Ee[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",Kh,[Ee[8]||(Ee[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:Ee[2]||(Ee[2]=We=>j())},{default:a.withCtx(()=>Ee[7]||(Ee[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(yr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:ma,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",Wh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Yh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[9]||(Ee[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Le,{class:"ok-button button",onClick:c,id:"themeButton"},{default:a.withCtx(()=>Ee[10]||(Ee[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(yr.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:ma,width:C.width},{default:a.withCtx(()=>[a.createElementVNode("div",Jh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Gh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[11]||(Ee[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Le,{class:"ok-button button",onClick:ma,id:"themeButton"},{default:a.withCtx(()=>Ee[12]||(Ee[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(yr.ssDialog,{visible:ee.visible,title:ee.title,onBeforeDestroy:ma,width:ee.width},{default:a.withCtx(()=>[a.createElementVNode("div",Xh,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Zh,[a.createVNode(Le,{class:"cancel-button button",onClick:ma,id:"themeBorderButton"},{default:a.withCtx(()=>Ee[13]||(Ee[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Le,{class:"ok-button button",onClick:ma,id:"themeButton"},{default:a.withCtx(()=>Ee[14]||(Ee[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),e4=Kl._export_sfc(Qh,[["__scopeId","data-v-fe119645"]]),a4={class:"layout"},l4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:n}){const r=n,t=l;a.onMounted(async()=>{});const s=a.computed(()=>A.cloneDeep(t==null?void 0:t.itemData)||[]),d=a.computed(()=>{var c;const y=(c=s==null?void 0:s.value)==null?void 0:c.find(C=>{const{key:M}=C;return M==="baseConfig"});return y==null?void 0:y.contents}),b=a.computed(()=>{var c;const y=(c=s==null?void 0:s.value)==null?void 0:c.find(C=>{const{key:M}=C;return M==="children"});return y==null?void 0:y.contents}),h=a.computed(()=>{let y=A.cloneDeep(b.value)||[];const c=y.length;let C=0;const M=[];if(y=y.map(L=>{const x=L.span;return x?(L.span=Number(x),C=C+L.span):M.push(L),L}),C<24){const L=Math.floor((24-C)/c);M.forEach(x=>{x.span=L})}return y}),v=y=>{r("rowClick",y)};return(y,c)=>{var L;const C=a.resolveComponent("el-col"),M=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",a4,[a.createVNode(M,{style:a.normalizeStyle({height:(L=d.value)==null?void 0:L.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(x,Y)=>(a.openBlock(),a.createBlock(C,{span:x==null?void 0:x.span},{default:a.withCtx(()=>{var w;return[a.unref(Ct)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(x.comp)),{key:a.unref($n),compName:x.name,index:(x==null?void 0:x.id)??Y,height:(w=d.value)==null?void 0:w.height,itemData:x==null?void 0:x.compData,childItemData:x==null?void 0:x.itemChildData,onChange:a.unref(wo),onContentChange:a.unref(Co),onPageChange:a.unref(Eo),onRowClick:v},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),r4=Kl._export_sfc(l4,[["__scopeId","data-v-ab9a36ed"]]),n4={class:"layout-operate"},t4={class:"layout-module"},o4={class:"collapse-title-item"},i4={class:"collapse-title"},s4={class:"icon-content"},c4=["onClick"],u4={class:"comp-child"},d4=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,t=n;a.onMounted(()=>{Y()});const s=a.ref({}),d=a.ref({}),b=a.ref([]),h=T=>[{label:"高度",prop:"height",type:"input",value:T==null?void 0:T.height}],v=T=>{d.value=T,t("change",$(),!0)},y=a.ref([]),c=a.ref([]),C=T=>[{label:"占比",prop:"span",type:"input",value:T==null?void 0:T.span}],M=a.computed(()=>{const T=r==null?void 0:r.itemContents;return A.cloneDeep(T)}),L=a.computed(()=>{const T=M==null?void 0:M.value,k=T==null?void 0:T.find(g=>{const{key:j}=g;return j==="baseConfig"});return k==null?void 0:k.contents}),x=a.computed(()=>{const T=M==null?void 0:M.value,k=T==null?void 0:T.find(g=>{const{key:j}=g;return j==="children"});return k==null?void 0:k.contents}),Y=()=>{var T;s.value=M.value||{},y.value=(x==null?void 0:x.value)||[],b.value=h(),b.value=(T=b.value)==null?void 0:T.map(k=>{var j;const{prop:g}=k;return k.value=(j=L.value)==null?void 0:j[g],k})};a.watch(()=>{var T;return(T=x==null?void 0:x.value)==null?void 0:T.length},()=>{var T;y.value=(x==null?void 0:x.value)||[],c.value=(T=x.value)==null?void 0:T.map(k=>C(k))},{immediate:!0});const w=(T,k)=>{const g=A.cloneDeep(x==null?void 0:x.value);g[k].span=T.span,y.value=g,t("change",$(),!0)},z=T=>Et(T),ee=(T,k,g)=>{if(!T)return;const j=A.cloneDeep(x==null?void 0:x.value);j[g]&&(j[g].compData=T,y.value=j,t("change",$(),!0))},S=T=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=A.cloneDeep(x==null?void 0:x.value);k=k==null?void 0:k.filter((g,j)=>T!==j),y.value=k,t("change",$(),!0),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:y==null?void 0:y.value}]});return(T,k)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",n4,[a.createElementVNode("div",t4,[k[1]||(k[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(pl.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:k[0]||(k[0]=j=>v(j))},null,8,["rowContents"])])]),a.createVNode(js.default,{class:"collapse-content",collapseContents:x.value},{title:a.withCtx(({item:j,index:q})=>[a.createElementVNode("div",o4,[a.createElementVNode("div",i4,a.toDisplayString(j.name),1),a.createElementVNode("div",s4,[a.createElementVNode("div",{onClick:a.withModifiers(J=>S(q),["stop"]),class:"icon-content"},[a.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,c4)])])]),content:a.withCtx(({item:j,index:q})=>[a.createElementVNode("div",u4,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value[q],key:q,isEnableWrap:!0,onChange:J=>w(J,q)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(z(j.comp+"Operate")),{itemContents:j==null?void 0:j.compData,originalItemContents:j.compData,onChange:J=>ee(J,j,q)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),p4=Kl._export_sfc(d4,[["__scopeId","data-v-ba05456e"]]),f4=typeof window<"u";var vs;f4&&((vs=window==null?void 0:window.navigator)!=null&&vs.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ln(l){return l==null}function Cc(){}const h4=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(h4)));function v4(){const l=new Map;return{on(n,r){const t=l.get(n);t!=null&&t.add(r)||l.set(n,new Set([r]))},off(n,r){const t=l.get(n);t&&t.delete(r)},clear(n){const r=l.get(n);r&&r.clear()},clearAll(){l.clear()},emit(n,...r){const t=l.get(n);t&&t.forEach(s=>{s(...r)})}}}function ms(l,n=16){if(typeof l!="function")return Cc;const r=(...d)=>{l(...d)};if(n<=0)return Ec(r);let t=0,s;return function(...d){const b=Date.now(),h=b-t;clearTimeout(s),h>=n?(t=b,r(...d)):s=setTimeout(()=>{t=Date.now(),r(...d)},Math.max(0,n-h))}}function m4(l,n=100){if(typeof l!="function")return Cc;const r=(...s)=>{l(...s)};if(n<=0)return Ec(r);let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{r(...s)},n)}}function Ec(l){if(typeof l!="function")return l;let n=!1,r,t;return function(...s){return r=s,n||(n=!0,t=Promise.resolve().then(()=>(n=!1,t=void 0,l(...r)))),t}}const Vt=new Set,Sc=new WeakMap;function y4(){Vt.forEach(l=>{l(...Sc.get(l))}),Vt.clear()}function Hr(l,...n){if(typeof l!="function")return l;Sc.set(l,n),!Vt.has(l)&&(Vt.add(l),Vt.size===1&&Promise.resolve().then(y4))}const Dc=Symbol("LAYOUT_KEY"),Bc=Symbol("EMITTER_KEY");function g4(l){let n=0,r;for(let t=0,s=l.length;t<s;t++)r=l[t].y+l[t].h,r>n&&(n=r);return n}function mi(l){const n=Array(l.length);for(let r=0,t=l.length;r<t;r++)n[r]=b4(l[r]);return n}function b4(l){return{...l}}function Nc(l,n){return!(l===n||l.x+l.w<=n.x||l.x>=n.x+n.w||l.y+l.h<=n.y||l.y>=n.y+n.h)}function gt(l,n,r){const t=Ac(l),s=Mc(l),d=Array(l.length);for(let b=0,h=s.length;b<h;b++){let v=s[b];v.static||(v=k4(t,v,n,r),t.push(v)),d[l.findIndex(y=>y.i===v.i)]=v,v.moved=!1}return d}function k4(l,n,r,t){if(r)for(;n.y>0&&!Rt(l,n);)n.y--;else if(t){const d=t[n.i].y;for(;n.y>d&&!Rt(l,n);)n.y--}let s;for(;s=Rt(l,n);)n.y=s.y+s.h;return n}function x4(l,n){const r=Ac(l);for(let t=0,s=l.length;t<s;t++){const d=l[t];if(d.x+d.w>n.cols&&(d.x=n.cols-d.w),d.x<0&&(d.x=0,d.w=n.cols),!d.static)r.push(d);else for(;Rt(r,d);)d.y++}return l}function ys(l,n){for(let r=0,t=l.length;r<t;r++)if(l[r].i===n)return l[r]}function Rt(l,n){for(let r=0,t=l.length;r<t;r++)if(Nc(l[r],n))return l[r]}function Tc(l,n){return l.filter(r=>Nc(r,n))}function Ac(l){return l.filter(n=>n.static)}function yi(l,n,r,t,s=!1,d=!1){if(n.static)return l;const b=n.x,h=n.y,v=t&&n.y>t;typeof r=="number"&&(n.x=r),typeof t=="number"&&(n.y=t),n.moved=!0;let y=Mc(l);v&&(y=y.reverse());const c=Tc(y,n);if(d&&c.length)return n.x=b,n.y=h,n.moved=!1,l;for(let C=0,M=c.length;C<M;C++){const L=c[C];L.moved||n.y>L.y&&n.y-L.y>L.h/4||(L.static?l=gs(l,L,n,s):l=gs(l,n,L,s))}return l}function gs(l,n,r,t){if(t){const s={x:r.x,y:r.y,w:r.w,h:r.h};if(s.y=Math.max(n.y-r.h,0),!Rt(l,s))return yi(l,r,void 0,s.y,!1)}return yi(l,r,void 0,r.y+1,!1)}function _4(l,n,r,t){const s="translate3d("+n+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:t+"px",position:"absolute"}}function w4(l,n,r,t){const s="translate3d("+n*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:t+"px",position:"absolute"}}function C4(l,n,r,t){return{top:l+"px",left:n+"px",width:r+"px",height:t+"px",position:"absolute"}}function E4(l,n,r,t){return{top:l+"px",right:n+"px",width:r+"px",height:t+"px",position:"absolute"}}function Mc(l){return Array.from(l).sort(function(n,r){return n.y===r.y&&n.x===r.x?0:n.y>r.y||n.y===r.y&&n.x>r.x?1:-1})}function S4(l,n){n=n||"Layout";const r=["x","y","w","h"],t=[];if(!Array.isArray(l))throw new Error(n+" must be an array!");for(let s=0,d=l.length;s<d;s++){const b=l[s];for(let h=0;h<r.length;h++)if(typeof b[r[h]]!="number")throw new Error("VueGridLayout: "+n+"["+s+"]."+r[h]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+n+"["+s+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+n+"["+s+"].i must be a string or number!");if(t.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+n+"["+s+"].i must be unique!");if(t.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+n+"["+s+"].static must be a boolean!")}}function D4(l,n="vgl"){const r=()=>`${n}-${l}`;return{b:r,be:t=>`${r()}__${t}`,bm:t=>`${r()}--${t}`,bem:(t,s)=>`${r()}__${t}--${s}`}}function bs(l){return B4(l)}function B4(l){var n;const r=((n=l.target)==null?void 0:n.offsetParent)||document.body,t=l.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),s=l.clientX+r.scrollLeft-t.left,d=l.clientY+r.scrollTop-t.top;return{x:s,y:d}}function ks(l,n,r,t){return N4(l)?{deltaX:r-l,deltaY:t-n,lastX:l,lastY:n,x:r,y:t}:{deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}}function N4(l){return typeof l=="number"&&!Number.isNaN(l)}function T4(l,n){const r=Oc(l);let t=r[0];for(let s=1,d=r.length;s<d;s++){const b=r[s];n>l[b]&&(t=b)}return t}function zc(l,n){if(!n[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return n[l]}function A4(l,n,r,t,s,d,b){if(n[t])return mi(n[t]);let h=l;const v=Oc(r),y=v.slice(v.indexOf(t));for(let c=0,C=y.length;c<C;c++){const M=y[c];if(n[M]){h=n[M];break}}return h=mi(h||[]),gt(x4(h,{cols:d}),b)}function Oc(l){return Object.keys(l).sort((n,r)=>l[n]-l[r])}let M4="auto";function z4(){return typeof document<"u"}function xs(){return z4()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):M4}var Lt={exports:{}},O4=Lt.exports,_s;function I4(){return _s||(_s=1,function(l,n){(function(r,t){l.exports=t()})(O4,function(){function r(i,o){var p=Object.keys(i);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(i);o&&(m=m.filter(function(_){return Object.getOwnPropertyDescriptor(i,_).enumerable})),p.push.apply(p,m)}return p}function t(i){for(var o=1;o<arguments.length;o++){var p=arguments[o]!=null?arguments[o]:{};o%2?r(Object(p),!0).forEach(function(m){v(i,m,p[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(p)):r(Object(p)).forEach(function(m){Object.defineProperty(i,m,Object.getOwnPropertyDescriptor(p,m))})}return i}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(i)}function d(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function b(i,o){for(var p=0;p<o.length;p++){var m=o[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(i,Y(m.key),m)}}function h(i,o,p){return o&&b(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,o,p){return(o=Y(o))in i?Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0,writable:!0}):i[o]=p,i}function y(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),o&&C(i,o)}function c(i){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},c(i)}function C(i,o){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},C(i,o)}function M(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function L(i){var o=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 p,m=c(i);if(o){var _=c(this).constructor;p=Reflect.construct(m,arguments,_)}else p=m.apply(this,arguments);return function(I,U){if(U&&(typeof U=="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(I)}(this,p)}}function x(){return x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(i,o,p){var m=function(I,U){for(;!Object.prototype.hasOwnProperty.call(I,U)&&(I=c(I))!==null;);return I}(i,o);if(m){var _=Object.getOwnPropertyDescriptor(m,o);return _.get?_.get.call(arguments.length<3?i:p):_.value}},x.apply(this,arguments)}function Y(i){var o=function(p,m){if(typeof p!="object"||p===null)return p;var _=p[Symbol.toPrimitive];if(_!==void 0){var I=_.call(p,m);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(i,"string");return typeof o=="symbol"?o:o+""}var w=function(i){return!(!i||!i.Window)&&i instanceof i.Window},z=void 0,ee=void 0;function S(i){z=i;var o=i.document.createTextNode("");o.ownerDocument!==i.document&&typeof i.wrap=="function"&&i.wrap(o)===o&&(i=i.wrap(i)),ee=i}function $(i){return w(i)?i:(i.ownerDocument||i).defaultView||ee.window}typeof window<"u"&&window&&S(window);var T=function(i){return!!i&&s(i)==="object"},k=function(i){return typeof i=="function"},g={window:function(i){return i===ee||w(i)},docFrag:function(i){return T(i)&&i.nodeType===11},object:T,func:k,number:function(i){return typeof i=="number"},bool:function(i){return typeof i=="boolean"},string:function(i){return typeof i=="string"},element:function(i){if(!i||s(i)!=="object")return!1;var o=$(i)||ee;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?i instanceof Element||i instanceof o.Element:i.nodeType===1&&typeof i.nodeName=="string"},plainObject:function(i){return T(i)&&!!i.constructor&&/function Object\b/.test(i.constructor.toString())},array:function(i){return T(i)&&i.length!==void 0&&k(i.splice)}};function j(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.prepared.axis;p==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):p==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function q(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="drag"){var m=p.prepared.axis;if(m==="x"||m==="y"){var _=m==="x"?"y":"x";o.page[_]=p.coords.start.page[_],o.client[_]=p.coords.start.client[_],o.delta[_]=0}}}var J={id:"actions/drag",install:function(i){var o=i.actions,p=i.Interactable,m=i.defaults;p.prototype.draggable=J.draggable,o.map.drag=J,o.methodDict.drag="draggable",m.actions.drag=J.defaults},listeners:{"interactions:before-action-move":j,"interactions:action-resume":j,"interactions:action-move":q,"auto-start:check":function(i){var o=i.interaction,p=i.interactable,m=i.buttons,_=p.options.drag;if(_&&_.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(m&p.options.drag.mouseButtons)!=0))return i.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(i){return g.object(i)?(this.options.drag.enabled=i.enabled!==!1,this.setPerAction("drag",i),this.setOnEvents("drag",i),/^(xy|x|y|start)$/.test(i.lockAxis)&&(this.options.drag.lockAxis=i.lockAxis),/^(xy|x|y)$/.test(i.startAxis)&&(this.options.drag.startAxis=i.startAxis),this):g.bool(i)?(this.options.drag.enabled=i,this):this.options.drag},beforeMove:j,move:q,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(i){return i.search("drag")===0}},me=J,ze={init:function(i){var o=i;ze.document=o.document,ze.DocumentFragment=o.DocumentFragment||xe,ze.SVGElement=o.SVGElement||xe,ze.SVGSVGElement=o.SVGSVGElement||xe,ze.SVGElementInstance=o.SVGElementInstance||xe,ze.Element=o.Element||xe,ze.HTMLElement=o.HTMLElement||ze.Element,ze.Event=o.Event,ze.Touch=o.Touch||xe,ze.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function xe(){}var te=ze,be={init:function(i){var o=te.Element,p=i.navigator||{};be.supportsTouch="ontouchstart"in i||g.func(i.DocumentTouch)&&te.document instanceof i.DocumentTouch,be.supportsPointerEvent=p.pointerEnabled!==!1&&!!te.PointerEvent,be.isIOS=/iP(hone|od|ad)/.test(p.platform),be.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),be.isIe9=/MSIE 9/.test(p.userAgent),be.isOperaMobile=p.appName==="Opera"&&be.supportsTouch&&/Presto/.test(p.userAgent),be.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",be.pEventTypes=be.supportsPointerEvent?te.PointerEvent===i.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,be.wheelEvent=te.document&&"onmousewheel"in te.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Q=be;function de(i,o){if(i.contains)return i.contains(o);for(;o;){if(o===i)return!0;o=o.parentNode}return!1}function Ke(i,o){for(;g.element(i);){if(oe(i,o))return i;i=wa(i)}return null}function wa(i){var o=i.parentNode;if(g.docFrag(o)){for(;(o=o.host)&&g.docFrag(o););return o}return o}function oe(i,o){return ee!==z&&(o=o.replace(/\/deep\//g," ")),i[Q.prefixedMatchesSelector](o)}var D=function(i){return i.parentNode||i.host};function ne(i,o){for(var p,m=[],_=i;(p=D(_))&&_!==o&&p!==_.ownerDocument;)m.unshift(_),_=p;return m}function ge(i,o,p){for(;g.element(i);){if(oe(i,o))return!0;if((i=wa(i))===p)return oe(i,o)}return!1}function se(i){return i.correspondingUseElement||i}function we(i){var o=i instanceof te.SVGElement?i.getBoundingClientRect():i.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function la(i){var o,p=we(i);if(!Q.isIOS7&&p){var m={x:(o=(o=$(i))||ee).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};p.left+=m.x,p.right+=m.x,p.top+=m.y,p.bottom+=m.y}return p}function ya(i){for(var o=[];i;)o.push(i),i=wa(i);return o}function Va(i){return!!g.string(i)&&(te.document.querySelector(i),!0)}function ae(i,o){for(var p in o)i[p]=o[p];return i}function ea(i,o,p){return i==="parent"?wa(p):i==="self"?o.getRect(p):Ke(p,i)}function Re(i,o,p,m){var _=i;return g.string(_)?_=ea(_,o,p):g.func(_)&&(_=_.apply(void 0,m)),g.element(_)&&(_=la(_)),_}function ma(i){return i&&{x:"x"in i?i.x:i.left,y:"y"in i?i.y:i.top}}function Pe(i){return!i||"x"in i&&"y"in i||((i=ae({},i)).x=i.left||0,i.y=i.top||0,i.width=i.width||(i.right||0)-i.x,i.height=i.height||(i.bottom||0)-i.y),i}function Ee(i,o,p){i.left&&(o.left+=p.x),i.right&&(o.right+=p.x),i.top&&(o.top+=p.y),i.bottom&&(o.bottom+=p.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function Le(i,o,p){var m=p&&i.options[p];return ma(Re(m&&m.origin||i.options.origin,i,o,[i&&o]))||{x:0,y:0}}function We(i,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(pe){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},g.string(i)&&i.search(" ")!==-1&&(i=Ua(i)),g.array(i))return i.forEach(function(pe){return We(pe,o,p,m)}),m;if(g.object(i)&&(o=i,i=""),g.func(o)&&p(i))m[i]=m[i]||[],m[i].push(o);else if(g.array(o))for(var _=0,I=o;_<I.length;_++){var U=I[_];We(i,U,p,m)}else if(g.object(o))for(var G in o)We(Ua(G).map(function(pe){return"".concat(i).concat(pe)}),o[G],p,m);return m}function Ua(i){return i.trim().split(/ +/)}var Oa=function(i,o){return Math.sqrt(i*i+o*o)},P=["webkit","moz"];function F(i,o){i.__set||(i.__set={});var p=function(_){if(P.some(function(I){return _.indexOf(I)===0}))return 1;typeof i[_]!="function"&&_!=="__set"&&Object.defineProperty(i,_,{get:function(){return _ in i.__set?i.__set[_]:i.__set[_]=o[_]},set:function(I){i.__set[_]=I},configurable:!0})};for(var m in o)p(m);return i}function X(i,o){i.page=i.page||{},i.page.x=o.page.x,i.page.y=o.page.y,i.client=i.client||{},i.client.x=o.client.x,i.client.y=o.client.y,i.timeStamp=o.timeStamp}function R(i){i.page.x=0,i.page.y=0,i.client.x=0,i.client.y=0}function W(i){return i instanceof te.Event||i instanceof te.Touch}function Ie(i,o,p){return i=i||"page",(p=p||{}).x=o[i+"X"],p.y=o[i+"Y"],p}function Ne(i,o){return o=o||{x:0,y:0},Q.isOperaMobile&&W(i)?(Ie("screen",i,o),o.x+=window.scrollX,o.y+=window.scrollY):Ie("page",i,o),o}function Ce(i){return g.number(i.pointerId)?i.pointerId:i.identifier}function K(i,o,p){var m=o.length>1?Ve(o):o[0];Ne(m,i.page),function(_,I){I=I||{},Q.isOperaMobile&&W(_)?Ie("screen",_,I):Ie("client",_,I)}(m,i.client),i.timeStamp=p}function He(i){var o=[];return g.array(i)?(o[0]=i[0],o[1]=i[1]):i.type==="touchend"?i.touches.length===1?(o[0]=i.touches[0],o[1]=i.changedTouches[0]):i.touches.length===0&&(o[0]=i.changedTouches[0],o[1]=i.changedTouches[1]):(o[0]=i.touches[0],o[1]=i.touches[1]),o}function Ve(i){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<i.length;p++){var m=i[p];for(var _ in o)o[_]+=m[_]}for(var I in o)o[I]/=i.length;return o}function ra(i){if(!i.length)return null;var o=He(i),p=Math.min(o[0].pageX,o[1].pageX),m=Math.min(o[0].pageY,o[1].pageY),_=Math.max(o[0].pageX,o[1].pageX),I=Math.max(o[0].pageY,o[1].pageY);return{x:p,y:m,left:p,top:m,right:_,bottom:I,width:_-p,height:I-m}}function va(i,o){var p=o+"X",m=o+"Y",_=He(i),I=_[0][p]-_[1][p],U=_[0][m]-_[1][m];return Oa(I,U)}function $e(i,o){var p=o+"X",m=o+"Y",_=He(i),I=_[1][p]-_[0][p],U=_[1][m]-_[0][m];return 180*Math.atan2(U,I)/Math.PI}function ba(i){return g.string(i.pointerType)?i.pointerType:g.number(i.pointerType)?[void 0,void 0,"touch","pen","mouse"][i.pointerType]:/touch/.test(i.type||"")||i instanceof te.Touch?"touch":"mouse"}function Te(i){var o=g.func(i.composedPath)?i.composedPath():i.path;return[se(o?o[0]:i.target),se(i.currentTarget)]}var fa=function(){function i(o){d(this,i),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return h(i,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),i}();Object.defineProperty(fa.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Ue=function(i,o){for(var p=0;p<o.length;p++){var m=o[p];i.push(m)}return i},ga=function(i){return Ue([],i)},fe=function(i,o){for(var p=0;p<i.length;p++)if(o(i[p],p,i))return p;return-1},ka=function(i,o){return i[fe(i,o)]},Fe=function(i){y(p,i);var o=L(p);function p(m,_,I){var U;d(this,p),(U=o.call(this,_._interaction)).dropzone=void 0,U.dragEvent=void 0,U.relatedTarget=void 0,U.draggable=void 0,U.propagationStopped=!1,U.immediatePropagationStopped=!1;var G=I==="dragleave"?m.prev:m.cur,pe=G.element,Ae=G.dropzone;return U.type=I,U.target=pe,U.currentTarget=pe,U.dropzone=Ae,U.dragEvent=_,U.relatedTarget=_.target,U.draggable=_.interactable,U.timeStamp=_.timeStamp,U}return h(p,[{key:"reject",value:function(){var m=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 I=_.activeDrops,U=fe(I,function(pe){var Ae=pe.dropzone,he=pe.element;return Ae===m.dropzone&&he===m.target});_.activeDrops.splice(U,1);var G=new p(_,this.dragEvent,"dropdeactivate");G.dropzone=this.dropzone,G.target=this.target,this.dropzone.fire(G)}else this.dropzone.fire(new p(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p}(fa);function $a(i,o){for(var p=0,m=i.slice();p<m.length;p++){var _=m[p],I=_.dropzone,U=_.element;o.dropzone=I,o.target=U,I.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function Na(i,o){for(var p=function(I,U){for(var G=[],pe=0,Ae=I.interactables.list;pe<Ae.length;pe++){var he=Ae[pe];if(he.options.drop.enabled){var Je=he.options.drop.accept;if(!(g.element(Je)&&Je!==U||g.string(Je)&&!oe(U,Je)||g.func(Je)&&!Je({dropzone:he,draggableElement:U})))for(var Ba=0,ll=he.getAllElements();Ba<ll.length;Ba++){var Za=ll[Ba];Za!==U&&G.push({dropzone:he,element:Za,rect:he.getRect(Za)})}}}return G}(i,o),m=0;m<p.length;m++){var _=p[m];_.rect=_.dropzone.getRect(_.element)}return p}function Ye(i,o,p){for(var m=i.dropState,_=i.interactable,I=i.element,U=[],G=0,pe=m.activeDrops;G<pe.length;G++){var Ae=pe[G],he=Ae.dropzone,Je=Ae.element,Ba=Ae.rect,ll=he.dropCheck(o,p,_,I,Je,Ba);U.push(ll?Je:null)}var Za=function(il){for(var xl,sl,Al,Vl=[],Wl=0;Wl<il.length;Wl++){var Tl=il[Wl],Ul=il[xl];if(Tl&&Wl!==xl)if(Ul){var Or=D(Tl),gr=D(Ul);if(Or!==Tl.ownerDocument)if(gr!==Tl.ownerDocument)if(Or!==gr){Vl=Vl.length?Vl:ne(Ul);var jr=void 0;if(Ul instanceof te.HTMLElement&&Tl instanceof te.SVGElement&&!(Tl instanceof te.SVGSVGElement)){if(Tl===gr)continue;jr=Tl.ownerSVGElement}else jr=Tl;for(var Qr=ne(jr,Ul.ownerDocument),sn=0;Qr[sn]&&Qr[sn]===Vl[sn];)sn++;var ct=[Qr[sn-1],Qr[sn],Vl[sn]];if(ct[0])for(var Sn=ct[0].lastChild;Sn;){if(Sn===ct[1]){xl=Wl,Vl=Qr;break}if(Sn===ct[2])break;Sn=Sn.previousSibling}}else Al=Ul,(parseInt($(sl=Tl).getComputedStyle(sl).zIndex,10)||0)>=(parseInt($(Al).getComputedStyle(Al).zIndex,10)||0)&&(xl=Wl);else xl=Wl}else xl=Wl}return xl}(U);return m.activeDrops[Za]||null}function Oe(i,o,p){var m=i.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(_.activate=new Fe(m,p,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),p.type==="dragend"&&(_.deactivate=new Fe(m,p,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(_.leave=new Fe(m,p,"dragleave"),p.dragLeave=_.leave.target=m.prev.element,p.prevDropzone=_.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(_.enter=new Fe(m,p,"dragenter"),p.dragEnter=m.cur.element,p.dropzone=m.cur.dropzone)),p.type==="dragend"&&m.cur.dropzone&&(_.drop=new Fe(m,p,"drop"),p.dropzone=m.cur.dropzone,p.relatedTarget=m.cur.element),p.type==="dragmove"&&m.cur.dropzone&&(_.move=new Fe(m,p,"dropmove"),p.dropzone=m.cur.dropzone)),_}function ue(i,o){var p=i.dropState,m=p.activeDrops,_=p.cur,I=p.prev;o.leave&&I.dropzone.fire(o.leave),o.enter&&_.dropzone.fire(o.enter),o.move&&_.dropzone.fire(o.move),o.drop&&_.dropzone.fire(o.drop),o.deactivate&&$a(m,o.deactivate),p.prev.dropzone=_.dropzone,p.prev.element=_.element}function ie(i,o){var p=i.interaction,m=i.iEvent,_=i.event;if(m.type==="dragmove"||m.type==="dragend"){var I=p.dropState;o.dynamicDrop&&(I.activeDrops=Na(o,p.element));var U=m,G=Ye(p,U,_);I.rejected=I.rejected&&!!G&&G.dropzone===I.cur.dropzone&&G.element===I.cur.element,I.cur.dropzone=G&&G.dropzone,I.cur.element=G&&G.element,I.events=Oe(p,0,U)}}var na={id:"actions/drop",install:function(i){var o=i.actions,p=i.interactStatic,m=i.Interactable,_=i.defaults;i.usePlugin(me),m.prototype.dropzone=function(I){return function(U,G){if(g.object(G)){if(U.options.drop.enabled=G.enabled!==!1,G.listeners){var pe=We(G.listeners),Ae=Object.keys(pe).reduce(function(Je,Ba){return Je[/^(enter|leave)/.test(Ba)?"drag".concat(Ba):/^(activate|deactivate|move)/.test(Ba)?"drop".concat(Ba):Ba]=pe[Ba],Je},{}),he=U.options.drop.listeners;he&&U.off(he),U.on(Ae),U.options.drop.listeners=Ae}return g.func(G.ondrop)&&U.on("drop",G.ondrop),g.func(G.ondropactivate)&&U.on("dropactivate",G.ondropactivate),g.func(G.ondropdeactivate)&&U.on("dropdeactivate",G.ondropdeactivate),g.func(G.ondragenter)&&U.on("dragenter",G.ondragenter),g.func(G.ondragleave)&&U.on("dragleave",G.ondragleave),g.func(G.ondropmove)&&U.on("dropmove",G.ondropmove),/^(pointer|center)$/.test(G.overlap)?U.options.drop.overlap=G.overlap:g.number(G.overlap)&&(U.options.drop.overlap=Math.max(Math.min(1,G.overlap),0)),"accept"in G&&(U.options.drop.accept=G.accept),"checker"in G&&(U.options.drop.checker=G.checker),U}return g.bool(G)?(U.options.drop.enabled=G,U):U.options.drop}(this,I)},m.prototype.dropCheck=function(I,U,G,pe,Ae,he){return function(Je,Ba,ll,Za,il,xl,sl){var Al=!1;if(!(sl=sl||Je.getRect(xl)))return!!Je.options.drop.checker&&Je.options.drop.checker(Ba,ll,Al,Je,xl,Za,il);var Vl=Je.options.drop.overlap;if(Vl==="pointer"){var Wl=Le(Za,il,"drag"),Tl=Ne(Ba);Tl.x+=Wl.x,Tl.y+=Wl.y;var Ul=Tl.x>sl.left&&Tl.x<sl.right,Or=Tl.y>sl.top&&Tl.y<sl.bottom;Al=Ul&&Or}var gr=Za.getRect(il);if(gr&&Vl==="center"){var jr=gr.left+gr.width/2,Qr=gr.top+gr.height/2;Al=jr>=sl.left&&jr<=sl.right&&Qr>=sl.top&&Qr<=sl.bottom}return gr&&g.number(Vl)&&(Al=Math.max(0,Math.min(sl.right,gr.right)-Math.max(sl.left,gr.left))*Math.max(0,Math.min(sl.bottom,gr.bottom)-Math.max(sl.top,gr.top))/(gr.width*gr.height)>=Vl),Je.options.drop.checker&&(Al=Je.options.drop.checker(Ba,ll,Al,Je,xl,Za,il)),Al}(this,I,U,G,pe,Ae,he)},p.dynamicDrop=function(I){return g.bool(I)?(i.dynamicDrop=I,p):i.dynamicDrop},ae(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",i.dynamicDrop=!1,_.actions.drop=na.defaults},listeners:{"interactions:before-action-start":function(i){var o=i.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(i,o){var p=i.interaction,m=(i.event,i.iEvent);if(p.prepared.name==="drag"){var _=p.dropState;_.activeDrops=[],_.events={},_.activeDrops=Na(o,p.element),_.events=Oe(p,0,m),_.events.activate&&($a(_.activeDrops,_.events.activate),o.fire("actions/drop:start",{interaction:p,dragEvent:m}))}},"interactions:action-move":ie,"interactions:after-action-move":function(i,o){var p=i.interaction,m=i.iEvent;if(p.prepared.name==="drag"){var _=p.dropState;ue(p,_.events),o.fire("actions/drop:move",{interaction:p,dragEvent:m}),_.events={}}},"interactions:action-end":function(i,o){if(i.interaction.prepared.name==="drag"){var p=i.interaction,m=i.iEvent;ie(i,o),ue(p,p.dropState.events),o.fire("actions/drop:end",{interaction:p,dragEvent:m})}},"interactions:stop":function(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Na,getDrop:Ye,getDropEvents:Oe,fireDropEvents:ue,filterEventType:function(i){return i.search("drag")===0||i.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},qa=na;function rl(i){var o=i.interaction,p=i.iEvent,m=i.phase;if(o.prepared.name==="gesture"){var _=o.pointers.map(function(Ae){return Ae.pointer}),I=m==="start",U=m==="end",G=o.interactable.options.deltaSource;if(p.touches=[_[0],_[1]],I)p.distance=va(_,G),p.box=ra(_),p.scale=1,p.ds=0,p.angle=$e(_,G),p.da=0,o.gesture.startDistance=p.distance,o.gesture.startAngle=p.angle;else if(U||o.pointers.length<2){var pe=o.prevEvent;p.distance=pe.distance,p.box=pe.box,p.scale=pe.scale,p.ds=0,p.angle=pe.angle,p.da=0}else p.distance=va(_,G),p.box=ra(_),p.scale=p.distance/o.gesture.startDistance,p.angle=$e(_,G),p.ds=p.scale-o.gesture.scale,p.da=p.angle-o.gesture.angle;o.gesture.distance=p.distance,o.gesture.angle=p.angle,g.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(o.gesture.scale=p.scale)}}var Ml={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(i){var o=i.actions,p=i.Interactable,m=i.defaults;p.prototype.gesturable=function(_){return g.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):g.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},o.map.gesture=Ml,o.methodDict.gesture="gesturable",m.actions.gesture=Ml.defaults},listeners:{"interactions:action-start":rl,"interactions:action-move":rl,"interactions:action-end":rl,"interactions:new":function(i){i.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(i){if(!(i.interaction.pointers.length<2)){var o=i.interactable.options.gesture;if(o&&o.enabled)return i.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(i){return i.search("gesture")===0}},Fa=Ml;function nl(i,o,p,m,_,I,U){if(!o)return!1;if(o===!0){var G=g.number(I.width)?I.width:I.right-I.left,pe=g.number(I.height)?I.height:I.bottom-I.top;if(U=Math.min(U,Math.abs((i==="left"||i==="right"?G:pe)/2)),G<0&&(i==="left"?i="right":i==="right"&&(i="left")),pe<0&&(i==="top"?i="bottom":i==="bottom"&&(i="top")),i==="left"){var Ae=G>=0?I.left:I.right;return p.x<Ae+U}if(i==="top"){var he=pe>=0?I.top:I.bottom;return p.y<he+U}if(i==="right")return p.x>(G>=0?I.right:I.left)-U;if(i==="bottom")return p.y>(pe>=0?I.bottom:I.top)-U}return!!g.element(m)&&(g.element(o)?o===m:ge(m,o,_))}function Ca(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var m=o;p.interactable.options.resize.square?(p.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=p.resizeAxes,p.resizeAxes==="x"?m.delta.y=0:p.resizeAxes==="y"&&(m.delta.x=0))}}var aa,Se,Xa={id:"actions/resize",before:["actions/drag"],install:function(i){var o=i.actions,p=i.browser,m=i.Interactable,_=i.defaults;Xa.cursors=function(I){return I.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"}}(p),Xa.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,m.prototype.resizable=function(I){return function(U,G,pe){return g.object(G)?(U.options.resize.enabled=G.enabled!==!1,U.setPerAction("resize",G),U.setOnEvents("resize",G),g.string(G.axis)&&/^x$|^y$|^xy$/.test(G.axis)?U.options.resize.axis=G.axis:G.axis===null&&(U.options.resize.axis=pe.defaults.actions.resize.axis),g.bool(G.preserveAspectRatio)?U.options.resize.preserveAspectRatio=G.preserveAspectRatio:g.bool(G.square)&&(U.options.resize.square=G.square),U):g.bool(G)?(U.options.resize.enabled=G,U):U.options.resize}(this,I,i)},o.map.resize=Xa,o.methodDict.resize="resizable",_.actions.resize=Xa.defaults},listeners:{"interactions:new":function(i){i.interaction.resizeAxes="xy"},"interactions:action-start":function(i){(function(o){var p=o.iEvent,m=o.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var _=p,I=m.rect;m._rects={start:ae({},I),corrected:ae({},I),previous:ae({},I),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=m.prepared.edges,_.rect=m._rects.corrected,_.deltaRect=m._rects.delta}})(i),Ca(i)},"interactions:action-move":function(i){(function(o){var p=o.iEvent,m=o.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var _=p,I=m.interactable.options.resize.invert,U=I==="reposition"||I==="negate",G=m.rect,pe=m._rects,Ae=pe.start,he=pe.corrected,Je=pe.delta,Ba=pe.previous;if(ae(Ba,he),U){if(ae(he,G),I==="reposition"){if(he.top>he.bottom){var ll=he.top;he.top=he.bottom,he.bottom=ll}if(he.left>he.right){var Za=he.left;he.left=he.right,he.right=Za}}}else he.top=Math.min(G.top,Ae.bottom),he.bottom=Math.max(G.bottom,Ae.top),he.left=Math.min(G.left,Ae.right),he.right=Math.max(G.right,Ae.left);for(var il in he.width=he.right-he.left,he.height=he.bottom-he.top,he)Je[il]=he[il]-Ba[il];_.edges=m.prepared.edges,_.rect=he,_.deltaRect=Je}})(i),Ca(i)},"interactions:action-end":function(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var m=o;m.edges=p.prepared.edges,m.rect=p._rects.corrected,m.deltaRect=p._rects.delta}},"auto-start:check":function(i){var o=i.interaction,p=i.interactable,m=i.element,_=i.rect,I=i.buttons;if(_){var U=ae({},o.coords.cur.page),G=p.options.resize;if(G&&G.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(I&G.mouseButtons)!=0)){if(g.object(G.edges)){var pe={left:!1,right:!1,top:!1,bottom:!1};for(var Ae in pe)pe[Ae]=nl(Ae,G.edges[Ae],U,o._latestPointer.eventTarget,m,_,G.margin||Xa.defaultMargin);pe.left=pe.left&&!pe.right,pe.top=pe.top&&!pe.bottom,(pe.left||pe.right||pe.top||pe.bottom)&&(i.action={name:"resize",edges:pe})}else{var he=G.axis!=="y"&&U.x>_.right-Xa.defaultMargin,Je=G.axis!=="x"&&U.y>_.bottom-Xa.defaultMargin;(he||Je)&&(i.action={name:"resize",axes:(he?"x":"")+(Je?"y":"")})}return!i.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(i){var o=i.edges,p=i.axis,m=i.name,_=Xa.cursors,I=null;if(p)I=_[m+p];else if(o){for(var U="",G=0,pe=["top","bottom","left","right"];G<pe.length;G++){var Ae=pe[G];o[Ae]&&(U+=Ae)}I=_[U]}return I},filterEventType:function(i){return i.search("resize")===0},defaultMargin:null},Ya=Xa,tl={id:"actions",install:function(i){i.usePlugin(Fa),i.usePlugin(Ya),i.usePlugin(me),i.usePlugin(qa)}},Da=0,sa={request:function(i){return aa(i)},cancel:function(i){return Se(i)},init:function(i){if(aa=i.requestAnimationFrame,Se=i.cancelAnimationFrame,!aa)for(var o=["ms","moz","webkit","o"],p=0;p<o.length;p++){var m=o[p];aa=i["".concat(m,"RequestAnimationFrame")],Se=i["".concat(m,"CancelAnimationFrame")]||i["".concat(m,"CancelRequestAnimationFrame")]}aa=aa&&aa.bind(i),Se=Se&&Se.bind(i),aa||(aa=function(_){var I=Date.now(),U=Math.max(0,16-(I-Da)),G=i.setTimeout(function(){_(I+U)},U);return Da=I+U,G},Se=function(_){return clearTimeout(_)})}},Z={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(i){Z.isScrolling=!0,sa.cancel(Z.i),i.autoScroll=Z,Z.interaction=i,Z.prevTime=Z.now(),Z.i=sa.request(Z.scroll)},stop:function(){Z.isScrolling=!1,Z.interaction&&(Z.interaction.autoScroll=null),sa.cancel(Z.i)},scroll:function(){var i=Z.interaction,o=i.interactable,p=i.element,m=i.prepared.name,_=o.options[m].autoScroll,I=Ea(_.container,o,p),U=Z.now(),G=(U-Z.prevTime)/1e3,pe=_.speed*G;if(pe>=1){var Ae={x:Z.x*pe,y:Z.y*pe};if(Ae.x||Ae.y){var he=Pa(I);g.window(I)?I.scrollBy(Ae.x,Ae.y):I&&(I.scrollLeft+=Ae.x,I.scrollTop+=Ae.y);var Je=Pa(I),Ba={x:Je.x-he.x,y:Je.y-he.y};(Ba.x||Ba.y)&&o.fire({type:"autoscroll",target:p,interactable:o,delta:Ba,interaction:i,container:I})}Z.prevTime=U}Z.isScrolling&&(sa.cancel(Z.i),Z.i=sa.request(Z.scroll))},check:function(i,o){var p;return(p=i.options[o].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(i){var o=i.interaction,p=i.pointer;if(o.interacting()&&Z.check(o.interactable,o.prepared.name))if(o.simulation)Z.x=Z.y=0;else{var m,_,I,U,G=o.interactable,pe=o.element,Ae=o.prepared.name,he=G.options[Ae].autoScroll,Je=Ea(he.container,G,pe);if(g.window(Je))U=p.clientX<Z.margin,m=p.clientY<Z.margin,_=p.clientX>Je.innerWidth-Z.margin,I=p.clientY>Je.innerHeight-Z.margin;else{var Ba=we(Je);U=p.clientX<Ba.left+Z.margin,m=p.clientY<Ba.top+Z.margin,_=p.clientX>Ba.right-Z.margin,I=p.clientY>Ba.bottom-Z.margin}Z.x=_?1:U?-1:0,Z.y=I?1:m?-1:0,Z.isScrolling||(Z.margin=he.margin,Z.speed=he.speed,Z.start(o))}}};function Ea(i,o,p){return(g.string(i)?ea(i,o,p):i)||$(p)}function Pa(i){return g.window(i)&&(i=window.document.body),{x:i.scrollLeft,y:i.scrollTop}}var ul={id:"auto-scroll",install:function(i){var o=i.defaults,p=i.actions;i.autoScroll=Z,Z.now=function(){return i.now()},p.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=Z.defaults},listeners:{"interactions:new":function(i){i.interaction.autoScroll=null},"interactions:destroy":function(i){i.interaction.autoScroll=null,Z.stop(),Z.interaction&&(Z.interaction=null)},"interactions:stop":Z.stop,"interactions:action-move":function(i){return Z.onInteractionMove(i)}}},ol=ul;function xa(i,o){var p=!1;return function(){return p||(ee.console.warn(o),p=!0),i.apply(this,arguments)}}function pa(i,o){return i.name=o.name,i.axis=o.axis,i.edges=o.edges,i}function Aa(i){return g.bool(i)?(this.options.styleCursor=i,this):i===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Ze(i){return g.func(i)?(this.options.actionChecker=i,this):i===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ha={id:"auto-start/interactableMethods",install:function(i){var o=i.Interactable;o.prototype.getAction=function(p,m,_,I){var U=function(G,pe,Ae,he,Je){var Ba=G.getRect(he),ll=pe.buttons||{0:1,1:4,3:8,4:16}[pe.button],Za={action:null,interactable:G,interaction:Ae,element:he,rect:Ba,buttons:ll};return Je.fire("auto-start:check",Za),Za.action}(this,m,_,I,i);return this.options.actionChecker?this.options.actionChecker(p,m,U,this,I,_):U},o.prototype.ignoreFrom=xa(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=xa(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=Ze,o.prototype.styleCursor=Aa}};function La(i,o,p,m,_){return o.testIgnoreAllow(o.options[i.name],p,m)&&o.options[i.name].enabled&&Sl(o,p,i,_)?i:null}function Ja(i,o,p,m,_,I,U){for(var G=0,pe=m.length;G<pe;G++){var Ae=m[G],he=_[G],Je=Ae.getAction(o,p,i,he);if(Je){var Ba=La(Je,Ae,he,I,U);if(Ba)return{action:Ba,interactable:Ae,element:he}}}return{action:null,interactable:null,element:null}}function Ol(i,o,p,m,_){var I=[],U=[],G=m;function pe(he){I.push(he),U.push(G)}for(;g.element(G);){I=[],U=[],_.interactables.forEachMatch(G,pe);var Ae=Ja(i,o,p,I,U,m,_);if(Ae.action&&!Ae.interactable.options[Ae.action.name].manualStart)return Ae;G=wa(G)}return{action:null,interactable:null,element:null}}function El(i,o,p){var m=o.action,_=o.interactable,I=o.element;m=m||{name:null},i.interactable=_,i.element=I,pa(i.prepared,m),i.rect=_&&m.name?_.getRect(I):null,cl(i,p),p.fire("autoStart:prepared",{interaction:i})}function Sl(i,o,p,m){var _=i.options,I=_[p.name].max,U=_[p.name].maxPerElement,G=m.autoStart.maxInteractions,pe=0,Ae=0,he=0;if(!(I&&U&&G))return!1;for(var Je=0,Ba=m.interactions.list;Je<Ba.length;Je++){var ll=Ba[Je],Za=ll.prepared.name;if(ll.interacting()&&(++pe>=G||ll.interactable===i&&((Ae+=Za===p.name?1:0)>=I||ll.element===o&&(he++,Za===p.name&&he>=U))))return!1}return G>0}function wl(i,o){return g.number(i)?(o.autoStart.maxInteractions=i,this):o.autoStart.maxInteractions}function fl(i,o,p){var m=p.autoStart.cursorElement;m&&m!==i&&(m.style.cursor=""),i.ownerDocument.documentElement.style.cursor=o,i.style.cursor=o,p.autoStart.cursorElement=o?i:null}function cl(i,o){var p=i.interactable,m=i.element,_=i.prepared;if(i.pointerType==="mouse"&&p&&p.options.styleCursor){var I="";if(_.name){var U=p.options[_.name].cursorChecker;I=g.func(U)?U(_,p,m,i._interacting):o.actions.map[_.name].getCursor(_)}fl(i.element,I||"",o)}else o.autoStart.cursorElement&&fl(o.autoStart.cursorElement,"",o)}var kl={id:"auto-start/base",before:["actions"],install:function(i){var o=i.interactStatic,p=i.defaults;i.usePlugin(ha),p.base.actionChecker=null,p.base.styleCursor=!0,ae(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(m){return wl(m,i)},i.autoStart={maxInteractions:1/0,withinInteractionLimit:Sl,cursorElement:null}},listeners:{"interactions:down":function(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget;p.interacting()||El(p,Ol(p,m,_,I,o),o)},"interactions:move":function(i,o){(function(p,m){var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||El(_,Ol(_,I,U,G,m),m)})(i,o),function(p,m){var _=p.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){m.fire("autoStart:before-start",p);var I=_.interactable,U=_.prepared.name;U&&I&&(I.options[U].manualStart||!Sl(I,_.element,_.prepared,m)?_.stop():(_.start(_.prepared,I,_.element),cl(_,m)))}}(i,o)},"interactions:stop":function(i,o){var p=i.interaction,m=p.interactable;m&&m.options.styleCursor&&fl(p.element,"",o)}},maxInteractions:wl,withinInteractionLimit:Sl,validateAction:La},Dl=kl,$l={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(i,o){var p=i.interaction,m=i.eventTarget,_=i.dx,I=i.dy;if(p.prepared.name==="drag"){var U=Math.abs(_),G=Math.abs(I),pe=p.interactable.options.drag,Ae=pe.startAxis,he=U>G?"x":U<G?"y":"xy";if(p.prepared.axis=pe.lockAxis==="start"?he[0]:pe.lockAxis,he!=="xy"&&Ae!=="xy"&&Ae!==he){p.prepared.name=null;for(var Je=m,Ba=function(Za){if(Za!==p.interactable){var il=p.interactable.options.drag;if(!il.manualStart&&Za.testIgnoreAllow(il,Je,m)){var xl=Za.getAction(p.downPointer,p.downEvent,p,Je);if(xl&&xl.name==="drag"&&function(sl,Al){if(!Al)return!1;var Vl=Al.options.drag.startAxis;return sl==="xy"||Vl==="xy"||Vl===sl}(he,Za)&&Dl.validateAction(xl,Za,Je,m,o))return Za}}};g.element(Je);){var ll=o.interactables.forEachMatch(Je,Ba);if(ll){p.prepared.name="drag",p.interactable=ll,p.element=Je;break}Je=wa(Je)}}}}}};function or(i){var o=i.prepared&&i.prepared.name;if(!o)return null;var p=i.interactable.options;return p[o].hold||p[o].delay}var Cr={id:"auto-start/hold",install:function(i){var o=i.defaults;i.usePlugin(Dl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(i){i.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(i){var o=i.interaction,p=or(o);p>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},p))},"interactions:move":function(i){var o=i.interaction,p=i.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!p&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(i){var o=i.interaction;or(o)>0&&(o.prepared.name=null)}},getHoldDuration:or},Gr=Cr,Xr={id:"auto-start",install:function(i){i.usePlugin(Dl),i.usePlugin(Gr),i.usePlugin($l)}},Rr=function(i){return/^(always|never|auto)$/.test(i)?(this.options.preventDefault=i,this):g.bool(i)?(this.options.preventDefault=i?"always":"never",this):this.options.preventDefault};function nn(i){var o=i.interaction,p=i.event;o.interactable&&o.interactable.checkAndPreventDefault(p)}var qr={id:"core/interactablePreventDefault",install:function(i){var o=i.Interactable;o.prototype.preventDefault=Rr,o.prototype.checkAndPreventDefault=function(p){return function(m,_,I){var U=m.options.preventDefault;if(U!=="never")if(U!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(I.type)){var G=$(I.target).document,pe=_.getDocOptions(G);if(!pe||!pe.events||pe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(I.type)||g.element(I.target)&&oe(I.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||I.preventDefault()}else I.preventDefault()}(this,i,p)},i.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var m=0,_=i.interactions.list;m<_.length;m++){var I=_[m];if(I.element&&(I.element===p.target||de(I.element,p.target)))return void I.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce(function(i,o){return i["interactions:".concat(o)]=nn,i},{})};function rr(i,o){if(o.phaselessTypes[i])return!0;for(var p in o.map)if(i.indexOf(p)===0&&i.substr(p.length)in o.phases)return!0;return!1}function Nr(i){var o={};for(var p in i){var m=i[p];g.plainObject(m)?o[p]=Nr(m):g.array(m)?o[p]=ga(m):o[p]=m}return o}var Fr=function(){function i(o){d(this,i),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=o,this.result=_n(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(i,[{key:"start",value:function(o,p){var m,_,I=o.phase,U=this.interaction,G=function(Ae){var he=Ae.interactable.options[Ae.prepared.name],Je=he.modifiers;return Je&&Je.length?Je:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ba){var ll=he[Ba];return ll&&ll.enabled&&{options:ll,methods:ll._methods}}).filter(function(Ba){return!!Ba})}(U);this.prepareStates(G),this.startEdges=ae({},U.edges),this.edges=ae({},this.startEdges),this.startOffset=(m=U.rect,_=p,m?{left:_.x-m.left,top:_.y-m.top,right:m.right-_.x,bottom:m.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var pe=this.fillArg({phase:I,pageCoords:p,preEnd:!1});return this.result=_n(),this.startAll(pe),this.result=this.setAll(pe)}},{key:"fillArg",value:function(o){var p=this.interaction;return o.interaction=p,o.interactable=p.interactable,o.element=p.element,o.rect||(o.rect=p.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var p=0,m=this.states;p<m.length;p++){var _=m[p];_.methods.start&&(o.state=_,_.methods.start(o))}}},{key:"setAll",value:function(o){var p=o.phase,m=o.preEnd,_=o.skipModifiers,I=o.rect,U=o.edges;o.coords=ae({},o.pageCoords),o.rect=ae({},I),o.edges=ae({},U);for(var G=_?this.states.slice(_):this.states,pe=_n(o.coords,o.rect),Ae=0;Ae<G.length;Ae++){var he,Je=G[Ae],Ba=Je.options,ll=ae({},o.coords),Za=null;(he=Je.methods)!=null&&he.set&&this.shouldDo(Ba,m,p)&&(o.state=Je,Za=Je.methods.set(o),Ee(o.edges,o.rect,{x:o.coords.x-ll.x,y:o.coords.y-ll.y})),pe.eventProps.push(Za)}ae(this.edges,o.edges),pe.delta.x=o.coords.x-o.pageCoords.x,pe.delta.y=o.coords.y-o.pageCoords.y,pe.rectDelta.left=o.rect.left-I.left,pe.rectDelta.right=o.rect.right-I.right,pe.rectDelta.top=o.rect.top-I.top,pe.rectDelta.bottom=o.rect.bottom-I.bottom;var il=this.result.coords,xl=this.result.rect;if(il&&xl){var sl=pe.rect.left!==xl.left||pe.rect.right!==xl.right||pe.rect.top!==xl.top||pe.rect.bottom!==xl.bottom;pe.changed=sl||il.x!==pe.coords.x||il.y!==pe.coords.y}return pe}},{key:"applyToInteraction",value:function(o){var p=this.interaction,m=o.phase,_=p.coords.cur,I=p.coords.start,U=this.result,G=this.startDelta,pe=U.delta;m==="start"&&ae(this.startDelta,U.delta);for(var Ae=0,he=[[I,G],[_,pe]];Ae<he.length;Ae++){var Je=he[Ae],Ba=Je[0],ll=Je[1];Ba.page.x+=ll.x,Ba.page.y+=ll.y,Ba.client.x+=ll.x,Ba.client.y+=ll.y}var Za=this.result.rectDelta,il=o.rect||p.rect;il.left+=Za.left,il.right+=Za.right,il.top+=Za.top,il.bottom+=Za.bottom,il.width=il.right-il.left,il.height=il.bottom-il.top}},{key:"setAndApply",value:function(o){var p=this.interaction,m=o.phase,_=o.preEnd,I=o.skipModifiers,U=this.setAll(this.fillArg({preEnd:_,phase:m,pageCoords:o.modifiedCoords||p.coords.cur.page}));if(this.result=U,!U.changed&&(!I||I<this.states.length)&&p.interacting())return!1;if(o.modifiedCoords){var G=p.coords.cur.page,pe={x:o.modifiedCoords.x-G.x,y:o.modifiedCoords.y-G.y};U.coords.x+=pe.x,U.coords.y+=pe.y,U.delta.x+=pe.x,U.delta.y+=pe.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var p=o.interaction,m=o.event,_=this.states;if(_&&_.length){for(var I=!1,U=0;U<_.length;U++){var G=_[U];o.state=G;var pe=G.options,Ae=G.methods,he=Ae.beforeEnd&&Ae.beforeEnd(o);if(he)return this.endResult=he,!1;I=I||!I&&this.shouldDo(pe,!0,o.phase,!0)}I&&p.move({event:m,preEnd:!0})}}},{key:"stop",value:function(o){var p=o.interaction;if(this.states&&this.states.length){var m=ae({states:this.states,interactable:p.interactable,element:p.element,rect:null},o);this.fillArg(m);for(var _=0,I=this.states;_<I.length;_++){var U=I[_];m.state=U,U.methods.stop&&U.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var p=0;p<o.length;p++){var m=o[p],_=m.options,I=m.methods,U=m.name;this.states.push({options:_,methods:I,index:p,name:U})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var p=o.interaction,m=p.coords,_=p.rect,I=p.modification;if(I.result){for(var U=I.startDelta,G=I.result,pe=G.delta,Ae=G.rectDelta,he=0,Je=[[m.start,U],[m.cur,pe]];he<Je.length;he++){var Ba=Je[he],ll=Ba[0],Za=Ba[1];ll.page.x-=Za.x,ll.page.y-=Za.y,ll.client.x-=Za.x,ll.client.y-=Za.y}_.left-=Ae.left,_.right-=Ae.right,_.top-=Ae.top,_.bottom-=Ae.bottom}}},{key:"shouldDo",value:function(o,p,m,_){return!(!o||o.enabled===!1||_&&!o.endOnly||o.endOnly&&!p||m==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(p){return Nr(p)}),this.result=_n(ae({},o.result.coords),ae({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),i}();function _n(i,o){return{rect:o,coords:i,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Ar(i,o){var p=i.defaults,m={start:i.start,set:i.set,beforeEnd:i.beforeEnd,stop:i.stop},_=function(I){var U=I||{};for(var G in U.enabled=U.enabled!==!1,p)G in U||(U[G]=p[G]);var pe={options:U,methods:m,name:o,enable:function(){return U.enabled=!0,pe},disable:function(){return U.enabled=!1,pe}};return pe};return o&&typeof o=="string"&&(_._defaults=p,_._methods=m),_}function hn(i){var o=i.iEvent,p=i.interaction.modification.result;p&&(o.modifiers=p.eventProps)}var $r={id:"modifiers/base",before:["actions"],install:function(i){i.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(i){var o=i.interaction;o.modification=new Fr(o)},"interactions:before-action-start":function(i){var o=i.interaction,p=i.interaction.modification;p.start(i,o.coords.start.page),o.edges=p.edges,p.applyToInteraction(i)},"interactions:before-action-move":function(i){var o=i.interaction,p=o.modification,m=p.setAndApply(i);return o.edges=p.edges,m},"interactions:before-action-end":function(i){var o=i.interaction,p=o.modification,m=p.beforeEnd(i);return o.edges=p.startEdges,m},"interactions:action-start":hn,"interactions:action-move":hn,"interactions:action-end":hn,"interactions:after-action-start":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-move":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:stop":function(i){return i.interaction.modification.stop(i)}}},ir=$r,Pn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},tn=function(i){y(p,i);var o=L(p);function p(m,_,I,U,G,pe,Ae){var he;d(this,p),(he=o.call(this,m)).relatedTarget=null,he.screenX=void 0,he.screenY=void 0,he.button=void 0,he.buttons=void 0,he.ctrlKey=void 0,he.shiftKey=void 0,he.altKey=void 0,he.metaKey=void 0,he.page=void 0,he.client=void 0,he.delta=void 0,he.rect=void 0,he.x0=void 0,he.y0=void 0,he.t0=void 0,he.dt=void 0,he.duration=void 0,he.clientX0=void 0,he.clientY0=void 0,he.velocity=void 0,he.speed=void 0,he.swipe=void 0,he.axes=void 0,he.preEnd=void 0,G=G||m.element;var Je=m.interactable,Ba=(Je&&Je.options||Pn).deltaSource,ll=Le(Je,G,I),Za=U==="start",il=U==="end",xl=Za?M(he):m.prevEvent,sl=Za?m.coords.start:il?{page:xl.page,client:xl.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return he.page=ae({},sl.page),he.client=ae({},sl.client),he.rect=ae({},m.rect),he.timeStamp=sl.timeStamp,il||(he.page.x-=ll.x,he.page.y-=ll.y,he.client.x-=ll.x,he.client.y-=ll.y),he.ctrlKey=_.ctrlKey,he.altKey=_.altKey,he.shiftKey=_.shiftKey,he.metaKey=_.metaKey,he.button=_.button,he.buttons=_.buttons,he.target=G,he.currentTarget=G,he.preEnd=pe,he.type=Ae||I+(U||""),he.interactable=Je,he.t0=Za?m.pointers[m.pointers.length-1].downTime:xl.t0,he.x0=m.coords.start.page.x-ll.x,he.y0=m.coords.start.page.y-ll.y,he.clientX0=m.coords.start.client.x-ll.x,he.clientY0=m.coords.start.client.y-ll.y,he.delta=Za||il?{x:0,y:0}:{x:he[Ba].x-xl[Ba].x,y:he[Ba].y-xl[Ba].y},he.dt=m.coords.delta.timeStamp,he.duration=he.timeStamp-he.t0,he.velocity=ae({},m.coords.velocity[Ba]),he.speed=Oa(he.velocity.x,he.velocity.y),he.swipe=il||U==="inertiastart"?he.getSwipe():null,he}return h(p,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var I=112.5<=_&&_<247.5,U=202.5<=_&&_<337.5;return{up:U,down:!U&&22.5<=_&&_<157.5,left:I,right:!I&&(292.5<=_||_<67.5),angle:_,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(fa);Object.defineProperties(tn.prototype,{pageX:{get:function(){return this.page.x},set:function(i){this.page.x=i}},pageY:{get:function(){return this.page.y},set:function(i){this.page.y=i}},clientX:{get:function(){return this.client.x},set:function(i){this.client.x=i}},clientY:{get:function(){return this.client.y},set:function(i){this.client.y=i}},dx:{get:function(){return this.delta.x},set:function(i){this.delta.x=i}},dy:{get:function(){return this.delta.y},set:function(i){this.delta.y=i}},velocityX:{get:function(){return this.velocity.x},set:function(i){this.velocity.x=i}},velocityY:{get:function(){return this.velocity.y},set:function(i){this.velocity.y=i}}});var vn=h(function i(o,p,m,_,I){d(this,i),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=o,this.pointer=p,this.event=m,this.downTime=_,this.downTarget=I}),rt=function(i){return i.interactable="",i.element="",i.prepared="",i.pointerIsDown="",i.pointerWasMoved="",i._proxy="",i}({}),Fn=function(i){return i.start="",i.move="",i.end="",i.stop="",i.interacting="",i}({}),An=0,mn=function(){function i(o){var p=this,m=o.pointerType,_=o.scopeFire;d(this,i),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=xa(function(he){this.move(he)},"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=m;var I=this;this._proxy={};var U=function(he){Object.defineProperty(p._proxy,he,{get:function(){return I[he]}})};for(var G in rt)U(G);var pe=function(he){Object.defineProperty(p._proxy,he,{value:function(){return I[he].apply(I,arguments)}})};for(var Ae in Fn)pe(Ae);this._scopeFire("interactions:new",{interaction:this})}return h(i,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,p,m){var _=this.updatePointer(o,p,m,!0),I=this.pointers[_];this._scopeFire("interactions:down",{pointer:o,event:p,eventTarget:m,pointerIndex:_,pointerInfo:I,type:"down",interaction:this})}},{key:"start",value:function(o,p,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!p.options[o.name].enabled)&&(pa(this.prepared,o),this.interactable=p,this.element=m,this.rect=p.getRect(m),this.edges=this.prepared.edges?ae({},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(o,p,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,p,m,!1);var _,I,U=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,I=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Oa(_,I)>this.pointerMoveTolerance);var G,pe,Ae,he=this.getPointerIndex(o),Je={pointer:o,pointerIndex:he,pointerInfo:this.pointers[he],event:p,type:"move",eventTarget:m,dx:_,dy:I,duplicate:U,interaction:this};U||(G=this.coords.velocity,pe=this.coords.delta,Ae=Math.max(pe.timeStamp/1e3,.001),G.page.x=pe.page.x/Ae,G.page.y=pe.page.y/Ae,G.client.x=pe.client.x/Ae,G.client.y=pe.client.y/Ae,G.timeStamp=Ae),this._scopeFire("interactions:move",Je),U||this.simulation||(this.interacting()&&(Je.type=null,this.move(Je)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||R(this.coords.delta),(o=ae({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,p,m,_){var I=this.getPointerIndex(o);I===-1&&(I=this.updatePointer(o,p,m,!1));var U=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(U),{pointer:o,pointerIndex:I,pointerInfo:this.pointers[I],event:p,eventTarget:m,type:U,curEventTarget:_,interaction:this}),this.simulation||this.end(p),this.removePointer(o,p)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var p;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:o,interaction:this,phase:"end"})),this._ending=!1,p===!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(o){var p=Ce(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:fe(this.pointers,function(m){return m.id===p})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,p,m,_){var I,U,G,pe=Ce(o),Ae=this.getPointerIndex(o),he=this.pointers[Ae];return _=_!==!1&&(_||/(down|start)$/i.test(p.type)),he?he.pointer=o:(he=new vn(pe,o,p,null,null),Ae=this.pointers.length,this.pointers.push(he)),K(this.coords.cur,this.pointers.map(function(Je){return Je.pointer}),this._now()),I=this.coords.delta,U=this.coords.prev,G=this.coords.cur,I.page.x=G.page.x-U.page.x,I.page.y=G.page.y-U.page.y,I.client.x=G.client.x-U.client.x,I.client.y=G.client.y-U.client.y,I.timeStamp=G.timeStamp-U.timeStamp,_&&(this.pointerIsDown=!0,he.downTime=this.coords.cur.timeStamp,he.downTarget=m,F(this.downPointer,o),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(o,p,m),this._scopeFire("interactions:update-pointer",{pointer:o,event:p,eventTarget:m,down:_,pointerInfo:he,pointerIndex:Ae,interaction:this}),Ae}},{key:"removePointer",value:function(o,p){var m=this.getPointerIndex(o);if(m!==-1){var _=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:o,event:p,eventTarget:null,pointerIndex:m,pointerInfo:_,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,p,m){this._latestPointer.pointer=o,this._latestPointer.event=p,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,p,m,_){return new tn(this,o,this.prepared.name,p,this.element,m,_)}},{key:"_fireEvent",value:function(o){var p;(p=this.interactable)==null||p.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var p=o.event,m=o.phase,_=o.preEnd,I=o.type,U=this.rect;if(U&&m==="move"&&(Ee(this.edges,U,this.coords.delta[this.interactable.options.deltaSource]),U.width=U.right-U.left,U.height=U.bottom-U.top),this._scopeFire("interactions:before-action-".concat(m),o)===!1)return!1;var G=o.iEvent=this._createPreparedEvent(p,m,_,I);return this._scopeFire("interactions:action-".concat(m),o),m==="start"&&(this.prevEvent=G),this._fireEvent(G),this._scopeFire("interactions:after-action-".concat(m),o),!0}},{key:"_now",value:function(){return Date.now()}}]),i}();function Zl(i){xr(i.interaction)}function xr(i){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(i))return!1;var o=i.offset.pending;return ql(i.coords.cur,o),ql(i.coords.delta,o),Ee(i.edges,i.rect,o),o.x=0,o.y=0,!0}function Fl(i){var o=i.x,p=i.y;this.offset.pending.x+=o,this.offset.pending.y+=p,this.offset.total.x+=o,this.offset.total.y+=p}function ql(i,o){var p=i.page,m=i.client,_=o.x,I=o.y;p.x+=_,p.y+=I,m.x+=_,m.y+=I}Fn.offsetBy="";var Ll={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(i){i.Interaction.prototype.offsetBy=Fl},listeners:{"interactions:new":function(i){i.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(i){return function(o){o.pointerIsDown&&(ql(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(i.interaction)},"interactions:before-action-start":Zl,"interactions:before-action-move":Zl,"interactions:before-action-end":function(i){var o=i.interaction;if(xr(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(i){var o=i.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},dr=Ll,ar=function(){function i(o){d(this,i),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=o}return h(i,[{key:"start",value:function(o){var p=this.interaction,m=Hl(p);if(!m||!m.enabled)return!1;var _=p.coords.velocity.client,I=Oa(_.x,_.y),U=this.modification||(this.modification=new Fr(p));if(U.copyFrom(p.modification),this.t0=p._now(),this.allowResume=m.allowResume,this.v0=I,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=U.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&I>m.minSpeed&&I>m.endSpeed)this.startInertia();else{if(U.result=U.setAll(this.modifierArg),!U.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:o,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var o=this,p=this.interaction.coords.velocity.client,m=Hl(this.interaction),_=m.resistance,I=-Math.log(m.endSpeed/this.v0)/_;this.targetOffset={x:(p.x-I)/_,y:(p.y-I)/_},this.te=I,this.lambda_v0=_/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var U=this.modification,G=this.modifierArg;G.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},U.result=U.setAll(G),U.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+U.result.delta.x,y:this.targetOffset.y+U.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var p=this;this.timeout=sa.request(function(){p.active&&o()})}},{key:"inertiaTick",value:function(){var o,p,m,_,I,U,G,pe=this,Ae=this.interaction,he=Hl(Ae).resistance,Je=(Ae._now()-this.t0)/1e3;if(Je<this.te){var Ba,ll=1-(Math.exp(-he*Je)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,p=0,m=this.targetOffset.x,_=this.targetOffset.y,I=this.modifiedOffset.x,U=this.modifiedOffset.y,Ba={x:Mr(G=ll,o,m,I),y:Mr(G,p,_,U)}):Ba={x:this.targetOffset.x*ll,y:this.targetOffset.y*ll};var Za={x:Ba.x-this.currentOffset.x,y:Ba.y-this.currentOffset.y};this.currentOffset.x+=Za.x,this.currentOffset.y+=Za.y,Ae.offsetBy(Za),Ae.move(),this.onNextFrame(function(){return pe.inertiaTick()})}else Ae.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,p=this.interaction,m=p._now()-this.t0,_=Hl(p).smoothEndDuration;if(m<_){var I={x:yn(m,0,this.targetOffset.x,_),y:yn(m,0,this.targetOffset.y,_)},U={x:I.x-this.currentOffset.x,y:I.y-this.currentOffset.y};this.currentOffset.x+=U.x,this.currentOffset.y+=U.y,p.offsetBy(U),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var p=o.pointer,m=o.event,_=o.eventTarget,I=this.interaction;I.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),I.updatePointer(p,m,_,!0),I._doPhase({interaction:I,event:m,phase:"resume"}),X(I.coords.prev,I.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,sa.cancel(this.timeout)}}]),i}();function Hl(i){var o=i.interactable,p=i.prepared;return o&&o.options&&p.name&&o.options[p.name].inertia}var Tr={id:"inertia",before:["modifiers","actions"],install:function(i){var o=i.defaults;i.usePlugin(dr),i.usePlugin(ir),i.actions.phases.inertiastart=!0,i.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(i){var o=i.interaction;o.inertia=new ar(o)},"interactions:before-action-end":function(i){var o=i.interaction,p=i.event;return(!o._interacting||o.simulation||!o.inertia.start(p))&&null},"interactions:down":function(i){var o=i.interaction,p=i.eventTarget,m=o.inertia;if(m.active)for(var _=p;g.element(_);){if(_===o.element){m.resume(i);break}_=wa(_)}},"interactions:stop":function(i){var o=i.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(i){var o=i.interaction.modification;o.stop(i),o.start(i,i.interaction.coords.cur.page),o.applyToInteraction(i)},"interactions:before-action-inertiastart":function(i){return i.interaction.modification.setAndApply(i)},"interactions:action-resume":hn,"interactions:action-inertiastart":hn,"interactions:after-action-inertiastart":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-resume":function(i){return i.interaction.modification.restoreInteractionCoords(i)}}};function Mr(i,o,p,m){var _=1-i;return _*_*o+2*_*i*p+i*i*m}function yn(i,o,p,m){return-p*(i/=m)*(i-2)+o}var wn=Tr;function dn(i,o){for(var p=0;p<o.length;p++){var m=o[p];if(i.immediatePropagationStopped)break;m(i)}}var jn=function(){function i(o){d(this,i),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ae({},o||{})}return h(i,[{key:"fire",value:function(o){var p,m=this.global;(p=this.types[o.type])&&dn(o,p),!o.propagationStopped&&m&&(p=m[o.type])&&dn(o,p)}},{key:"on",value:function(o,p){var m=We(o,p);for(o in m)this.types[o]=Ue(this.types[o]||[],m[o])}},{key:"off",value:function(o,p){var m=We(o,p);for(o in m){var _=this.types[o];if(_&&_.length)for(var I=0,U=m[o];I<U.length;I++){var G=U[I],pe=_.indexOf(G);pe!==-1&&_.splice(pe,1)}}}},{key:"getRect",value:function(o){return null}}]),i}(),Mn=function(){function i(o){d(this,i),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,F(this,o)}return h(i,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),i}();function pn(i){return g.object(i)?{capture:!!i.capture,passive:!!i.passive}:{capture:!!i,passive:!1}}function Cn(i,o){return i===o||(typeof i=="boolean"?!!o.capture===i&&!o.passive:!!i.capture==!!o.capture&&!!i.passive==!!o.passive)}var zn={id:"events",install:function(i){var o,p=[],m={},_=[],I={add:U,remove:G,addDelegate:function(he,Je,Ba,ll,Za){var il=pn(Za);if(!m[Ba]){m[Ba]=[];for(var xl=0;xl<_.length;xl++){var sl=_[xl];U(sl,Ba,pe),U(sl,Ba,Ae,!0)}}var Al=m[Ba],Vl=ka(Al,function(Wl){return Wl.selector===he&&Wl.context===Je});Vl||(Vl={selector:he,context:Je,listeners:[]},Al.push(Vl)),Vl.listeners.push({func:ll,options:il})},removeDelegate:function(he,Je,Ba,ll,Za){var il,xl=pn(Za),sl=m[Ba],Al=!1;if(sl)for(il=sl.length-1;il>=0;il--){var Vl=sl[il];if(Vl.selector===he&&Vl.context===Je){for(var Wl=Vl.listeners,Tl=Wl.length-1;Tl>=0;Tl--){var Ul=Wl[Tl];if(Ul.func===ll&&Cn(Ul.options,xl)){Wl.splice(Tl,1),Wl.length||(sl.splice(il,1),G(Je,Ba,pe),G(Je,Ba,Ae,!0)),Al=!0;break}}if(Al)break}}},delegateListener:pe,delegateUseCapture:Ae,delegatedEvents:m,documents:_,targets:p,supportsOptions:!1,supportsPassive:!1};function U(he,Je,Ba,ll){if(he.addEventListener){var Za=pn(ll),il=ka(p,function(xl){return xl.eventTarget===he});il||(il={eventTarget:he,events:{}},p.push(il)),il.events[Je]||(il.events[Je]=[]),ka(il.events[Je],function(xl){return xl.func===Ba&&Cn(xl.options,Za)})||(he.addEventListener(Je,Ba,I.supportsOptions?Za:Za.capture),il.events[Je].push({func:Ba,options:Za}))}}function G(he,Je,Ba,ll){if(he.addEventListener&&he.removeEventListener){var Za=fe(p,function(Or){return Or.eventTarget===he}),il=p[Za];if(il&&il.events)if(Je!=="all"){var xl=!1,sl=il.events[Je];if(sl){if(Ba==="all"){for(var Al=sl.length-1;Al>=0;Al--){var Vl=sl[Al];G(he,Je,Vl.func,Vl.options)}return}for(var Wl=pn(ll),Tl=0;Tl<sl.length;Tl++){var Ul=sl[Tl];if(Ul.func===Ba&&Cn(Ul.options,Wl)){he.removeEventListener(Je,Ba,I.supportsOptions?Wl:Wl.capture),sl.splice(Tl,1),sl.length===0&&(delete il.events[Je],xl=!0);break}}}xl&&!Object.keys(il.events).length&&p.splice(Za,1)}else for(Je in il.events)il.events.hasOwnProperty(Je)&&G(he,Je,"all")}}function pe(he,Je){for(var Ba=pn(Je),ll=new Mn(he),Za=m[he.type],il=Te(he)[0],xl=il;g.element(xl);){for(var sl=0;sl<Za.length;sl++){var Al=Za[sl],Vl=Al.selector,Wl=Al.context;if(oe(xl,Vl)&&de(Wl,il)&&de(Wl,xl)){var Tl=Al.listeners;ll.currentTarget=xl;for(var Ul=0;Ul<Tl.length;Ul++){var Or=Tl[Ul];Cn(Or.options,Ba)&&Or.func(ll)}}}xl=wa(xl)}}function Ae(he){return pe(he,!0)}return(o=i.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return I.supportsOptions=!0},get passive(){return I.supportsPassive=!0}}),i.events=I,I}},Kr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(i){for(var o=0,p=Kr.methodOrder;o<p.length;o++){var m=p[o],_=Kr[m](i);if(_)return _}return null},simulationResume:function(i){var o=i.pointerType,p=i.eventType,m=i.eventTarget,_=i.scope;if(!/down|start/i.test(p))return null;for(var I=0,U=_.interactions.list;I<U.length;I++){var G=U[I],pe=m;if(G.simulation&&G.simulation.allowResume&&G.pointerType===o)for(;pe;){if(pe===G.element)return G;pe=wa(pe)}}return null},mouseOrPen:function(i){var o,p=i.pointerId,m=i.pointerType,_=i.eventType,I=i.scope;if(m!=="mouse"&&m!=="pen")return null;for(var U=0,G=I.interactions.list;U<G.length;U++){var pe=G[U];if(pe.pointerType===m){if(pe.simulation&&!En(pe,p))continue;if(pe.interacting())return pe;o||(o=pe)}}if(o)return o;for(var Ae=0,he=I.interactions.list;Ae<he.length;Ae++){var Je=he[Ae];if(!(Je.pointerType!==m||/down/i.test(_)&&Je.simulation))return Je}return null},hasPointer:function(i){for(var o=i.pointerId,p=0,m=i.scope.interactions.list;p<m.length;p++){var _=m[p];if(En(_,o))return _}return null},idle:function(i){for(var o=i.pointerType,p=0,m=i.scope.interactions.list;p<m.length;p++){var _=m[p];if(_.pointers.length===1){var I=_.interactable;if(I&&(!I.options.gesture||!I.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&o===_.pointerType)return _}return null}};function En(i,o){return i.pointers.some(function(p){return p.id===o})}var Hn=Kr,Sr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Un(i,o){return function(p){var m=o.interactions.list,_=ba(p),I=Te(p),U=I[0],G=I[1],pe=[];if(/^touch/.test(p.type)){o.prevTouchTime=o.now();for(var Ae=0,he=p.changedTouches;Ae<he.length;Ae++){var Je=he[Ae],Ba={pointer:Je,pointerId:Ce(Je),pointerType:_,eventType:p.type,eventTarget:U,curEventTarget:G,scope:o},ll=on(Ba);pe.push([Ba.pointer,Ba.eventTarget,Ba.curEventTarget,ll])}}else{var Za=!1;if(!Q.supportsPointerEvent&&/mouse/.test(p.type)){for(var il=0;il<m.length&&!Za;il++)Za=m[il].pointerType!=="mouse"&&m[il].pointerIsDown;Za=Za||o.now()-o.prevTouchTime<500||p.timeStamp===0}if(!Za){var xl={pointer:p,pointerId:Ce(p),pointerType:_,eventType:p.type,curEventTarget:G,eventTarget:U,scope:o},sl=on(xl);pe.push([xl.pointer,xl.eventTarget,xl.curEventTarget,sl])}}for(var Al=0;Al<pe.length;Al++){var Vl=pe[Al],Wl=Vl[0],Tl=Vl[1],Ul=Vl[2];Vl[3][i](Wl,p,Tl,Ul)}}}function on(i){var o=i.pointerType,p=i.scope,m={interaction:Hn.search(i),searchDetails:i};return p.fire("interactions:find",m),m.interaction||p.interactions.new({pointerType:o})}function St(i,o){var p=i.doc,m=i.scope,_=i.options,I=m.interactions.docEvents,U=m.events,G=U[o];for(var pe in m.browser.isIOS&&!_.events&&(_.events={passive:!1}),U.delegatedEvents)G(p,pe,U.delegateListener),G(p,pe,U.delegateUseCapture,!0);for(var Ae=_&&_.events,he=0;he<I.length;he++){var Je=I[he];G(p,Je.type,Je.listener,Ae)}}var To={id:"core/interactions",install:function(i){for(var o={},p=0;p<Sr.length;p++){var m=Sr[p];o[m]=Un(m,i)}var _,I=Q.pEventTypes;function U(){for(var G=0,pe=i.interactions.list;G<pe.length;G++){var Ae=pe[G];if(Ae.pointerIsDown&&Ae.pointerType==="touch"&&!Ae._interacting)for(var he=function(){var ll=Ba[Je];i.documents.some(function(Za){return de(Za.doc,ll.downTarget)})||Ae.removePointer(ll.pointer,ll.event)},Je=0,Ba=Ae.pointers;Je<Ba.length;Je++)he()}}(_=te.PointerEvent?[{type:I.down,listener:U},{type:I.down,listener:o.pointerDown},{type:I.move,listener:o.pointerMove},{type:I.up,listener:o.pointerUp},{type:I.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:U},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(G){for(var pe=0,Ae=i.interactions.list;pe<Ae.length;pe++)Ae[pe].documentBlur(G)}}),i.prevTouchTime=0,i.Interaction=function(G){y(Ae,G);var pe=L(Ae);function Ae(){return d(this,Ae),pe.apply(this,arguments)}return h(Ae,[{key:"pointerMoveTolerance",get:function(){return i.interactions.pointerMoveTolerance},set:function(he){i.interactions.pointerMoveTolerance=he}},{key:"_now",value:function(){return i.now()}}]),Ae}(mn),i.interactions={list:[],new:function(G){G.scopeFire=function(Ae,he){return i.fire(Ae,he)};var pe=new i.Interaction(G);return i.interactions.list.push(pe),pe},listeners:o,docEvents:_,pointerMoveTolerance:1},i.usePlugin(qr)},listeners:{"scope:add-document":function(i){return St(i,"add")},"scope:remove-document":function(i){return St(i,"remove")},"interactable:unset":function(i,o){for(var p=i.interactable,m=o.interactions.list.length-1;m>=0;m--){var _=o.interactions.list[m];_.interactable===p&&(_.stop(),o.fire("interactions:destroy",{interaction:_}),_.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(m,1))}}},onDocSignal:St,doOnInteractions:Un,methodNames:Sr},Ao=To,gn=function(i){return i[i.On=0]="On",i[i.Off=1]="Off",i}(gn||{}),Mo=function(){function i(o,p,m,_){d(this,i),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=p.actions,this.target=o,this._context=p.context||m,this._win=$(Va(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=_,this.set(p)}return h(i,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,p){return g.func(p.onstart)&&this.on("".concat(o,"start"),p.onstart),g.func(p.onmove)&&this.on("".concat(o,"move"),p.onmove),g.func(p.onend)&&this.on("".concat(o,"end"),p.onend),g.func(p.oninertiastart)&&this.on("".concat(o,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,p,m){var _,I=this,U=(_=this._actions.map[o])==null?void 0:_.filterEventType,G=function(pe){return(U==null||U(pe))&&rr(pe,I._actions)};(g.array(p)||g.object(p))&&this._onOff(gn.Off,o,p,void 0,G),(g.array(m)||g.object(m))&&this._onOff(gn.On,o,m,void 0,G)}},{key:"setPerAction",value:function(o,p){var m=this._defaults;for(var _ in p){var I=_,U=this.options[o],G=p[I];I==="listeners"&&this.updatePerActionListeners(o,U.listeners,G),g.array(G)?U[I]=ga(G):g.plainObject(G)?(U[I]=ae(U[I]||{},Nr(G)),g.object(m.perAction[I])&&"enabled"in m.perAction[I]&&(U[I].enabled=G.enabled!==!1)):g.bool(G)&&g.object(m.perAction[I])?U[I].enabled=G:U[I]=G}}},{key:"getRect",value:function(o){return o=o||(g.element(this.target)?this.target:null),g.string(this.target)&&(o=o||this._context.querySelector(this.target)),la(o)}},{key:"rectChecker",value:function(o){var p=this;return g.func(o)?(this.getRect=function(m){var _=ae({},o.apply(p,m));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,p){if(Va(p)||g.object(p)){for(var m in this.options[o]=p,this._actions.map)this.options[m][o]=p;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return g.string(o)?Array.from(this._context.querySelectorAll(o)):g.func(o)&&o.getAllElements?o.getAllElements():g.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||de(this._context,o)}},{key:"testIgnoreAllow",value:function(o,p,m){return!this.testIgnore(o.ignoreFrom,p,m)&&this.testAllow(o.allowFrom,p,m)}},{key:"testAllow",value:function(o,p,m){return!o||!!g.element(m)&&(g.string(o)?ge(m,o,p):!!g.element(o)&&de(o,m))}},{key:"testIgnore",value:function(o,p,m){return!(!o||!g.element(m))&&(g.string(o)?ge(m,o,p):!!g.element(o)&&de(o,m))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,p,m,_,I){g.object(p)&&!g.array(p)&&(_=m,m=null);var U=We(p,m,I);for(var G in U){G==="wheel"&&(G=Q.wheelEvent);for(var pe=0,Ae=U[G];pe<Ae.length;pe++){var he=Ae[pe];rr(G,this._actions)?this.events[o===gn.On?"on":"off"](G,he):g.string(this.target)?this._scopeEvents[o===gn.On?"addDelegate":"removeDelegate"](this.target,this._context,G,he,_):this._scopeEvents[o===gn.On?"add":"remove"](this.target,G,he,_)}}return this}},{key:"on",value:function(o,p,m){return this._onOff(gn.On,o,p,m)}},{key:"off",value:function(o,p,m){return this._onOff(gn.Off,o,p,m)}},{key:"set",value:function(o){var p=this._defaults;for(var m in g.object(o)||(o={}),this.options=Nr(p.base),this._actions.methodDict){var _=m,I=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ae(ae({},p.perAction),p.actions[_])),this[I](o[_])}for(var U in o)U!=="getRect"?g.func(this[U])&&this[U](o[U]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[o],m=p.length-1;m>=0;m--){var _=p[m],I=_.selector,U=_.context,G=_.listeners;I===this.target&&U===this._context&&p.splice(m,1);for(var pe=G.length-1;pe>=0;pe--)this._scopeEvents.removeDelegate(this.target,this._context,o,G[pe][0],G[pe][1])}else this._scopeEvents.remove(this.target,"all")}}]),i}(),zo=function(){function i(o){var p=this;d(this,i),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(m){var _=m.interactable,I=_.target,U=g.string(I)?p.selectorMap[I]:I[p.scope.id],G=fe(U,function(pe){return pe===_});U.splice(G,1)}})}return h(i,[{key:"new",value:function(o,p){p=ae(p||{},{actions:this.scope.actions});var m=new this.scope.Interactable(o,p,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),g.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(m)):(m.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:o,options:p,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(o,p){var m=p&&p.context||this.scope.document,_=g.string(o),I=_?this.selectorMap[o]:o[this.scope.id];if(I)return ka(I,function(U){return U._context===m&&(_||U.inContext(o))})}},{key:"forEachMatch",value:function(o,p){for(var m=0,_=this.list;m<_.length;m++){var I=_[m],U=void 0;if((g.string(I.target)?g.element(o)&&oe(o,I.target):o===I.target)&&I.inContext(o)&&(U=p(I)),U!==void 0)return U}}}]),i}(),Oo=function(){function i(){var o=this;d(this,i),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Q,this.defaults=Nr(Pn),this.Eventable=jn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var _=function I(U,G){var pe=m.interactables.getExisting(U,G);return pe||((pe=m.interactables.new(U,G)).events.global=I.globalEvents),pe};return _.getPointerAverage=Ve,_.getTouchBBox=ra,_.getTouchDistance=va,_.getTouchAngle=$e,_.getElementRect=la,_.getElementClientRect=we,_.matchesSelector=oe,_.closest=Ke,_.globalEvents={},_.version="1.10.27",_.scope=m,_.use=function(I,U){return this.scope.usePlugin(I,U),this},_.isSet=function(I,U){return!!this.scope.interactables.get(I,U&&U.context)},_.on=xa(function(I,U,G){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var pe=0,Ae=I;pe<Ae.length;pe++){var he=Ae[pe];this.on(he,U,G)}return this}if(g.object(I)){for(var Je in I)this.on(Je,I[Je],U);return this}return rr(I,this.scope.actions)?this.globalEvents[I]?this.globalEvents[I].push(U):this.globalEvents[I]=[U]:this.scope.events.add(this.scope.document,I,U,{options:G}),this},"The interact.on() method is being deprecated"),_.off=xa(function(I,U,G){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var pe=0,Ae=I;pe<Ae.length;pe++){var he=Ae[pe];this.off(he,U,G)}return this}if(g.object(I)){for(var Je in I)this.off(Je,I[Je],U);return this}var Ba;return rr(I,this.scope.actions)?I in this.globalEvents&&(Ba=this.globalEvents[I].indexOf(U))!==-1&&this.globalEvents[I].splice(Ba,1):this.scope.events.remove(this.scope.document,I,U,G),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return Q.supportsTouch},_.supportsPointerEvent=function(){return Q.supportsPointerEvent},_.stop=function(){for(var I=0,U=this.scope.interactions.list;I<U.length;I++)U[I].stop();return this},_.pointerMoveTolerance=function(I){return g.number(I)?(this.scope.interactions.pointerMoveTolerance=I,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(I,U){this.scope.addDocument(I,U)},_.removeDocument=function(I){this.scope.removeDocument(I)},_}(this),this.InteractEvent=tn,this.Interactable=void 0,this.interactables=new zo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return o.removeDocument(m.target)};var p=this;this.Interactable=function(m){y(I,m);var _=L(I);function I(){return d(this,I),_.apply(this,arguments)}return h(I,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(U){return x(c(I.prototype),"set",this).call(this,U),p.fire("interactable:set",{options:U,interactable:this}),this}},{key:"unset",value:function(){x(c(I.prototype),"unset",this).call(this);var U=p.interactables.list.indexOf(this);U<0||(p.interactables.list.splice(U,1),p.fire("interactable:unset",{interactable:this}))}}]),I}(Mo)}return h(i,[{key:"addListeners",value:function(o,p){this.listenerMaps.push({id:p,map:o})}},{key:"fire",value:function(o,p){for(var m=0,_=this.listenerMaps;m<_.length;m++){var I=_[m].map[o];if(I&&I(p,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(p,m){return p.isInitialized=!0,g.window(m)&&S(m),te.init(m),Q.init(m),sa.init(m),p.window=m,p.document=m.document,p.usePlugin(Ao),p.usePlugin(zn),p}(this,o)}},{key:"pluginIsInstalled",value:function(o){var p=o.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,p),o.listeners&&o.before){for(var m=0,_=this.listenerMaps.length,I=o.before.reduce(function(G,pe){return G[pe]=!0,G[Dt(pe)]=!0,G},{});m<_;m++){var U=this.listenerMaps[m].id;if(U&&(I[U]||I[Dt(U)]))break}this.listenerMaps.splice(m,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,p){if(this.getDocIndex(o)!==-1)return!1;var m=$(o);p=p?ae({},p):{},this.documents.push({doc:o,options:p}),this.events.documents.push(o),o!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:m,scope:this,options:p})}},{key:"removeDocument",value:function(o){var p=this.getDocIndex(o),m=$(o),_=this.documents[p].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:o,window:m,scope:this,options:_})}},{key:"getDocIndex",value:function(o){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===o)return p;return-1}},{key:"getDocOptions",value:function(o){var p=this.getDocIndex(o);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),i}();function Dt(i){return i&&i.replace(/\/.*$/,"")}var Ht=new Oo,zr=Ht.interactStatic,Io=typeof globalThis<"u"?globalThis:window;Ht.init(Io);var Lo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(i){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var _=m[0],I=m[1];return _ in i||I in i}),p=function(m,_){for(var I=i.range,U=i.limits,G=U===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:U,pe=i.offset,Ae=pe===void 0?{x:0,y:0}:pe,he={range:I,grid:i,x:null,y:null},Je=0;Je<o.length;Je++){var Ba=o[Je],ll=Ba[0],Za=Ba[1],il=Math.round((m-Ae.x)/i[ll]),xl=Math.round((_-Ae.y)/i[Za]);he[ll]=Math.max(G.left,Math.min(G.right,il*i[ll]+Ae.x)),he[Za]=Math.max(G.top,Math.min(G.bottom,xl*i[Za]+Ae.y))}return he};return p.grid=i,p.coordFields=o,p}}),Bt={id:"snappers",install:function(i){var o=i.interactStatic;o.snappers=ae(o.snappers||{},Lo),o.createSnapGrid=o.snappers.grid}},Vo=Bt,Nt={start:function(i){var o=i.state,p=i.rect,m=i.edges,_=i.pageCoords,I=o.options,U=I.ratio,G=I.enabled,pe=o.options,Ae=pe.equalDelta,he=pe.modifiers;U==="preserve"&&(U=p.width/p.height),o.startCoords=ae({},_),o.startRect=ae({},p),o.ratio=U,o.equalDelta=Ae;var Je=o.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(o.xIsPrimaryAxis=!(!m.left&&!m.right),o.equalDelta){var Ba=(Je.left?1:-1)*(Je.top?1:-1);o.edgeSign={x:Ba,y:Ba}}else o.edgeSign={x:Je.left?-1:1,y:Je.top?-1:1};if(G!==!1&&ae(m,Je),he!=null&&he.length){var ll=new Fr(i.interaction);ll.copyFrom(i.interaction.modification),ll.prepareStates(he),o.subModification=ll,ll.startAll(t({},i))}},set:function(i){var o=i.state,p=i.rect,m=i.coords,_=o.linkedEdges,I=ae({},m),U=o.equalDelta?Ut:qt;if(ae(i.edges,_),U(o,o.xIsPrimaryAxis,m,p),!o.subModification)return null;var G=ae({},p);Ee(_,G,{x:m.x-I.x,y:m.y-I.y});var pe=o.subModification.setAll(t(t({},i),{},{rect:G,edges:_,pageCoords:m,prevCoords:m,prevRect:G})),Ae=pe.delta;return pe.changed&&(U(o,Math.abs(Ae.x)>Math.abs(Ae.y),pe.coords,pe.rect),ae(m,pe.coords)),pe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Ut(i,o,p){var m=i.startCoords,_=i.edgeSign;o?p.y=m.y+(p.x-m.x)*_.y:p.x=m.x+(p.y-m.y)*_.x}function qt(i,o,p,m){var _=i.startRect,I=i.startCoords,U=i.ratio,G=i.edgeSign;if(o){var pe=m.width/U;p.y=I.y+(pe-_.height)*G.y}else{var Ae=m.height*U;p.x=I.x+(Ae-_.width)*G.x}}var Ro=Ar(Nt,"aspectRatio"),Kt=function(){};Kt._defaults={};var nt=Kt;function Zr(i,o,p){return g.func(i)?Re(i,o.interactable,o.element,[p.x,p.y,o]):Re(i,o.interactable,o.element)}var qn={start:function(i){var o=i.rect,p=i.startOffset,m=i.state,_=i.interaction,I=i.pageCoords,U=m.options,G=U.elementRect,pe=ae({left:0,top:0,right:0,bottom:0},U.offset||{});if(o&&G){var Ae=Zr(U.restriction,_,I);if(Ae){var he=Ae.right-Ae.left-o.width,Je=Ae.bottom-Ae.top-o.height;he<0&&(pe.left+=he,pe.right+=he),Je<0&&(pe.top+=Je,pe.bottom+=Je)}pe.left+=p.left-o.width*G.left,pe.top+=p.top-o.height*G.top,pe.right+=p.right-o.width*(1-G.right),pe.bottom+=p.bottom-o.height*(1-G.bottom)}m.offset=pe},set:function(i){var o=i.coords,p=i.interaction,m=i.state,_=m.options,I=m.offset,U=Zr(_.restriction,p,o);if(U){var G=function(pe){return!pe||"left"in pe&&"top"in pe||((pe=ae({},pe)).left=pe.x||0,pe.top=pe.y||0,pe.right=pe.right||pe.left+pe.width,pe.bottom=pe.bottom||pe.top+pe.height),pe}(U);o.x=Math.max(Math.min(G.right-I.right,o.x),G.left+I.left),o.y=Math.max(Math.min(G.bottom-I.bottom,o.y),G.top+I.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Tt=Ar(qn,"restrict"),Wt={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Yt={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Jt(i,o){for(var p=0,m=["top","left","bottom","right"];p<m.length;p++){var _=m[p];_ in i||(i[_]=o[_])}return i}var Kn={noInner:Wt,noOuter:Yt,start:function(i){var o,p=i.interaction,m=i.startOffset,_=i.state,I=_.options;I&&(o=ma(Zr(I.offset,p,p.coords.start.page))),o=o||{x:0,y:0},_.offset={top:o.y+m.top,left:o.x+m.left,bottom:o.y-m.bottom,right:o.x-m.right}},set:function(i){var o=i.coords,p=i.edges,m=i.interaction,_=i.state,I=_.offset,U=_.options;if(p){var G=ae({},o),pe=Zr(U.inner,m,G)||{},Ae=Zr(U.outer,m,G)||{};Jt(pe,Wt),Jt(Ae,Yt),p.top?o.y=Math.min(Math.max(Ae.top+I.top,G.y),pe.top+I.top):p.bottom&&(o.y=Math.max(Math.min(Ae.bottom+I.bottom,G.y),pe.bottom+I.bottom)),p.left?o.x=Math.min(Math.max(Ae.left+I.left,G.x),pe.left+I.left):p.right&&(o.x=Math.max(Math.min(Ae.right+I.right,G.x),pe.right+I.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Gt=Ar(Kn,"restrictEdges"),Wn=ae({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(i){}},qn.defaults),Xt=Ar({start:qn.start,set:qn.set,defaults:Wn},"restrictRect"),Zt={width:-1/0,height:-1/0},Yn={width:1/0,height:1/0},Qt=Ar({start:function(i){return Kn.start(i)},set:function(i){var o=i.interaction,p=i.state,m=i.rect,_=i.edges,I=p.options;if(_){var U=Pe(Zr(I.min,o,i.coords))||Zt,G=Pe(Zr(I.max,o,i.coords))||Yn;p.options={endOnly:I.endOnly,inner:ae({},Kn.noInner),outer:ae({},Kn.noOuter)},_.top?(p.options.inner.top=m.bottom-U.height,p.options.outer.top=m.bottom-G.height):_.bottom&&(p.options.inner.bottom=m.top+U.height,p.options.outer.bottom=m.top+G.height),_.left?(p.options.inner.left=m.right-U.width,p.options.outer.left=m.right-G.width):_.right&&(p.options.inner.right=m.left+U.width,p.options.outer.right=m.left+G.width),Kn.set(i),p.options=I}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),tt={start:function(i){var o,p=i.interaction,m=i.interactable,_=i.element,I=i.rect,U=i.state,G=i.startOffset,pe=U.options,Ae=pe.offsetWithOrigin?function(Ba){var ll=Ba.interaction.element,Za=ma(Re(Ba.state.options.origin,null,null,[ll])),il=Za||Le(Ba.interactable,ll,Ba.interaction.prepared.name);return il}(i):{x:0,y:0};if(pe.offset==="startCoords")o={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var he=Re(pe.offset,m,_,[p]);(o=ma(he)||{x:0,y:0}).x+=Ae.x,o.y+=Ae.y}var Je=pe.relativePoints;U.offsets=I&&Je&&Je.length?Je.map(function(Ba,ll){return{index:ll,relativePoint:Ba,x:G.left-I.width*Ba.x+o.x,y:G.top-I.height*Ba.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(i){var o=i.interaction,p=i.coords,m=i.state,_=m.options,I=m.offsets,U=Le(o.interactable,o.element,o.prepared.name),G=ae({},p),pe=[];_.offsetWithOrigin||(G.x-=U.x,G.y-=U.y);for(var Ae=0,he=I;Ae<he.length;Ae++)for(var Je=he[Ae],Ba=G.x-Je.x,ll=G.y-Je.y,Za=0,il=_.targets.length;Za<il;Za++){var xl=_.targets[Za],sl=void 0;(sl=g.func(xl)?xl(Ba,ll,o._proxy,Je,Za):xl)&&pe.push({x:(g.number(sl.x)?sl.x:Ba)+Je.x,y:(g.number(sl.y)?sl.y:ll)+Je.y,range:g.number(sl.range)?sl.range:_.range,source:xl,index:Za,offset:Je})}for(var Al={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Vl=0;Vl<pe.length;Vl++){var Wl=pe[Vl],Tl=Wl.range,Ul=Wl.x-G.x,Or=Wl.y-G.y,gr=Oa(Ul,Or),jr=gr<=Tl;Tl===1/0&&Al.inRange&&Al.range!==1/0&&(jr=!1),Al.target&&!(jr?Al.inRange&&Tl!==1/0?gr/Tl<Al.distance/Al.range:Tl===1/0&&Al.range!==1/0||gr<Al.distance:!Al.inRange&&gr<Al.distance)||(Al.target=Wl,Al.distance=gr,Al.range=Tl,Al.inRange=jr,Al.delta.x=Ul,Al.delta.y=Or)}return Al.inRange&&(p.x=Al.target.x,p.y=Al.target.y),m.closest=Al,Al},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},$o=Ar(tt,"snap"),ot={start:function(i){var o=i.state,p=i.edges,m=o.options;if(!p)return null;i.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],tt.start(i),o.offsets=i.state.offsets,i.state=o},set:function(i){var o=i.interaction,p=i.state,m=i.coords,_=p.options,I=p.offsets,U={x:m.x-I[0].x,y:m.y-I[0].y};p.options=ae({},_),p.options.targets=[];for(var G=0,pe=_.targets||[];G<pe.length;G++){var Ae=pe[G],he=void 0;if(he=g.func(Ae)?Ae(U.x,U.y,o):Ae){for(var Je=0,Ba=p.targetFields;Je<Ba.length;Je++){var ll=Ba[Je],Za=ll[0],il=ll[1];if(Za in he||il in he){he.x=he[Za],he.y=he[il];break}}p.options.targets.push(he)}}var xl=tt.set(i);return p.options=_,xl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Po=Ar(ot,"snapSize"),At={aspectRatio:Ro,restrictEdges:Gt,restrict:Tt,restrictRect:Xt,restrictSize:Qt,snapEdges:Ar({start:function(i){var o=i.edges;return o?(i.state.targetFields=i.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],ot.start(i)):null},set:ot.set,defaults:ae(Nr(ot.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:$o,snapSize:Po,spring:nt,avoid:nt,transform:nt,rubberband:nt},Fo={id:"modifiers",install:function(i){var o=i.interactStatic;for(var p in i.usePlugin(ir),i.usePlugin(Vo),o.modifiers=At,At){var m=At[p],_=m._defaults,I=m._methods;_._methods=I,i.defaults.perAction[p]=_}}},jo=Fo,eo=function(i){y(p,i);var o=L(p);function p(m,_,I,U,G,pe){var Ae;if(d(this,p),F(M(Ae=o.call(this,G)),I),I!==_&&F(M(Ae),_),Ae.timeStamp=pe,Ae.originalEvent=I,Ae.type=m,Ae.pointerId=Ce(_),Ae.pointerType=ba(_),Ae.target=U,Ae.currentTarget=null,m==="tap"){var he=G.getPointerIndex(_);Ae.dt=Ae.timeStamp-G.pointers[he].downTime;var Je=Ae.timeStamp-G.tapTime;Ae.double=!!G.prevTap&&G.prevTap.type!=="doubletap"&&G.prevTap.target===Ae.target&&Je<500}else m==="doubletap"&&(Ae.dt=_.timeStamp-G.tapTime,Ae.double=!0);return Ae}return h(p,[{key:"_subtractOrigin",value:function(m){var _=m.x,I=m.y;return this.pageX-=_,this.pageY-=I,this.clientX-=_,this.clientY-=I,this}},{key:"_addOrigin",value:function(m){var _=m.x,I=m.y;return this.pageX+=_,this.pageY+=I,this.clientX+=_,this.clientY+=I,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(fa),On={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(i){i.pointerEvents=On,i.defaults.actions.pointerEvents=On.defaults,ae(i.actions.phaselessTypes,On.types)},listeners:{"interactions:new":function(i){var o=i.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(i){var o=i.down,p=i.pointerInfo;!o&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget;i.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&Mt(i),bn({interaction:p,pointer:m,event:_,eventTarget:I,type:"move"},o))},"interactions:down":function(i,o){(function(p,m){for(var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget,pe=p.pointerIndex,Ae=_.pointers[pe].hold,he=ya(G),Je={interaction:_,pointer:I,event:U,eventTarget:G,type:"hold",targets:[],path:he,node:null},Ba=0;Ba<he.length;Ba++){var ll=he[Ba];Je.node=ll,m.fire("pointerEvents:collect-targets",Je)}if(Je.targets.length){for(var Za=1/0,il=0,xl=Je.targets;il<xl.length;il++){var sl=xl[il].eventable.options.holdDuration;sl<Za&&(Za=sl)}Ae.duration=Za,Ae.timeout=setTimeout(function(){bn({interaction:_,eventTarget:G,pointer:I,event:U,type:"hold"},m)},Za)}})(i,o),bn(i,o)},"interactions:up":function(i,o){Mt(i),bn(i,o),function(p,m){var _=p.interaction,I=p.pointer,U=p.event,G=p.eventTarget;_.pointerWasMoved||bn({interaction:_,eventTarget:G,pointer:I,event:U,type:"tap"},m)}(i,o)},"interactions:cancel":function(i,o){Mt(i),bn(i,o)}},PointerEvent:eo,fire:bn,collectEventTargets:ao,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 bn(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget,U=i.type,G=i.targets,pe=G===void 0?ao(i,o):G,Ae=new eo(U,m,_,I,p,o.now());o.fire("pointerEvents:new",{pointerEvent:Ae});for(var he={interaction:p,pointer:m,event:_,eventTarget:I,targets:pe,type:U,pointerEvent:Ae},Je=0;Je<pe.length;Je++){var Ba=pe[Je];for(var ll in Ba.props||{})Ae[ll]=Ba.props[ll];var Za=Le(Ba.eventable,Ba.node);if(Ae._subtractOrigin(Za),Ae.eventable=Ba.eventable,Ae.currentTarget=Ba.node,Ba.eventable.fire(Ae),Ae._addOrigin(Za),Ae.immediatePropagationStopped||Ae.propagationStopped&&Je+1<pe.length&&pe[Je+1].node!==Ae.currentTarget)break}if(o.fire("pointerEvents:fired",he),U==="tap"){var il=Ae.double?bn({interaction:p,pointer:m,event:_,eventTarget:I,type:"doubletap"},o):Ae;p.prevTap=il,p.tapTime=il.timeStamp}return Ae}function ao(i,o){var p=i.interaction,m=i.pointer,_=i.event,I=i.eventTarget,U=i.type,G=p.getPointerIndex(m),pe=p.pointers[G];if(U==="tap"&&(p.pointerWasMoved||!pe||pe.downTarget!==I))return[];for(var Ae=ya(I),he={interaction:p,pointer:m,event:_,eventTarget:I,type:U,path:Ae,targets:[],node:null},Je=0;Je<Ae.length;Je++){var Ba=Ae[Je];he.node=Ba,o.fire("pointerEvents:collect-targets",he)}return U==="hold"&&(he.targets=he.targets.filter(function(ll){var Za,il;return ll.eventable.options.holdDuration===((Za=p.pointers[G])==null||(il=Za.hold)==null?void 0:il.duration)})),he.targets}function Mt(i){var o=i.interaction,p=i.pointerIndex,m=o.pointers[p].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var Ho=Object.freeze({__proto__:null,default:On});function it(i){var o=i.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var Uo={id:"pointer-events/holdRepeat",install:function(i){i.usePlugin(On);var o=i.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=i.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(i,o){return i["pointerEvents:".concat(o)]=it,i},{"pointerEvents:new":function(i){var o=i.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(i,o){var p=i.interaction,m=i.pointerEvent,_=i.eventTarget,I=i.targets;if(m.type==="hold"&&I.length){var U=I[0].eventable.options.holdRepeatInterval;U<=0||(p.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:p,eventTarget:_,type:"hold",pointer:m,event:m},o)},U))}}})},qo=Uo,Ko={id:"pointer-events/interactableTargets",install:function(i){var o=i.Interactable;o.prototype.pointerEvents=function(m){return ae(this.events.options,m),this};var p=o.prototype._backCompatOption;o.prototype._backCompatOption=function(m,_){var I=p.call(this,m,_);return I===this&&(this.events.options[m]=_),I}},listeners:{"pointerEvents:collect-targets":function(i,o){var p=i.targets,m=i.node,_=i.type,I=i.eventTarget;o.interactables.forEachMatch(m,function(U){var G=U.events,pe=G.options;G.types[_]&&G.types[_].length&&U.testIgnoreAllow(pe,m,I)&&p.push({node:m,eventable:G,props:{interactable:U}})})},"interactable:new":function(i){var o=i.interactable;o.events.getRect=function(p){return o.getRect(p)}},"interactable:set":function(i,o){var p=i.interactable,m=i.options;ae(p.events.options,o.pointerEvents.defaults),ae(p.events.options,m.pointerEvents||{})}}},Wo=Ko,lo={id:"pointer-events",install:function(i){i.usePlugin(Ho),i.usePlugin(qo),i.usePlugin(Wo)}},st=lo,Yo={id:"reflow",install:function(i){var o=i.Interactable;i.actions.phases.reflow=!0,o.prototype.reflow=function(p){return function(m,_,I){for(var U=m.getAllElements(),G=I.window.Promise,pe=G?[]:null,Ae=function(){var Je=U[he],Ba=m.getRect(Je);if(!Ba)return 1;var ll,Za=ka(I.interactions.list,function(sl){return sl.interacting()&&sl.interactable===m&&sl.element===Je&&sl.prepared.name===_.name});if(Za)Za.move(),pe&&(ll=Za._reflowPromise||new G(function(sl){Za._reflowResolve=sl}));else{var il=Pe(Ba),xl=function(sl){return{coords:sl,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:il.x,y:il.y},client:{x:il.x,y:il.y},timeStamp:I.now()});ll=function(sl,Al,Vl,Wl,Tl){var Ul=sl.interactions.new({pointerType:"reflow"}),Or={interaction:Ul,event:Tl,pointer:Tl,eventTarget:Vl,phase:"reflow"};Ul.interactable=Al,Ul.element=Vl,Ul.prevEvent=Tl,Ul.updatePointer(Tl,Tl,Vl,!0),R(Ul.coords.delta),pa(Ul.prepared,Wl),Ul._doPhase(Or);var gr=sl.window,jr=gr.Promise,Qr=jr?new jr(function(sn){Ul._reflowResolve=sn}):void 0;return Ul._reflowPromise=Qr,Ul.start(Wl,Al,Vl),Ul._interacting?(Ul.move(Or),Ul.end(Tl)):(Ul.stop(),Ul._reflowResolve()),Ul.removePointer(Tl,Tl),Qr}(I,m,Je,_,xl)}pe&&pe.push(ll)},he=0;he<U.length&&!Ae();he++);return pe&&G.all(pe).then(function(){return m})}(this,p,i)}},listeners:{"interactions:stop":function(i,o){var p=i.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(m,_){m.splice(m.indexOf(_),1)}(o.interactions.list,p))}}},Jo=Yo;if(zr.use(qr),zr.use(dr),zr.use(st),zr.use(wn),zr.use(jo),zr.use(Xr),zr.use(tl),zr.use(ol),zr.use(Jo),zr.default=zr,s(l)==="object"&&l)try{l.exports=zr}catch{}return zr.default=zr,zr})}(Lt,Lt.exports)),Lt.exports}var L4=I4();const ws=A.getDefaultExportFromCjs(L4),Do=a.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(l,{expose:n,emit:r}){const t=l,s=r,d=a.inject(Dc),b=a.inject(Bc);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=a.shallowRef(null),v=a.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 y=!1,c=!1,C=NaN,M=NaN,L=NaN,x=NaN,Y=-1,w=-1,z=-1,ee=-1,S=t.x,$=t.y,T=t.w,k=t.h;const g=a.ref(),j=a.reactive({i:a.toRef(t,"i"),state:v,wrapper:g,calcXY:Re});function q(W){We(W)}function J(){Ua()}function me(W){ln(t.isDraggable)&&(v.draggable=W)}function ze(W){ln(t.isResizable)&&(v.resizable=W)}function xe(W){ln(t.isBounded)&&(v.bounded=W)}function te(W){v.transformScale=W}function be(W){v.rowHeight=W}function Q(W){v.maxRows=W}function de(){v.rtl=xs()==="rtl",Ua()}function Ke(W){v.cols=Math.floor(W)}d.increaseItem(j),a.onBeforeMount(()=>{v.rtl=xs()==="rtl"}),a.onMounted(()=>{d.responsive&&d.lastBreakpoint?v.cols=zc(d.lastBreakpoint,d.cols):v.cols=d.colNum,v.rowHeight=d.rowHeight,v.containerWidth=d.width!==null?d.width:100,v.margin=d.margin!==void 0?d.margin.map(Number):[10,10],v.maxRows=d.maxRows,ln(t.isDraggable)?v.draggable=d.isDraggable:v.draggable=t.isDraggable,ln(t.isResizable)?v.resizable=d.isResizable:v.resizable=t.isResizable,ln(t.isBounded)?v.bounded=d.isBounded:v.bounded=t.isBounded,v.transformScale=d.transformScale,v.useCssTransforms=d.useCssTransforms,v.useStyleCursor=d.useStyleCursor,a.watchEffect(()=>{S=t.x,$=t.y,k=t.h,T=t.w,Hr(la)}),b.on("updateWidth",q),b.on("compact",J),b.on("setDraggable",me),b.on("setResizable",ze),b.on("setBounded",xe),b.on("setTransformScale",te),b.on("setRowHeight",be),b.on("setMaxRows",Q),b.on("directionchange",de),b.on("setColNum",Ke)}),a.onBeforeUnmount(()=>{b.off("updateWidth",q),b.off("compact",J),b.off("setDraggable",me),b.off("setResizable",ze),b.off("setBounded",xe),b.off("setTransformScale",te),b.off("setRowHeight",be),b.off("setMaxRows",Q),b.off("directionchange",de),b.off("setColNum",Ke),h.value&&(h.value.unset(),h.value=null),d.decreaseItem(j)}),n({state:v,wrapper:g});const wa=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,oe=a.computed(()=>v.resizable&&!t.static),D=a.computed(()=>d.isMirrored?!v.rtl:v.rtl),ne=a.computed(()=>(v.draggable||v.resizable)&&!t.static),ge=D4("item"),se=a.computed(()=>({[ge.b()]:!0,[ge.bm("resizable")]:oe.value,[ge.bm("static")]:t.static,[ge.bm("resizing")]:v.isResizing,[ge.bm("dragging")]:v.isDragging,[ge.bm("transform")]:v.useCssTransforms,[ge.bm("rtl")]:D.value,[ge.bm("no-touch")]:wa&&ne.value})),we=a.computed(()=>[ge.be("resizer"),D.value&&ge.bem("resizer","rtl")].filter(Boolean));a.watch(()=>t.isDraggable,W=>{v.draggable=W}),a.watch(()=>t.static,()=>{Hr(F),Hr(R)}),a.watch(()=>v.draggable,()=>{Hr(F)}),a.watch(()=>t.isResizable,W=>{v.resizable=W}),a.watch(()=>t.isBounded,W=>{v.bounded=W}),a.watch(()=>v.resizable,()=>{Hr(R)}),a.watch(()=>v.rowHeight,()=>{Hr(la),Hr(ya)}),a.watch([()=>v.cols,()=>v.containerWidth],()=>{Hr(R),Hr(la),Hr(ya)}),a.watch([()=>t.minH,()=>t.maxH,()=>t.minW,()=>t.maxW],()=>{Hr(R)}),a.watch(D,()=>{Hr(R),Hr(la)}),a.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const W=d.margin;!W||W[0]===v.margin[0]&&W[1]===v.margin[1]||(v.margin=W.map(Number),Hr(la),Hr(ya))});function la(){t.x+t.w>v.cols?(S=0,T=t.w>v.cols?v.cols:t.w):(S=t.x,T=t.w);const W=ea(S,$,T,k);v.isDragging&&(W.top=v.dragging.top,D.value?W.right=v.dragging.left:W.left=v.dragging.left),v.isResizing&&(W.width=v.resizing.width,W.height=v.resizing.height);let Ie;v.useCssTransforms?D.value?Ie=w4(W.top,W.right,W.width,W.height):Ie=_4(W.top,W.left,W.width,W.height):D.value?Ie=E4(W.top,W.right,W.width,W.height):Ie=C4(W.top,W.left,W.width,W.height),v.style=Ie}function ya(){const W={};for(const Ie of["width","height"]){const Ne=v.style[Ie].match(/^(\d+)px$/);if(!Ne)return;W[Ie]=Ne[1]}s("container-resized",t.i,t.h,t.w,W.height,W.width)}function Va(W){if(t.static)return;const Ie=W.type;if(Ie==="resizestart"&&v.isResizing||Ie!=="resizestart"&&!v.isResizing)return;const Ne=bs(W);if(ln(Ne))return;const{x:Ce,y:K}=Ne,He={width:0,height:0};let Ve;switch(Ie){case"resizestart":{R(),Y=T,w=k,Ve=ea(S,$,T,k),He.width=Ve.width,He.height=Ve.height,v.resizing=He,v.isResizing=!0;break}case"resizemove":{!W.edges.right&&!W.edges.left&&(L=Ce),!W.edges.top&&!W.edges.bottom&&(x=K);const ra=ks(L,x,Ce,K);D.value?He.width=v.resizing.width-ra.deltaX/v.transformScale:He.width=v.resizing.width+ra.deltaX/v.transformScale,He.height=v.resizing.height+ra.deltaY/v.transformScale,v.resizing=He;break}case"resizeend":{Ve=ea(S,$,T,k),He.width=Ve.width,He.height=Ve.height,v.resizing={width:-1,height:-1},v.isResizing=!1;break}}Ve=Le(He.height,He.width),Ve.w<t.minW&&(Ve.w=t.minW),Ve.w>t.maxW&&(Ve.w=t.maxW),Ve.h<t.minH&&(Ve.h=t.minH),Ve.h>t.maxH&&(Ve.h=t.maxH),Ve.h<1&&(Ve.h=1),Ve.w<1&&(Ve.w=1),L=Ce,x=K,(T!==Ve.w||k!==Ve.h)&&s("resize",t.i,Ve.h,Ve.w,He.height,He.width),W.type==="resizeend"&&(Y!==T||w!==k)&&s("resized",t.i,Ve.h,Ve.w,He.height,He.width),b.emit("resizeEvent",W.type,t.i,S,$,Ve.h,Ve.w)}function ae(W){if(t.static||v.isResizing)return;const Ie=W.type;if(Ie==="dragstart"&&v.isDragging||Ie!=="dragstart"&&!v.isDragging)return;const Ne=bs(W);if(ln(Ne))return;const{x:Ce,y:K}=Ne,He=W.target;if(!He.offsetParent)return;const Ve={top:0,left:0};switch(Ie){case"dragstart":{z=S,ee=$;const va=He.offsetParent.getBoundingClientRect(),$e=He.getBoundingClientRect(),ba=$e.left/v.transformScale,Te=va.left/v.transformScale,fa=$e.right/v.transformScale,Ue=va.right/v.transformScale,ga=$e.top/v.transformScale,fe=va.top/v.transformScale;D.value?Ve.left=(fa-Ue)*-1:Ve.left=ba-Te,Ve.top=ga-fe,v.dragging=Ve,v.isDragging=!0;break}case"dragmove":{const va=ks(C,M,Ce,K);if(D.value?Ve.left=v.dragging.left-va.deltaX/v.transformScale:Ve.left=v.dragging.left+va.deltaX/v.transformScale,Ve.top=v.dragging.top+va.deltaY/v.transformScale,v.bounded){const $e=He.offsetParent.clientHeight-Pe(t.h,v.rowHeight,v.margin[1]);Ve.top=Ee(Ve.top,0,$e);const ba=ma(),Te=v.containerWidth-Pe(t.w,ba,v.margin[0]);Ve.left=Ee(Ve.left,0,Te)}v.dragging=Ve;break}case"dragend":{const va=He.offsetParent.getBoundingClientRect(),$e=He.getBoundingClientRect(),ba=$e.left/v.transformScale,Te=va.left/v.transformScale,fa=$e.right/v.transformScale,Ue=va.right/v.transformScale,ga=$e.top/v.transformScale,fe=va.top/v.transformScale;D.value?Ve.left=(fa-Ue)*-1:Ve.left=ba-Te,Ve.top=ga-fe,v.dragging={top:-1,left:-1},v.isDragging=!1;break}}let ra;D.value,ra=Re(Ve.top,Ve.left),C=Ce,M=K,(S!==ra.x||$!==ra.y)&&s("move",t.i,ra.x,ra.y),W.type==="dragend"&&(z!==S||ee!==$)&&s("moved",t.i,ra.x,ra.y),b.emit("dragEvent",W.type,t.i,ra.x,ra.y,k,T)}function ea(W,Ie,Ne,Ce){const K=ma();let He;return D.value?He={right:Math.round(K*W+(W+1)*v.margin[0]),top:Math.round(v.rowHeight*Ie+(Ie+1)*v.margin[1]),width:Ne===1/0?Ne:Math.round(K*Ne+Math.max(0,Ne-1)*v.margin[0]),height:Ce===1/0?Ce:Math.round(v.rowHeight*Ce+Math.max(0,Ce-1)*v.margin[1])}:He={left:Math.round(K*W+(W+1)*v.margin[0]),top:Math.round(v.rowHeight*Ie+(Ie+1)*v.margin[1]),width:Ne===1/0?Ne:Math.round(K*Ne+Math.max(0,Ne-1)*v.margin[0]),height:Ce===1/0?Ce:Math.round(v.rowHeight*Ce+Math.max(0,Ce-1)*v.margin[1])},He}function Re(W,Ie){const Ne=ma();let Ce=Math.round((Ie-v.margin[0])/(Ne+v.margin[0])),K=Math.round((W-v.margin[1])/(v.rowHeight+v.margin[1]));return Ce=Math.max(Math.min(Ce,v.cols-T),0),K=Math.max(Math.min(K,v.maxRows-k),0),{x:Ce,y:K}}function ma(){return(v.containerWidth-v.margin[0]*(v.cols+1))/v.cols}function Pe(W,Ie,Ne){return Number.isFinite(W)?Math.round(Ie*W+Math.max(0,W-1)*Ne):W}function Ee(W,Ie,Ne){return Math.max(Math.min(W,Ne),Ie)}function Le(W,Ie,Ne=!1){const Ce=ma();let K=Math.round((Ie+v.margin[0])/(Ce+v.margin[0])),He=0;return Ne?He=Math.ceil((W+v.margin[1])/(v.rowHeight+v.margin[1])):He=Math.round((W+v.margin[1])/(v.rowHeight+v.margin[1])),K=Math.max(Math.min(K,v.cols-S),0),He=Math.max(Math.min(He,v.maxRows-$),0),{w:K,h:He}}function We(W,Ie){v.containerWidth=W}function Ua(){la()}function Oa(){!h.value&&g.value&&(h.value=ws(g.value),v.useStyleCursor||h.value.styleCursor(!1))}const P=ms(ae);function F(){if(Oa(),!!h.value)if(v.draggable&&!t.static){const W={ignoreFrom:t.dragIgnoreFrom,allowFrom:t.dragAllowFrom,...t.dragOption};h.value.draggable(W),y||(y=!0,h.value.on("dragstart dragmove dragend",Ie=>{Ie.type==="dragmove"?P(Ie):ae(Ie)}))}else h.value.draggable({enabled:!1})}const X=ms(Va);function R(){if(Oa(),!!h.value)if(v.resizable&&!t.static){const W=ea(0,0,t.maxW,t.maxH),Ie=ea(0,0,t.minW,t.minH),Ne={edges:{left:D.value?`.${we.value[0]}`:!1,right:D.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:t.resizeIgnoreFrom,restrictSize:{min:{height:Ie.height*v.transformScale,width:Ie.width*v.transformScale},max:{height:W.height*v.transformScale,width:W.width*v.transformScale}},...t.resizeOption};t.preserveAspectRatio&&(Ne.modifiers=[ws.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(Ne),c||(c=!0,h.value.on("resizestart resizemove resizeend",Ce=>{Ce.type==="resizemove"?X(Ce):Va(Ce)}))}else h.value.resizable({enabled:!1})}return(W,Ie)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:g,class:a.normalizeClass(se.value),style:a.normalizeStyle(v.style)},[a.renderSlot(W.$slots,"default"),oe.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(we.value)},null,2)):a.createCommentVNode("",!0)],6))}}),lt=typeof window<"u";var Cs;lt&&(Cs=window==null?void 0:window.navigator)!=null&&Cs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Es(l){return l!=null}function Ss(){}const V4=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(V4)));const R4=lt&&("ontouchstart"in window||P4()>0),$4=R4?"pointerdown":"click";function P4(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function F4(l,n,r=window.Event){const{type:t,bubbles:s=!1,cancelable:d=!1,...b}=n;if(!Es(t)||t==="")return!1;let h;return Es(r)?h=new r(t,{bubbles:s,cancelable:d}):(h=document.createEvent("HTMLEvents"),h.initEvent(t,s,d)),Object.assign(h,b),l.dispatchEvent(h)}const j4="clickoutside",H4=new Set;lt&&document.addEventListener($4,l=>{const n=l.target,r=l.composedPath&&l.composedPath();H4.forEach(t=>{t!==n&&(r?!r.includes(t):!t.contains(n))&&(!t.__transferElement||t.__transferElement!==n&&!t.__transferElement.contains(n))&&F4(t,{type:j4})})},!0);const U4=[["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 yo;if(lt){for(const l of U4)if(l[1]in document){yo=l;break}}a.computed(()=>!1);const q4=new Set,K4=new WeakMap;if(lt&&yo){const l=yo[2],n=yo[4];document.addEventListener(n,()=>{if(q4.forEach(r=>{r.value=!1}),document[l]){const r=K4.get(document[l]);r&&(r.value=!0)}},!1)}const Ic=new Map;Ic.set("x",0);Ic.set("y",0);var Qn=[],W4=function(){return Qn.some(function(l){return l.activeTargets.length>0})},Y4=function(){return Qn.some(function(l){return l.skippedTargets.length>0})},Ds="ResizeObserver loop completed with undelivered notifications.",J4=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:Ds}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=Ds),window.dispatchEvent(l)},jt;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(jt||(jt={}));var et=function(l){return Object.freeze(l)},G4=function(){function l(n,r){this.inlineSize=n,this.blockSize=r,et(this)}return l}(),Lc=function(){function l(n,r,t,s){return this.x=n,this.y=r,this.width=t,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,et(this)}return l.prototype.toJSON=function(){var n=this,r=n.x,t=n.y,s=n.top,d=n.right,b=n.bottom,h=n.left,v=n.width,y=n.height;return{x:r,y:t,top:s,right:d,bottom:b,left:h,width:v,height:y}},l.fromRect=function(n){return new l(n.x,n.y,n.width,n.height)},l}(),wi=function(l){return l instanceof SVGElement&&"getBBox"in l},Vc=function(l){if(wi(l)){var n=l.getBBox(),r=n.width,t=n.height;return!r&&!t}var s=l,d=s.offsetWidth,b=s.offsetHeight;return!(d||b||l.getClientRects().length)},Bs=function(l){var n;if(l instanceof Element)return!0;var r=(n=l==null?void 0:l.ownerDocument)===null||n===void 0?void 0:n.defaultView;return!!(r&&l instanceof r.Element)},X4=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},$t=typeof window<"u"?window:{},fo=new WeakMap,Ns=/auto|scroll/,Z4=/^tb|vertical/,Q4=/msie|trident/i.test($t.navigator&&$t.navigator.userAgent),xn=function(l){return parseFloat(l||"0")},_t=function(l,n,r){return l===void 0&&(l=0),n===void 0&&(n=0),r===void 0&&(r=!1),new G4((r?n:l)||0,(r?l:n)||0)},Ts=et({devicePixelContentBoxSize:_t(),borderBoxSize:_t(),contentBoxSize:_t(),contentRect:new Lc(0,0,0,0)}),Rc=function(l,n){if(n===void 0&&(n=!1),fo.has(l)&&!n)return fo.get(l);if(Vc(l))return fo.set(l,Ts),Ts;var r=getComputedStyle(l),t=wi(l)&&l.ownerSVGElement&&l.getBBox(),s=!Q4&&r.boxSizing==="border-box",d=Z4.test(r.writingMode||""),b=!t&&Ns.test(r.overflowY||""),h=!t&&Ns.test(r.overflowX||""),v=t?0:xn(r.paddingTop),y=t?0:xn(r.paddingRight),c=t?0:xn(r.paddingBottom),C=t?0:xn(r.paddingLeft),M=t?0:xn(r.borderTopWidth),L=t?0:xn(r.borderRightWidth),x=t?0:xn(r.borderBottomWidth),Y=t?0:xn(r.borderLeftWidth),w=C+y,z=v+c,ee=Y+L,S=M+x,$=h?l.offsetHeight-S-l.clientHeight:0,T=b?l.offsetWidth-ee-l.clientWidth:0,k=s?w+ee:0,g=s?z+S:0,j=t?t.width:xn(r.width)-k-T,q=t?t.height:xn(r.height)-g-$,J=j+w+T+ee,me=q+z+$+S,ze=et({devicePixelContentBoxSize:_t(Math.round(j*devicePixelRatio),Math.round(q*devicePixelRatio),d),borderBoxSize:_t(J,me,d),contentBoxSize:_t(j,q,d),contentRect:new Lc(C,v,j,q)});return fo.set(l,ze),ze},$c=function(l,n,r){var t=Rc(l,r),s=t.borderBoxSize,d=t.contentBoxSize,b=t.devicePixelContentBoxSize;switch(n){case jt.DEVICE_PIXEL_CONTENT_BOX:return b;case jt.BORDER_BOX:return s;default:return d}},e6=function(){function l(n){var r=Rc(n);this.target=n,this.contentRect=r.contentRect,this.borderBoxSize=et([r.borderBoxSize]),this.contentBoxSize=et([r.contentBoxSize]),this.devicePixelContentBoxSize=et([r.devicePixelContentBoxSize])}return l}(),Pc=function(l){if(Vc(l))return 1/0;for(var n=0,r=l.parentNode;r;)n+=1,r=r.parentNode;return n},a6=function(){var l=1/0,n=[];Qn.forEach(function(d){if(d.activeTargets.length!==0){var b=[];d.activeTargets.forEach(function(h){var v=new e6(h.target),y=Pc(h.target);b.push(v),h.lastReportedSize=$c(h.target,h.observedBox),y<l&&(l=y)}),n.push(function(){d.callback.call(d.observer,b,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var r=0,t=n;r<t.length;r++){var s=t[r];s()}return l},As=function(l){Qn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Pc(r.target)>l?n.activeTargets.push(r):n.skippedTargets.push(r))})})},l6=function(){var l=0;for(As(l);W4();)l=a6(),As(l);return Y4()&&J4(),l>0},li,Fc=[],r6=function(){return Fc.splice(0).forEach(function(l){return l()})},n6=function(l){if(!li){var n=0,r=document.createTextNode(""),t={characterData:!0};new MutationObserver(function(){return r6()}).observe(r,t),li=function(){r.textContent="".concat(n?n--:n++)}}Fc.push(l),li()},t6=function(l){n6(function(){requestAnimationFrame(l)})},go=0,o6=function(){return!!go},i6=250,s6={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ms=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],zs=function(l){return l===void 0&&(l=0),Date.now()+l},ri=!1,c6=function(){function l(){var n=this;this.stopped=!0,this.listener=function(){return n.schedule()}}return l.prototype.run=function(n){var r=this;if(n===void 0&&(n=i6),!ri){ri=!0;var t=zs(n);t6(function(){var s=!1;try{s=l6()}finally{if(ri=!1,n=t-zs(),!o6())return;s?r.run(1e3):n>0?r.run(n):r.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var n=this,r=function(){return n.observer&&n.observer.observe(document.body,s6)};document.body?r():$t.addEventListener("DOMContentLoaded",r)},l.prototype.start=function(){var n=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ms.forEach(function(r){return $t.addEventListener(r,n.listener,!0)}))},l.prototype.stop=function(){var n=this;this.stopped||(this.observer&&this.observer.disconnect(),Ms.forEach(function(r){return $t.removeEventListener(r,n.listener,!0)}),this.stopped=!0)},l}(),gi=new c6,Os=function(l){!go&&l>0&&gi.start(),go+=l,!go&&gi.stop()},u6=function(l){return!wi(l)&&!X4(l)&&getComputedStyle(l).display==="inline"},d6=function(){function l(n,r){this.target=n,this.observedBox=r||jt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var n=$c(this.target,this.observedBox,!0);return u6(this.target)&&(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},l}(),p6=function(){function l(n,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=n,this.callback=r}return l}(),ho=new WeakMap,Is=function(l,n){for(var r=0;r<l.length;r+=1)if(l[r].target===n)return r;return-1},vo=function(){function l(){}return l.connect=function(n,r){var t=new p6(n,r);ho.set(n,t)},l.observe=function(n,r,t){var s=ho.get(n),d=s.observationTargets.length===0;Is(s.observationTargets,r)<0&&(d&&Qn.push(s),s.observationTargets.push(new d6(r,t&&t.box)),Os(1),gi.schedule())},l.unobserve=function(n,r){var t=ho.get(n),s=Is(t.observationTargets,r),d=t.observationTargets.length===1;s>=0&&(d&&Qn.splice(Qn.indexOf(t),1),t.observationTargets.splice(s,1),Os(-1))},l.disconnect=function(n){var r=this,t=ho.get(n);t.observationTargets.slice().forEach(function(s){return r.unobserve(n,s.target)}),t.activeTargets.splice(0,t.activeTargets.length)},l}(),f6=function(){function l(n){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof n!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");vo.connect(this,n)}return l.prototype.observe=function(n,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Bs(n))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");vo.observe(this,n,r)},l.prototype.unobserve=function(n){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Bs(n))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");vo.unobserve(this,n)},l.prototype.disconnect=function(){vo.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const Bo=new WeakMap;function h6(l){var n;for(let r=0,t=l.length;r<t;++r){const s=l[r],d=Bo.get(s.target);if(typeof d=="function"){const{inlineSize:b,blockSize:h}=((n=s.borderBoxSize)==null?void 0:n[0])??{},{offsetWidth:v,offsetHeight:y}=s.target;d(Object.assign(s,{offsetWidth:v,offsetHeight:y,width:b??v,height:h??y}))}}}const jc=new(lt&&window.ResizeObserver||f6)(h6);function Ls(l,n){Bo.set(l,n),jc.observe(l)}function Vs(l){Bo.has(l)&&(jc.unobserve(l),Bo.delete(l))}function v6(l={}){let n=Ss;const r=a.watch(()=>a.unref(l.target),s=>{n(),!(!s||typeof l.onResize!="function")&&(Ls(s,l.onResize),n=()=>{Vs(s),n=Ss})},{immediate:!0}),t=()=>{r(),n()};return a.getCurrentScope()&&a.onScopeDispose(t),{observeResize:Ls,unobserveResize:Vs,unobserve:t}}const m6=a.ref(!1);a.computed(()=>m6.value);const Rs="__theme_style__",ni="__theme_observer__",$s=a.reactive(new Map),Ps=new Map;a.watch($s,()=>{if(!lt)return;Ps.clear();const l=document.head.querySelector(`#${Rs}`);l&&document.head.removeChild(l);const n=document.createElement("style");let r=`.${ni} { width: 1px }`,t=1;for(const[s,[d,b]]of $s.entries())r+=` html.${d} .${ni}, .${b} .${ni} { width: ${++t}px }`,Ps.set(t,s);n.textContent=r,n.id=Rs,document.head.appendChild(n)});const Hc=a.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(l,{expose:n,emit:r}){const t=l,s=r,d=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,h=a.ref(t.layout),v=a.ref(),{observeResize:y,unobserveResize:c}=v6(),C=v4();C.on("resizeEvent",M),C.on("dragEvent",L),a.onBeforeMount(()=>{s("layout-before-mount",h.value)}),a.onMounted(()=>{s("layout-mounted",h.value),a.nextTick(()=>{S4(h.value),d.originalLayout=h.value,a.nextTick(()=>{q(),v.value&&y(v.value,m4(S,16)),gt(h.value,t.verticalCompact),s("layout-updated",h.value),ee(),S()})})}),a.onBeforeUnmount(()=>{C.clearAll(),v.value&&c(v.value)});function M(me,ze,xe,te,be,Q){g(me,ze,xe,te,be,Q)}function L(me,ze,xe,te,be,Q){k(me,ze,xe,te,be,Q)}a.watch(()=>d.width,(me,ze)=>{a.nextTick(()=>{C.emit("updateWidth",me),ze===-1&&a.nextTick(()=>{s("layout-ready",h.value)}),ee()})}),a.watch(()=>[t.layout,t.layout.length],()=>{h.value=t.layout,z()}),a.watch(()=>t.colNum,me=>{C.emit("setColNum",me)}),a.watch(()=>t.rowHeight,me=>{C.emit("setRowHeight",me)}),a.watch(()=>t.isDraggable,me=>{C.emit("setDraggable",me)}),a.watch(()=>t.isResizable,me=>{C.emit("setResizable",me)}),a.watch(()=>t.isBounded,me=>{C.emit("setBounded",me)}),a.watch(()=>t.transformScale,me=>{C.emit("setTransformScale",me)}),a.watch(()=>t.responsive,me=>{me||(s("update:layout",d.originalLayout),C.emit("setColNum",t.colNum)),S()}),a.watch(()=>t.maxRows,me=>{C.emit("setMaxRows",me)}),a.watch([()=>t.margin,()=>t.margin[1]],ee),a.provide(Dc,a.reactive({...a.toRefs(t),...a.toRefs(d),increaseItem:x,decreaseItem:Y})),a.provide(Bc,C),n({state:d,getItem:w,resizeEvent:g,dragEvent:k,layoutUpdate:z});function x(me){b.set(me.i,me)}function Y(me){b.delete(me.i)}function w(me){return b.get(me)}function z(){if(!ln(h.value)&&!ln(d.originalLayout)){if(h.value.length!==d.originalLayout.length){const me=J(h.value,d.originalLayout);if(me.length>0)if(h.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(me);else{const ze=new Set(me.map(xe=>xe.i));d.originalLayout=d.originalLayout.filter(xe=>!ze.has(xe.i))}d.lastLayoutLength=h.value.length,q()}gt(h.value,t.verticalCompact),C.emit("updateWidth",d.width),ee(),s("layout-updated",h.value)}}function ee(){d.mergedStyle={height:$()}}function S(){v.value&&(d.width=v.value.offsetWidth),C.emit("resizeEvent")}function $(){if(!t.autoSize)return;const me=parseFloat(t.margin[1]);return g4(h.value)*(t.rowHeight+me)+me+"px"}let T;function k(me,ze,xe,te,be,Q){let de=ys(h.value,ze);ln(de)&&(de={h:0,w:0,x:0,y:0,i:""}),me==="dragstart"&&!t.verticalCompact&&(T=h.value.reduce((Ke,{i:wa,x:oe,y:D})=>({...Ke,[wa]:{x:oe,y:D}}),{})),me==="dragmove"||me==="dragstart"?(d.placeholder.i=ze,d.placeholder.x=de.x,d.placeholder.y=de.y,d.placeholder.w=Q,d.placeholder.h=be,a.nextTick(()=>{d.isDragging=!0}),C.emit("updateWidth",d.width)):a.nextTick(()=>{d.isDragging=!1}),h.value=yi(h.value,de,xe,te,!0,t.preventCollision),t.restoreOnDrag?(de.static=!0,gt(h.value,t.verticalCompact,T),de.static=!1):gt(h.value,t.verticalCompact),C.emit("compact"),ee(),me==="dragend"&&(T=void 0,s("layout-updated",h.value))}function g(me,ze,xe,te,be,Q){let de=ys(h.value,ze);ln(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Ke;if(t.preventCollision){const wa=Tc(h.value,{...de,w:Q,h:be}).filter(oe=>oe.i!==de.i);if(Ke=wa.length>0,Ke){let oe=1/0,D=1/0;wa.forEach(ne=>{ne.x>de.x&&(oe=Math.min(oe,ne.x)),ne.y>de.y&&(D=Math.min(D,ne.y))}),Number.isFinite(oe)&&(de.w=oe-de.x),Number.isFinite(D)&&(de.h=D-de.y)}}Ke||(de.w=Q,de.h=be),me==="resizestart"||me==="resizemove"?(d.placeholder.i=ze,d.placeholder.x=xe,d.placeholder.y=te,d.placeholder.w=de.w,d.placeholder.h=de.h,a.nextTick(()=>{d.isDragging=!0}),C.emit("updateWidth",d.width)):me&&a.nextTick(()=>{d.isDragging=!1}),t.responsive&&j(),gt(h.value,t.verticalCompact),C.emit("compact"),ee(),me==="resizeend"&&s("layout-updated",h.value)}function j(){const me=T4(t.breakpoints,d.width);if(me===d.lastBreakpoint)return;const ze=zc(me,t.cols);!ln(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mi(h.value));const xe=A4(d.originalLayout,d.layouts,t.breakpoints,me,d.lastBreakpoint,ze,t.verticalCompact);d.layouts[me]=xe,d.lastBreakpoint!==me&&s("breakpoint-changed",me,xe),h.value=xe,s("update:layout",xe),d.lastBreakpoint=me,C.emit("setColNum",ze)}function q(){d.layouts=Object.assign({},t.responsiveLayouts)}function J(me,ze){const xe=new Set(ze.map(de=>de.i)),te=new Set(me.map(de=>de.i)),be=me.filter(de=>!xe.has(de.i)),Q=ze.filter(de=>!te.has(de.i));return be.concat(Q)}return(me,ze)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:v,class:"vgl-layout",style:a.normalizeStyle(d.mergedStyle)},[me.$slots.default?a.renderSlot(me.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h.value,xe=>(a.openBlock(),a.createBlock(Do,a.mergeProps({key:xe.i,ref_for:!0},xe),{default:a.withCtx(()=>[a.renderSlot(me.$slots,"item",{item:xe})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Do,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.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(l)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const y6={key:0,class:"item-view-group"},g6={key:0,class:"item-view-group"},b6=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:n}){const r=A.useModelComp(A.pinia),{isEdit:t}=A.storeToRefs(r),s=n,d=l,b=a.computed(()=>d==null?void 0:d.children),h=a.computed(()=>{var x,Y,w,z;return((x=d==null?void 0:d.children)==null?void 0:x.length)>0&&((Y=d==null?void 0:d.children)!=null&&Y.every(ee=>ee==null?void 0:ee.layout))?(z=(w=d==null?void 0:d.children)==null?void 0:w[0])==null?void 0:z.layout:"vertical"}),v=x=>{s("radioChange",x)},y=a.computed(()=>{var x,Y;return((Y=(x=d==null?void 0:d.children)==null?void 0:x[0])==null?void 0:Y.isGridLayout)||!1}),c=a.ref((d==null?void 0:d.level)+1),C=a.computed(()=>{if(!(d!=null&&d.children)||!Array.isArray(d.children)||d.children.length<2)return!1;const x=d.children.some(w=>(w==null?void 0:w.name)==="测量系统配置表"&&(w==null?void 0:w.comp)==="ParentItem"),Y=d.children.some(w=>(w==null?void 0:w.name)==="测量系统传递表"&&(w==null?void 0:w.comp)==="ParentItem");return x&&Y});a.watch(()=>d==null?void 0:d.children,()=>{C.value},{deep:!0});const M=x=>{s("rowClick",x)},L=(x,Y)=>{s("routeUrl",x,Y)};return(x,Y)=>y.value?(a.openBlock(),a.createBlock(a.unref(Hc),{key:0,layout:b.value,"onUpdate:layout":Y[0]||(Y[0]=w=>b.value=w),"is-draggable":a.unref(t)==="edit","is-resizable":a.unref(t)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(w,z)=>(a.openBlock(),a.createBlock(a.unref(Do),{key:w.i,x:w.x,y:w.y,"min-h":w.minH,"max-h":w.maxH,"min-w":w.minW,w:w.w,h:w.h,i:w.i},{default:a.withCtx(()=>{var ee,S,$,T,k,g,j,q,J,me,ze,xe,te,be;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:z===((ee=d==null?void 0:d.children)==null?void 0:ee.length)-1?"0px":"24px"})},[(($=(S=w==null?void 0:w.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((T=w==null?void 0:w.component)!=null&&T.name)?(a.openBlock(),a.createElementBlock("div",y6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.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"})},a.toDisplayString((k=w==null?void 0:w.component)==null?void 0:k.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)((g=w==null?void 0:w.component)==null?void 0:g.comp)),{pageLayout:h.value,config:{showIndex:(j=a.unref(Xl)[z])==null?void 0:j.showIndex,allowMove:(q=a.unref(Xl)[z])==null?void 0:q.allowMove,viewport:(J=a.unref(Xl)[z])==null?void 0:J.viewport,status:(me=a.unref(Xl)[z])==null?void 0:me.status},related:w==null?void 0:w.relatedTables,compName:w==null?void 0:w.component.name,compNames:a.unref(sc),itemData:(ze=w==null?void 0:w.component)==null?void 0:ze.compData,childItemData:(xe=w==null?void 0:w.component)==null?void 0:xe.itemChildData,key:a.unref($n),cacheNewData:a.unref(ic),onChange:a.unref(wo),index:(w==null?void 0:w.id)??z,onContentChange:a.unref(Co),onPageChange:a.unref(Eo),parentTableId:(te=w==null?void 0:w.component)==null?void 0:te.tableId,allMapContents:a.unref(hi),children:(be=w==null?void 0:w.component)==null?void 0:be.children,level:c.value,onRowClick:M,onRouteUrl:L,onClickTrigger:a.unref(cc),onClickMainKey:a.unref(uc)},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"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(d==null?void 0:d.children,(w,z)=>{var ee,S;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(w==null?void 0:w.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(z)===((ee=d==null?void 0:d.children)==null?void 0:ee.length)-1?"0px":"24px"})},[((S=w==null?void 0:w.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&w.name?(a.openBlock(),a.createElementBlock("div",g6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.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"})},a.toDisplayString(w.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ft)(w.comp)),{compName:w.name,config:{showIndex:w==null?void 0:w.showIndex,allowMove:w==null?void 0:w.allowMove,viewport:w==null?void 0:w.viewport,status:w==null?void 0:w.status},itemData:w==null?void 0:w.compData,related:w==null?void 0:w.relatedTables,childItemData:w==null?void 0:w.itemChildData,key:a.unref($n),onChange:a.unref(wo),index:(w==null?void 0:w.id)??z,onContentChange:a.unref(Co),onPageChange:a.unref(Eo),parentTableId:w==null?void 0:w.tableId,allMapContents:a.unref(hi),children:w==null?void 0:w.children,level:c.value,onRowClick:M,onRouteUrl:L,onRadioChange:v},null,40,["compName","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),k6=Kl._export_sfc(b6,[["__scopeId","data-v-ed72c7ff"]]),x6={class:"radio-group-container"},_6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:n}){const r=l,t=n,s=a.ref(),d=at(A.pinia),{selectTab:b}=A.storeToRefs(d);a.watch(()=>r==null?void 0:r.itemData,()=>{s.value=b.value},{immediate:!0,deep:!0});const h=v=>{s.value=v,t("radioChange",s.value)};return(v,y)=>(a.openBlock(),a.createElementBlock("div",x6,[a.createVNode(pl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=c=>s.value=c),content:r==null?void 0:r.itemData,onChange:h},null,8,["modelValue","content"])]))}}),w6=Kl._export_sfc(_6,[["__scopeId","data-v-177d64c3"]]),Uc=a.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"}]),C6={TABLE:hc,FORM:ps,STATICFORM:vc,TABLEOPERATE:y1,TABLESTYLE:z1,TABLEEXTEND:I1,TABLEINTERACTION:R1,FORMOPERATE:fs,FOLD:h2,CALCULATOR:k2,METHODBUTTON:w2,AVATARUPLOAD:Yi.ssAvatar,SIGNATURE:Yi.ssSignature,FORMTOP:ps,STEP:I2,STEPOPERATE:t2,TIMELINE:F2,TIMELINEOPERATE:d2,FORMTOPOPERATE:fs,SIGNATUREOPERATE:M2,AVATARUPLOADOPERATE:S2,TABS:U2,TABSOPERATE:Nh,CHART:Hh,CHARTOPERATE:e4,LAYOUT:r4,LAYOUTOPERATE:p4,PARENTITEM:k6,RADIO:w6};function Et(l){return C6[l==null?void 0:l.toUpperCase()]||null}exports.De=Hc;exports.activeStepInfo=bt;exports.addContents=Pt;exports.addVisibleDialog=xi;exports.affixItems=Uf;exports.allMapContents=hi;exports.analyzeFilter=kt;exports.analyzeForm=Sd;exports.analyzeQuoteForm=Ed;exports.analyzeTable=Bd;exports.cacheNewData=ic;exports.clickMainKey=uc;exports.clickSavePage=Hf;exports.clickStep=pc;exports.clickTrigger=cc;exports.compId=$n;exports.compNames=sc;exports.compShow=Ct;exports.createRobotContent=ec;exports.existLayouts=Zf;exports.generateLayouts=N1;exports.getComponent=Et;exports.getComponents=Ft;exports.getPageData=Pr;exports.getSliceContLength=r0;exports.gridRowHeight=C1;exports.isStepLayout=fc;exports.onBack=Ff;exports.onButtonChange=Yf;exports.onChange=wo;exports.onClick=jf;exports.onContentChange=Co;exports.onExtendTaskEnd=Xf;exports.onOk=Jf;exports.onPageBack=e0;exports.onPageChange=Eo;exports.onSelectFixContent=Pf;exports.renderShowItems=tc;exports.robotFile=mf;exports.showItems=Xl;exports.sliceTableLength=oc;exports.slotContent=Uc;exports.ssTable=hc;exports.ssTag=Us;exports.st=Do;exports.stepItems=n0;exports.tabChange=Qf;exports.toolBar=Gf;exports.useFormComp=bi;exports.useModelLoader=Pp;exports.verifyButton=a0;
|