ss-component-new 1.3.293 → 1.3.296
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-BZGJgmUx.cjs → array-B92nmZ3e.cjs} +1 -1
- package/dist/{array-BVedBC4J.js → array-Dyq4XhuN.js} +2 -2
- package/dist/{index-D-RquVVU.cjs → index-10cIo1OB.cjs} +1 -1
- package/dist/{index-DefvWUXW.js → index-B2EKs9L9.js} +1 -1
- package/dist/{index-BKPi9246.js → index-B8Aon_1a.js} +7673 -7677
- package/dist/{index-BGXlt0Bk.cjs → index-BILc9IPu.cjs} +1 -1
- package/dist/{index-B5_JD9Zr.js → index-BdM1fkpo.js} +1 -1
- package/dist/{index-C_rNGRpL.js → index-Bp3b_ow5.js} +1 -1
- package/dist/{index-CvAN1H22.js → index-C32uAsQO.js} +3 -3
- package/dist/{index-wW51rQ0m.js → index-C8liwVWm.js} +2 -2
- package/dist/{index-efltJzM6.js → index-CAM7iYGV.js} +8 -8
- package/dist/{index-DCL0uKEy.cjs → index-CFsqIG7u.cjs} +1 -1
- package/dist/index-CJlApKvn.cjs +25 -0
- package/dist/{index-BK2xjtjO.js → index-CsHESydV.js} +1 -1
- package/dist/{index-Cw3Mzxsu.cjs → index-D4w4YErl.cjs} +1 -1
- package/dist/{index-BMOdyP-6.cjs → index-DFvG0KxB.cjs} +1 -1
- package/dist/{index-WsYVHGnw.cjs → index-DIHCeGuk.cjs} +1 -1
- package/dist/{index-CuxsdavJ.js → index-DXpl-sR-.js} +2 -2
- package/dist/{index-iyPg8SID.cjs → index-DdtEeDTm.cjs} +1 -1
- package/dist/{index-OVAb_o-R.cjs → index-DmOH3yXH.cjs} +1 -1
- package/dist/{index-B5V-oUOc.js → index-Drb_dYeM.js} +1 -1
- package/dist/{index-B83PV1ft.cjs → index-ElpZs-E-.cjs} +1 -1
- package/dist/{index-Bsk8vIdB.cjs → index-QP6pNDrh.cjs} +1 -1
- package/dist/{index-DsopYGEs.js → index-UWPwt-jl.js} +2 -2
- package/dist/{index-DR_J3sca.js → index-fZgBoSVt.js} +1 -1
- package/dist/{index-C4MRQylF.cjs → index-zuL3t5Wr.cjs} +1 -1
- package/dist/{main-B5W7D5YD.js → main-BDJzFbLL.js} +2 -2
- package/dist/{main-Bj5s2YI8.cjs → main-Cq2fWzA_.cjs} +1 -1
- package/dist/ss-component.cjs +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-C87-hoqY.js → threeModel-CrdhZxJh.js} +1 -1
- package/dist/{threeModel-DTxQtp2f.cjs → threeModel-DIdIJ99Q.cjs} +1 -1
- package/dist/{threeSceneView-Br8jbvLM.cjs → threeSceneView-3p0o71BQ.cjs} +1 -1
- package/dist/{threeSceneView-jNmK6OkL.js → threeSceneView-B8Os_D7c.js} +3 -3
- package/dist/{threeSceneViewForCPMPIP-B3ZnBCj6.cjs → threeSceneViewForCPMPIP-DAYNTC7g.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DB1dWZmp.js → threeSceneViewForCPMPIP-Dn50xIWm.js} +1 -1
- package/dist/{threeViewerHost-CJ4fhhdJ.cjs → threeViewerHost-BkgI8zZM.cjs} +1 -1
- package/dist/{threeViewerHost-pVaZ-5d1.js → threeViewerHost-CKFQOVbT.js} +1 -1
- package/package.json +1 -1
- package/dist/index-C73PF4P6.cjs +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";var ku=Object.defineProperty;var xu=(l,n,r)=>n in l?ku(l,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[n]=r;var qr=(l,n,r)=>xu(l,typeof n!="symbol"?n+"":n,r);const a=require("vue"),Qa=require("./request-BC2w2vGr.cjs"),$n=require("./dayjs.min-73fIR1V_.cjs"),O=require("./menu-DopnPfbG.cjs"),dl=require("./index-zuL3t5Wr.cjs"),Yl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pa=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-6F-e2GJs.cjs"),xr=require("./index-CUw6nGTo.cjs"),wi=require("./threeViewerHost-BkgI8zZM.cjs"),ua=require("./index-BkOJA3nu.cjs"),wu=require("./index-DsNHJYr-.cjs"),_r=require("./index-CW4qJdP8.cjs"),Qt=require("./index-DFvG0KxB.cjs");require("./index-CwOB279v.cjs");const Ws=require("./index-Cq0IbX2g.cjs"),Vo=require("./index-W8p89C7t.cjs"),un=require("./index-CQY6ageG.cjs");;/* empty css */const _i=require("./isString-DNBlKLZH.cjs"),es=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ks=require("./index-BVaHwt5f.cjs"),_u=require("./index-DG_ZoAwM.cjs"),On=require("./MTLLoader-C6rfxQ-U.cjs"),Cu=require("./URDFLoader-C51mjCMr.cjs");var Eu="[object Boolean]";function Gs(l){return l===!0||l===!1||Qa.isObjectLike(l)&&Qa.baseGetTag(l)==Eu}function Su(l){return l===void 0}const Du=l=>l.match(/\((.*)\)/)[1],Bu={__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),o=a.ref(!1),s=a.ref(null);return a.watch(()=>n==null?void 0:n.isVisible,()=>{o.value=n==null?void 0:n.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var c,m;(m=(c=r.value)==null?void 0:c.updatePopper)==null||m.call(c)})},{deep:!0,immediate:!0}),(c,m)=>{const p=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(p,{visible:o.value,"onUpdate:visible":m[0]||(m[0]=v=>o.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(c.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Nu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const n=l,r=a.computed(()=>{const o=String(n.value??"");return o==="已完成"?"task-status-completed":o==="进行中"?"task-status-running":o==="终止"||o==="暂停"?"task-status-stopped":""});return(o,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)}},Tu=Yl._export_sfc(Nu,[["__scopeId","data-v-d81f59b4"]]);function Au(l,n,r,o={}){if(!l||!n||!r||r.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:c="rgba(255, 235, 59, 0.3)",strokeWidth:m=2,fillOpacity:p=.2}=o,v=l.getBoundingClientRect(),g=n.getBoundingClientRect(),u=n.naturalWidth,_=n.naturalHeight,x=g.width/u,L=g.height/_,C=Math.min(x,L),U=u*C,I=_*C,H=(v.width-U)/2,G=(v.height-I)/2,D=r.map(([S,y])=>{const k=H+S*U,F=G+y*I;return{x:k,y:F}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(D[0].x,D[0].y);for(let S=1;S<D.length;S++)s.lineTo(D[S].x,D[S].y);s.closePath();const E=c.replace(/[\d.]+\)$/,`${p})`);s.fillStyle=E,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=m,s.stroke()}function ko(l){if(!l)return;const n=l.getContext("2d");n&&n.clearRect(0,0,l.width,l.height)}function as(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 zu={key:0,class:"ocr-img-preview-root"},Mu={class:"ocr-img-preview-window"},Iu={key:0,class:"img-preview-body"},Ou={class:"img-preview-header"},Lu={class:"img-header-left"},Ru={class:"img-name"},$u={key:0,class:"img-header-right"},Vu={class:"img-index"},Pu={key:0,class:"img-thumb-list"},Fu=["onClick"],ju={key:1,class:"thumb-placeholder"},Hu={class:"thumb-name"},Uu={class:"img-preview-container"},qu={key:0,class:"img-placeholder"},Wu={key:2,class:"img-placeholder"},Ku={key:0},Gu={key:1},Yu={key:1,class:"img-placeholder"},Ju=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,o=n,s=a.computed({get:()=>r.visible,set:B=>o("update:visible",B)});let c=!1,m="",p=0,v=0,g=0,u=0,_=0,x=0,L=null;const C=B=>{var be,ce;const re=(ce=(be=B==null?void 0:B.target)==null?void 0:be.closest)==null?void 0:ce.call(be,".ocr-img-preview-window");return re||document.querySelector(".ocr-img-preview-window")},U=B=>{if(!B||B==="none")return{tx:0,ty:0};let re=B.match(/matrix\(([^)]+)\)/);if(re){const be=re[1].split(",").map(ce=>Number(ce.trim()));return{tx:(be==null?void 0:be[4])||0,ty:(be==null?void 0:be[5])||0}}if(re=B.match(/matrix3d\(([^)]+)\)/),re){const be=re[1].split(",").map(ce=>Number(ce.trim()));return{tx:(be==null?void 0:be[12])||0,ty:(be==null?void 0:be[13])||0}}return re=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),re?{tx:Number(re[1])||0,ty:Number(re[2])||0}:{tx:0,ty:0}},I=(B,re,be)=>{B.style.transform=`translate(${re}px, ${be}px)`},H=B=>{const re=C(B);if(!re)return;c=!0,L=re,m="move",p=B.clientX,v=B.clientY;const be=window.getComputedStyle(re),{tx:ce,ty:Se}=U(be.transform);_=ce,x=Se,document.addEventListener("mousemove",D),document.addEventListener("mouseup",E)},G=(B,re)=>{const be=C(B);if(!be)return;c=!0,L=be,m=re,p=B.clientX,v=B.clientY;const ce=be.getBoundingClientRect();g=ce.width,u=ce.height;const Se=window.getComputedStyle(be),{tx:va,ty:Ca}=U(Se.transform);_=va,x=Ca,document.addEventListener("mousemove",D),document.addEventListener("mouseup",E)},D=B=>{if(!c||!L)return;const re=B.clientX-p,be=B.clientY-v,ce=360,Se=420;let va=g,Ca=u,Ga=_,le=x;if(m==="move"){Ga=_+re,le=x+be,I(L,Ga,le);return}if(m.includes("right")&&(va=Math.max(ce,g+re)),m.includes("bottom")&&(Ca=Math.max(Se,u+be)),m.includes("left")){const na=g-re;na<ce?(va=ce,Ga=_+(g-ce)):(va=na,Ga=_+re)}if(m.includes("top")){const na=u-be;na<Se?(Ca=Se,le=x+(u-Se)):(Ca=na,le=x+be)}L.style.width=`${va}px`,L.style.height=`${Ca}px`,I(L,Ga,le)},E=()=>{c=!1,m="",L=null,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",E)},S=a.ref([]),y=a.ref(!1);a.watch(()=>r.images,async B=>{if(!Array.isArray(B)||B.length===0){S.value=[];return}y.value=!0;const re=[];for(const be of B)if(be.url&&!be.url.startsWith("blob:")&&!be.url.startsWith("http"))try{const ce=await Pa.downloadFile(be.url),Se=URL.createObjectURL(ce);re.push({...be,blobUrl:Se})}catch(ce){console.error(`Failed to load image for preview: ${be.url}`,ce),re.push({...be,blobUrl:""})}else re.push({...be,blobUrl:be.url});S.value=re,y.value=!1},{deep:!0,immediate:!0});const k=a.ref(0),F=a.ref(null),$=a.ref(null),Y=a.computed(()=>S.value[k.value]||null),pe=()=>{if(!S.value.length){k.value=0;return}if(r.defaultImageName){const B=S.value.findIndex(re=>(re==null?void 0:re.name)===r.defaultImageName);k.value=B>=0?B:0}else k.value=0},Ne=B=>{if(!S.value.length)return;const re=Math.max(0,Math.min(B,S.value.length-1));k.value=re},Ce=()=>Ne(k.value-1),Q=()=>Ne(k.value+1),ye=B=>{if(!B)return;const re=S.value.findIndex(be=>(be==null?void 0:be.name)===B);re>=0&&(k.value=re)},X=()=>{if(!$.value)return;const B=$.value.parentElement;if(!B)return;const re=B.getBoundingClientRect();$.value.width=re.width,$.value.height=re.height},se=()=>{var ce,Se;if(!$.value||!F.value||!r.focusedFieldName){$.value&&ko($.value);return}const B=(ce=F.value.$el)==null?void 0:ce.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{a.nextTick(()=>{se()})};return}const re=((Se=Y.value)==null?void 0:Se.name)||"",be=as(r.fieldMeta,r.focusedFieldName);if(!be){ko($.value);return}if(be.imageName!==re){ko($.value);return}X(),Au($.value,B,be.bboxNorm)},qe=()=>{a.nextTick(()=>{X(),se()})};a.watch(()=>r.focusedFieldName,()=>{if(!s.value)return;const B=as(r.fieldMeta,r.focusedFieldName);B!=null&&B.imageName&&ye(B.imageName),a.nextTick(()=>{se()})}),a.watch(()=>{var B;return(B=Y.value)==null?void 0:B.name},()=>{s.value&&a.nextTick(()=>{$.value&&ko($.value),se()})}),a.watch(()=>r.visible,B=>{B?(pe(),a.nextTick(()=>{X(),se()})):$.value&&ko($.value)}),a.watch(()=>r.defaultImageName,()=>{s.value&&pe()});let Da=null;a.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Da=new ResizeObserver(()=>{X(),a.nextTick(()=>{se()})}),(B=$.value)!=null&&B.parentElement&&Da.observe($.value.parentElement))}),a.onUnmounted(()=>{Da&&(Da.disconnect(),Da=null),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",E)});const ne=()=>{$.value&&ko($.value),o("update:visible",!1),o("close")};return(B,re)=>{var Ca,Ga;const be=a.resolveComponent("el-button"),ce=a.resolveComponent("el-image"),Se=a.resolveComponent("Loading"),va=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",zu,[re[12]||(re[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Mu,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(H,["stop"])},[re[8]||(re[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ne},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:re[0]||(re[0]=a.withModifiers(le=>G(le,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:re[1]||(re[1]=a.withModifiers(le=>G(le,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:re[2]||(re[2]=a.withModifiers(le=>G(le,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:re[3]||(re[3]=a.withModifiers(le=>G(le,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:re[4]||(re[4]=a.withModifiers(le=>G(le,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:re[5]||(re[5]=a.withModifiers(le=>G(le,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:re[6]||(re[6]=a.withModifiers(le=>G(le,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:re[7]||(re[7]=a.withModifiers(le=>G(le,"bottom-right"),["stop"]))},null,32),Y.value?(a.openBlock(),a.createElementBlock("div",Iu,[a.createElementVNode("div",Ou,[a.createElementVNode("div",Lu,[a.createElementVNode("span",Ru,a.toDisplayString(Y.value.name?Y.value.name+(Y.value.url&&Y.value.url.lastIndexOf(".")!==-1?Y.value.url.substring(Y.value.url.lastIndexOf(".")):""):""),1)]),S.value.length>1?(a.openBlock(),a.createElementBlock("div",$u,[a.createVNode(be,{size:"small",disabled:k.value===0,onClick:Ce},{default:a.withCtx(()=>re[9]||(re[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Vu,a.toDisplayString(k.value+1)+" / "+a.toDisplayString(S.value.length),1),a.createVNode(be,{size:"small",disabled:k.value===S.value.length-1,onClick:Q},{default:a.withCtx(()=>re[10]||(re[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),S.value.length>1?(a.openBlock(),a.createElementBlock("div",Pu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.value,(le,na)=>(a.openBlock(),a.createElementBlock("div",{key:(le.name||"")+"-"+na,class:a.normalizeClass(["img-thumb-item",{active:na===k.value}]),onClick:Pe=>Ne(na)},[le!=null&&le.blobUrl?(a.openBlock(),a.createBlock(ce,{key:0,src:le.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[le.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",ju,"加载失败")),a.createElementVNode("div",Hu,a.toDisplayString(le.name||"-"),1)],10,Fu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",Uu,[y.value?(a.openBlock(),a.createElementBlock("div",qu,[a.createVNode(va,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(Se)]),_:1}),re[11]||(re[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(Ca=Y.value)!=null&&Ca.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(ce,{ref_key:"imageRef",ref:F,src:Y.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[Y.value.blobUrl],onLoad:qe},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:$,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",Wu,[(Ga=Y.value)!=null&&Ga.url?(a.openBlock(),a.createElementBlock("span",Ku,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",Gu,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",Yu,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),Xu=Yl._export_sfc(Ju,[["__scopeId","data-v-48a4ecb1"]]),Zu={class:"cert-preview-body"},Qu={key:0,class:"pdf-preview-container"},ed={class:"thumbs"},ad=["onClick"],ld={class:"thumb-img"},rd=["src"],nd={key:1,class:"thumb-loading"},od={class:"thumb-title"},id={class:"viewer"},td={key:0,class:"viewer-img-wrap"},sd=["src"],cd={key:1,class:"viewer-loading"},ud=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(""),c=a.ref(""),m=a.computed(()=>(r.versions||[]).find(C=>String(C.versionId)===String(s.value))),p=a.ref({}),v=a.ref(""),g=a.ref("证书附件.pdf"),u=()=>{try{Object.values(p.value||{}).forEach(C=>{C&&URL.revokeObjectURL(C)}),v.value&&URL.revokeObjectURL(v.value)}catch{}p.value={},v.value=""},_=async C=>{if(!C||C.fileType==="pdf")return;const U=Array.isArray(C.images)?C.images:[];for(const I of U){const H=I==null?void 0:I.url;if(!(!H||p.value[H]))try{const G=await O.platformDownloadFile({url:H}),D=URL.createObjectURL(G.data);p.value={...p.value,[H]:D}}catch{}}},x=async C=>{var I;if(!C||C.fileType!=="pdf"){v.value="";return}const U=C.sourceUrl||"";if(!U){v.value="";return}if(v.value){try{URL.revokeObjectURL(v.value)}catch{}v.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:U,versionId:C==null?void 0:C.versionId,certNo:C==null?void 0:C.certNo});const H=await O.platformDownloadFile({url:U});console.log("[CertificatePreview] PDF响应:",{url:U,status:H==null?void 0:H.status,size:(I=H==null?void 0:H.data)==null?void 0:I.size});const G=URL.createObjectURL(H.data);v.value=G;const D=C.certNo?String(C.certNo):"";g.value=D?`${D}.pdf`:"证书附件.pdf"}catch(H){console.error("[CertificatePreview] PDF加载失败:",{url:U,error:H}),v.value=""}};a.watch(()=>r.visible,async C=>{var I;if(!C){u();return}const U=(I=r.versions)==null?void 0:I[0];s.value=(U==null?void 0:U.versionId)||"",await _(U),await x(U)},{immediate:!0}),a.watch(()=>s.value,async()=>{var U,I;const C=m.value;if(!C){c.value="",v.value="";return}if(C.fileType==="pdf"){c.value="",await x(C);return}v.value="",c.value=((I=(U=C.images)==null?void 0:U[0])==null?void 0:I.url)||"",await _(C)},{immediate:!0});const L=()=>{o("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(C,U)=>{const I=a.resolveComponent("el-empty"),H=a.resolveComponent("el-tab-pane"),G=a.resolveComponent("el-tabs"),D=a.resolveComponent("el-button"),E=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(E,{"model-value":C.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:L},{footer:a.withCtx(()=>[a.createVNode(D,{id:"themeBorderButton",onClick:L},{default:a.withCtx(()=>U[1]||(U[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[C.versions&&C.versions.length>0?(a.openBlock(),a.createBlock(G,{key:0,modelValue:s.value,"onUpdate:modelValue":U[0]||(U[0]=S=>s.value=S),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.versions,S=>(a.openBlock(),a.createBlock(H,{key:S.versionId,name:S.versionId,label:S.label},{default:a.withCtx(()=>[a.createElementVNode("div",Zu,[S.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",Qu,[v.value?(a.openBlock(),a.createBlock(dl.SsFilePreview,{key:1,fileName:g.value,blobUrl:v.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(I,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",ed,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.images||[],y=>(a.openBlock(),a.createElementBlock("div",{key:y.url,class:a.normalizeClass(["thumb",{active:y.url===c.value}]),onClick:k=>c.value=y.url},[a.createElementVNode("div",ld,[p.value[y.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:p.value[y.url]},null,8,rd)):(a.openBlock(),a.createElementBlock("div",nd,"加载中"))]),a.createElementVNode("div",od,a.toDisplayString(y.name),1)],10,ad))),128))]),a.createElementVNode("div",id,[c.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[p.value[c.value]?(a.openBlock(),a.createElementBlock("div",td,[a.createElementVNode("img",{class:"viewer-img",src:p.value[c.value]},null,8,sd)])):(a.openBlock(),a.createElementBlock("div",cd,"加载中"))],64)):(a.openBlock(),a.createBlock(I,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(I,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),dd=Yl._export_sfc(ud,[["__scopeId","data-v-220703c0"]]),pd={class:"ocr-candidate-wrap"},fd={class:"ocr-candidate-left"},hd={key:1},vd={key:0},md={key:1},yd={key:2},gd={key:3},bd={key:0,class:"ocr-candidate-right"},kd={class:"ocr-candidate-actions"},xd={key:1},wd={class:"dialog-footer"},_d={__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=(k=[])=>{const F=[],$=Y=>{(Y||[]).forEach(pe=>{if(!pe)return;const Ne=pe.children||pe.childrens||pe.columns;Array.isArray(Ne)&&Ne.length>0?$(Ne):F.push(pe)})};return $(k),F},o=l,s=n,c=a.computed(()=>{var k;return((k=x.value)==null?void 0:k.allowAdd)!==!1}),m=a.computed(()=>{var k;return((k=x.value)==null?void 0:k.allowReplace)!==!1}),p=k=>{if(!k)return[];if(Array.isArray(k))return k;if(typeof k=="string")try{const F=JSON.parse(k);return Array.isArray(F)?F:[]}catch{return[]}return[]},v=k=>{s("preview-file",k)},g=a.ref([]),u=a.ref(0),_=a.ref("");a.watch(()=>o.candidates,k=>{var F,$;g.value=(k||[]).map(Y=>({...Y,...(Y==null?void 0:Y.ocrRow)||{},selectedTargetId:(Y==null?void 0:Y.selectedTargetId)||"",__decision:Y==null?void 0:Y.__decision})),u.value=0,_.value=(($=(F=g.value)==null?void 0:F[0])==null?void 0:$.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>o.visible,k=>{var F,$;k&&(u.value=0,_.value=(($=(F=g.value)==null?void 0:F[0])==null?void 0:$.selectedTargetId)||"")});const x=a.computed(()=>{var F;const k=Number(u.value||0);return((F=g.value||[])==null?void 0:F[k])||null}),L=a.computed(()=>(r(o.columns||[])||[]).filter($=>$&&$.prop).filter($=>$.type!=="operate"&&$.label!=="操作"&&$.prop!=="operate")),C=a.computed(()=>L.value.filter(k=>k.label!=="证书附件"&&k.prop!=="证书附件")),U=k=>{if(!k)return;const F=(g.value||[]).findIndex($=>($==null?void 0:$.idx)===(k==null?void 0:k.idx));F>-1&&(u.value=F,_.value=(k==null?void 0:k.selectedTargetId)||"")},I=k=>{if(!k){_.value="";return}_.value=String((k==null?void 0:k.id)??"")},H=(k,F="")=>{const $=Number(u.value||0),Y=g.value||[],pe=Y[$];pe&&(pe.__decision=k,pe.selectedTargetId=F,_.value=F,g.value=[...Y])},G=()=>H("skip",""),D=()=>H("add",""),E=()=>{if(!_.value){Qa.ElMessage.warning("请先选择要替换的目标记录");return}H("replace",_.value)},S=()=>{s("update:visible",!1)},y=()=>{const k=g.value||[];if(k.find($=>($==null?void 0:$.__decision)==="replace"&&!($!=null&&$.selectedTargetId))){Qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",k),s("update:visible",!1)};return(k,F)=>{const $=a.resolveComponent("el-table-column"),Y=a.resolveComponent("svg-icon"),pe=a.resolveComponent("el-table"),Ne=a.resolveComponent("el-button"),Ce=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(xr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:S},{default:a.withCtx(()=>{var Q,ye;return[a.createElementVNode("div",pd,[a.createElementVNode("div",fd,[F[0]||(F[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(pe,{data:g.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:U},{default:a.withCtx(()=>[a.createVNode($,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.value,X=>(a.openBlock(),a.createBlock($,{key:X.prop,label:X.label,prop:X.prop,"min-width":X.minWidth||160},{default:a.withCtx(({row:se})=>[X.label==="证书附件"||X.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(se==null?void 0:se[X.prop]).length>0?(a.openBlock(),a.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(qe=>v({row:se,prop:X.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((se==null?void 0:se[X.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode($,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:X})=>[a.createTextVNode(a.toDisplayString(((X==null?void 0:X.candidates)||[]).length),1)]),_:1}),a.createVNode($,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:X})=>[(X==null?void 0:X.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",vd,"替换")):(X==null?void 0:X.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",md,"新增")):(X==null?void 0:X.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",yd,"跳过")):(a.openBlock(),a.createElementBlock("span",gd,"未处理"))]),_:1})]),_:1},8,["data"])]),g.value&&g.value.length>0?(a.openBlock(),a.createElementBlock("div",bd,[F[4]||(F[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",kd,[a.createVNode(Ne,{id:"themeBorderButton",onClick:G},{default:a.withCtx(()=>F[1]||(F[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(Ne,{id:"themeBorderButton",onClick:D,disabled:!c.value},{default:a.withCtx(()=>F[2]||(F[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Ne,{class:"ok-button",id:"themeButton",onClick:E,disabled:!m.value||!_.value},{default:a.withCtx(()=>F[3]||(F[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((Q=x.value)==null?void 0:Q.candidates)||[]).length===0?(a.openBlock(),a.createBlock(Ce,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(pe,{data:((ye=x.value)==null?void 0:ye.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:I,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode($,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(L.value,X=>(a.openBlock(),a.createBlock($,{key:X.prop,label:X.label,prop:X.prop,"min-width":X.minWidth||160},{default:a.withCtx(({row:se})=>[X.label==="证书附件"||X.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(se==null?void 0:se[X.prop]).length>0?(a.openBlock(),a.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(qe=>v({row:se,prop:X.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",xd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((se==null?void 0:se[X.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",wd,[a.createVNode(Ne,{id:"themeBorderButton",onClick:S},{default:a.withCtx(()=>F[5]||(F[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(Ne,{class:"ok-button",id:"themeButton",onClick:y},{default:a.withCtx(()=>F[6]||(F[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Cd=Yl._export_sfc(_d,[["__scopeId","data-v-89e0489c"]]),Ed={class:"ocr-preview-content"},Sd={class:"ocr-preview-tip"},Dd={class:"ocr-preview-table"},Bd={style:{display:"flex","align-items":"center",gap:"8px"}},Nd={class:"dialog-footer"},Td={__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,o=n,s=a.ref([]),c=a.ref([]),m=a.ref([]);a.watch(()=>r.visible,L=>{L&&(s.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),m.value=[...r.ocrSelectedFields])});const p=(L,C)=>{const U=[...m.value];if(C)U.includes(L)||U.push(L);else{const I=U.indexOf(L);I>-1&&U.splice(I,1)}m.value=U,o("update:ocrSelectedFields",U)},v=(L,C,U)=>{o("fieldChange",{rowIndex:L,prop:C,value:U})},g=()=>{o("update:ocrPreviewData",s.value),o("confirm",s.value),o("update:visible",!1)},u=()=>{o("update:visible",!1)},_=L=>typeof L!="number"?"-":`${(L*100).toFixed(1)}%`,x=L=>typeof L!="number"?"#606266":L>=.9?"#67c23a":L>=.7?"#e6a23c":"#f56c6c";return(L,C)=>{const U=a.resolveComponent("el-alert"),I=a.resolveComponent("el-table-column"),H=a.resolveComponent("el-checkbox"),G=a.resolveComponent("el-input"),D=a.resolveComponent("el-table"),E=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(xr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:u,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",Ed,[a.createElementVNode("div",Sd,[a.createVNode(U,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",Dd,[a.createVNode(D,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(I,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,S=>(a.openBlock(),a.createBlock(I,{key:S.prop,prop:S.prop,"min-width":S.minWidth||230,"class-name":S.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",Bd,[S.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(H,{key:0,"model-value":m.value.includes(S.prop),onChange:y=>p(S.prop,y),onClick:C[0]||(C[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(S.label),1)])]),default:a.withCtx(({row:y,$index:k})=>[S.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:x(y[S.prop]),fontWeight:500})},a.toDisplayString(_(y[S.prop])),5)):(a.openBlock(),a.createBlock(G,{key:1,modelValue:y[S.prop],"onUpdate:modelValue":F=>y[S.prop]=F,size:"small",placeholder:"请输入"+S.label,onChange:F=>v(k,S.prop,F)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Nd,[a.createVNode(E,{onClick:u,id:"themeBorderButton"},{default:a.withCtx(()=>C[1]||(C[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(E,{class:"ok-button",onClick:g,id:"themeButton"},{default:a.withCtx(()=>C[2]||(C[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Ad=Yl._export_sfc(Td,[["__scopeId","data-v-df66eb1f"]]),Co=l=>{var o;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=(o=Pa.analyzeSplitToContent(n,","))==null?void 0:o.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)),dt(s)));return r=r==null?void 0:r.join(","),r};let Ra="$R",oo="[Any]";const zd=l=>{var m,p,v,g;let n={},r=l==null?void 0:l[0],o=(p=(m=r==null?void 0:r.replace("{",Ra))==null?void 0:m.split(Ra))==null?void 0:p[0];(o==null?void 0:o[0])==="*"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),o=o==null?void 0:o.split(":"),n.group=o;let s=l==null?void 0:l[1],c;return s!=null&&s.includes("{")?c=(g=(v=s==null?void 0:s.replaceAll("{",""))==null?void 0:v.replaceAll("}",""))==null?void 0:g.replaceAll(oo,""):c=s==null?void 0:s.replaceAll(oo,""),(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),n.filter=c,n},Md=l=>{var u,_;let n=[],r=[],o=l==null?void 0:l.map(x=>{let L=x==null?void 0:x.indexOf("@Form(");return L>0?x==null?void 0:x.substring(0,L):x}),s="",c=Pa.analyzeSplitToContent(o==null?void 0:o[0],":");r=(u=c==null?void 0:c.filter(x=>!(x!=null&&x.includes("{"))&&!(x!=null&&x.includes("["))))==null?void 0:u.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 m=c==null?void 0:c.filter(x=>(x==null?void 0:x.includes("{"))||(x==null?void 0:x.includes("["))),v=(m==null?void 0:m[0])??"";v=(_=Pa.analyzeSplitToContent(v,","))==null?void 0:_.map(x=>((x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),x)),(m==null?void 0:m.length)>1&&(n=Do(m==null?void 0:m[1]),n!=null&&n.every(x=>Array.isArray(x))&&(n=[n]));let g=[];return v==null||v.forEach((x,L)=>{var k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe;let C=(k=x==null?void 0:x.split("=="))==null?void 0:k[0],U=(F=x==null?void 0:x.split("=="))==null?void 0:F[1],I=[],H=[],G=[],D=[],E="Input",S=[],y=[];if((x==null?void 0:x[0])!=="{"){if((U==null?void 0:U[0])==="$")U=U==null?void 0:U.slice(1,U==null?void 0:U.length),I=(Y=($=U==null?void 0:U.split("*"))==null?void 0:$[0])==null?void 0:Y.split(":"),H=(X=(ye=(Q=(Ce=(Ne=(pe=U==null?void 0:U.split("*"))==null?void 0:pe[1])==null?void 0:Ne.replace("{",Ra))==null?void 0:Ce.split(Ra))==null?void 0:Q[0])==null?void 0:ye.split(":"))==null?void 0:X.filter(je=>je!==""),G=(qe=(se=U==null?void 0:U.replace("{",Ra))==null?void 0:se.split(Ra))==null?void 0:qe[1],G=G==null?void 0:G.replaceAll("}",""),G=G==null?void 0:G.split(":"),E="Select";else if(((Da=Pa.analyzeSplitToContent(x,"="))==null?void 0:Da.length)>1){let je=(ne=C==null?void 0:C.split("="))==null?void 0:ne[1];if(C=(B=C==null?void 0:C.split("="))==null?void 0:B[0],E="Select",!(x!=null&&x.includes("||")))je=(re=je==null?void 0:je.split("/"))==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)),D=je==null?void 0:je.map(Oe=>({label:Oe==null?void 0:Oe.replaceAll("'",""),value:Oe==null?void 0:Oe.replaceAll("'","")}));else{let Oe=[];(va=(Se=(ce=(be=x==null?void 0:x.replace("=",Ra))==null?void 0:be.split(Ra))==null?void 0:ce[1])==null?void 0:Se.split("||"))==null||va.forEach(_e=>{var pa,ra,$a;S.push((ra=(pa=_e==null?void 0:_e.split("@Filter"))==null?void 0:pa[0])==null?void 0:ra.split("/")),Oe.push(($a=_e==null?void 0:_e.split("@Filter"))==null?void 0:$a[1])}),y=Oe==null?void 0:Oe.map(_e=>(_e=_e==null?void 0:_e.slice(1,(_e==null?void 0:_e.length)-1),_e))}}else if(x!=null&&x.includes("@")&&!(x!=null&&x.includes("||"))){C=(Pe=(na=(le=(Ga=(Ca=C==null?void 0:C.replace("(@",Ra))==null?void 0:Ca.split(Ra))==null?void 0:Ga[0])==null?void 0:le.replace("@",Ra))==null?void 0:na.split(Ra))==null?void 0:Pe[0];let je=x!=null&&x.includes("(@")?"(@"+((Fe=(wa=x==null?void 0:x.replace("(@",Ra))==null?void 0:wa.split(Ra))==null?void 0:Fe[1]):"@"+((Ve=(ze=x==null?void 0:x.replace("@",Ra))==null?void 0:ze.split(Ra))==null?void 0:Ve[1]);if(je=(ea=Co(je))==null?void 0:ea.split(","),je!=null&&je.find(Oe=>Oe==null?void 0:Oe.includes("@Type"))){let Oe=(Ja=je==null?void 0:je.find(_e=>_e==null?void 0:_e.includes("@Type")))==null?void 0:Ja.split("=");Oe!=null&&Oe.includes("File")&&(E="Upload"),Oe!=null&&Oe.includes("Date")&&(E="Date"),Oe!=null&&Oe.includes("DateTime")&&(E="DateTime"),Oe!=null&&Oe.includes("Time")&&(E="Time")}}g.push({prop:C,label:C,value:"",menuPath:I,groups:H,columns:G,width:v==null?void 0:v.length,options:D,type:E,allContents:S,filterContents:y})}else{s=s+"@"+((qa=Pa.analyzeSplitToContent(x,"@"))==null?void 0:qa[1]);let je=(P=Pa.analyzeSplitToContent(x,"@"))==null?void 0:P[0];(je==null?void 0:je[(je==null?void 0:je.length)-1])==="@"&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1));let Oe=(V=je==null?void 0:je.split("=="))==null?void 0:V[0],_e=(Z=je==null?void 0:je.split("=="))==null?void 0:Z[1],pa=(te=(oe=_e==null?void 0:_e.split("*"))==null?void 0:oe[0])==null?void 0:te.replace(oo,"");(pa==null?void 0:pa[0])==="$"&&(pa=pa==null?void 0:pa.slice(1,pa==null?void 0:pa.length)),pa=Pa.analyzeSplitToContent(pa,"$"),pa=(ka=pa==null?void 0:pa.map((ra,$a)=>{var xa;return $a===0&&(pa==null?void 0:pa.length)>1&&(ra=(xa=ra==null?void 0:ra.split(":"))==null?void 0:xa[0]),(pa==null?void 0:pa.length)>1&&$a===(pa==null?void 0:pa.length)-1&&(ra=ra+":"),ra}))==null?void 0:ka.join(":"),I=(Re=(oa=pa==null?void 0:pa.replaceAll("{",""))==null?void 0:oa.replaceAll("}",""))==null?void 0:Re.split(":"),H=(he=(ja=(Fa=(ya=(Ea=(we=_e==null?void 0:_e.split("*"))==null?void 0:we[1])==null?void 0:Ea.replace("{",Ra))==null?void 0:ya.split(Ra))==null?void 0:Fa[0])==null?void 0:ja.split(":"))==null?void 0:he.filter(ra=>ra!==""),G=(Te=(Ze=_e==null?void 0:_e.replace("{",Ra))==null?void 0:Ze.split(Ra))==null?void 0:Te[1],G=G==null?void 0:G.replaceAll("}",""),Oe=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1),G=G==null?void 0:G.split(","),E="Select",(Qe=Oe==null?void 0:Oe.split(","))==null||Qe.forEach((ra,$a)=>{var xa,Oa;g.push({prop:ra,label:ra,value:"",menuPath:I,groups:H,columns:(xa=G==null?void 0:G[$a])==null?void 0:xa.split(":"),width:(Oa=Oe==null?void 0:Oe.split(","))==null?void 0:Oa.length,type:E})})}}),{groupName:r,formContents:g,contents:n,filter:s,formColumn:v}},Do=l=>{var o,s;if(!l||typeof l!="string")return[];let n=[],r=l.slice(1,(l==null?void 0:l.length)-1);if((r==null?void 0:r[0])!=="[")(o=Pa.analyzeSplitToContent(r,","))==null||o.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),n.push(c??"")});else{let c=[];(s=Pa.analyzeSplitToContent(r,","))==null||s.forEach(m=>{(m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),c.push(Do(m))}),n=c}return n},ut=(l,n)=>{var I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va,ue,Ae;let r,o=[],s=[],c=[],m=[],p=[],v=[],g=[],u="Input",_,x="",L="",C=[],U="";if(l!=null&&l.includes("@Pam")||l!=null&&l.includes("==")||l!=null&&l.includes("="))if(l!=null&&l.includes("@Pam")){let Ue=Pa.analyzeSplitToContent(l,"=");if((Ue==null?void 0:Ue.length)>1){l=Ue==null?void 0:Ue[0],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1);let Be=Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1];(Be==null?void 0:Be[0])==="&"&&(Be=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length)),L=(H=(I=Be==null?void 0:Be.replace("(",Ra))==null?void 0:I.split(Ra))==null?void 0:H[0];let il=(D=(G=Be==null?void 0:Be.replace(")",Ra))==null?void 0:G.split(Ra))==null?void 0:D[0];il=(S=(E=il==null?void 0:il.replace("(",Ra))==null?void 0:E.split(Ra))==null?void 0:S[1],(il==null?void 0:il[0])==="{"&&(il=il==null?void 0:il.slice(1,il==null?void 0:il.length)),(il==null?void 0:il[(il==null?void 0:il.length)-1])==="}"&&(il=il==null?void 0:il.slice(0,(il==null?void 0:il.length)-1)),C=il==null?void 0:il.split(",");let vl=(k=(y=Be==null?void 0:Be.replace(")",Ra))==null?void 0:y.split(Ra))==null?void 0:k[1];vl&&vl!==""&&(U=Co(vl))}r=($=(F=l==null?void 0:l.replace("@Pam",Ra))==null?void 0:F.split(Ra))==null?void 0:$[0];let Xe=(pe=(Y=l==null?void 0:l.replace("@Pam",Ra))==null?void 0:Y.split(Ra))==null?void 0:pe[1];Xe=Xe==null?void 0:Xe.slice(1,(Xe==null?void 0:Xe.length)-1),Xe=(Ne=Pa.analyzeSplitToContent(Xe,","))==null?void 0:Ne.map(Be=>(Be="@"+Be,Be));let _a=Xe==null?void 0:Xe.find(Be=>Be==null?void 0:Be.includes("@Type"));_a!=null&&_a.includes("File")&&(u="Upload"),_a!=null&&_a.includes("Date")&&(u="Date"),_a!=null&&_a.includes("DateTime")&&(u="DateTime"),_a!=null&&_a.includes("Time")&&(u="Time"),_=Xe==null?void 0:Xe.find(Be=>Be==null?void 0:Be.includes("@IdentName")),_=_?(Q=(Ce=_==null?void 0:_.replace("=",Ra))==null?void 0:Ce.split(Ra))==null?void 0:Q[1]:r}else{if(r=(ye=l==null?void 0:l.split("=="))==null?void 0:ye[0],_=(X=l==null?void 0:l.split("=="))==null?void 0:X[0],l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((Da=(qe=(se=l==null?void 0:l.replace("=",Ra))==null?void 0:se.split(Ra))==null?void 0:qe[1])!=null&&Da.includes("||")))if(r=(ne=l==null?void 0:l.split("="))==null?void 0:ne[0],_=r,l!=null&&l.includes("(@")||l!=null&&l.includes("@")){if(l!=null&&l.includes("(@")){let Xe=(B=l==null?void 0:l.split("(@"))==null?void 0:B[1];Xe=Xe==null?void 0:Xe.slice(0,(Xe==null?void 0:Xe.length)-1),Xe=(be=(re=Xe==null?void 0:Xe.replace("(",Ra))==null?void 0:re.split(Ra))==null?void 0:be[1],Xe=Xe==null?void 0:Xe.slice(0,(Xe==null?void 0:Xe.length)-1),c==null||c.push(Xe),l=(ce=l==null?void 0:l.split("(@"))==null?void 0:ce[0]}else{let Xe=(Se=l==null?void 0:l.split("@"))==null?void 0:Se[1];Xe=Xe==null?void 0:Xe.slice(0,(Xe==null?void 0:Xe.length)-1),Xe=(Ca=(va=Xe==null?void 0:Xe.replace("(",Ra))==null?void 0:va.split(Ra))==null?void 0:Ca[1],Xe=Xe==null?void 0:Xe.slice(0,(Xe==null?void 0:Xe.length)-1),c==null||c.push(Xe),l=(Ga=l==null?void 0:l.split("@"))==null?void 0:Ga[0]}let Ue=(na=(le=l==null?void 0:l.split("="))==null?void 0:le[1])==null?void 0:na.split("/");s.push(Ue)}else o=(wa=Pa.analyzeSplitToContent((Pe=l==null?void 0:l.split("="))==null?void 0:Pe[1],"/"))==null?void 0:wa.map(Ue=>((Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])==="/"&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1)),Ue)),o=o==null?void 0:o.map(Ue=>({label:Ue==null?void 0:Ue.replaceAll("'",""),value:Ue==null?void 0:Ue.replaceAll("'","")}));else if((Ve=(ze=(Fe=l==null?void 0:l.replace("=",Ra))==null?void 0:Fe.split(Ra))==null?void 0:ze[1])!=null&&Ve.includes("||")){r=(ea=l==null?void 0:l.split("="))==null?void 0:ea[0],_=(Ja=l==null?void 0:l.split("="))==null?void 0:Ja[0];let Ue=[];(Z=(V=(P=(qa=l==null?void 0:l.replace("=",Ra))==null?void 0:qa.split(Ra))==null?void 0:P[1])==null?void 0:V.split("||"))==null||Z.forEach(Xe=>{var _a,Be,il;s.push((Be=(_a=Xe==null?void 0:Xe.split("@Filter"))==null?void 0:_a[0])==null?void 0:Be.split("/")),Ue.push((il=Xe==null?void 0:Xe.split("@Filter"))==null?void 0:il[1])}),c=Ue==null?void 0:Ue.map(Xe=>(Xe=Xe==null?void 0:Xe.slice(1,(Xe==null?void 0:Xe.length)-1),Xe))}else{let Ue=l==null?void 0:l.split("=="),Xe=(oe=Ue==null?void 0:Ue.filter(_a=>(_a==null?void 0:_a[0])==="$"))==null?void 0:oe[0];if(Xe&&!(Xe!=null&&Xe.includes("&"))){let _a=(te=Xe==null?void 0:Xe.replace("*",Ra))==null?void 0:te.split(Ra),Be=(_a==null?void 0:_a[0])===""?n==null?void 0:n.value:_a==null?void 0:_a[0];Be=(oa=(ka=Be==null?void 0:Be.replaceAll("{",""))==null?void 0:ka.replaceAll("}",""))==null?void 0:oa.replaceAll(oo,""),(Be==null?void 0:Be[0])==="$"&&(Be=(Re=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length))==null?void 0:Re.replaceAll(":","/")),m=Be==null?void 0:Be.split("/");let il=(Ea=(we=_a==null?void 0:_a[1])==null?void 0:we.replace("{",Ra))==null?void 0:Ea.split(Ra),vl=il==null?void 0:il[0];(vl==null?void 0:vl[(vl==null?void 0:vl.length)-1])===":"&&(vl=vl==null?void 0:vl.slice(0,(vl==null?void 0:vl.length)-1)),p=vl==null?void 0:vl.split(":"),v=(he=(ja=(Fa=(ya=il==null?void 0:il[1])==null?void 0:ya.replace("}",Ra))==null?void 0:Fa.split(Ra))==null?void 0:ja[0])==null?void 0:he.split(":");let Jl=(Qe=(Te=(Ze=il==null?void 0:il[(il==null?void 0:il.length)-1])==null?void 0:Ze.replace("}",Ra))==null?void 0:Te.split(Ra))==null?void 0:Qe[1];Jl&&Jl!==""&&(x=Co(Jl))}if(Ue!=null&&Ue.some(_a=>(_a==null?void 0:_a[0])==="&")){let _a=(je=Ue==null?void 0:Ue.filter(vl=>(vl==null?void 0:vl[0])==="&"))==null?void 0:je[0];(_a==null?void 0:_a[0])==="&"&&(_a=_a==null?void 0:_a.slice(1,_a==null?void 0:_a.length)),L=(_e=(Oe=_a==null?void 0:_a.replace("(",Ra))==null?void 0:Oe.split(Ra))==null?void 0:_e[0];let Be=(ra=(pa=_a==null?void 0:_a.replace(")",Ra))==null?void 0:pa.split(Ra))==null?void 0:ra[0];Be=(xa=($a=Be==null?void 0:Be.replace("(",Ra))==null?void 0:$a.split(Ra))==null?void 0:xa[1],(Be==null?void 0:Be[0])==="{"&&(Be=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length)),(Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])==="}"&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),C=Be==null?void 0:Be.split(",");let il=(Va=(Oa=_a==null?void 0:_a.replace(")",Ra))==null?void 0:Oa.split(Ra))==null?void 0:Va[1];il&&il!==""&&(U=Co(il))}else if(!Xe){let _a=Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1];_a=_a==null?void 0:_a.slice(1,(_a==null?void 0:_a.length)-1),_a=Pa.analyzeSplitToContent(_a,","),_a=_a==null?void 0:_a.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),_a=_a==null?void 0:_a.map(Be=>{var il,vl,Jl,Ya;if(Be=Be==null?void 0:Be.replaceAll("$",""),Be!=null&&Be.includes("{")){let ha="";Be=Be==null?void 0:Be.replaceAll("{","");let ma=Be==null?void 0:Be.split("}");ha=((vl=(il=ma==null?void 0:ma[0])==null?void 0:il.split(":"))==null?void 0:vl[0])+":"+(ma==null?void 0:ma[1]),Be=ha,Be=Be+":"}if(Be!=null&&Be.includes(oo)){let ha="",ma=Be==null?void 0:Be.split(oo);ha=((Ya=(Jl=ma==null?void 0:ma[0])==null?void 0:Jl.split(":"))==null?void 0:Ya[0])+":"+(ma==null?void 0:ma[1]),Be=ha,Be=Be+":"}return Be=Be==null?void 0:Be.replaceAll(":","/"),Be}),g=_a}}u="Select"}else r=l,_=l;return r!=null&&r.includes("@Pam")&&(r=(Ae=(ue=l==null?void 0:l.replace("@Pam",Ra))==null?void 0:ue.split(Ra))==null?void 0:Ae[0],_=r),{label:r,prop:_,options:o,allContents:s,filterContents:c,menus:m,groups:p,words:v,align:"center",formType:u,filter:x,functionName:L,functionRelatedWords:C,calculatorFilter:U,relatedPages:g}},Ci=(l,n)=>{var o,s,c,m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q,ye;let r=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((m=(c=(s=(o=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:o.replace(":",Ra))==null?void 0:s.split(Ra))==null?void 0:c[0])!=null&&m.includes(","))){let X=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),se=(p=X==null?void 0:X.replace(":",Ra))==null?void 0:p.split(Ra);if(((v=Pa.analyzeSplitToContent(se==null?void 0:se[1],"="))==null?void 0:v.length)===1){let qe=se==null?void 0:se[0],Da=[];(_=Pa.analyzeSplitToContent((u=se==null?void 0:se[1])==null?void 0:u.slice(1,((g=se==null?void 0:se[1])==null?void 0:g.length)-1),","))==null||_.forEach(ne=>{var B,re;((B=Pa.analyzeSplitToContent(ne,"="))==null?void 0:B.length)>1?((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)),Da=[...Da,...Ci(ne,n)]):((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)),Da.push((re=Ci(ne,n))==null?void 0:re[0]))}),r==null||r.push({label:qe,prop:qe,children:Da,align:"center"})}else{let qe=[];if(((x=Pa.analyzeSplitToContent(X,"="))==null?void 0:x.length)>=2){let ne=(L=Pa.analyzeSplitToContent(X,"="))==null?void 0:L[1],B=(C=Pa.analyzeSplitToContent(ne,"/"))==null?void 0:C.map(re=>((re==null?void 0:re[(re==null?void 0:re.length)-1])==="/"&&(re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1)),re));qe=B==null?void 0:B.map(re=>(re=Do(re),re))}let Da=(E=(D=(G=(H=(I=(U=X==null?void 0:X.replace("{",Ra))==null?void 0:U.split(Ra))==null?void 0:I[1])==null?void 0:H.replace("}",Ra))==null?void 0:G.split(Ra))==null?void 0:D[0])==null?void 0:E.split(",");Da==null||Da.forEach((ne,B)=>{(qe==null?void 0:qe.length)>0&&B===0?r==null||r.push({label:ne,prop:ne,align:"center",formType:"Select",relatedContents:qe==null?void 0:qe.map(re=>{let be={};return Da==null||Da.forEach((ce,Se)=>{be[ce]=re==null?void 0:re[Se]}),be}),options:qe==null?void 0:qe.map(re=>({label:re==null?void 0:re[0],value:re==null?void 0:re[0]})),mainKey:!0}):r==null||r.push({label:ne,prop:ne,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((S=Pa.analyzeSplitToContent(l,"="))==null?void 0:S.length)===2&&((k=(y=Pa.analyzeSplitToContent(l,"="))==null?void 0:y[1])==null?void 0:k[0])==="["){let X=[];if(((F=Pa.analyzeSplitToContent(l,"="))==null?void 0:F.length)>=2){let qe=($=Pa.analyzeSplitToContent(l,"="))==null?void 0:$[1],Da=(Y=Pa.analyzeSplitToContent(qe,"/"))==null?void 0:Y.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])==="/"&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),ne));X=Da==null?void 0:Da.map(ne=>(ne=Do(ne),ne))}let se=(Ne=(pe=l==null?void 0:l.replace("}",Ra))==null?void 0:pe.split(Ra))==null?void 0:Ne[0];se=(Ce=se==null?void 0:se.slice(1,se==null?void 0:se.length))==null?void 0:Ce.split(","),se==null||se.forEach((qe,Da)=>{(X==null?void 0:X.length)>0&&Da===0?r==null||r.push({label:qe,prop:qe,align:"center",formType:"Select",relatedContents:X==null?void 0:X.map(ne=>{let B={};return se==null||se.forEach((re,be)=>{B[re]=ne==null?void 0:ne[be]}),B}),options:X==null?void 0:X.map(ne=>({label:ne==null?void 0:ne[0],value:ne==null?void 0:ne[0]})),mainKey:!0}):r==null||r.push({label:qe,prop:qe,align:"center"})})}else(Q=Pa.analyzeSplitToContent(l,","))==null||Q.forEach(X=>{var se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a;if((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),(X==null?void 0:X[0])==="{"){let xa=Pa.analyzeSplitToContent(X,"="),Oa=xa==null?void 0:xa[(xa==null?void 0:xa.length)-1],Va=[],ue=[],Ae=[],Ue=[],Xe=[],_a=(se=Oa==null?void 0:Oa.replace("*",Ra))==null?void 0:se.split(Ra),Be=(_a==null?void 0:_a[0])===""?n==null?void 0:n.value:_a==null?void 0:_a[0];if((Be==null?void 0:Be[0])==="$"&&((ne=(Da=(qe=Be==null?void 0:Be.replace("@",Ra))==null?void 0:qe.split(Ra))==null?void 0:Da[0])!=null&&ne.includes("{"))&&(Be=(B=Be==null?void 0:Be.replace("{",""))==null?void 0:B.replace("}","")),Be=Be==null?void 0:Be.replaceAll(oo,""),(Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===":"&&(Be=Be!=null&&Be.includes("(@")?((re=Be==null?void 0:Be.split("(@"))==null?void 0:re[0])+":":((be=Be==null?void 0:Be.split("@"))==null?void 0:be[0])+":"),(Be==null?void 0:Be[0])==="$"&&(Be=(ce=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length))==null?void 0:ce.replaceAll(":","/")),Be!=null&&Be.includes("$")){let ma=(Se=Be==null?void 0:Be.split("$"))==null?void 0:Se[0];ma=(va=ma==null?void 0:ma.split("/"))==null?void 0:va[0],Be=ma+"/"+((Ca=Be==null?void 0:Be.split("$"))==null?void 0:Ca[1])+"/"}(Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])==="/"&&(Be==null?void 0:Be[(Be==null?void 0:Be.length)-2])==="/"&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Va=Be==null?void 0:Be.split("/");let il=(le=(Ga=_a==null?void 0:_a[1])==null?void 0:Ga.replace("{",Ra))==null?void 0:le.split(Ra);if((wa=(Pe=(na=_a==null?void 0:_a[1])==null?void 0:na.split("(@"))==null?void 0:Pe[0])!=null&&wa.includes("&&")||(Ve=(ze=(Fe=_a==null?void 0:_a[1])==null?void 0:Fe.split("@"))==null?void 0:ze[0])!=null&&Ve.includes("&&")){let ma=(ea=_a==null?void 0:_a[1])!=null&&ea.includes("(@")?(P=(qa=(Ja=_a==null?void 0:_a[1])==null?void 0:Ja.split("(@"))==null?void 0:qa[0])==null?void 0:P.split("&&"):(oe=(Z=(V=_a==null?void 0:_a[1])==null?void 0:V.split("@"))==null?void 0:Z[0])==null?void 0:oe.split("&&");Ue=ma==null?void 0:ma.map(Je=>{var Xa,Ee;return(Je==null?void 0:Je[0])==="*"&&(Je=Je==null?void 0:Je.slice(1,Je==null?void 0:Je.length)),Je=(Ee=(Xa=Je==null?void 0:Je.replace("{",Ra))==null?void 0:Xa.split(Ra))==null?void 0:Ee[0],(Je==null?void 0:Je[(Je==null?void 0:Je.length)-1])===":"&&(Je=Je==null?void 0:Je.slice(0,(Je==null?void 0:Je.length)-1)),Je=Je==null?void 0:Je.split(":"),Je});let ga=[];ma==null||ma.forEach((Je,Xa)=>{var Ee,Ge;(Je==null?void 0:Je[0])==="*"&&(Je=Je==null?void 0:Je.slice(1,Je==null?void 0:Je.length)),Je=(Ge=(Ee=Je==null?void 0:Je.replace("{",Ra))==null?void 0:Ee.split(Ra))==null?void 0:Ge[1],(Je==null?void 0:Je[(Je==null?void 0:Je.length)-1])==="}"&&(Je=Je==null?void 0:Je.slice(0,(Je==null?void 0:Je.length)-1)),Je=Je==null?void 0:Je.split(","),ga.push(Xa===0?(Je==null?void 0:Je.length)-1:Je==null?void 0:Je.length),Xe=[...Xe,...Je]}),ga=(te=Pa.prefixSum(ga))==null?void 0:te.map(Je=>Je==null?void 0:Je.total),Ue=Ue==null?void 0:Ue.map((Je,Xa)=>({number:ga==null?void 0:ga[Xa],contents:Je}))}let vl=il==null?void 0:il[0];(vl==null?void 0:vl[(vl==null?void 0:vl.length)-1])===":"&&(vl=vl==null?void 0:vl.slice(0,(vl==null?void 0:vl.length)-1)),ue=vl==null?void 0:vl.split(":"),Ae=(we=(Re=(oa=(ka=il==null?void 0:il[1])==null?void 0:ka.replace("}",Ra))==null?void 0:oa.split(Ra))==null?void 0:Re[0])==null?void 0:we.split(",");let Jl=(ya=xa==null?void 0:xa[0])==null?void 0:ya.slice(1,((Ea=xa==null?void 0:xa[0])==null?void 0:Ea.length)-2),Ya="",ha="";if((Fa=xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])!=null&&Fa.includes("(@")?(ha=(Ze=(he=(ja=xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])==null?void 0:ja.replace("(@",Ra))==null?void 0:he.split(Ra))==null?void 0:Ze[1],ha="(@"+ha):(Te=xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])!=null&&Te.includes("@")&&(ha=(Oe=(je=(Qe=xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])==null?void 0:Qe.replace("@",Ra))==null?void 0:je.split(Ra))==null?void 0:Oe[1],ha="@"+ha),((_e=Pa.analyzeSplitToContent(ha,"&"))==null?void 0:_e.length)>1){let ma=(ra=(pa=Pa.analyzeSplitToContent(ha,"}"))==null?void 0:pa.map(ga=>{var Je;return ga!=null&&ga.includes("@")||(ga=""),ga!=null&&ga.includes("@")&&(ga=(Je=Pa.analyzeSplitToContent(ga,":"))==null?void 0:Je[0],(ga==null?void 0:ga[(ga==null?void 0:ga.length)-1])===":"&&(ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1)),(ga==null?void 0:ga[0])==="("&&(ga=ga==null?void 0:ga.slice(1,(ga==null?void 0:ga.length)-1))),ga}))==null?void 0:ra.filter(ga=>ga!=="");ha=(ha==null?void 0:ha.length)===1?ma:"("+(ma==null?void 0:ma.join(","))+")"}ha&&ha!==""&&(Ya=Co(ha)),($a=Jl==null?void 0:Jl.split(","))==null||$a.forEach((ma,ga)=>{var Je,Xa,Ee;r.push({label:ma,prop:ma,align:"center",menus:Va,groups:(Ue==null?void 0:Ue.length)===0?ue:(Je=Ue==null?void 0:Ue.find(Ge=>(Ge==null?void 0:Ge.number)>=ga))==null?void 0:Je.contents,words:(Xe==null?void 0:Xe.length)===0?(Xa=Ae==null?void 0:Ae[ga])==null?void 0:Xa.split(":"):(Ee=Xe==null?void 0:Xe[ga])==null?void 0:Ee.split(":"),formType:(Va==null?void 0:Va.length)>0?"Select":"Input",mainKey:ga===0,filter:Ya,isMainPath:(Ue==null?void 0:Ue.findIndex(Ge=>(Ge==null?void 0:Ge.number)>=ga))===0})})}else r.push({label:X,prop:X,align:"center"})});else{let X=(ye=Pa.analyzeSplitToContent(l,","))==null?void 0:ye.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));X==null||X.forEach(se=>{r.push(ut(se,n))})}return r},Id=(l,n)=>{var m,p,v,g,u;let r=l;if(!l)return;let o="";((m=Pa.analyzeSplitToContent(l,"}"))==null?void 0:m.length)>1&&(r=(p=Pa.analyzeSplitToContent(l,"}"))==null?void 0:p[0],o=(v=Pa.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=[],c=[];return s.push({label:"排序",prop:"sort"}),s.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(g=Pa.analyzeSplitToContent(r,","))==null||g.forEach(_=>{var x;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(x=Ci(_,n))==null||x.forEach(L=>{s.push(L)}):s.push(ut(_,n))}),s!=null&&s.some(_=>{var x;return(x=_==null?void 0:_.prop)==null?void 0:x.includes("@")})&&(s=s==null?void 0:s.filter(_=>{var x;return!((x=_==null?void 0:_.prop)!=null&&x.includes("@"))})),o!==""&&((o==null?void 0:o[0])=="{"&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),(u=Pa.analyzeSplitToContent(o,","))==null||u.forEach(_=>{var x;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(x=Ci(_,n))==null||x.forEach(L=>{c.push(L)}):c.push(ut(_,n))})),{columns:s,secondColumns:c}},dt=l=>{var n,r,o,s,c;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition"))return l;{let m=(r=(n=l==null?void 0:l.replace("(",Ra))==null?void 0:n.split(Ra))==null?void 0:r[1],p=(s=(o=l==null?void 0:l.replace("(",Ra))==null?void 0:o.split(Ra))==null?void 0:s[0];return m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1),m=(c=Pa.analyzeSplitToContent(m,","))==null?void 0:c.map(v=>((v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),p+v)),m=m==null?void 0:m.join(","),l!=null&&l.includes("@Quote")&&(m!=null&&m.includes("@QuoteType")||(m=m===""?m+"@QuoteType=Manual":m+",@QuoteType=Manual"),m!=null&&m.includes("@QuoteSonSync")||(m=m===""?m+"@QuoteSonSync=No":m+",@QuoteSonSync=No"),m!=null&&m.includes("@QuoteFatherSync")||(m=m===""?m+"@QuoteFatherSync=Yes":m+",@QuoteFatherSync=Yes")),m}},ls=l=>{let n=l==null?void 0:l.map(r=>{var o,s;return{menus:r==null?void 0:r.menus,content:((o=r==null?void 0:r.menus)==null?void 0:o.join("/"))+Ra+((s=r==null?void 0:r.groups)==null?void 0:s.join("/"))}});return n=n==null?void 0:n.filter(r=>{var o;return(r==null?void 0:r.menus)&&((o=r==null?void 0:r.menus)==null?void 0:o.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 o,s;return{menus:(o=r==null?void 0:r.split(Ra))==null?void 0:o[0],groups:((s=r==null?void 0:r.split(Ra))==null?void 0:s[1])??[]}}),n},Od=(l,n,r="")=>{var H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va;let o=[];if(((H=l==null?void 0:l[0])==null?void 0:H[0])!=="*"&&((G=l==null?void 0:l[0])==null?void 0:G[0])!=="$")return;let s=Pa.analyzeSplitToContent(l==null?void 0:l[0],":"),c=s==null?void 0:s.filter(ue=>!((ue==null?void 0:ue[0])!=="{"&&(ue==null?void 0:ue[0])!=="["));o=(D=s==null?void 0:s.filter(ue=>(ue==null?void 0:ue[0])!=="{"&&(ue==null?void 0:ue[0])!=="["))==null?void 0:D.join("");let m="",p="";if((o==null?void 0:o[(o==null?void 0:o.length)-1])===":"&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o!=null&&o.includes("(@")&&(o==null?void 0:o[0])==="*"&&(m="(@"+((E=o==null?void 0:o.split("(@"))==null?void 0:E[1]),o=(S=o==null?void 0:o.split("(@"))==null?void 0:S[0]),o!=null&&o.includes("@")&&(o==null?void 0:o[0])==="*"&&(m="@"+((k=(y=o==null?void 0:o.replace("@",Ra))==null?void 0:y.split(Ra))==null?void 0:k[1]),o=($=(F=o==null?void 0:o.replace("@",Ra))==null?void 0:F.split(Ra))==null?void 0:$[0]),(o==null?void 0:o[0])==="*"?(o=o==null?void 0:o.slice(1,o==null?void 0:o.length),o=o==null?void 0:o.split(":")):(p=O.cloneDeep(o)+":",o=[]),p=p+((c==null?void 0:c[0])??""),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),m!==""&&p!=="")if((p==null?void 0:p[(p==null?void 0:p.length)-1])===")")if(p!=null&&p.includes("(@")){let ue=(Y=p==null?void 0:p.split("(@"))==null?void 0:Y[0],Ae=(pe=p==null?void 0:p.split("(@"))==null?void 0:pe[1];Ae="(@"+(Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1))+m,p=ue+Ae}else{let ue=(Ce=(Ne=p==null?void 0:p.replace("@",Ra))==null?void 0:Ne.split(Ra))==null?void 0:Ce[0],Ae=(ye=(Q=p==null?void 0:p.replace("@",Ra))==null?void 0:Q.split(Ra))==null?void 0:ye[1];Ae="(@"+Ae+m,p=ue+Ae}else p=p+m;let v=c==null?void 0:c[1];(p==null?void 0:p[0])==="["&&(v=O.cloneDeep(p)+(v??""),p="");let g=v?Do(v):[];!(g!=null&&g.every(ue=>Array.isArray(ue)))&&(g==null?void 0:g.length)>0&&(g=[g]);let u=(X=Pa.analyzeSplitToContent(p,"@"))!=null&&X[1]?"@"+((se=Pa.analyzeSplitToContent(p,"@"))==null?void 0:se[1]):"";if(p=(qe=Pa.analyzeSplitToContent(p,"@"))==null?void 0:qe[0],p!=null&&p.includes("(@")&&(((Da=Pa.analyzeSplitToContent(p,"}"))==null?void 0:Da.length)===1&&((be=(ne=Pa.analyzeSplitToContent(p,"}"))==null?void 0:ne[0])==null?void 0:be[((re=(B=Pa.analyzeSplitToContent(p,"}"))==null?void 0:B[0])==null?void 0:re.length)-1])===")"||(ce=Pa.analyzeSplitToContent(p,"}"))!=null&&ce[1]&&((Se=Pa.analyzeSplitToContent(p,"}"))==null?void 0:Se[1])!=="@")&&(u="(@"+((va=p==null?void 0:p.split("(@"))==null?void 0:va[1]),p=(Ca=p==null?void 0:p.split("(@"))==null?void 0:Ca[0]),(p==null?void 0:p[0])==="$"&&(u=O.cloneDeep(p)+(u??""),p=""),r!=="")if(m!=="")u=(r==null?void 0:r[(r==null?void 0:r.length)-1])!==")"?r+m:(r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1))+","+m;else{let ue="";if(r!=null&&r.includes("(@")){let Ae=(wa=(Pe=(na=(le=(Ga=r==null?void 0:r.replace("(@",Ra))==null?void 0:Ga.split(Ra))==null?void 0:le[0])==null?void 0:na.replace("{",Ra))==null?void 0:Pe.split(Ra))==null?void 0:wa[0];ue=((Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])===":"?Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1):Ae)+"(@"+((ze=(Fe=r==null?void 0:r.replace("(@",Ra))==null?void 0:Fe.split(Ra))==null?void 0:ze[1])}else if(r!=null&&r.includes("@")){let Ae=(ea=(Ve=r==null?void 0:r.replace("@",Ra))==null?void 0:Ve.split(Ra))==null?void 0:ea[0];(Ae==null?void 0:Ae[0])==="$"?Ae=(Ja=Ae==null?void 0:Ae.replaceAll("{",""))==null?void 0:Ja.replaceAll("}",""):Ae=(P=(qa=Ae==null?void 0:Ae.replace("{",Ra))==null?void 0:qa.split(Ra))==null?void 0:P[0],ue=((Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])===":"?Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1):Ae)+"@"+((Z=(V=r==null?void 0:r.replace("@",Ra))==null?void 0:V.split(Ra))==null?void 0:Z[1])}u=ue===""?r:ue}if(u!==""){(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),(u==null?void 0:u[(u==null?void 0:u.length)-1])===":"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1));let ue="";if(u!=null&&u.includes("(@")){ue=(te=(oe=u==null?void 0:u.replace("(@",Ra))==null?void 0:oe.split(Ra))==null?void 0:te[0];let Ae=(oa=(ka=u==null?void 0:u.replace("(@",Ra))==null?void 0:ka.split(Ra))==null?void 0:oa[1];Ae="@"+(Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1));let Ue=(Re=Pa.analyzeSplitToContent(Ae,","))==null?void 0:Re.map(Xe=>((Xe==null?void 0:Xe[(Xe==null?void 0:Xe.length)-1])===","&&(Xe=Xe==null?void 0:Xe.slice(0,(Xe==null?void 0:Xe.length)-1)),(Xe==null?void 0:Xe[(Xe==null?void 0:Xe.length)-1])!==")"&&(Xe=Xe+")"),dt(Xe)));u=ue+"("+(Ue==null?void 0:Ue.join(","))+")"}else{ue=(Ea=(we=u==null?void 0:u.replace("@",Ra))==null?void 0:we.split(Ra))==null?void 0:Ea[0];let Ae=(Fa=(ya=u==null?void 0:u.replace("@",Ra))==null?void 0:ya.split(Ra))==null?void 0:Fa[1];if(Ae){Ae="@"+Ae;let Ue=(ja=Pa.analyzeSplitToContent(Ae,","))==null?void 0:ja.map(Xe=>((Xe==null?void 0:Xe[(Xe==null?void 0:Xe.length)-1])!==")"&&(Xe=Xe+")"),dt(Xe)));u=ue+"("+(Ue==null?void 0:Ue.join(","))+")"}else u=ue}}(p==null?void 0:p[(p==null?void 0:p.length)-1])==="@"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1));let _=Id(p,n),x=p===""?[]:(_==null?void 0:_.columns)??[],L=ua.getColumnChild(x),C=L;C=C==null?void 0:C.filter(ue=>{var Ae,Ue;return(ue==null?void 0:ue.filter)&&(ue==null?void 0:ue.filter)!==""&&(((Ae=ue==null?void 0:ue.filter)==null?void 0:Ae.includes("@QuoteSonSync"))||((Ue=ue==null?void 0:ue.filter)==null?void 0:Ue.includes("@QuoteFatherSync")))});let U=C==null?void 0:C.filter(ue=>{var Ae,Ue,Xe;return((Ae=ue==null?void 0:ue.filter)==null?void 0:Ae.includes("@QuoteSonSync"))&&((Xe=(Ue=ue==null?void 0:ue.filter)==null?void 0:Ue.split(","))==null?void 0:Xe.find(_a=>(_a==null?void 0:_a.includes("@QuoteSonSync"))&&(_a==null?void 0:_a.includes("Yes"))))}),I=C==null?void 0:C.filter(ue=>{var Ae,Ue,Xe;return((Ae=ue==null?void 0:ue.filter)==null?void 0:Ae.includes("@QuoteFatherSync"))&&((Xe=(Ue=ue==null?void 0:ue.filter)==null?void 0:Ue.split(","))==null?void 0:Xe.find(_a=>(_a==null?void 0:_a.includes("@QuoteFatherSync"))&&(_a==null?void 0:_a.includes("Yes"))))});if(L=L==null?void 0:L.map(ue=>{var Ae,Ue;return{menus:ue==null?void 0:ue.menus,content:((Ae=ue==null?void 0:ue.menus)==null?void 0:Ae.join("/"))+Ra+((Ue=ue==null?void 0:ue.groups)==null?void 0:Ue.join("/"))}}),I=ls(I),U=ls(U),L=L==null?void 0:L.filter(ue=>{var Ae;return(ue==null?void 0:ue.menus)&&((Ae=ue==null?void 0:ue.menus)==null?void 0:Ae.length)>0}),L=L==null?void 0:L.map(ue=>ue==null?void 0:ue.content),L=[...new Set(L)],L=L==null?void 0:L.map(ue=>{var Ae,Ue;return{menus:(Ae=ue==null?void 0:ue.split(Ra))==null?void 0:Ae[0],groups:((Ue=ue==null?void 0:ue.split(Ra))==null?void 0:Ue[1])??[]}}),x!=null&&x.some(ue=>{var Ae;return Array.isArray(ue==null?void 0:ue.children)&&((Ae=ue==null?void 0:ue.children)==null?void 0:Ae.length)>0})&&(x=[x]),(g==null?void 0:g.length)>0&&(Array.isArray(g==null?void 0:g[0])&&((he=g==null?void 0:g[0])!=null&&he.every(ue=>Array.isArray(ue)))?g=g==null?void 0:g.map((ue,Ae)=>(ue=ue.map((Ue,Xe)=>(Ue.unshift("{}"),Ue.unshift((Xe+1).toString()),Ue)),ue)):g=g==null?void 0:g.map((ue,Ae)=>(ue.unshift("{}"),ue.unshift((Ae+1).toString()),ue))),_!=null&&_.secondColumns&&((Ze=_==null?void 0:_.secondColumns)==null?void 0:Ze.length)>0&&((g==null?void 0:g.length)>0?g=g==null?void 0:g.map((ue,Ae)=>{var Ue,Xe;return Array.isArray(ue==null?void 0:ue[0])?ue=ue==null?void 0:ue.map((_a,Be)=>{var il,vl;return _a.unshift((vl=(il=_==null?void 0:_.secondColumns)==null?void 0:il[Be])==null?void 0:vl.prop),_a}):ue.unshift((Xe=(Ue=_==null?void 0:_.secondColumns)==null?void 0:Ue[Ae])==null?void 0:Xe.prop),ue}):g=(Te=_==null?void 0:_.secondColumns)==null?void 0:Te.map((ue,Ae)=>(ue=[ue==null?void 0:ue.label],ue.push(Ae),ue)),x.unshift({label:"",prop:"disabled",sortable:!1})),(x==null?void 0:x.length)>0){let ue=O.cloneDeep(x);Array.isArray(ue==null?void 0:ue[0])&&(ue=ue==null?void 0:ue[0]);let Ae=ua.getColumnChild(ue);Ae=Ae==null?void 0:Ae.map(Ue=>Ue==null?void 0:Ue.filter),Ae=Ae==null?void 0:Ae.filter(Ue=>Ue&&Ue!==""),Ae=[...new Set(Ae)],(Ae==null?void 0:Ae.length)>0&&(u=Ra+(u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1))+(u!=null&&u.slice(1,(u==null?void 0:u.length)-1)?",":"")+((Qe=O.cloneDeep(Ae))==null?void 0:Qe.join(";")))}if((u==null?void 0:u[0])!=="("&&(u!=null&&u.includes("(@"))){let ue=(Oe=(je=u==null?void 0:u.replace("(",Ra))==null?void 0:je.split(Ra))==null?void 0:Oe[0],Ae=[{menus:(pa=(_e=ue==null?void 0:ue.split("*"))==null?void 0:_e[0])==null?void 0:pa.replaceAll(":","/"),groups:(ra=ue==null?void 0:ue.split("*"))==null?void 0:ra[1]}],Ue=(xa=($a=u==null?void 0:u.replace("(",Ra))==null?void 0:$a.split(Ra))==null?void 0:xa[1];(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])===")"&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1)),Ue=Pa.analyzeSplitToContent(Ue,","),(Oa=Ue==null?void 0:Ue.find(Xe=>Xe==null?void 0:Xe.includes("@QuoteFatherSync")))!=null&&Oa.includes("Yes")&&(I=[...I,...Ae]),(Va=Ue==null?void 0:Ue.find(Xe=>Xe==null?void 0:Xe.includes("@QuoteSonSync")))!=null&&Va.includes("Yes")&&(U=[...U,...Ae])}return{groupName:o,tableColumns:x,tableFilter:u,tableContents:g,columns:(_==null?void 0:_.secondColumns)??[],relatedQuotes:L,fatherSyncContents:I,sonSyncContents:U}},Ys=(l,n)=>(l=l==null?void 0:l.map((r,o)=>{var s,c,m,p;if(Array.isArray(r))r=r==null?void 0:r.map(v=>{var g,u,_,x;return v!=null&&v.isMainPath||(((g=v==null?void 0:v.children)==null?void 0:g.length)>0?v.children=Ys(v.children,n):((u=v==null?void 0:v.menus)==null?void 0:u.length)>0&&!((_=r==null?void 0:r[0])!=null&&_.isMainPath)&&(v.menus=(x=v.menus)==null?void 0:x.map((L,C)=>{var U,I;return((U=v.menus)==null?void 0:U.length)-1===C&&L===""&&(n==null?void 0:n.parentContent)+"/"!==((I=v.menus)==null?void 0:I.join("/"))&&(L=n==null?void 0:n.value),v}),v.bindMenus=v.menus)),v});else{if(o===0&&((s=r.menus)==null?void 0:s.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((c=r.menus)==null?void 0:c.length)>0&&!((m=l==null?void 0:l[0])!=null&&m.isMainPath)&&(r.menus=(p=r.menus)==null?void 0:p.map((v,g)=>{var u,_;return((u=r.menus)==null?void 0:u.length)-1===g&&v===""&&(n==null?void 0:n.parentContent)+"/"!==((_=r.menus)==null?void 0:_.join("/"))&&(v=n==null?void 0:n.value),v}),r.bindMenus=r.menus)}return r}),l),Ld=(l,n)=>(l=l==null?void 0:l.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=Ys(r.contents,n)),r)),l),pt=(l,n)=>{let r=l;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(o=>(o=pt(o,n),o)):r=r==null?void 0:r.map(o=>{var s,c;return o!=null&&o.children&&((s=o==null?void 0:o.children)==null?void 0:s.length)>0?o.children=pt(o==null?void 0:o.children,n):o!=null&&o.words&&((c=o==null?void 0:o.words)==null?void 0:c.length)>0&&(n!=null&&n.find(m=>{var p,v,g,u;return((u=(p=o==null?void 0:o.prop)==null?void 0:p.split("."))==null?void 0:u[((g=(v=o==null?void 0:o.prop)==null?void 0:v.split("."))==null?void 0:g.length)-1])===m}))&&(o.mainKey=!0),o}),r};let ur="$R";const Rd=O.useUnit(O.pinia),{selectTitle:fn}=O.storeToRefs(Rd),hn=[{key:"@interfaceMaxRow",value:"onNumSlice",order:1},{key:"@QuoteType",value:"onRandomContents",order:2},{key:"@interfaceType",value:"onInterfaceTypeContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@QuoteMainPam",value:"onMainTagContents",order:3},{key:"@interfaceTopButton",value:"onButtonContents",order:1},{key:"@interfaceColumnButton",value:"onPamButtonContents",order:1},{key:"@interfaceRowButton",value:"onRowButtonContents",order:1},{key:"@interfaceBottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@interfaceRowNum",value:"onRowNum",order:1},{key:"@interfaceFixRow",value:"onFixRow",order:1},{key:"@interfaceReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@interfaceTab",value:"onTabs",order:1},{key:"@interfaceSinChoice",value:"onSinChoice",order:1},{key:"@interfaceTextSize",value:"onTextSize",order:1},{key:"@interfaceTextRGBA",value:"onTextRGBA",order:1},{key:"@interfacePosition",value:"onPosition",order:4},{key:"@interfaceSize",value:"onSize",order:4},{key:"@interfaceShowType",value:"onShowType",order:1},{key:"@interfaceStepName",value:"onStepName",order:1},{key:"@interfaceStep",value:"onStep",order:1},{key:"@interfaceBackGround",value:"onBackGround",order:1}];var no=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(no||{});const $d=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.contents;return n.push({key:"backGround",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Vd=l=>{const n=Xs(l==null?void 0:l.filter);return n?Zs(l==null?void 0:l.contents,{position:n}):l==null?void 0:l.contents},Pd=l=>{const n=Xs(l==null?void 0:l.filter);return n?Zs(l==null?void 0:l.contents,{size:n}):l==null?void 0:l.contents},Fd=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.contents;const r=Number(l==null?void 0:l.filter);return n.push({key:"textSize",contents:Number.isNaN(r)?l==null?void 0:l.filter:r}),n}return l==null?void 0:l.contents},jd=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.contents;return n.push({key:"textRGBA",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Hd=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(o=>{var s;return(o==null?void 0:o.key)==="tableContents"&&(o.contents=(s=o.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),o})},Ud=async l=>{var n,r,o,s,c,m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q;if((l==null?void 0:l.filter)==="Random")return(n=l==null?void 0:l.contents)==null?void 0:n.map(X=>((X==null?void 0:X.key)==="tableContents"&&(X.contents=Pa.shuffle(X.contents)),X));if((l==null?void 0:l.filter)==="Auto"){let ye=(o=(r=l==null?void 0:l.contents)==null?void 0:r.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:o.contents;Array.isArray(ye==null?void 0:ye[0])&&(ye=ye==null?void 0:ye[0]),ye=ua.getColumnChild(ye);let X=ye==null?void 0:ye.filter(ce=>(ce==null?void 0:ce.filter)&&(ce==null?void 0:ce.filter)!==""),se=new Map,qe=[];X==null||X.forEach(ce=>{var Se,va;se.get((Se=ce==null?void 0:ce.menus)==null?void 0:Se.join("/"))||(se.set((va=ce==null?void 0:ce.menus)==null?void 0:va.join("/"),ce),qe.push(ce))});let Da=(c=(s=fn==null?void 0:fn.value)==null?void 0:s.find(ce=>(ce==null?void 0:ce.condition)==="child"))==null?void 0:c.value,ne=qe==null?void 0:qe.map(ce=>{var Se,va,Ca;return ce=(Se=ce==null?void 0:ce.menus)==null?void 0:Se.join("/"),(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])==="/"&&((Ca=(va=fn==null?void 0:fn.value)==null?void 0:va.find(Ga=>(Ga==null?void 0:Ga.condition)==="child"))==null?void 0:Ca.parentContent)+"/"!==ce?ce=ce+Da:(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])==="/"&&(ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1)),ce}),B=qe==null?void 0:qe.map(ce=>ce==null?void 0:ce.groups),re=ne==null?void 0:ne.map(async ce=>{let Se=await Wr(ce,!1);return{path:ce,contents:Se}});re=await Promise.all(re);let be=re==null?void 0:re.map((ce,Se)=>{var Ca,Ga,le,na,Pe,wa,Fe;let va=(Ca=ce==null?void 0:ce.contents)==null?void 0:Ca.filter(ze=>{var Ve,ea;return(ze==null?void 0:ze.name)===((ea=B==null?void 0:B[Se])==null?void 0:ea[((Ve=B==null?void 0:B[Se])==null?void 0:Ve.length)-1])});return va=(na=(le=(Ga=va==null?void 0:va[0])==null?void 0:Ga.compData)==null?void 0:le.find(ze=>(ze==null?void 0:ze.key)==="tableContents"))==null?void 0:na.contents,(ce==null?void 0:ce.path)===((wa=(Pe=fn==null?void 0:fn.value)==null?void 0:Pe.find(ze=>(ze==null?void 0:ze.condition)==="child"))==null?void 0:wa.parentContent)&&(va=((Fe=va==null?void 0:va.map(ze=>{for(let Ve in ze)if(ze[Ve]===Da)return ze}))==null?void 0:Fe.filter(ze=>ze))??[]),va??[]});if(be=be==null?void 0:be.map(ce=>(ce=ce==null?void 0:ce.map(Se=>{var Ca;let va={};for(let Ga in Se)if(X!=null&&X.find(le=>{var na,Pe;return((Pe=(na=le==null?void 0:le.words)==null?void 0:na[0])==null?void 0:Pe.replaceAll("'",""))===Ga})){let le=(Ca=X==null?void 0:X.find(na=>{var Pe,wa;return((wa=(Pe=na==null?void 0:na.words)==null?void 0:Pe[0])==null?void 0:wa.replaceAll("'",""))===Ga}))==null?void 0:Ca.prop;va[le]=Se==null?void 0:Se[Ga]}return va}),ce)),be=Pa.cartesianProduct(be),Array.isArray(be==null?void 0:be[0])&&(be=be==null?void 0:be[0]),(be==null?void 0:be.length)>0&&((_=(p=(m=X==null?void 0:X[0])==null?void 0:m.menus)==null?void 0:p.join("/"))==null?void 0:_[((u=(g=(v=X==null?void 0:X[0])==null?void 0:v.menus)==null?void 0:g.join("/"))==null?void 0:u.length)-1])==="/")return(x=l==null?void 0:l.contents)==null?void 0:x.map(Se=>{var va;return(Se==null?void 0:Se.key)==="tableContents"&&(be==null?void 0:be.length)>0&&(Se.contents=((va=Se.contents)==null?void 0:va.length)>0?Se.contents:be),Se})}if((l==null?void 0:l.filter)==="Manual"){let ye=[],X=[],se=(C=(L=l==null?void 0:l.contents)==null?void 0:L.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:C.contents;(se==null?void 0:se[(se==null?void 0:se.length)-1])===")"?se=(I=(U=se==null?void 0:se.replace("(",ur))==null?void 0:U.split(ur))==null?void 0:I[0]:se="",se!==""&&(ye=((G=(H=se==null?void 0:se.split("*"))==null?void 0:H[0])==null?void 0:G.split(":"))??[],X=((k=(y=(S=(E=(D=se==null?void 0:se.split("*"))==null?void 0:D[1])==null?void 0:E.replace("{",ur))==null?void 0:S.split(ur))==null?void 0:y[0])==null?void 0:k.split(":"))??[]);let qe=($=(F=l==null?void 0:l.contents)==null?void 0:F.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:$.contents;qe=(pe=(Y=qe==null?void 0:qe.replace("(",ur))==null?void 0:Y.split(ur))==null?void 0:pe[1],qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1);let Da=(Ne=l==null?void 0:l.contents)==null?void 0:Ne.map(B=>{var re,be,ce,Se,va,Ca,Ga,le,na;return(B==null?void 0:B.key)==="header"&&((re=B==null?void 0:B.contents)!=null&&re.every(Pe=>(Pe==null?void 0:Pe.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((be=B==null?void 0:B.contents)==null?void 0:be[0])?B.contents=(ce=B==null?void 0:B.contents)==null?void 0:ce.map((Pe,wa)=>{var Fe,ze,Ve;return Pe!=null&&Pe.isMainPath||(wa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ye,Pe.groups=((Fe=Pe.groups)==null?void 0:Fe.length)===0?X:Pe.groups,Pe.words=((ze=Pe.words)==null?void 0:ze.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=qe,(!(Pe!=null&&Pe.menus)||((Ve=Pe==null?void 0:Pe.menus)==null?void 0:Ve.length)===0)&&(Pe.menus=ye)):(Pe.mainKey=!1,Pe.bindMenus=ye)),Pe}):Array.isArray((Se=B==null?void 0:B.contents)==null?void 0:Se[0])&&((Ga=(Ca=(va=B==null?void 0:B.contents)==null?void 0:va[0])==null?void 0:Ca.filter(()=>(ye==null?void 0:ye.length)>0))==null?void 0:Ga.length)>0&&(B.contents[0]=(na=(le=B==null?void 0:B.contents)==null?void 0:le[0])==null?void 0:na.map((Pe,wa)=>{var Fe,ze,Ve;return Pe!=null&&Pe.isMainPath||(wa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ye,Pe.groups=((Fe=Pe.groups)==null?void 0:Fe.length)===0?X:Pe.groups,Pe.words=((ze=Pe.words)==null?void 0:ze.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=qe,(!(Pe!=null&&Pe.menus)||Array.isArray(Pe==null?void 0:Pe.menus)&&((Ve=Pe==null?void 0:Pe.menus)==null?void 0:Ve.length)===0)&&(ye==null?void 0:ye.length)>0&&(Pe.menus=ye)):(Pe.mainKey=!1,Pe.bindMenus=ye)),Pe}))),B}),ne=(Ce=Da==null?void 0:Da.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Ce.contents;if(Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),ne=ua.getColumnChild(ne),ne!=null&&ne.some(B=>{var re,be;return((be=B==null?void 0:B.menus)==null?void 0:be[((re=B==null?void 0:B.menus)==null?void 0:re.length)-1])===""})){let B=(Q=fn==null?void 0:fn.value)==null?void 0:Q.find(re=>(re==null?void 0:re.condition)==="child");Da=Ld(Da,B)}return Da}return l==null?void 0:l.contents},qd=async l=>{if((l==null?void 0:l.filter)==="Form"){let n=l==null?void 0:l.contents;return n.push({key:"enableWrap",contents:1}),n}if((l==null?void 0:l.filter)==="FormBlock"){let n=l==null?void 0:l.contents;return n.push({key:"enableWrap",contents:2}),n}if((l==null?void 0:l.filter)==="FormText"){let n=l==null?void 0:l.contents;return n.push({key:"enableWrap",contents:3}),n}return l==null?void 0:l.contents},Wd=l=>{var o,s,c,m;let n=l==null?void 0:l.filter;if(n!=null&&n.includes("*")&&(n="({"+((s=(o=n==null?void 0:n.replace("{",ur))==null?void 0:o.split(ur))==null?void 0:s[1])),n=(c=n==null?void 0:n.replaceAll("{",""))==null?void 0:c.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 p=[];return r==null||r.forEach(g=>{let u={};for(let _ in g){let x=_;x!=null&&x.includes("[")||(u[x]=g[_])}p.push(u)}),(m=l==null?void 0:l.contents)==null?void 0:m.map(g=>{var _,x,L;let u=(x=(_=l==null?void 0:l.contents)==null?void 0:_.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:x.contents;if(u=(L=ua.getEqualChild(u))==null?void 0:L.filter(C=>(C==null?void 0:C.label)!=="操作"),(g==null?void 0:g.key)==="tableContents"){let U=ua.tableToForm(g==null?void 0:g.contents,u);p==null||p.forEach(I=>{var H,G;for(let D in I)!((H=U==null?void 0:U[0])!=null&&H.find(E=>{var S;return(E==null?void 0:E.key)===D||((S=E==null?void 0:E.key)==null?void 0:S.includes(D))}))&&!(U!=null&&U.find(E=>{var S;return(E==null?void 0:E.key)===D||((S=E==null?void 0:E.key)==null?void 0:S.includes(D))}))||(((G=I[D])==null?void 0:G[0])!=="!"?U=U==null?void 0:U.filter(E=>{var S,y;return((S=E==null?void 0:E.find(k=>{var F;return(k==null?void 0:k.key)===D||((F=k==null?void 0:k.key)==null?void 0:F.includes(D))}))==null?void 0:S.value)===I[D]||Array.isArray(I==null?void 0:I[D])&&((y=I==null?void 0:I[D])==null?void 0:y.find(k=>{var F;return((F=E==null?void 0:E.find($=>{var Y;return($==null?void 0:$.key)===D||((Y=$==null?void 0:$.key)==null?void 0:Y.includes(D))}))==null?void 0:F.value)===k}))}):U=U==null?void 0:U.filter(E=>{var S;return((S=E==null?void 0:E.find(y=>{var k;return(y==null?void 0:y.key)===D||((k=y==null?void 0:y.key)==null?void 0:k.includes(D))}))==null?void 0:S.value)!==I[D]}))}),(U==null?void 0:U.length)===0?g.contents=[]:g.contents=U==null?void 0:U.map(I=>{let H={};return I==null||I.forEach(G=>{H[G==null?void 0:G.key]=G==null?void 0:G.value}),H})}return g})}return l==null?void 0:l.contents},Kd=l=>l==null?void 0:l.contents,Gd=l=>l==null?void 0:l.contents,Yd=l=>{var n,r,o,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(o=(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:o.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=pt(p.contents,c)),p))}return l==null?void 0:l.contents},Jd=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 c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=n==null?void 0:n.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},Xd=l=>l==null?void 0:l.contents,Zd=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 c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=n==null?void 0:n.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},Qd=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 o=l==null?void 0:l.contents,s=(r=n==null?void 0:n.split(","))==null?void 0:r.map(c=>({label:c,prop:c}));return o.push({key:"bottomButton",contents:s}),o}return l==null?void 0:l.contents},ep=l=>{var n,r,o,s;if(((n=l==null?void 0:l.filter)==null?void 0:n[0])!=="["){const c=parseInt(l==null?void 0:l.filter);return!c||Number.isNaN(c)?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(p=>{var v;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(v=p.contents)==null?void 0:v.map(g=>(g.width=c,g))),p})}if(((o=l==null?void 0:l.filter)==null?void 0:o[0])==="["){let c=Do(l==null?void 0:l.filter),m=Array.isArray(c)?c.map(v=>parseInt(v)).filter(v=>!!v&&!Number.isNaN(v)):[];return m.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(v=>{if((v==null?void 0:v.key)==="formContent"){const g=v.contents??[];v.contents=g.map((u,_)=>{const x=_+1;let L=0,C=0;for(let I=0;I<m.length;I++){if(C+=m[I],x<=C){L=I;break}I===m.length-1&&(L=m.length-1)}const U=m[L]||m[m.length-1]||1;return u.width=U,u})}return v}):l==null?void 0:l.contents}return l==null?void 0:l.contents},ap=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 c,m,p;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(p=s.contents[0])==null?void 0:p.map(v=>(r!=null&&r.find(g=>g===(v==null?void 0:v.prop))&&(v.fixed="left"),v)):s.contents=(m=s.contents)==null?void 0:m.map(v=>(r!=null&&r.find(g=>g===(v==null?void 0:v.prop))&&(v.fixed="left"),v))),s})}return l==null?void 0:l.contents},lp=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 o=c=>(r!=null&&r.find(m=>m===(c==null?void 0:c.prop))&&(c.required=!0),c!=null&&c.children&&Array.isArray(c.children)&&(c.children=c.children.map(m=>o(m))),c);return(n=l==null?void 0:l.contents)==null?void 0:n.map(c=>{var m,p,v;return(c==null?void 0:c.key)==="header"&&(Array.isArray((m=c==null?void 0:c.contents)==null?void 0:m[0])?c.contents[0]=(v=c.contents[0])==null?void 0:v.map(g=>o(g)):c.contents=(p=c.contents)==null?void 0:p.map(g=>o(g))),c})}return l==null?void 0:l.contents},rp=async l=>{var o,s,c,m,p,v,g,u,_,x,L,C,U,I,H,G,D;const n=O.useUnit(O.pinia),{chooseTitle:r}=O.storeToRefs(n);if((l==null?void 0:l.filter)==="true"){let E=await Wr(((s=(o=r==null?void 0:r.value)==null?void 0:o[0])==null?void 0:s.parentContent)??((m=(c=r==null?void 0:r.value)==null?void 0:c[0])==null?void 0:m.relatedContent),!1),S=(v=(p=r==null?void 0:r.value)==null?void 0:p[0])==null?void 0:v.value;(u=(g=E==null?void 0:E[0])==null?void 0:g.compData)!=null&&u.find($=>($==null?void 0:$.key)==="header")?E=(_=E==null?void 0:E[0])==null?void 0:_.compData:E=(L=(x=E==null?void 0:E.filter($=>{var Y;return(Y=$==null?void 0:$.compData)==null?void 0:Y.find(pe=>(pe==null?void 0:pe.key)==="header")}))==null?void 0:x[0])==null?void 0:L.compData;let y=(C=E==null?void 0:E.find($=>($==null?void 0:$.key)==="header"))==null?void 0:C.contents;Array.isArray(y==null?void 0:y[0])&&(y=y==null?void 0:y[0]),y=((U=y==null?void 0:y.find($=>$==null?void 0:$.isMainKey))==null?void 0:U.prop)??((I=y==null?void 0:y[0])==null?void 0:I.prop);let k=(G=(H=E==null?void 0:E.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:H.contents)==null?void 0:G.find($=>($==null?void 0:$[y])===S);return(D=l==null?void 0:l.contents)==null?void 0:D.map($=>{var Y;return($==null?void 0:$.key)==="formContent"&&($.contents=(Y=$.contents)==null?void 0:Y.map(pe=>(pe.value=k==null?void 0:k[pe==null?void 0:pe.prop],pe))),$})}return l==null?void 0:l.contents},np=l=>{var n,r,o,s,c;if((n=l==null?void 0:l.extra)!=null&&n.row){let m=l==null?void 0:l.filter;if(m!=null&&m.includes("*")&&(m="({"+((o=(r=m==null?void 0:m.replace("{",ur))==null?void 0:r.split(ur))==null?void 0:o[1])),m=(s=m==null?void 0:m.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(m==null?void 0:m[0])!=="("&&(m="("+m+")"),m.slice(1,(m==null?void 0:m.length)-1)==="undefined")return l==null?void 0:l.contents;let p=ua.calculatorAndToOr(m),v=p==null?void 0:p[0],g=(c=l==null?void 0:l.extra)==null?void 0:c.row,u=[];for(let _ in v)(v==null?void 0:v[_])===(g==null?void 0:g[_])?u.push(!0):u.push(!1);return u!=null&&u.every(_=>_===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},op=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},ip=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},tp=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"fixType",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},sp=l=>{var n;if(l!=null&&l.filter){let r=l==null?void 0:l.contents,o=l==null?void 0:l.filter;return(o==null?void 0:o[0])==="{"&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=(n=Pa.analyzeSplitToContent(o,","))==null?void 0:n.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),s)),r.push({key:"stepName",contents:o}),r}return l==null?void 0:l.contents},cp=l=>{if(l!=null&&l.filter){let n=l==null?void 0:l.contents;return n.push({key:"step",contents:l==null?void 0:l.filter}),n}return l==null?void 0:l.contents},Js={onNumSlice:Hd,onRandomContents:Ud,onConditionContents:Wd,onFatherPaceContents:Kd,onPaceContents:Gd,onMainTagContents:Yd,onButtonContents:Jd,onPamButtonContents:Xd,onRowButtonContents:Zd,onRelated:rp,onRowNum:ep,onFixRow:ap,onReqItem:lp,onBottomButtonContents:Qd,onConditionContent:np,onTabs:op,onSinChoice:ip,onTextSize:Fd,onTextRGBA:jd,onPosition:Vd,onSize:Pd,onShowType:tp,onStepName:sp,onStep:cp,onInterfaceTypeContents:qd,onBackGround:$d},up=async(l,n)=>{var c,m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y,k;let r="";if(((c=l==null?void 0:l.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(m=l==null?void 0:l.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:m.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=(p=r==null?void 0:r.replace("(",ur))==null?void 0:p.split(ur))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(g=Pa.analyzeSplitToContent(r,","))==null?void 0:g.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F!=null&&F.includes("(")||(F=F==null?void 0:F.replaceAll(":","=")),F)),s=l;for(let F in o){let $,Y="";(u=o==null?void 0:o[F])!=null&&u.includes("(")?($=(L=(x=(_=o==null?void 0:o[F])==null?void 0:_.replace("(",ur))==null?void 0:x.split(ur))==null?void 0:L[0],Y="("+((I=(U=(C=o==null?void 0:o[F])==null?void 0:C.replace("(",ur))==null?void 0:U.split(ur))==null?void 0:I[1])):($=(D=(G=(H=o==null?void 0:o[F])==null?void 0:H.replace("=",ur))==null?void 0:G.split(ur))==null?void 0:D[0],Y=(y=(S=(E=o==null?void 0:o[F])==null?void 0:E.replace("=",ur))==null?void 0:S.split(ur))==null?void 0:y[1]);let pe=(k=hn==null?void 0:hn.find(Ne=>(Ne==null?void 0:Ne.key)===$))==null?void 0:k.value;if(pe){const Ne=Js[pe];s=await Ne({contents:s,filter:Y})}}return s},_t=async(l,n)=>{var m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y,k,F,$;let r="";if(((m=l==null?void 0:l.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:m.contents)!==""&&(r=(p=l==null?void 0:l.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:p.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=(g=(v=r==null?void 0:r.replace("(",ur))==null?void 0:v.split(ur))==null?void 0:g[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(u=Pa.analyzeSplitToContent(r,","))==null?void 0:u.map(Y=>((Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])===","&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1)),Y!=null&&Y.includes("(")||(Y=Y==null?void 0:Y.replaceAll(":","=")),Y)),s=l,c=new Map;o==null||o.forEach(Y=>{var Ne,Ce,Q;let pe=(Ne=Y==null?void 0:Y.split("="))==null?void 0:Ne[0];if(pe==="@MainPam"&&c.get(pe)){let ye=c.get(pe);ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1);let X=(Q=(Ce=Y==null?void 0:Y.replace("{",ur))==null?void 0:Ce.split(ur))==null?void 0:Q[1];X=ye+","+X,c.set(pe,X)}else c.set(pe,Y)}),o=Array.from(c.values()),o=o==null?void 0:o.sort((Y,pe)=>{var Ne,Ce;return((Ne=hn==null?void 0:hn.find(Q=>pe==null?void 0:pe.includes(Q==null?void 0:Q.key)))==null?void 0:Ne.order)-((Ce=hn==null?void 0:hn.find(Q=>Y==null?void 0:Y.includes(Q==null?void 0:Q.key)))==null?void 0:Ce.order)});for(let Y in o){let pe,Ne="";(_=o==null?void 0:o[Y])!=null&&_.includes("(")&&((x=o==null?void 0:o[Y])!=null&&x.includes("@Filter"))?(pe=(U=(C=(L=o==null?void 0:o[Y])==null?void 0:L.replace("(",ur))==null?void 0:C.split(ur))==null?void 0:U[0],Ne="("+((G=(H=(I=o==null?void 0:o[Y])==null?void 0:I.replace("(",ur))==null?void 0:H.split(ur))==null?void 0:G[1])):(pe=(S=(E=(D=o==null?void 0:o[Y])==null?void 0:D.replace("=",ur))==null?void 0:E.split(ur))==null?void 0:S[0],Ne=(F=(k=(y=o==null?void 0:o[Y])==null?void 0:y.replace("=",ur))==null?void 0:k.split(ur))==null?void 0:F[1]);let Ce=($=hn==null?void 0:hn.find(Q=>(Q==null?void 0:Q.key)===pe))==null?void 0:$.value;if(Ce){const Q=Js[Ce];s=await Q({contents:s,filter:Ne,extra:n})}}return s},Xs=l=>{if(l==null)return null;const n=String(l).trim();if(!n.startsWith("[")||!n.endsWith("]"))return null;const r=n.slice(1,-1).split(",").map(o=>Number(o.trim()));return r.length<2||r.some(o=>Number.isNaN(o))?null:[r[0],r[1]]},Zs=(l,n)=>{var U,I,H,G,D;const r=Array.isArray(l)?l:[],o=r.find(E=>(E==null?void 0:E.key)==="formContent"),s=Array.isArray(o==null?void 0:o.contents)?o.contents:[],c=((U=r.find(E=>(E==null?void 0:E.key)==="_gridLayoutMeta"))==null?void 0:U.contents)??{},m=(s==null?void 0:s[0])??{};let p=((I=n==null?void 0:n.position)==null?void 0:I[0])??(c==null?void 0:c._positionStartRow)??(m==null?void 0:m._positionStartRow),v=((H=n==null?void 0:n.position)==null?void 0:H[1])??(c==null?void 0:c._positionRowSpan)??(m==null?void 0:m._positionRowSpan);(!p||Number.isNaN(p)||p<1)&&(p=1),(!v||Number.isNaN(v)||v<1)&&(v=1);let g=((G=n==null?void 0:n.size)==null?void 0:G[0])??(c==null?void 0:c._sizeStart)??(m==null?void 0:m._sizeStart),u=((D=n==null?void 0:n.size)==null?void 0:D[1])??(c==null?void 0:c._sizeEnd)??(m==null?void 0:m._sizeEnd);(g===void 0||Number.isNaN(g))&&(g=0),(u===void 0||Number.isNaN(u))&&(u=1),g=Math.max(0,Math.min(1,g)),u=Math.max(0,Math.min(1,u)),u<=g&&(g=0,u=1);const _=u-g,x=Math.max(1,Math.round(1/_));let L=r.map(E=>{if((E==null?void 0:E.key)!=="formContent")return E;const S=Array.isArray(E==null?void 0:E.contents)?E.contents:[];return{...E,contents:S.map(y=>({...y,width:x,_positionStartRow:p,_positionRowSpan:v,_sizeStart:g,_sizeEnd:u}))}});const C={_positionStartRow:p,_positionRowSpan:v,_sizeStart:g,_sizeEnd:u};return L.some(E=>(E==null?void 0:E.key)==="_gridLayoutMeta")?L=L.map(E=>(E==null?void 0:E.key)==="_gridLayoutMeta"?{...E,contents:C}:E):L.push({key:"_gridLayoutMeta",contents:C}),L};let ui="$R";const dp=O.useUnit(O.pinia),{selectTitle:pp}=O.storeToRefs(dp);let fp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],hp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],vp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],mp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const rs=async(l,n,r=!0)=>{let o=[],s=l==null?void 0:l.map(async c=>{var _,x,L,C,U,I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va,ue,Ae,Ue,Xe,_a,Be,il,vl,Jl;let m=(C=(L=(x=(_=c==null?void 0:c.contents)==null?void 0:_.find(Ya=>{var ha;return(ha=Ya==null?void 0:Ya.key)==null?void 0:ha.includes("struct")}))==null?void 0:x.value)==null?void 0:L[0])==null?void 0:C.类型,p=Object.values(c==null?void 0:c.name);p=p==null?void 0:p.reverse();let v=(U=c==null?void 0:c.contents)==null?void 0:U.map(Ya=>Ya==null?void 0:Ya.key),g={comp:m,isShow:c==null?void 0:c.is_show,name:p==null?void 0:p[0],id:c==null?void 0:c.object_id,relatedTables:v,menuFilter:(I=c==null?void 0:c.filter)==null?void 0:I.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(H=c==null?void 0:c.filter)==null?void 0:H.fatherSyncs,relatedQuotes:(G=c==null?void 0:c.filter)==null?void 0:G.quotes,sonSyncContents:(D=c==null?void 0:c.filter)==null?void 0:D.sonSyncs,nameContents:(E=O.cloneDeep(p))==null?void 0:E.reverse()};for(let Ya in p)parseInt(Ya)>=1&&(g[`name${parseInt(Ya)-1}`]=p[Ya]);let u=Array.isArray((S=c==null?void 0:c.filter)==null?void 0:S.menuFilter)?(y=c==null?void 0:c.filter)==null?void 0:y.menuFilter:[];if(((k=u==null?void 0:u.filter(Ya=>Ya==null?void 0:Ya.includes("@Filter")))==null?void 0:k.length)>0){let Ya=u==null?void 0:u.filter(Ee=>Ee==null?void 0:Ee.includes("@Filter"));Ya=Ya==null?void 0:Ya[0],Ya=($=(F=Ya==null?void 0:Ya.replace("(",ui))==null?void 0:F.split(ui))==null?void 0:$[1],Ya=Ya==null?void 0:Ya.slice(0,(Ya==null?void 0:Ya.length)-1),Ya!=null&&Ya.includes("*")&&(Ya=(pe=(Y=Ya==null?void 0:Ya.replace("{",ui))==null?void 0:Y.split(ui))==null?void 0:pe[1],Ya=Ya==null?void 0:Ya.replace("}","")),Ya=ua.calculatorAndToOr(Ya);let ha=(n==null?void 0:n.originPath)??"";(ha==null?void 0:ha[(ha==null?void 0:ha.length)-1])==="/"&&(ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1));let ma=await Wr(ha,!1),ga=(Ne=ma==null?void 0:ma.filter(Ee=>(Ee==null?void 0:Ee.comp)==="Table"))==null?void 0:Ne[0];ga=(Q=(Ce=ga==null?void 0:ga.compData)==null?void 0:Ce.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:Q.contents;let Je=(X=(ye=pp.value)==null?void 0:ye.find(Ee=>(Ee==null?void 0:Ee.condition)==="child"))==null?void 0:X.value;ga=(se=ga==null?void 0:ga.map(Ee=>{for(let Ge in Ee)if((Ee==null?void 0:Ee[Ge])===Je)return Ee}))==null?void 0:se.filter(Ee=>Ee),ga=ga==null?void 0:ga[0],Ya=Ya==null?void 0:Ya[0];let Xa=[];for(let Ee in Ya){let Ge="";Qa.isObject(ga)&&(Ge=(Da=(qe=Object.keys(ga))==null?void 0:qe.filter(ve=>ve==null?void 0:ve.includes("."+Ee)))==null?void 0:Da[0]),Ge!==""&&(ga!=null&&ga[Ge])&&(Ya==null?void 0:Ya[Ee])===(ga==null?void 0:ga[Ge])||ga!=null&&ga[Ee]&&(Ya==null?void 0:Ya[Ee])===(ga==null?void 0:ga[Ee])?Xa.push(!0):Xa.push(!1)}if(Xa!=null&&Xa.some(Ee=>Ee===!1)&&((B=n==null?void 0:n.originPath)==null?void 0:B[((ne=n==null?void 0:n.originPath)==null?void 0:ne.length)-1])!=="/")return}if(m==="Table"||m==="Method"){let Ya=((re=c==null?void 0:c.contents)==null?void 0:re.find(We=>{var K;return(K=We==null?void 0:We.key)==null?void 0:K.includes("content")}))||[],ha=[];g.comp="Table",Ya.value=(be=Ya==null?void 0:Ya.value)==null?void 0:be.sort((We,K)=>parseInt(We==null?void 0:We.id)-parseInt(K==null?void 0:K.id)),Ya.value=(ce=Ya==null?void 0:Ya.value)==null?void 0:ce.map(We=>{let K={};for(let la in We)JSON.stringify(We==null?void 0:We[la])==="{}"?K[la]="":K[la]=We==null?void 0:We[la];return K}),ha.push({key:"tableContents",contents:Ya==null?void 0:Ya.value});let ma=(le=(Ga=(Ca=(va=(Se=c==null?void 0:c.contents)==null?void 0:Se.find(We=>{var K;return(K=We==null?void 0:We.key)==null?void 0:K.includes("struct")}))==null?void 0:va.value)==null?void 0:Ca[0])==null?void 0:Ga.结构)==null?void 0:le.contents;Array.isArray(ma==null?void 0:ma[0])?ma[0]=(na=ma==null?void 0:ma[0])==null?void 0:na.filter(We=>(We==null?void 0:We.prop)!=="sort"&&(We==null?void 0:We.prop)!=="relatedId"):ma=ma==null?void 0:ma.filter(We=>(We==null?void 0:We.prop)!=="sort"&&(We==null?void 0:We.prop)!=="relatedId"),ha.push({key:"header",contents:ma}),ha.push({key:"filter",contents:(Ve=(ze=(Fe=(wa=(Pe=c==null?void 0:c.contents)==null?void 0:Pe.find(We=>{var K;return(K=We==null?void 0:We.key)==null?void 0:K.includes("struct")}))==null?void 0:wa.value)==null?void 0:Fe[0])==null?void 0:ze.引用)==null?void 0:Ve.contents});let ga=fp,Je=O.cloneDeep(hp);m==="Method"&&Je.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ma==null?void 0:ma[0])&&((ea=ma==null?void 0:ma[0])==null?void 0:ea.prop)==="disabled"&&(ga=vp,Je=mp);const Xa=["推力","真空","压力","温度","流量"],Ee=g.name;Ee&&Xa.includes(Ee)&&(ga=[...ga],ga.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let Ge=[];if(!Array.isArray(ma==null?void 0:ma[0])&&(ma!=null&&ma.some(We=>{var K;return(We==null?void 0:We.calculatorFilter)&&((K=We==null?void 0:We.calculatorFilter)==null?void 0:K.includes("Manual"))}))){let We=(Ja=ma==null?void 0:ma.map(K=>K==null?void 0:K.calculatorFilter))==null?void 0:Ja.filter(K=>K&&(K==null?void 0:K.includes("Manual")));We==null||We.forEach(K=>{var Ye;let la=Pa.analyzeSplitToContent(K,",");if(la=la==null?void 0:la.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)),la!=null&&la.find(De=>(De==null?void 0:De.includes("Extent"))&&(De==null?void 0:De.includes("Row")))&&(la!=null&&la.find(De=>(De==null?void 0:De.includes("Button"))&&(De==null?void 0:De.includes(","))))){let De=la==null?void 0:la.find(Cl=>Cl==null?void 0:Cl.includes("@FunctionButton"));De=(Ye=De==null?void 0:De.split("="))==null?void 0:Ye[1],De=De==null?void 0:De.slice(1,(De==null?void 0:De.length)-1),De=De==null?void 0:De.split(","),De=De==null?void 0:De[(De==null?void 0:De.length)-1],Ge.push(De)}}),Ge=[...new Set(Ge)],Ge=Ge==null?void 0:Ge.map(K=>({label:K,prop:K,type:"methodButton"}))}else if(Array.isArray(ma==null?void 0:ma[0])&&((qa=ua.getColumnChild(ma==null?void 0:ma[0]))!=null&&qa.some(We=>{var K;return(We==null?void 0:We.calculatorFilter)&&((K=We==null?void 0:We.calculatorFilter)==null?void 0:K.includes("Manual"))}))){let We=(V=(P=ua.getColumnChild(ma==null?void 0:ma[0]))==null?void 0:P.map(K=>K==null?void 0:K.calculatorFilter))==null?void 0:V.filter(K=>K&&(K==null?void 0:K.includes("Manual")));We==null||We.forEach(K=>{var Ye;let la=Pa.analyzeSplitToContent(K,",");if(la=la==null?void 0:la.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)),la!=null&&la.find(De=>(De==null?void 0:De.includes("Extent"))&&(De==null?void 0:De.includes("Row")))&&(la!=null&&la.find(De=>(De==null?void 0:De.includes("Button"))&&(De==null?void 0:De.includes(","))))){let De=la==null?void 0:la.find(Cl=>Cl==null?void 0:Cl.includes("@FunctionButton"));De=(Ye=De==null?void 0:De.split("="))==null?void 0:Ye[1],De=De==null?void 0:De.slice(1,(De==null?void 0:De.length)-1),De=De==null?void 0:De.split(","),De=De==null?void 0:De[(De==null?void 0:De.length)-1],Ge.push(De)}}),Ge=[...new Set(Ge)],Ge=Ge==null?void 0:Ge.map(K=>({label:K,prop:K,type:"methodButton"}))}ha.push({key:"extraButton",contents:ga}),ha.push({key:"rowButton",contents:[...Je,...Ge]}),g.compData=await _t(ha,n),(Z=g.compData)!=null&&Z.find(We=>(We==null?void 0:We.key)==="tab")&&(g.tab=(te=(oe=g.compData)==null?void 0:oe.find(We=>(We==null?void 0:We.key)==="tab"))==null?void 0:te.contents),(ka=g.compData)!=null&&ka.find(We=>(We==null?void 0:We.key)==="step")&&(g.step=(Re=(oa=g.compData)==null?void 0:oa.find(We=>(We==null?void 0:We.key)==="step"))==null?void 0:Re.contents),(we=g.compData)!=null&&we.find(We=>(We==null?void 0:We.key)==="choice")&&(g.choice=(ya=(Ea=g.compData)==null?void 0:Ea.find(We=>(We==null?void 0:We.key)==="choice"))==null?void 0:ya.contents);let ve="",Ia=(Fa=g==null?void 0:g.compData)==null?void 0:Fa.filter(We=>(We==null?void 0:We.key)==="fixType");(Ia==null?void 0:Ia.length)>0&&r&&(ve=(ja=Ia==null?void 0:Ia[0])==null?void 0:ja.contents,g.comp=ve)}else if(m==="Form"){let Ya=[],ha=(Te=(Ze=(he=c==null?void 0:c.contents)==null?void 0:he.find(Ee=>{var Ge;return(Ge=Ee==null?void 0:Ee.key)==null?void 0:Ge.includes("content")}))==null?void 0:Ze.value)==null?void 0:Te[0],ma=[],ga=Array.isArray((Qe=c==null?void 0:c.filter)==null?void 0:Qe.menuFilter)?(je=c==null?void 0:c.filter)==null?void 0:je.menuFilter:[];ga==null||ga.forEach(Ee=>{if(Ee!=null&&Ee.includes("@Param(Hide=Yes, prop=")){const Ge=Ee==null?void 0:Ee.match(/prop=([^,)]+)/);Ge!=null&&Ge[1]&&ma.push(Ge==null?void 0:Ge[1])}});let Je=($a=(ra=(pa=(_e=(Oe=c==null?void 0:c.contents)==null?void 0:Oe.find(Ee=>{var Ge;return(Ge=Ee==null?void 0:Ee.key)==null?void 0:Ge.includes("struct")}))==null?void 0:_e.value)==null?void 0:pa[0])==null?void 0:ra.结构)==null?void 0:$a.contents,Xa=(xa=Je==null?void 0:Je.map(Ee=>(Ee.value=ha==null?void 0:ha[Ee==null?void 0:Ee.prop],Ee)))==null?void 0:xa.filter(Ee=>(Ee==null?void 0:Ee.prop)!=="sort"&&(Ee==null?void 0:Ee.prop)!=="relatedId");Xa=Xa==null?void 0:Xa.map(Ee=>(ma!=null&&ma.includes(Ee==null?void 0:Ee.prop)&&(Ee.isHideInForm=!0),Ee)),Ya.push({key:"filter",contents:(Ue=(Ae=(ue=(Va=(Oa=c==null?void 0:c.contents)==null?void 0:Oa.find(Ee=>{var Ge;return(Ge=Ee==null?void 0:Ee.key)==null?void 0:Ge.includes("struct")}))==null?void 0:Va.value)==null?void 0:ue[0])==null?void 0:Ae.引用)==null?void 0:Ue.contents}),Ya.push({key:"formContent",contents:Xa}),Ya.push({key:"paramHideProps",contents:ma}),g.compData=await up(Ya),(Xe=g.compData)!=null&&Xe.find(Ee=>(Ee==null?void 0:Ee.key)==="tab")&&(g.tab=(Be=(_a=g.compData)==null?void 0:_a.find(Ee=>(Ee==null?void 0:Ee.key)==="tab"))==null?void 0:Be.contents),(il=g.compData)!=null&&il.find(Ee=>(Ee==null?void 0:Ee.key)==="step")&&(g.step=(Jl=(vl=g.compData)==null?void 0:vl.find(Ee=>(Ee==null?void 0:Ee.key)==="step"))==null?void 0:Jl.contents)}return g});return o=await Promise.all(s),o},yp=O.useLoginState(O.pinia),{loginUserInfo:xo}=O.storeToRefs(yp),ft=async(l,n,r="Manual",o=[])=>{var v;let s=l,c;Array.isArray(n==null?void 0:n[0])?c=ua.getColumnChild(n==null?void 0:n[0]):c=n;let m=(v=c==null?void 0:c.filter(g=>{var u;return(g==null?void 0:g.calculatorFilter)&&((u=g==null?void 0:g.calculatorFilter)==null?void 0:u.includes(r))||(g==null?void 0:g.calculatorFilter)===""&&(g==null?void 0:g.functionName)}))==null?void 0:v.map(g=>({prop:g==null?void 0:g.prop,label:g==null?void 0:g.label,methods:g==null?void 0:g.calculatorFilter,functionName:g==null?void 0:g.functionName,functionRelatedWords:g==null?void 0:g.functionRelatedWords})),p=s==null?void 0:s.map(async g=>(g=await _p(g,m,c,r,s,o),g));return p=await Promise.all(p),p},gp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c;return Array.isArray(n)&&(n==null?void 0:n.length)!==1&&(n=ua.getValueToObjectValue(n,ua.getColumnContents(s))),r==null||r.forEach(m=>{var p;if(n!=null&&n[m]){let v=n==null?void 0:n[m];c=c?v?Pa.isEqual(v.toString(),c.toString()):void 0:v}else{let v=(p=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===m))==null?void 0:p.prop,g=(n==null?void 0:n[v])??0;c=c?g?Pa.isEqual(g.toString(),c.toString()):void 0:g}}),n[o]=c===void 0?void 0:c?1:0,n},br=l=>{const[n,r,o]=O.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(n??0)*3600+(r??0)*60+(o??0)},Gn=l=>{const n=c=>c.toString().padStart(2,"0"),r=Math.floor(l/3600),o=Math.floor(l%3600/60),s=l%60;return`${n(r)}:${n(o)}:${parseInt(n(s))}`},bp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=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 g,u,_,x,L,C,U,I,H;if(n!=null&&n[v]){if(c==="Row")if(!((u=((g=n==null?void 0:n[v])==null?void 0:g.toString())??"")!=null&&u.includes(":"))&&!((_=p==null?void 0:p.toString())!=null&&_.includes(":"))){let G=+(n==null?void 0:n[v]);p=p+G}else p=br(p.toString())+br((x=n==null?void 0:n[v])==null?void 0:x.toString()),p=Gn(p)}else if(c==="Row"){let G=(L=s==null?void 0:s.find(D=>(D==null?void 0:D.label)===v))==null?void 0:L.prop;if(!((U=Number.isNaN(n==null?void 0:n[G])?"":(C=n==null?void 0:n[G])==null?void 0:C.toString())!=null&&U.includes(":"))&&!((I=p==null?void 0:p.toString())!=null&&I.includes(":"))){let D=+((n==null?void 0:n[G])??0);p=p+D}else p=br(p==null?void 0:p.toString())+br((H=(n==null?void 0:n[G])??0)==null?void 0:H.toString()),p=Gn(p)}}),c==="Column"){let v=[];r==null||r.forEach(g=>{let u=m==null?void 0:m.map(_=>{var x;return(_==null?void 0:_[g])??(_==null?void 0:_[(x=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===g))==null?void 0:x.prop])});v=[...v,...u]}),p=v.reduce((g,u)=>{let _=0;Number.isNaN(g)||(_=+g);let x=0;return Number.isNaN(u)||(x=+u),_+x},0)}return n[o]=p,n},kp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=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 g,u,_,x,L,C,U;if(n!=null&&n[v]){if(c==="Row")if(!((u=(g=n==null?void 0:n[v])==null?void 0:g.toString())!=null&&u.includes(":"))&&!((_=p==null?void 0:p.toString())!=null&&_.includes(":"))){let I=+(n==null?void 0:n[v]);p=p===0?p+I:p-I}else p=p===0?br(p.toString())+br(n==null?void 0:n[v].toString()):br(p.toString())-br(n==null?void 0:n[v].toString()),p=Gn(p)}else if(c==="Row"){let I=(x=s==null?void 0:s.find(H=>(H==null?void 0:H.label)===v))==null?void 0:x.prop;if(!((C=Number.isNaN(n==null?void 0:n[I])?"":(L=n==null?void 0:n[I])==null?void 0:L.toString())!=null&&C.includes(":"))&&!((U=p==null?void 0:p.toString())!=null&&U.includes(":"))){let H=+((n==null?void 0:n[I])??0);p=p===0?p+H:p-H}else p=p===0?br(p.toString())+br(((n==null?void 0:n[I])??0).toString()):br(p.toString())-br(((n==null?void 0:n[I])??0).toString()),p=Gn(p)}}),c==="Column"){let v=[];r==null||r.forEach(g=>{let u=m==null?void 0:m.map(_=>{var x;return(_==null?void 0:_[g])??(_==null?void 0:_[(x=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===g))==null?void 0:x.prop])});v=[...v,...u]}),p=v.reduce((g,u)=>{let _=0;Number.isNaN(g)||(_=+g);let x=0;return Number.isNaN(u)||(x=+u),_-x},0)}return n[o]=p,n},xp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=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 g,u,_,x,L,C,U;if(n!=null&&n[v]){if(c==="Row")if(!((u=(g=n==null?void 0:n[v])==null?void 0:g.toString())!=null&&u.includes(":"))&&!((_=p==null?void 0:p.toString())!=null&&_.includes(":"))){let I=+(n==null?void 0:n[v]);p=p===0?p+I:p*I}else p=p===0?br(p.toString())+br(n==null?void 0:n[v].toString()):br(p.toString())*br(n==null?void 0:n[v].toString()),p=Gn(p)}else if(c==="Row"){let I=(x=s==null?void 0:s.find(H=>(H==null?void 0:H.label)===v))==null?void 0:x.prop;if(!(n!=null&&n[I]))p=void 0;else if(!((C=Number.isNaN(n==null?void 0:n[I])?"":(L=n==null?void 0:n[I])==null?void 0:L.toString())!=null&&C.includes(":"))&&!((U=p==null?void 0:p.toString())!=null&&U.includes(":"))){let H=+((n==null?void 0:n[I])??0);p=p===0?p+H:p*H}else p=p===0?br(p.toString())+br(((n==null?void 0:n[I])??0).toString()):br(p.toString())*br(((n==null?void 0:n[I])??0).toString()),p=Gn(p)}}),c==="Column"){let v=[];r==null||r.forEach(g=>{let u=m==null?void 0:m.map(_=>{var x;return(_==null?void 0:_[g])??(_==null?void 0:_[(x=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===g))==null?void 0:x.prop])});v=[...v,...u]}),p=v.reduce((g,u)=>{let _=0;Number.isNaN(g)||(_=+g);let x=0;return Number.isNaN(u)||(x=+u),_*x},0)}return n[o]=p,n},wp=l=>{let n=l==null?void 0:l.contents,r=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=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 g,u,_,x,L,C,U;if(n!=null&&n[v]){if(c==="Row")if(!((u=(g=n==null?void 0:n[v])==null?void 0:g.toString())!=null&&u.includes(":"))&&!((_=p==null?void 0:p.toString())!=null&&_.includes(":"))){let I=+(n==null?void 0:n[v]);p=p===0?p+I:p/I}else p=p===0?br(p.toString())+br(n==null?void 0:n[v].toString()):br(p.toString())/br(n==null?void 0:n[v].toString()),p=Gn(p)}else if(c==="Row"){let I=(x=s==null?void 0:s.find(H=>(H==null?void 0:H.label)===v))==null?void 0:x.prop;if(!((C=Number.isNaN(n==null?void 0:n[I])?"":(L=n==null?void 0:n[I])==null?void 0:L.toString())!=null&&C.includes(":"))&&!((U=p==null?void 0:p.toString())!=null&&U.includes(":"))){let H=+((n==null?void 0:n[I])??0);p=p===0?p+H:p/H}else p=p===0?br(p.toString())+br(((n==null?void 0:n[I])??0).toString()):br(p.toString())/br(((n==null?void 0:n[I])??0).toString()),p=Gn(p)}}),c==="Column"){let v=[];r==null||r.forEach(g=>{let u=m==null?void 0:m.map(_=>{var x;return(_==null?void 0:_[g])??(_==null?void 0:_[(x=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===g))==null?void 0:x.prop])});v=[...v,...u]}),p=v.reduce((g,u)=>{let _=0;Number.isNaN(g)||(_=+g);let x=0;return Number.isNaN(u)||(x=+u),_/x},0)}return n[o]=p.toFixed(2),n},di={Sum:bp,Substract:kp,Multiple:xp,Divide:wp,Compare:gp},_p=async(l,n,r,o="Auto",s,c=[])=>{var u,_,x,L,C,U,I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q;let m=l,p=[],v=await O.getPageDataApi({platId:parseInt((u=xo==null?void 0:xo.value)==null?void 0:u.plat_id),pageName:"menu"});v=(L=(x=(_=v==null?void 0:v.data)==null?void 0:_.result)==null?void 0:x.filter(ye=>(ye==null?void 0:ye.property_name)===""))==null?void 0:L[0];let g=[];if(v!=null&&v.object_name){v=v==null?void 0:v.object_name;let ye=await O.getPageDataApi({platId:parseInt((C=xo==null?void 0:xo.value)==null?void 0:C.plat_id),pageName:v});ye=(D=(G=(H=(I=(U=ye==null?void 0:ye.data)==null?void 0:U.result)==null?void 0:I[0])==null?void 0:H.contents)==null?void 0:G.find(X=>{var se;return(se=X==null?void 0:X.key)==null?void 0:se.includes("content")}))==null?void 0:D.value,p=(E=ye==null?void 0:ye.map(X=>({functionName:X==null?void 0:X.函数名称,functionContent:X==null?void 0:X.输出值})))==null?void 0:E.filter(X=>(X==null?void 0:X.functionContent)!==""),p==null||p.forEach(X=>{g.push(X.functionName),di[X.functionName]=new Function("return "+X.functionContent)()})}if((n==null?void 0:n.length)===0)return m;for(let ye in n){let X=(S=n==null?void 0:n[ye])==null?void 0:S.functionName;const se=di==null?void 0:di[X];let qe=(y=n==null?void 0:n[ye])==null?void 0:y.methods;if(qe=Pa.analyzeSplitToContent(qe,","),(k=qe==null?void 0:qe.find(Da=>Da==null?void 0:Da.includes("@Type")))!=null&&k.includes(o)||(qe==null?void 0:qe.length)===0){let Da=((Y=($=(F=qe==null?void 0:qe.find(ne=>ne==null?void 0:ne.includes("@Extent")))==null?void 0:F.replace(":","="))==null?void 0:$.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(g==null?void 0:g.length)>0&&g.find(ne=>ne===X)){let ne="";try{let re=(pe=n==null?void 0:n[ye])==null?void 0:pe.functionRelatedWords,be=(c==null?void 0:c.length)>0?c==null?void 0:c.map(Se=>{var va;return Se==null?void 0:Se[(va=n==null?void 0:n[ye])==null?void 0:va.prop]}):["0"];be=be==null?void 0:be.map(Se=>Se==null?void 0:Se.slice((Se==null?void 0:Se.length)-5,Se==null?void 0:Se.length)),be=be==null?void 0:be.map(Se=>Pa.isNumber(parseInt(Se))&&parseInt(Se)?parseInt(Se):0);let ce=Math.max(...be);re=re==null?void 0:re.map(Se=>{if(Se!=null&&Se.includes("'"))return Se==null?void 0:Se.replaceAll("'","");if(Se!=null&&Se.includes("@"))return ce+1;{let va=Object.keys(m);return Se=(m==null?void 0:m[Se])??(m==null?void 0:m[va==null?void 0:va.find(Ca=>Ca==null?void 0:Ca.includes("."+Se))]),Se}}),ne=se(...re)}catch(re){Qa.ElMessage.warning("关联数据出现错误,"+re.message)}let B=(Ne=n==null?void 0:n[ye])==null?void 0:Ne.prop;m[B]=ne}else m=se({contents:m,valueString:(Ce=n==null?void 0:n[ye])==null?void 0:Ce.functionRelatedWords,prop:(Q=n==null?void 0:n[ye])==null?void 0:Q.prop,headers:r,typeString:Da,allContents:s})}}return m},Cp=O.useLoginState(O.pinia),{loginUserInfo:Xr}=O.storeToRefs(Cp),Ep=O.useMenuState(O.pinia),{activeMenuPath:ns,currentMenuPath:pi}=O.storeToRefs(Ep),Qs=O.useUnit(O.pinia);let os="$R";const{selectTitle:Eo}=O.storeToRefs(Qs),ec=async(l,n)=>{var m,p,v,g,u,_,x,L,C,U,I,H,G;let r=ns.value,o="",s=((m=Eo==null?void 0:Eo.value)==null?void 0:m.find(D=>(D==null?void 0:D.condition)==="child"&&!(D!=null&&D.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(r=n?r:(p=l==null?void 0:l[0])==null?void 0:p.object_name,o=(v=l==null?void 0:l[0])==null?void 0:v.father_name);let c=[];if(o!==""){let D=o;(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));let E=await Wr(D,!1);E=(g=E==null?void 0:E[0])==null?void 0:g.compData;let S=(u=E==null?void 0:E.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:u.contents;S=((_=S==null?void 0:S.find(k=>k==null?void 0:k.isMainKey))==null?void 0:_.prop)??((x=S==null?void 0:S[0])==null?void 0:x.prop);let y=(C=(L=E==null?void 0:E.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:L.contents)==null?void 0:C.map(k=>({label:k==null?void 0:k[S],value:k==null?void 0:k[S]}));c=(U=o==null?void 0:o.split("/"))==null?void 0:U.map(k=>(k===""?s?(s.isShow=!0,k=s):k={value:k,condition:"child",options:y,parentContent:(o==null?void 0:o[(o==null?void 0:o.length)-1])==="/"?o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1):o,isShow:!0}:k={condition:"parent",value:k.trim(),isShow:!0},k))}if(r!==""){let D=(I=r==null?void 0:r.split("/"))==null?void 0:I.map(E=>(E={condition:"normal",value:E.trim(),isShow:!0},E));((H=D==null?void 0:D[0])==null?void 0:H.value)===((G=c==null?void 0:c[0])==null?void 0:G.value)&&(D=D==null?void 0:D.filter((E,S)=>S!==0)),c=[...c??[],...D??[]]}o===""&&s&&((s==null?void 0:s.parentContent)!==ns.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),Qs.setSelectTitle(c)},Sp=async l=>{var c,m,p,v,g,u,_,x,L;let n=await O.getPageDataApi({platId:parseInt((c=Xr==null?void 0:Xr.value)==null?void 0:c.plat_id),pageName:"menu"}),r=(m=n==null?void 0:n.data)==null?void 0:m.result,o=(u=(g=(v=(p=l==null?void 0:l.filter(C=>(C==null?void 0:C.comp)==="Table"))==null?void 0:p[0])==null?void 0:v.compData)==null?void 0:g.find(C=>(C==null?void 0:C.key)==="filter"))==null?void 0:u.contents;o=(L=(x=(_=o==null?void 0:o.replace("(",os))==null?void 0:_.split(os))==null?void 0:x[0])==null?void 0:L.replaceAll(":","/");let s=r==null?void 0:r.filter(C=>{var U;return(C==null?void 0:C.object_name)===pi.value+"/"||((U=pi.value)==null?void 0:U.includes(o))&&o+"/"===(C==null?void 0:C.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(C=>{var U;return(C==null?void 0:C.comp)==="Table"&&(C.compData=(U=C==null?void 0:C.compData)==null?void 0:U.map(I=>{var H,G,D;return(I==null?void 0:I.key)==="header"&&(Array.isArray((H=I.contents)==null?void 0:H[0])?I.contents[0]=(D=I.contents[0])==null?void 0:D.map((E,S)=>{var y;return S===0&&(E.isExistChild=!0,(y=pi.value)!=null&&y.includes(o)&&(E.fatherPath=o)),E}):I.contents=(G=I.contents)==null?void 0:G.map((E,S)=>{var y;return S===0&&(E.isExistChild=!0,(y=pi.value)!=null&&y.includes(o)&&(E.fatherPath=o)),E})),I})),C})),l},Wr=async(l,n,r={})=>{var m,p,v,g,u,_,x,L,C,U,I,H;let o=await O.getPageDataApi({platId:parseInt((m=Xr==null?void 0:Xr.value)==null?void 0:m.plat_id),pageName:l}),s=(p=o==null?void 0:o.data)==null?void 0:p.result;if((s==null?void 0:s.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==l){let G=await O.getPageDataApi({platId:parseInt((v=Xr==null?void 0:Xr.value)==null?void 0:v.plat_id),pageName:r==null?void 0:r.originPath});if(((u=(g=G==null?void 0:G.data)==null?void 0:g.result)==null?void 0:u.length)>0){let D=await rs((_=G==null?void 0:G.data)==null?void 0:_.result,r,!1);D=D==null?void 0:D.map(async y=>{var $,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa;let k=[],F=($=Object.keys(y))==null?void 0:$.filter(P=>(P==null?void 0:P.includes("name"))&&P!=="nameContents");for(let P in y)F!=null&&F.find(V=>V===P)&&k.push(y==null?void 0:y[P]);if(k=k.reverse(),(y==null?void 0:y.comp)==="Table"){let P=(Ne=(pe=(Y=y==null?void 0:y.compData)==null?void 0:Y.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:pe.contents)==null?void 0:Ne.map(Z=>{let oe={};for(let te in Z)te!=="id"&&te!=="create_time"&&te!=="update_time"&&te!=="sort"&&te!=="create_user_id"&&te!=="update_user_id"&&te!=="department_id"&&te!=="relatedId"&&(oe[te]=Z==null?void 0:Z[te]);return Z=Object.values(oe),Z}),V=(Q=(Ce=y==null?void 0:y.compData)==null?void 0:Ce.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:Q.contents;if(Array.isArray(V==null?void 0:V[0])?(V[0].push({label:"排序",prop:"sort"}),V[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ye=V[0])!=null&&ye.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(V[0]=(X=V[0])==null?void 0:X.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),V[0].unshift({label:"",prop:"disabled",sortable:!1}))):(V.push({label:"排序",prop:"sort"}),V.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),V!=null&&V.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(V=V==null?void 0:V.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),V.unshift({label:"",prop:"disabled",sortable:!1}))),V!=null&&V.some(Z=>{var oe;return(Z==null?void 0:Z.calculatorFilter)&&((oe=Z==null?void 0:Z.calculatorFilter)==null?void 0:oe.includes("Auto"))})&&(P=await ft(P,V,"Auto"),P=P==null?void 0:P.map(Z=>Object.values(Z))),y!=null&&y.fatherSyncContents){Array.isArray((se=y==null?void 0:y.fatherSyncContents)==null?void 0:se[0])&&(y.fatherSyncContents=(qe=y==null?void 0:y.fatherSyncContents)==null?void 0:qe[0]);let Z=(Da=Eo.value)==null?void 0:Da.find(oe=>(oe==null?void 0:oe.condition)==="child");y.fatherSyncContents=(ne=y==null?void 0:y.fatherSyncContents)==null?void 0:ne.map(oe=>{var te,ka,oa,Re,we,Ea;return((ka=oe==null?void 0:oe.menus)==null?void 0:ka[((te=oe==null?void 0:oe.menus)==null?void 0:te.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(oe==null?void 0:oe.menus)?oe.menus=(oe==null?void 0:oe.menus)+(Z==null?void 0:Z.value):((Re=oe==null?void 0:oe.menus)==null?void 0:Re[((oa=oe==null?void 0:oe.menus)==null?void 0:oa.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(oe==null?void 0:oe.menus)&&(oe.menus=(Ea=oe.menus)==null?void 0:Ea.slice(0,((we=oe.menus)==null?void 0:we.length)-1)),oe})}if(y!=null&&y.sonSyncContents){Array.isArray((B=y==null?void 0:y.sonSyncContents)==null?void 0:B[0])&&(y.sonSyncContents=(re=y==null?void 0:y.sonSyncContents)==null?void 0:re[0]);let Z=(be=Eo.value)==null?void 0:be.find(oe=>(oe==null?void 0:oe.condition)==="child");y.sonSyncContents=(ce=y==null?void 0:y.sonSyncContents)==null?void 0:ce.map(oe=>{var te,ka,oa,Re,we,Ea;return((ka=oe==null?void 0:oe.menus)==null?void 0:ka[((te=oe==null?void 0:oe.menus)==null?void 0:te.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(oe==null?void 0:oe.menus)?oe.menus=(oe==null?void 0:oe.menus)+(Z==null?void 0:Z.value):((Re=oe==null?void 0:oe.menus)==null?void 0:Re[((oa=oe==null?void 0:oe.menus)==null?void 0:oa.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(oe==null?void 0:oe.menus)&&(oe.menus=(Ea=oe.menus)==null?void 0:Ea.slice(0,((we=oe.menus)==null?void 0:we.length)-1)),oe})}if(y!=null&&y.relatedQuotes){Array.isArray((Se=y==null?void 0:y.relatedQuotes)==null?void 0:Se[0])&&(y.relatedQuotes=(va=y==null?void 0:y.relatedQuotes)==null?void 0:va[0]);let Z=(Ca=Eo.value)==null?void 0:Ca.find(oe=>(oe==null?void 0:oe.condition)==="child");y.relatedQuotes=(Ga=y==null?void 0:y.relatedQuotes)==null?void 0:Ga.map(oe=>{var te,ka,oa,Re,we,Ea;return((ka=oe==null?void 0:oe.menus)==null?void 0:ka[((te=oe==null?void 0:oe.menus)==null?void 0:te.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(oe==null?void 0:oe.menus)?oe.menus=(oe==null?void 0:oe.menus)+(Z==null?void 0:Z.value):((Re=oe==null?void 0:oe.menus)==null?void 0:Re[((oa=oe==null?void 0:oe.menus)==null?void 0:oa.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(oe==null?void 0:oe.menus)&&(oe.menus=(Ea=oe.menus)==null?void 0:Ea.slice(0,((we=oe.menus)==null?void 0:we.length)-1)),oe})}y={filter:(na=(le=y==null?void 0:y.compData)==null?void 0:le.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:na.contents,key:y==null?void 0:y.comp,name:k,tableColumns:V,tableContents:P,menuFilter:y==null?void 0:y.menuFilter,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents}}else{let P=(Fe=(wa=(Pe=y==null?void 0:y.compData)==null?void 0:Pe.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:wa.contents)==null?void 0:Fe.map(Z=>(Z==null?void 0:Z.value)??"");P=[P];let V=(ea=(Ve=(ze=y==null?void 0:y.compData)==null?void 0:ze.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:Ve.contents)==null?void 0:ea.map(Z=>(Z.value="",Z));y={contents:P,filter:(qa=(Ja=y==null?void 0:y.compData)==null?void 0:Ja.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:qa.contents,key:y==null?void 0:y.comp,name:k,value:V,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents}}return y.isShow=!1,y}),D=await Promise.all(D);let E=[{key:"menuPath",contents:[{path:l,fatherPath:(C=(L=(x=G==null?void 0:G.data)==null?void 0:x.result)==null?void 0:L[0])==null?void 0:C.father_name,isShow:!1}]},{key:l,contents:D}];await O.createPlatFormDataApi({platId:parseInt((U=Xr==null?void 0:Xr.value)==null?void 0:U.plat_id),changeData:E});let S=await O.getPageDataApi({platId:parseInt((I=Xr==null?void 0:Xr.value)==null?void 0:I.plat_id),pageName:l});s=(H=S==null?void 0:S.data)==null?void 0:H.result}}n&&await ec(s,!!(r!=null&&r.originPath));let c=await rs(s,r);return n&&(c=await Sp(c)),c==null?void 0:c.filter(G=>G)},is=async l=>{var o,s,c,m,p,v,g,u,_,x,L;let n=(o=l==null?void 0:l.menus)==null?void 0:o.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+((c=(s=l.value)==null?void 0:s.split(" "))==null?void 0:c[0]));let r=await Wr(n,!1);if(r=(m=r==null?void 0:r.filter(C=>{var U,I;return(C==null?void 0:C.name)===((I=l==null?void 0:l.groups)==null?void 0:I[((U=l==null?void 0:l.groups)==null?void 0:U.length)-1])}))==null?void 0:m[0],(v=(p=r==null?void 0:r.compData)==null?void 0:p.find(C=>(C==null?void 0:C.key)==="tableContents"))!=null&&v.contents){r=(u=(g=r==null?void 0:r.compData)==null?void 0:g.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:u.contents;let C=((_=l==null?void 0:l.words)==null?void 0:_[0])??(l==null?void 0:l.prop);return r=r==null?void 0:r.filter(U=>{var I,H,G,D;return(U==null?void 0:U[l!=null&&l.endChildMenu?C:(I=l==null?void 0:l.words)==null?void 0:I[0]])===(l!=null&&l.relatedWords&&((H=l==null?void 0:l.relatedWords)==null?void 0:H.length)>0?(D=(G=l.value)==null?void 0:G.split(" "))==null?void 0:D[0]:l.value)}),r==null?void 0:r[0]}else{let C=(L=(x=r==null?void 0:r.compData)==null?void 0:x.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:L.contents,U={};return C==null||C.forEach(I=>{U[I.prop]=I.value}),U}},Dp={key:0,class:"extra-button-content"},Bp={class:"table-operator-wrap"},Np={key:0,class:"extra-button-filter"},Tp={key:1,class:"extra-header"},Ap=["onClick"],zp={class:"table-op-text"},Mp={class:"table-op-text"},Ip={class:"drop-menu",style:{width:"120px"}},Op=["onClick"],Lp={key:0},Rp={key:1},$p=["onClick"],Vp={class:"table-op-text"},Pp={key:1,class:"extra-button-content tabs-button-wrapper"},Fp={class:"table-operator-wrap"},jp={class:"extra-button-filter"},Hp={key:0,class:"extra-header"},Up={class:"table-op-action"},qp={class:"table-op-text"},Wp={class:"drop-menu",style:{width:"120px"}},Kp={key:0},Gp={key:1},Yp=["onClick"],Jp={class:"table-op-text"},Xp={__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,o=l,s=a.ref(""),c=a.ref(!1),m=a.ref([]),p=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 g(y,k){return y.map(F=>{const $={...F};return k.forEach(Y=>{delete $[Y]}),$})}function u(y){if(!y||y.t!=="n")return(y==null?void 0:y.v)??"";const k=y.v;if(y.z){const F=String(y.z).toLowerCase(),$=["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 Ne of $)if(F.includes(Ne))return _(k);const Y=/[ymdhms]/.test(F),pe=/^[0#\.\,\s]+$/.test(F.replace(/[\\\/\-:]/g,""));if(Y&&!pe)return _(k)}if(k>=1&&k<=73050){if(k<5e3)return k;if(k>=5e3&&k<4e4){const F=Math.floor((k-25569)/365.25)+1970;return F>=1970&&F<=2e3&&y.z&&/[ymd]/.test(String(y.z).toLowerCase())?_(k):k}if(k>=4e4)return _(k)}return k}function _(y){if(typeof y!="number")return y;try{const k=new Date((y-25569)*86400*1e3);if(isNaN(k.getTime()))return y;const F=k.getFullYear(),$=String(k.getMonth()+1).padStart(2,"0"),Y=String(k.getDate()).padStart(2,"0");return`${F}-${$}-${Y}`}catch{return y}}const x=y=>{const k=y.raw;if(!k)return;const F=new FileReader;F.onload=$=>{try{const Y=new Uint8Array($.target.result),pe=ua.readSync(Y,{type:"array"}),Ne=pe.SheetNames[0],Ce=pe.Sheets[Ne],ye=ua.utils.decode_range(Ce["!ref"]).e.c+1,X=new Array(ye).fill(""),se=[];for(const re in Ce){if(re[0]==="!")continue;const{r:be,c:ce}=ua.utils.decode_cell(re),Se=Ce[re];let va=u(Se);if((va==null||va==="")&&(va=""),be===0)X[ce]=va;else{if(!se[be-1]){se[be-1]={};for(let Ca=0;Ca<ye;Ca++)se[be-1][`col_${Ca}`]=""}se[be-1][`col_${ce}`]=va}}for(let re=0;re<ye;re++)X[re]===void 0&&(X[re]="");const qe=[];for(let re=0;re<X.length;re++)(!X[re]||X[re].toString().trim()==="")&&qe.push(re);let Da,ne;(qe==null?void 0:qe.length)>0?(Qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),Da=X.filter((re,be)=>!qe.includes(be)),ne=g(se,qe==null?void 0:qe.map(re=>`col_${re}`))):(Da=X,ne=se);const B=se==null?void 0:se[0];if(!(B!=null&&B.hasOwnProperty("col_0")))return Qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",Da,ne)}catch(Y){throw Qa.ElMessage.error(Y.message),new Error(Y.message)}},F.readAsArrayBuffer(k)},L=y=>{var F;const k=(F=m.value)==null?void 0:F.reduce(($,Y,pe)=>(pe===0?$[Y.label]=y:$[Y.label]=Y==null?void 0:Y.value,$),{});r("filter",k,y,!0)},C=(y,k={})=>{r("buttonClick",y,"",k)},U=y=>{var k,F;m.value=(F=(k=ua.getColumnChild(O.cloneDeep(y)))==null?void 0:k.filter($=>($==null?void 0:$.label)!==""&&($==null?void 0:$.label)!=="操作"))==null?void 0:F.map($=>({label:($==null?void 0:$.label)??"",value:"",name:($==null?void 0:$.prop)??"",isFormColHidden:$==null?void 0:$.isTableColHidden,width:2,prop:($==null?void 0:$.prop)??""}))},I=a.ref(!1),H=y=>{var k;if((y==null?void 0:y.buttonName)==="确认"&&(r("filter",y==null?void 0:y.content),I.value=(y==null?void 0:y.content)&&Object.values(y==null?void 0:y.content).length>0),(y==null?void 0:y.buttonName)==="清空"){const F=O.cloneDeep(y==null?void 0:y.content);for(const $ in F)F[$]="";m.value=(k=m.value)==null?void 0:k.map($=>({...$,value:""})),r("filter",F),I.value=!1}c.value=!1},G=()=>{c.value=!c.value},D=()=>{var k,F;m.value=(k=m.value)==null?void 0:k.map($=>({...$,value:""}));const y=(F=m.value)==null?void 0:F.reduce(($,Y)=>($[Y.label]=Y.value,$),{});r("filter",y)},E=a.ref(null);let S;return S=y=>{var Y;if(!c.value)return;const k=(Y=E==null?void 0:E.value)==null?void 0:Y.$el,F=k==null?void 0:k.contains(y.target);let $=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(pe=>{pe.contains(y.target)&&($=!0)}),!F&&!$&&(c.value=!1)},a.onMounted(()=>{document.addEventListener("click",S),U(o.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",S)}),a.watch(()=>o.columns,()=>{U(o.columns)},{deep:!0,immediate:!0}),(y,k)=>{var Ce,Q,ye,X,se,qe,Da,ne;const F=a.resolveComponent("el-icon"),$=a.resolveComponent("svg-icon"),Y=a.resolveComponent("el-input"),pe=a.resolveComponent("el-upload"),Ne=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:(o==null?void 0:o.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((o==null?void 0:o.level)-1)*12+"px",fontWeight:600-((o==null?void 0:o.level)-1)*100>=400?600-((o==null?void 0:o.level)-1)*100:400,fontSize:17-(o==null?void 0:o.level)>=14?17-(o==null?void 0:o.level)+"px":"14px"})},a.toDisplayString(l.compName),7),a.createElementVNode("div",Bp,[o!=null&&o.filterShow?(a.openBlock(),a.createElementBlock("div",Np,[a.createVNode(Bu,{trigger:"contextmenu",ref_key:"popOverRef",ref:E,title:"",width:800,placement:"bottom-start",isVisible:c.value,"onUpdate:isVisible":k[4]||(k[4]=B=>c.value=B)},{reference:a.withCtx(()=>{var B,re,be,ce;return[a.createVNode(Y,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=Se=>s.value=Se),style:{"min-width":"80px"},placeholder:I.value?(be=(re=(B=l.filterValues)==null?void 0:B.filter(Se=>Se))==null?void 0:re.slice(0,3))==null?void 0:be.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((ce=m.value)==null?void 0:ce.length)===0},{suffix:a.withCtx(()=>{var Se,va;return[!s.value&&((va=(Se=l.filterValues)==null?void 0:Se.filter(Ca=>Ca))!=null&&va.join("/"))?(a.openBlock(),a.createBlock(F,{key:0,style:{cursor:"pointer"},onClick:D},{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(G,["stop"])},[a.createVNode($,{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:k[1]||(k[1]=a.withModifiers(()=>{},["stop"])),onKeyup:k[2]||(k[2]=a.withModifiers(()=>{},["stop"])),onKeypress:k[3]||(k[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:m.value,buttonValue:p.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:p.value,isStartJustify:!1,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((Ce=l.buttons)==null?void 0:Ce.length)>0?(a.openBlock(),a.createElementBlock("div",Tp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Q=l.buttons)==null?void 0:Q.filter(B=>l.isDevMode||(B==null?void 0:B.label)!=="修改模板"),(B,re)=>{var be;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:re},[(B==null?void 0:B.type)==="upload"?(a.openBlock(),a.createBlock(pe,{key:0,class:"upload-button-wrap","on-change":x,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var ce;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:Se=>C(B==null?void 0:B.label)},[a.createVNode($,{class:"table-op-icon",name:(ce=v==null?void 0:v.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label)))==null?void 0:ce.icon},null,8,["name"]),a.createElementVNode("span",zp,a.toDisplayString(B==null?void 0:B.label),1)],10,Ap)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(B==null?void 0:B.type)==="popover"?(a.openBlock(),a.createBlock(dl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var ce;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode($,{class:"table-op-icon",name:(ce=v==null?void 0:v.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label)))==null?void 0:ce.icon},null,8,["name"]),a.createElementVNode("span",Mp,a.toDisplayString(B==null?void 0:B.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Ip,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(B==null?void 0:B.contents,ce=>{var Se,va;return a.openBlock(),a.createElementBlock("div",{key:ce==null?void 0:ce.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:Ca=>!l.lockingPage&&C(ce==null?void 0:ce.label)},[a.createTextVNode(a.toDisplayString(ce==null?void 0:ce.label),1),(Se=ce==null?void 0:ce.label)!=null&&Se.includes("选中")?(a.openBlock(),a.createElementBlock("span",Lp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(va=ce==null?void 0:ce.label)!=null&&va.includes("全部")?(a.openBlock(),a.createElementBlock("span",Rp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,Op)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(B!=null&&B.type)||(B==null?void 0:B.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:ce=>!l.lockingPage&&C(B==null?void 0:B.label,B)},[a.createVNode($,{class:"table-op-icon",name:(be=v==null?void 0:v.find(ce=>(ce==null?void 0:ce.label)===(B==null?void 0:B.label)))==null?void 0:be.icon},null,8,["name"]),a.createElementVNode("span",Vp,a.toDisplayString(B==null?void 0:B.label),1)],10,$p)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",Pp,[a.createElementVNode("div",Fp,[a.createElementVNode("div",jp,[a.createVNode(Y,{modelValue:s.value,"onUpdate:modelValue":k[5]||(k[5]=B=>s.value=B),style:{"min-width":"80px"},placeholder:I.value?(se=(X=(ye=l.filterValues)==null?void 0:ye.filter(B=>B))==null?void 0:X.slice(0,3))==null?void 0:se.join("/"):"搜索","prefix-icon":a.unref(Qa.search_default),clearable:"",onInput:L,disabled:((qe=m.value)==null?void 0:qe.length)===0},{suffix:a.withCtx(()=>{var B,re;return[!s.value&&((re=(B=l.filterValues)==null?void 0:B.filter(be=>be))!=null&&re.join("/"))?(a.openBlock(),a.createBlock(F,{key:0,style:{cursor:"pointer"},onClick:D},{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(G,["stop"])},[a.createVNode($,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((Da=l.buttons)==null?void 0:Da.length)>0?(a.openBlock(),a.createElementBlock("div",Hp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ne=l.buttons)==null?void 0:ne.filter(B=>l.isDevMode||(B==null?void 0:B.label)!=="修改模板"),(B,re)=>{var be;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:re},[(B==null?void 0:B.type)==="upload"?(a.openBlock(),a.createBlock(pe,{key:0,class:"upload-button-wrap","on-change":x,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var ce;return[a.createElementVNode("div",Up,[a.createVNode($,{class:"table-op-icon",name:(ce=v==null?void 0:v.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label)))==null?void 0:ce.icon},null,8,["name"]),a.createElementVNode("span",qp,a.toDisplayString(B==null?void 0:B.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(B==null?void 0:B.type)==="popover"?(a.openBlock(),a.createBlock(dl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(B==null?void 0:B.type)==="popover"?(a.openBlock(),a.createBlock(Ne,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var ce;return[a.createVNode($,{class:"table-op-icon",name:(ce=v==null?void 0:v.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label)))==null?void 0:ce.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(B==null?void 0:B.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Wp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(B==null?void 0:B.contents,ce=>(a.openBlock(),a.createBlock(Ne,{key:ce==null?void 0:ce.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Se=>C(ce==null?void 0:ce.label)},{default:a.withCtx(()=>{var Se,va;return[a.createTextVNode(a.toDisplayString(ce==null?void 0:ce.label),1),(Se=ce==null?void 0:ce.label)!=null&&Se.includes("选中")?(a.openBlock(),a.createElementBlock("span",Kp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(va=ce==null?void 0:ce.label)!=null&&va.includes("全部")?(a.openBlock(),a.createElementBlock("span",Gp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(B!=null&&B.type)||(B==null?void 0:B.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:ce=>!l.lockingPage&&C(B==null?void 0:B.label,B)},[a.createVNode($,{class:"table-op-icon",name:(be=v==null?void 0:v.find(ce=>(ce==null?void 0:ce.label)===(B==null?void 0:B.label)))==null?void 0:be.icon},null,8,["name"]),a.createElementVNode("span",Jp,a.toDisplayString(B==null?void 0:B.label),1)],10,Yp)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},Zp=Yl._export_sfc(Xp,[["__scopeId","data-v-3a44c010"]]),Qp={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(n,r)=>{const o=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,c=>{var m;return a.openBlock(),a.createBlock(o,{key:c==null?void 0:c.prop,label:c==null?void 0:c.label,prop:c==null?void 0:c.prop,fixed:(c==null?void 0:c.prop)==="operate"?"right":c==null?void 0:c.fixed,align:(c==null?void 0:c.align)??"left","show-overflow-tooltip":(c==null?void 0:c.showOverflowTooltip)??!0,width:c==null?void 0:c.width,"min-width":(c==null?void 0:c.minWidth)||((c==null?void 0:c.prop)==="operate"?80:(((m=c==null?void 0:c.label)==null?void 0:m.length)*2||4)*27)},{default:a.withCtx(p=>[a.renderSlot(n.$slots,"content",{row:p.row,column:p.column,$index:p.$index,scope:p}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(v,g)=>(a.openBlock(),a.createBlock(dl._sfc_main$2,{key:g,column:v,tableData:l.tableData},a.createSlots({_:2},[a.renderList(n.$slots,(u,_)=>({name:_,fn:a.withCtx(({row:x,slotData:L,item:C,column:U})=>[a.renderSlot(n.$slots,_,a.mergeProps({ref_for:!0},L??x,{item:C??v,slotData:L??x,row:x,column:U,columnProp:v}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class ef extends Pa.Loader{constructor(n){super(n),this.littleEndian=!0}load(n,r,o,s){const c=this,m=new Pa.FileLoader(c.manager);m.setPath(c.path),m.setResponseType("arraybuffer"),m.setRequestHeader(c.requestHeader),m.setWithCredentials(c.withCredentials),m.load(n,function(p){try{r(c.parse(p))}catch(v){s?s(v):console.error(v),c.manager.itemError(n)}},o,s)}_getDataView(n,r,o,s){switch(o){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,C){const U=L.length,I=new Uint8Array(C);let H=0,G=0,D,E,S;do if(D=L[H++],D<32){if(D++,G+D>C)throw new Error("Output buffer is not large enough");if(H+D>U)throw new Error("Invalid compressed data");do I[G++]=L[H++];while(--D)}else{if(E=D>>5,S=G-((D&31)<<8)-1,H>=U)throw new Error("Invalid compressed data");if(E===7&&(E+=L[H++],H>=U))throw new Error("Invalid compressed data");if(S-=L[H++],G+E+2>C)throw new Error("Output buffer is not large enough");if(S<0)throw new Error("Invalid compressed data");if(S>=G)throw new Error("Invalid compressed data");do I[G++]=I[S++];while(--E+2)}while(H<U);return I}function o(L){const C={},U=new Uint8Array(L);let I="",H="",G=0,D=!1;const E=U.length;for(;G<E&&D===!1;){const F=String.fromCharCode(U[G++]);F===`
|
|
2
|
+
`||F==="\r"?(H.trim().toLowerCase().startsWith("data")&&(D=!0),H=""):H+=F,I+=F}const S=I.search(/[\r\n]DATA\s(\S*)\s/i),y=/[\r\n]DATA\s(\S*)\s/i.exec(I.slice(S-1));if(C.data=y[1],C.headerLen=y[0].length+S,C.str=I.slice(0,C.headerLen),C.str=C.str.replace(/#.*/gi,""),C.version=/^VERSION (.*)/im.exec(C.str),C.fields=/^FIELDS (.*)/im.exec(C.str),C.size=/^SIZE (.*)/im.exec(C.str),C.type=/^TYPE (.*)/im.exec(C.str),C.count=/^COUNT (.*)/im.exec(C.str),C.width=/^WIDTH (.*)/im.exec(C.str),C.height=/^HEIGHT (.*)/im.exec(C.str),C.viewpoint=/^VIEWPOINT (.*)/im.exec(C.str),C.points=/^POINTS (.*)/im.exec(C.str),C.version!==null&&(C.version=parseFloat(C.version[1])),C.fields=C.fields!==null?C.fields[1].split(" "):[],C.type!==null&&(C.type=C.type[1].split(" ")),C.width!==null&&(C.width=parseInt(C.width[1])),C.height!==null&&(C.height=parseInt(C.height[1])),C.viewpoint!==null&&(C.viewpoint=C.viewpoint[1]),C.points!==null&&(C.points=parseInt(C.points[1],10)),C.points===null&&(C.points=C.width*C.height),C.size!==null&&(C.size=C.size[1].split(" ").map(function(F){return parseInt(F,10)})),C.count!==null)C.count=C.count[1].split(" ").map(function(F){return parseInt(F,10)});else{C.count=[];for(let F=0,$=C.fields.length;F<$;F++)C.count.push(1)}C.offset={};let k=0;for(let F=0,$=C.fields.length;F<$;F++)C.data==="ascii"?C.offset[C.fields[F]]=F:(C.offset[C.fields[F]]=k,k+=C.size[F]*C.count[F]);return C.rowSize=k,C}const s=o(n),c=[],m=[],p=[],v=[],g=[],u=new Pa.Color;if(s.data==="ascii"){const L=s.offset,I=new TextDecoder().decode(n).slice(s.headerLen).split(`
|
|
3
|
+
`);for(let H=0,G=I.length;H<G;H++){if(I[H]==="")continue;const D=I[H].split(" ");if(L.x!==void 0&&(c.push(parseFloat(D[L.x])),c.push(parseFloat(D[L.y])),c.push(parseFloat(D[L.z]))),L.rgb!==void 0){const E=s.fields.findIndex(pe=>pe==="rgb"),S=s.type[E],y=parseFloat(D[L.rgb]);let k=y;if(S==="F"){const pe=new Float32Array(1);pe[0]=y,k=new Int32Array(pe.buffer)[0]}const F=(k>>16&255)/255,$=(k>>8&255)/255,Y=(k>>0&255)/255;u.setRGB(F,$,Y,Pa.SRGBColorSpace),p.push(u.r,u.g,u.b)}L.normal_x!==void 0&&(m.push(parseFloat(D[L.normal_x])),m.push(parseFloat(D[L.normal_y])),m.push(parseFloat(D[L.normal_z]))),L.intensity!==void 0&&v.push(parseFloat(D[L.intensity])),L.label!==void 0&&g.push(parseInt(D[L.label]))}}if(s.data==="binary_compressed"){const L=new Uint32Array(n.slice(s.headerLen,s.headerLen+8)),C=L[0],U=L[1],I=r(new Uint8Array(n,s.headerLen+8,C),U),H=new DataView(I.buffer),G=s.offset;for(let D=0;D<s.points;D++){if(G.x!==void 0){const E=s.fields.indexOf("x"),S=s.fields.indexOf("y"),y=s.fields.indexOf("z");c.push(this._getDataView(H,s.points*G.x+s.size[E]*D,s.type[E],s.size[E])),c.push(this._getDataView(H,s.points*G.y+s.size[S]*D,s.type[S],s.size[S])),c.push(this._getDataView(H,s.points*G.z+s.size[y]*D,s.type[y],s.size[y]))}if(G.rgb!==void 0){const E=s.fields.indexOf("rgb"),S=H.getUint8(s.points*G.rgb+s.size[E]*D+2)/255,y=H.getUint8(s.points*G.rgb+s.size[E]*D+1)/255,k=H.getUint8(s.points*G.rgb+s.size[E]*D+0)/255;u.setRGB(S,y,k,Pa.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(G.normal_x!==void 0){const E=s.fields.indexOf("normal_x"),S=s.fields.indexOf("normal_y"),y=s.fields.indexOf("normal_z");m.push(this._getDataView(H,s.points*G.normal_x+s.size[E]*D,s.type[E],s.size[E])),m.push(this._getDataView(H,s.points*G.normal_y+s.size[S]*D,s.type[S],s.size[S])),m.push(this._getDataView(H,s.points*G.normal_z+s.size[y]*D,s.type[y],s.size[y]))}if(G.intensity!==void 0){const E=s.fields.indexOf("intensity");v.push(this._getDataView(H,s.points*G.intensity+s.size[E]*D,s.type[E],s.size[E]))}if(G.label!==void 0){const E=s.fields.indexOf("label");g.push(H.getInt32(s.points*G.label+s.size[E]*D,this.littleEndian))}}}if(s.data==="binary"){const L=new DataView(n,s.headerLen),C=s.offset;for(let U=0,I=0;U<s.points;U++,I+=s.rowSize){if(C.x!==void 0){const H=s.fields.indexOf("x"),G=s.fields.indexOf("y"),D=s.fields.indexOf("z");c.push(this._getDataView(L,I+C.x,s.type[H],s.size[H])),c.push(this._getDataView(L,I+C.y,s.type[G],s.size[G])),c.push(this._getDataView(L,I+C.z,s.type[D],s.size[D]))}if(C.rgb!==void 0){const H=L.getUint8(I+C.rgb+2)/255,G=L.getUint8(I+C.rgb+1)/255,D=L.getUint8(I+C.rgb+0)/255;u.setRGB(H,G,D,Pa.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(C.normal_x!==void 0){const H=s.fields.indexOf("normal_x"),G=s.fields.indexOf("normal_y"),D=s.fields.indexOf("normal_z");m.push(this._getDataView(L,I+C.normal_x,s.type[H],s.size[H])),m.push(this._getDataView(L,I+C.normal_y,s.type[G],s.size[G])),m.push(this._getDataView(L,I+C.normal_z,s.type[D],s.size[D]))}if(C.intensity!==void 0){const H=s.fields.indexOf("intensity");v.push(this._getDataView(L,I+C.intensity,s.type[H],s.size[H]))}C.label!==void 0&&g.push(L.getInt32(I+C.label,this.littleEndian))}}const _=new Pa.BufferGeometry;c.length>0&&_.setAttribute("position",new Pa.Float32BufferAttribute(c,3)),m.length>0&&_.setAttribute("normal",new Pa.Float32BufferAttribute(m,3)),p.length>0&&_.setAttribute("color",new Pa.Float32BufferAttribute(p,3)),v.length>0&&_.setAttribute("intensity",new Pa.Float32BufferAttribute(v,1)),g.length>0&&_.setAttribute("label",new Pa.Int32BufferAttribute(g,1)),_.computeBoundingSphere();const x=new Pa.PointsMaterial({size:.005});return p.length>0&&(x.vertexColors=!0),new Pa.Points(_,x)}}const af=O.useModelComp(O.pinia),{systemPath:ts}=O.storeToRefs(af),fi=a.ref(),ss=new WeakMap;function lf(l,n,r,o,s){const c=async x=>{try{const L=await O.platformDownloadFile({url:x});if(L.status!==200)throw new Error(`下载失败: ${L.status}`);return L.data}catch(L){throw console.error("addModelFromUrl失败:",L),L}},m=x=>new Promise((L,C)=>{const U=new FileReader;U.onload=I=>{try{const H=I.target.result,D=new On.MTLLoader().parse(H);D.preload(),L(D)}catch(H){C(H)}},U.onerror=()=>{C(new Error("MTL文件读取失败"))},U.readAsText(x)}),p=async x=>{const L={materials:{},create:function(C){return this.materials[C]?this.materials[C]:(console.warn(`Material '${C}' not found, using default material`),new Pa.MeshPhongMaterial({color:8947848,side:Pa.DoubleSide}))},getAsArray:function(){const C=[];for(const U in this.materials)C.push(this.materials[U]);return C},preload:function(){for(const C in this.materials)this.materials[C].map&&(this.materials[C].map.needsUpdate=!0)}};for(const C of x){const U=await m(C);Object.assign(L.materials,U.materials)}return L.preload(),L},v=async(x,L=[])=>new Promise((C,U)=>{const I=new FileReader;I.onload=async H=>{try{const G=H.target.result;let D=null;L&&L.length>0&&(L.length===1?D=await m(L[0]):D=await p(L));const E=new On.OBJLoader;D&&E.setMaterials(D);const S=E.parse(G);D||S.traverse(y=>{y.isMesh&&(y.material=new Pa.MeshPhongMaterial({color:8947848,side:Pa.DoubleSide}))}),C(S)}catch(G){U(G)}},I.onerror=()=>{U(new Error("OBJ文件读取失败"))},I.readAsText(x)}),g=async x=>{var L;try{r.value=!0;const{scene:C}=l();if(!C)throw new Error("Scene not initialized");s();const U=[];for(let I=0;I<x.length;I++){const H=x[I];o.value=`正在加载模型 ${I+1}/${x.length}...`;const G=await c(H.objUrl),D=((L=H.objUrl)==null?void 0:L.split("/").pop())||`model_${I}.obj`,E=new File([G],D,{type:G.type});let S=[];if(H.mtlUrls){const k=Array.isArray(H.mtlUrls)?H.mtlUrls:[H.mtlUrls];for(let F=0;F<k.length;F++){const $=k[F],Y=await c($),pe=($==null?void 0:$.split("/").pop())||`material_${I}_${F}.mtl`,Ne=new File([Y],pe,{type:Y.type});S.push(Ne)}}const y=await v(E,S);C.add(y),n.value.push(y),U.push(y)}return r.value=!1,U}catch(C){throw console.error("加载模型失败:",C),r.value=!1,C}},u=async(x,L,C=[],U=[])=>{let I;const H=x.toLowerCase();switch(H){case".txt":case".cpt":case".obj":const G=await L.text();if(H===".txt"||H===".cpt"){const le=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Pe=[...G.matchAll(le)].map(ze=>({x:parseFloat(ze[1]),y:parseFloat(ze[2]),z:parseFloat(ze[3])})),wa=new Pa.BufferGeometry,Fe=Pe.flatMap(ze=>[ze.x,ze.y,ze.z]);if(wa.setAttribute("position",new Pa.Float32BufferAttribute(Fe,3)),H===".txt"){const ze=new Pa.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});I=new Pa.Points(wa,ze)}else if(H===".cpt"){const ze=new Pa.LineBasicMaterial({color:"#5B5C99",linewidth:100});I=new Pa.Line(wa,ze)}}else if(H===".obj"){const le=new On.OBJLoader;if(C&&C.length>0){const na=new On.MTLLoader;for(const Pe of C){const wa=await Pe.text(),Fe=na.parse(wa);Fe.preload(),le.setMaterials(Fe);break}}I=le.parse(G),(!C||C.length===0)&&I.traverse(na=>{na.isMesh&&(na.material=new Pa.MeshPhongMaterial({color:"#B3B3D4"})),na instanceof Pa.Mesh&&(na.material.side=Pa.DoubleSide)})}break;case".stl":const D=await L.arrayBuffer(),S=new On.STLLoader().parse(D),y=new Pa.MeshPhongMaterial({color:"#B3B3D4",side:Pa.DoubleSide});I=new Pa.Mesh(S,y);break;case".nc":const k=["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"],F={"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)"},$=new Pa.Group,Y=k.map(le=>new Promise((na,Pe)=>{new On.STLLoader().load(ts.value===""?`/model/${le}`:`${ts.value}\\${le}`,Fe=>{const ze=new Pa.MeshPhongMaterial({color:F[le]||"#B3B3D4",side:Pa.DoubleSide}),Ve=new Pa.Mesh(Fe,ze);na(Ve)},void 0,Pe)}));try{(await Promise.all(Y)).forEach(na=>$.add(na)),I=$}catch(le){throw console.error("加载NC文件对应的STL文件失败:",le),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const pe=new ef,Ne=new Pa.Group;try{const le=await Qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),na=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"}),Pe=await Qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),wa=new Blob([Pe.data],{type:"application/octet-stream;charset=UTF-8"}),Fe=await new Promise((Ve,ea)=>{const Ja=URL.createObjectURL(na);pe.load(Ja,qa=>{const P=new Float32Array(qa.geometry.attributes.position.count*3);for(let V=0;V<qa.geometry.attributes.position.count;V++)P[V*3]=1,P[V*3+1]=0,P[V*3+2]=0;qa.geometry.setAttribute("color",new Pa.BufferAttribute(P,3)),qa.material.vertexColors=!0,qa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ja),Ve(qa)},void 0,ea)}),ze=await new Promise((Ve,ea)=>{const Ja=URL.createObjectURL(wa);pe.load(Ja,qa=>{const P=new Float32Array(qa.geometry.attributes.position.count*3);for(let V=0;V<qa.geometry.attributes.position.count;V++)P[V*3]=0,P[V*3+1]=1,P[V*3+2]=0;qa.geometry.setAttribute("color",new Pa.BufferAttribute(P,3)),qa.material.vertexColors=!0,qa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ja),Ve(qa)},void 0,ea)});Ne.add(Fe),Ne.add(ze),I=Ne}catch(le){throw console.error("PCD文件加载失败:",le),new Error("无法加载PCD文件")}break;case".urdf":const Ce=URL.createObjectURL(L),Q=new Cu.URDFLoader,ye="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",X={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},se=new WeakMap,qe=new WeakMap,Da=new WeakMap,ne=async le=>{if(se.has(le))return console.log(`从缓存加载: ${le}`),se.get(le);try{const na=await Qa.axios.get(`${ye}/${le}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Pe=new Blob([na.data],{type:"application/octet-stream;charset=UTF-8"});return X.enableCache&&se.set(le,Pe),Pe}catch(na){throw console.error(`加载文件失败: ${le}`,na),new Error(`无法加载文件: ${le}`)}},B=(le="default")=>{if(qe.has(le))return qe.get(le);const na=new Pa.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Pa.FrontSide});return qe.set(le,na),na},re=le=>{try{le.isBufferGeometry&&le.mergeVertices&&le.mergeVertices(),le.computeVertexNormals&&le.computeVertexNormals(),le.computeBoundingSphere&&le.computeBoundingSphere(),le.deleteAttribute&&le.deleteAttribute("uv2")}catch(na){console.warn("几何体优化失败,使用原始几何体:",na)}return le},be=async(le,na,Pe)=>{const wa=`stl_${na}`;if(Da.has(wa)){const ea=Da.get(wa);return new Pa.Mesh(ea,B())}const Fe=await le.arrayBuffer();let Ve=new On.STLLoader(Pe).parse(Fe);return Ve=re(Ve),Da.set(wa,Ve),new Pa.Mesh(Ve,B())},ce=async(le,na,Pe)=>{const wa=`obj_${na}`;if(se.has(wa))return se.get(wa).clone();const Fe=await le.text(),ze=new On.OBJLoader(Pe),Ve=na.replace(".obj",".mtl");try{const qa=await(await ne(Ve)).text(),V=new On.MTLLoader(Pe).parse(qa);V.preload(),ze.setMaterials(V)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Ve}`)}const ea=ze.parse(Fe);return ea.traverse(Ja=>{Ja.isMesh&&(Ja.geometry=re(Ja.geometry),Ja.castShadow=!0,Ja.receiveShadow=!0,Ja.renderOrder=1)}),se.set(wa,ea),ea},Se=(le,na)=>{const Pe=new Pa.LOD;if(Pe.addLevel(le,0),le.geometry){const wa=le.geometry.clone(),Fe=new Pa.Mesh(wa,le.material);Pe.addLevel(Fe,50)}return Pe};let va=0,Ca=0;const Ga=[];Q.loadMeshCb=async(le,na,Pe,wa,Fe)=>{const ze=le.split("/").pop(),Ve=Pe||(()=>{});va++;const ea=new Promise(async(Ja,qa)=>{try{const P=await ne(ze);if(!P||P.size===0)throw new Error(`文件为空: ${ze}`);const V=ze.split(".").pop().toLowerCase();let Z;switch(V){case"stl":Z=await be(P,ze,na);break;case"obj":Z=await ce(P,ze,na);break;default:throw new Error(`不支持的文件格式: ${V}`)}X.enableLOD&&Z.isMesh&&(Z=Se(Z,ze)),Ve(Z),Ca++,wa&&wa({loaded:Ca,total:va,progress:Ca/va}),Ja(Z)}catch(P){console.error(`mesh文件加载失败: ${ze}`,P);const V=new Pa.Group;Ve(V),Ja(V);const Z=new Pa.BoxGeometry(.1,.1,.1),oe=new Pa.MeshStandardMaterial({color:16711680,wireframe:!0});return new Pa.Mesh(Z,oe)}});Ga.push(ea)};try{if(!Ce){fi.value=void 0;break}if(I=await Q.loadAsync(Ce),console.log(`URDF文件加载完成,等待${va}个mesh文件加载...`),Ga.length>0)try{await Promise.allSettled(Ga),console.log(`所有mesh文件处理完成,成功加载: ${Ca}/${va}`)}catch(Pe){console.warn("部分mesh文件加载失败,但继续显示模型",Pe)}I.traverse(Pe=>{Pe.isMesh&&(Pe.castShadow=!0,Pe.receiveShadow=!0,Pe.renderOrder=1,Pe.material&&(Pe.material.needsUpdate=!0))}),console.time("计算包围盒");const le=new Pa.Box3;le.expandByObject(I);const na=`urdf_${Date.now()}`;I.userData.boundingBox=le.clone(),I.userData.modelId=na,ss.set(na,{box:le.clone(),center:le.getCenter(new Pa.Vector3),size:le.getSize(new Pa.Vector3),maxSize:Math.max(...le.getSize(new Pa.Vector3).toArray())}),fi.value=I,console.log("URDF模型加载完成并优化")}catch(le){console.error("URDF加载失败:",le),fi.value=void 0}finally{Ce&&URL.revokeObjectURL(Ce)}break;default:throw new Error(`不支持的文件格式: ${x}`)}return I};return{addModelsFromUrls:g,loadModelByDefaultPath:async x=>{console.log(x);try{r.value=!0,o.value="正在加载模型...";const{scene:L}=l();if(!L)throw new Error("Scene not initialized");s(),await new Promise(U=>setTimeout(U,100));const C=[];for(let U=0;U<x.length;U++){const I=x[U],H=await u(I.suffix,I.blob,I.mtlBlobs||[],I.meshFiles||[]);H&&(L.add(H),n.value.push(H),C.push(H))}return r.value=!1,o.value="",C}catch(L){throw console.error("加载模型失败:",L),r.value=!1,o.value="",L}},urdfModel:fi,modelBoundingBoxes:ss}}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 o,s,c,m,p,v=function(_,x){x.parentNode.insertBefore(_,x)};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(_){console&&console.log(_)}}o=function(){var _,x=document.createElement("div");x.innerHTML=l._iconfont_svg_string_4827314,(x=x.getElementsByTagName("svg")[0])&&(x.setAttribute("aria-hidden","true"),x.style.position="absolute",x.style.width=0,x.style.height=0,x.style.overflow="hidden",x=x,(_=document.body).firstChild?v(x,_.firstChild):_.appendChild(x))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),o()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(c=o,m=l.document,p=!1,u(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,g())})}function g(){p||(p=!0,c())}function u(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(u,50)}g()}})(window);const rf=["onClick"],nf=a.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0}},emits:["update:backGroundImage"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(null),c=a.ref(null),m=S=>{if(Array.isArray(S)&&S.length>=3){const[y,k,F,$]=S;return $!==void 0?`rgba(${y}, ${k}, ${F}, ${$})`:`rgb(${y}, ${k}, ${F})`}if(typeof S=="string"){const y=S.trim();if(y.startsWith("[")&&y.endsWith("]")){const k=y.slice(1,-1).split(",").map(F=>Number(F.trim()));if(k.length>=3&&k.every(F=>!Number.isNaN(F))){const[F,$,Y,pe]=k;return pe!==void 0?`rgba(${F}, ${$}, ${Y}, ${pe})`:`rgb(${F}, ${$}, ${Y})`}}return y}},p=a.computed(()=>{const S=Number(r==null?void 0:r.textSize),y=m(r==null?void 0:r.textColor),k={},F={};return!Number.isNaN(S)&&S&&(k.fontSize=`${S}px`,F.fontSize=`${S}px`),y&&(k.color=y,F.color=y),{label:k,value:F}}),v=a.ref(""),g=a.ref(""),u=a.ref(!1),_=async S=>{if(S){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const y=await O.platformDownloadFile({url:S}),k=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(k)}catch{g.value=""}}};a.watch(()=>r==null?void 0:r.backGroundImage,S=>{S&&(v.value=S)},{immediate:!0}),a.watch(v,S=>{_(S)},{immediate:!0});const x=()=>{var S;(S=c.value)==null||S.click()},L=async S=>{var F,$,Y;const y=S.target,k=(F=y==null?void 0:y.files)==null?void 0:F[0];if(!k){y.value="";return}u.value=!0;try{const pe=new FormData;pe.append("file",k);const Ne=await O.platformUploadFile(pe),Ce=(Y=($=Ne==null?void 0:Ne.data)==null?void 0:$.result)==null?void 0:Y.url;Ce?(v.value=Ce,o("update:backGroundImage",Ce),_(Ce),Qa.ElMessage.success("背景图片上传成功")):Qa.ElMessage.error("背景图片上传失败")}catch{Qa.ElMessage.error("背景图片上传失败")}finally{u.value=!1,y.value=""}},C=a.computed(()=>g.value?{backgroundImage:`url(${g.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),U=S=>dl.getComponent(S),I=S=>{if(!S)return;const y=S.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},H=(S,y,k)=>{r.disabled||S.field&&(s.value=y,a.nextTick(()=>{I(k.currentTarget)}))},G=()=>{s.value=null},D=S=>{var k;const y=((k=S==null?void 0:S.field)==null?void 0:k.value)??(S==null?void 0:S.value);return y==null||y===""?"-":y},E=S=>{const y=S!=null&&S.width&&S.width>0?S.width:1,F=`calc((100% - ${(y-1)*16}px) / ${y})`;return{flex:`0 0 ${F}`,maxWidth:F,minWidth:"140px",boxSizing:"border-box"}};return(S,y)=>(a.openBlock(),a.createElementBlock("div",{class:"statistics-cards-container",style:a.normalizeStyle(C.value),onClick:y[2]||(y[2]=k=>(r==null?void 0:r.backGround)==="Yes"&&x())},[(r==null?void 0:r.backGround)==="Yes"?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:y[0]||(y[0]=a.withModifiers(k=>x(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:L},null,544),y[3]||(y[3]=a.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.items,(k,F)=>{var $,Y,pe,Ne,Ce,Q,ye,X;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:F,style:a.normalizeStyle(E(k)),onClick:y[1]||(y[1]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",{class:"statistics-label",style:a.normalizeStyle(p.value.label)},a.toDisplayString(k==null?void 0:k.label),5),a.createElementVNode("div",{class:"statistics-value",style:a.normalizeStyle(p.value.value),onClick:se=>H(k,F,se)},[s.value===F&&k.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(U((($=k.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:k.field.value,"onUpdate:modelValue":se=>k.field.value=se,isEdit:!0,disabled:(Y=k.field)==null?void 0:Y.disabled,content:((pe=k.field)==null?void 0:pe.contents)??[],optionUrl:k.field,originalValue:(Ne=k.field)==null?void 0:Ne.value,config:(Ce=k.field)==null?void 0:Ce.config,configModel:((Q=k.field)==null?void 0:Q.prop)??((ye=k.field)==null?void 0:ye.name),selectedTagList:((X=k.field)==null?void 0:X.selectValue)??[],onBlur:G,onBlurChange:G},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(D(k)),1)],64))],12,rf)],4)}),128))],4))}}),of=Yl._export_sfc(nf,[["__scopeId","data-v-423d9eb1"]]),ac=O.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),tf={class:"calculator-content"},sf={class:"calculator-child"},cf={class:"calculator-child"},uf=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"}]}),(o,s)=>(a.openBlock(),a.createElementBlock("div",tf,[a.createElementVNode("div",sf,[a.createVNode(dl.ssForm,{rowContents:n.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",cf,[a.createVNode(dl.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),df=Yl._export_sfc(uf,[["__scopeId","data-v-73db0fe7"]]),ht=(l,n)=>{let r=l,o=n;return Array.isArray(r)&&(r=r==null?void 0:r.map((s,c)=>{if(Array.isArray(s)){let m={};return s=s==null?void 0:s.forEach((p,v)=>{var g;(g=o==null?void 0:o[v])!=null&&g.prop?m[o[v].prop]=p:Array.isArray(p)&&(m.children=ht(p,o))}),Object.assign(m,{id:c})}else return s})),r},lc=(l,n,r)=>{let o=l,s=n;return o=o==null?void 0:o.map((c,m)=>{var p,v;return!Array.isArray(c)||!((p=s==null?void 0:s[m])!=null&&p.label)&&!r||(c.unshift(((v=s==null?void 0:s[m])==null?void 0:v.label)??""),c.some(g=>Array.isArray(g))&&(c=c==null?void 0:c.map(g=>{var u;return Array.isArray(g)&&(g=lc(g,(u=s==null?void 0:s[m])==null?void 0:u.children,r)),g}))),c}),o},pf=(l,n,r)=>{if(n==="")return l==null?void 0:l.filter(o=>(o==null?void 0:o.id)!==r);{const o=n.split("-");return ff(l,o,r)}},ff=(l,n,r)=>{let o=l,s=n;return(s==null?void 0:s.length)===0?o=o==null?void 0:o.filter(c=>c.id!==r):o=o==null?void 0:o.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=rc(c,s,r)),c)),o},rc=(l,n,r)=>{var c,m;let o=l,s=n;return(s==null?void 0:s.length)===0?o.children=(c=o.children)==null?void 0:c.filter(p=>p.id!==r):o.children=(m=o.children)==null?void 0:m.map(p=>(p.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),p=rc(p,s,r)),p)),o},hf=(l,n,r)=>{if(n==="")return r;{const o=n.split("-");return vf(l,o,r)}},vf=(l,n,r)=>{let o=l,s=n;return(s==null?void 0:s.length)===0?o=r:o=o==null?void 0:o.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=nc(c,s,r)),c)),o},nc=(l,n,r)=>{var c;let o=l,s=n;return(s==null?void 0:s.length)===0?o.children=r:o.children=(c=o.children)==null?void 0:c.map(m=>(m.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),m=nc(m,s,r)),m)),o};class mf{constructor(n={}){qr(this,"url");qr(this,"heartbeatInterval");qr(this,"socket",null);qr(this,"isConnected",!1);qr(this,"heartTimer",null);qr(this,"canvas",null);qr(this,"ctx",null);qr(this,"mainCamCutMode",0);qr(this,"pMainShowStartX",0);qr(this,"pMainShowStartY",0);qr(this,"onLog");qr(this,"onDevCount");qr(this,"onResolution");qr(this,"onCameraStatus");qr(this,"onPhoto");this.url=n.url??"ws://127.0.0.1:22225",this.heartbeatInterval=n.heartbeatInterval??3e3}init(n,r,o){var m;(m=this.canvas)!=null&&m.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=o;const c=s.getContext("2d");if(!c)throw new Error("无法获取 CanvasRenderingContext2D");n.appendChild(s),this.canvas=s,this.ctx=c}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((n,r)=>{const o=new WebSocket(this.url);o.binaryType="arraybuffer",o.onopen=()=>{this.socket=o,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),n()},o.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),r(s)},o.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},o.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,c)=>c.width*c.height-s.width*s.height)[0]||null}openCamera(n=0,r=1280,o=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]=o>>8&255,s[11]=o&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,c,m,p,v,g;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 o=r[2];if(o===80){const u=r[3],_=r.length-4,x=new Uint8Array(_);for(let U=0;U<_;U++)x[U]=r[4+U];const C=decodeURIComponent(this.byteToString(x)).split("|");(s=this.onDevCount)==null||s.call(this,u,C);return}if(o===81){const u=r[3]||0,_=[];for(let x=0;x<u;x++){const L=(r[4+x*4+0]||0)*256+(r[4+x*4+1]||0),C=(r[4+x*4+2]||0)*256+(r[4+x*4+3]||0);_.push({width:L,height:C,text:`${L}*${C}`})}(c=this.onResolution)==null||c.call(this,u,_);return}if(o===1){r[3]===1&&((m=this.onCameraStatus)==null||m.call(this,"opened")),r[3]===3&&((p=this.onCameraStatus)==null||p.call(this,"closed"));return}if(o===16){if(r[3]===1){const _=r[4]*256+r[5],x=r[6]*65536+r[7]*256+r[8];let L="";if(_>0){const I=new Uint8Array(_);for(let H=0;H<_;H++)I[H]=r[9+H];L=decodeURIComponent(this.byteToString(I))}const C=new Uint8Array(x);for(let I=0;I<x;I++)C[I]=r[9+_+I];const U=this.uint8ArrayToString(C);(v=this.onPhoto)==null||v.call(this,{flag:0,imgPath:L,base64:U})}r[3]===2&&((g=this.onPhoto)==null||g.call(this,{flag:2,imgPath:"",base64:""}));return}if(o===204){if(!this.canvas||!this.ctx)return;const u=r[3]*256+r[4],_=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 x=this.ctx.createImageData(u,_);let L=11;for(let C=0;C<x.data.length;C+=4)x.data[C+0]=r[L],x.data[C+1]=r[L+1],x.data[C+2]=r[L+2],x.data[C+3]=255,L+=3;this.ctx.putImageData(x,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(n){let r="";for(let o=0;o<n.length;o++)r+=String.fromCharCode(n[o]);return r}byteToString(n){let r="";for(let o=0;o<n.length;o++)r+=String.fromCharCode(n[o]);return r}}const yf={style:{display:"flex",gap:"16px",height:"100%"}},gf={key:0,style:{color:"var(--el-text-color-secondary)"}},bf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},kf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},xf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},wf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},_f={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Cf=["src","onClick"],Ef=["onClick"],Sf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Df={class:"dialog-footer"},Bf=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(null),c=a.ref(!1),m=a.ref([]),p=a.ref(""),v=a.ref(!1),g=a.ref([]),u=new mf({url:"ws://127.0.0.1:22225"});function _($,Y){var X;const pe=$.split(","),Ne=((X=pe[0].match(/:(.*?);/))==null?void 0:X[1])??"image/jpeg",Ce=atob(pe[1]);let Q=Ce.length;const ye=new Uint8Array(Q);for(;Q--;)ye[Q]=Ce.charCodeAt(Q);return new File([ye],Y,{type:Ne})}function x(){u.onLog=$=>{console.log("[GPY]",$)},u.onDevCount=($,Y)=>{if(p.value+=`设备数量=${$},设备=${Y.join(",")}
|
|
4
|
+
`,$>0){p.value+=`检测到设备,正在获取分辨率...
|
|
5
|
+
`;try{u.getResolution(0)}catch(pe){p.value+=`获取分辨率失败:${(pe==null?void 0:pe.message)??pe}
|
|
6
|
+
`}}else p.value+=`未检测到高拍仪设备!
|
|
7
|
+
`},u.onResolution=($,Y)=>{if($<=0||!Array.isArray(Y)||Y.length===0){p.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
|
|
8
|
+
`;try{u.openCamera(0,1280,720)}catch(Ne){p.value+=`打开摄像头失败:${(Ne==null?void 0:Ne.message)??Ne}
|
|
9
|
+
`}return}const pe=u.chooseResolution(Y);if(!pe){p.value+=`分辨率选择失败,回退使用 1280*720 打开...
|
|
10
|
+
`;try{u.openCamera(0,1280,720)}catch(Ne){p.value+=`打开摄像头失败:${(Ne==null?void 0:Ne.message)??Ne}
|
|
11
|
+
`}return}p.value+=`获取分辨率 ${pe.text}成功,打开摄像头...
|
|
12
|
+
`;try{u.closeCamera(),setTimeout(()=>{try{u.openCamera(0,pe.width,pe.height)}catch(Ne){p.value+=`打开摄像头失败:${(Ne==null?void 0:Ne.message)??Ne}
|
|
13
|
+
`}},100)}catch{try{u.openCamera(0,pe.width,pe.height)}catch(Ne){p.value+=`打开摄像头失败:${(Ne==null?void 0:Ne.message)??Ne}
|
|
14
|
+
`}}},u.onCameraStatus=$=>{$==="opened"?(c.value=!0,p.value+=`摄像头已打开
|
|
15
|
+
`):(c.value=!1,p.value+=`摄像头已关闭
|
|
16
|
+
`)},u.onPhoto=$=>{if($.flag===0&&$.base64){const Y=`data:image/jpeg;base64,${$.base64}`,pe=_(Y,`gpy-capture-${Date.now()}.jpg`);m.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:Y,file:pe}),p.value+=`拍照完成,已接收图片(当前 ${m.value.length} 张)
|
|
17
|
+
`}else p.value+=`拍照失败 flag=${$.flag}
|
|
18
|
+
`}}const L=async()=>{if(await a.nextTick(),!s.value)return;C(),x();const $=s.value.getBoundingClientRect();u.init(s.value,Math.floor($.width),Math.floor($.height)),p.value+=`正在连接设备服务...
|
|
19
|
+
`,await u.connect(),p.value+=`正在获取设备数量...
|
|
20
|
+
`,u.getDevCount()},C=()=>{try{u.destroy()}catch($){console.error($)}c.value=!1,m.value=[],p.value="",v.value=!1,g.value=[]};a.watch(()=>r.visible,$=>{$?L():C()});const U=()=>{try{u.bestSize()}catch($){console.error($)}},I=()=>{try{u.rotateLeft()}catch($){console.error($)}},H=()=>{try{u.rotateRight()}catch($){console.error($)}},G=()=>{try{u.focus()}catch($){console.error($)}},D=()=>{p.value+=`正在拍照...
|
|
21
|
+
`;try{u.photo()}catch($){p.value+=`拍照调用失败:${($==null?void 0:$.message)??$}
|
|
22
|
+
`}},E=()=>{m.value.length>0?o("confirm",m.value.map($=>$.file)):o("confirm",[])},S=$=>{$<0||$>=m.value.length||(m.value.splice($,1),p.value+=`已删除一张图片(剩余 ${m.value.length} 张)
|
|
23
|
+
`)},y=$=>{if(!$)return;const Y=`gpy-preview-${Date.now()}.jpg`;g.value=[{name:Y,blobUrl:$}],v.value=!0},k=()=>{v.value=!1},F=()=>{C(),o("cancel")};return($,Y)=>{const pe=a.resolveComponent("el-input"),Ne=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(xr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:F,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",yf,[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)"}},[c.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",gf,"初始化摄像头..."))],512),a.createElementVNode("div",bf,[a.createElementVNode("div",kf,[Y[0]||(Y[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",xf,[m.value.length===0?(a.openBlock(),a.createElementBlock("div",wf,"暂无图片")):(a.openBlock(),a.createElementBlock("div",_f,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(Ce,Q)=>(a.openBlock(),a.createElementBlock("div",{key:Ce.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:Ce.url,onClick:ye=>y(Ce.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Cf),a.createElementVNode("div",{onClick:ye=>S(Q),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,Ef)]))),128))]))],512)]),a.createElementVNode("div",Sf,[Y[1]||(Y[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(pe,{type:"textarea",value:p.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Df,[a.createVNode(Ne,{onClick:U,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[2]||(Y[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Ne,{onClick:I,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[3]||(Y[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(Ne,{onClick:H,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[4]||(Y[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(Ne,{onClick:G,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[5]||(Y[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(Ne,{onClick:D,disabled:!c.value,id:"themeButton"},{default:a.withCtx(()=>Y[6]||(Y[6]=[a.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),Y[9]||(Y[9]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),a.createVNode(Ne,{onClick:E,disabled:m.value.length===0,id:"themeButton"},{default:a.withCtx(()=>Y[7]||(Y[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(Ne,{onClick:F,id:"themeBorderButton"},{default:a.withCtx(()=>Y[8]||(Y[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),v.value?(a.openBlock(),a.createBlock(dl.ssFilePreview,{key:0,fileDataList:g.value,onDestroy:k},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),Nf=Yl._export_sfc(Bf,[["__scopeId","data-v-24a2050a"]]);function oc(l){return Qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function Tf(l){return Qa.axios.get(l,{responseType:"blob"})}const cs=O.useMenuState(O.pinia),Af=async l=>{var c,m,p,v,g,u;let n=l==null?void 0:l.导入文件,r=l==null?void 0:l.函数参数,o=(c=n==null?void 0:n[0])==null?void 0:c.url,s="";if(!(o!=null&&o.includes("http"))||!(o!=null&&o.includes("https"))){cs.setContentLoading(!0);const _=await O.platformDownloadFile({url:o});let x=_==null?void 0:_.data;const L=new FormData;L.append("file",x,((m=n==null?void 0:n[0])==null?void 0:m.name)+"."+((p=o==null?void 0:o.split("."))==null?void 0:p[1])),L.append("query",r);let C=await oc(L);C=(u=(g=(v=C==null?void 0:C.data)==null?void 0:v.data)==null?void 0:g.response)==null?void 0:u.replace("generateResult",l==null?void 0:l.函数名称),s=C,cs.setContentLoading(!1)}return s},Ct=O.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),Ei={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},us={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:"http://139.196.154.85:20015/api/public/paddleOCR"};class zf{constructor(n){qr(this,"config");this.config={...us,...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 o=this.getAuthorizationToken(),s=this.buildOCRRequest(n,r),c=this.config.apiUrl||us.apiUrl;return(await Qa.axios.post(c,s,{headers:{"Content-Type":"application/json",Authorization:o}})).data}getFieldAliases(n){return Ei[n]?Ei[n]:[n]}extractTableHeaders(n){const r=[],o=new Set,s=m=>{const p=m==null?void 0:m.label;return!(!p||p==="操作"||p===this.config.columnName||(m==null?void 0:m.type)==="operate"||(m==null?void 0:m.prop)==="operate")},c=m=>{(m||[]).forEach(p=>{if(!p)return;const v=(p==null?void 0:p.children)||(p==null?void 0:p.child)||(p==null?void 0:p.columns);if(Array.isArray(v)&&v.length>0){c(v);return}if(s(p)){const g=p.label;if(!o.has(g)){o.add(g);const u=this.getFieldAliases(g);r.push(u)}}})};return c(n||[]),r}}function ic(l){return new zf(l)}ic();const vt=async(l,n)=>{var m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y;let r=(p=(m=O.cloneDeep(l))==null?void 0:m.optionUrl)==null?void 0:p.menuSelect,o=[];r==null||r.forEach(k=>{});let s="",c=await ua.menuToParent(r);if(c==null||c.forEach(k=>{var F,$,Y,pe;(k==null?void 0:k.name)===(((pe=(Y=($=(F=O.cloneDeep(l))==null?void 0:F.optionUrl)==null?void 0:$.groupSelect)==null?void 0:Y[0])==null?void 0:pe.replaceAll("'",""))??"")&&(s=k==null?void 0:k.id)}),n){s=n;const k=await _r.getInsofDataApi({id:s}),F=(_=(u=(g=(v=k==null?void 0:k.data)==null?void 0:v.result)==null?void 0:g[0])==null?void 0:u.key)==null?void 0:_.pageKey;c=await ua.getItemData(F,sessionStorage.getItem("systemKey"),"")}if(s!==""){let k;n?k=(x=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.id)===n))==null?void 0:x.compData:k=(L=c==null?void 0:c.find(Y=>{var pe,Ne,Ce,Q;return(Y==null?void 0:Y.name)===(((Ne=(pe=l==null?void 0:l.groupSelect)==null?void 0:pe.split(":"))==null?void 0:Ne[0])||((Q=(Ce=l==null?void 0:l.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:Q[0]))}))==null?void 0:L.compData;let F=(U=(C=k==null?void 0:k.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:C.contents)==null?void 0:U.map(Y=>Y==null?void 0:Y.label);(H=(I=k==null?void 0:k.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:I.contents)!=null&&H.every(Y=>Array.isArray(Y))&&(F=(E=ua.getColumnChild((D=(G=k==null?void 0:k.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:G.contents)==null?void 0:D[0]))==null?void 0:E.map(Y=>Y==null?void 0:Y.prop));let $=(y=(S=k==null?void 0:k.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:S.contents)==null?void 0:y.map(Y=>{if(Array.isArray(Y))Y=Y==null?void 0:Y.filter(pe=>!(pe!=null&&pe.id));else{let pe={};for(let Ne in Y)Ne!=="id"&&(pe[Ne]=Y==null?void 0:Y[Ne]);Y=pe}return Y});$==null||$.forEach(Y=>{Array.isArray(Y)?o.push(ua.getValueToObjectValue(Y,F)):o.push(Y)})}return o},Mf=O.useMenuState(O.pinia),{activeMenuPath:$6}=O.storeToRefs(Mf),If=O.useUnit(O.pinia),{chooseTitle:V6}=O.storeToRefs(If),Of="col-operate",Et=l=>`${Of}-${l}`,Lf=(l,n)=>{const r=new Map;l.forEach(s=>{const{prop:c}=s;r.set(c,s)});const o=s=>{Array.isArray(s)&&s.forEach(c=>{const{prop:m}=c||{},p=r.get(m);Rf(p,c),Array.isArray(c==null?void 0:c.children)&&c.children.length>0&&o(c.children)})};return o(n),n},Rf=(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),$f=(l,n)=>{const{sortable:r=!1,filterable:o=!1,showSummary:s=!1,operable:c=!1,fixed:m=!1}=n||{};return{prop:l,sortable:r,filterable:o,showSummary:s,operable:c,fixed:m}},Vf=async l=>{var c,m;if(!l)return;const n=Et(l),r=await _r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n}}),o=(c=r==null?void 0:r.data)==null?void 0:c.code,s=(m=r==null?void 0:r.data)==null?void 0:m.result;if(o==200)return s==null?void 0:s[0]},Pf=async l=>{var c,m,p,v;if(!l)return;const n=Et(l),r=await _r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n}}),o=(c=r==null?void 0:r.data)==null?void 0:c.code,s=(m=r==null?void 0:r.data)==null?void 0:m.result;return o==200?(v=(p=s==null?void 0:s[0])==null?void 0:p.value)==null?void 0:v.columns:[]},Ff=async(l,n)=>{if(!l||!n)return;const r=Et(l);return await _r.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:n}})},jf=async(l,n)=>!l||!n?void 0:await _r.updateInsofDataApi({id:l,value:{columns:n}}),ds=async(l,n)=>{const r=sessionStorage.getItem("systemKey");if(!l||!n||!r)return;const o=await Vf(l);return o?await jf(o==null?void 0:o.id,n):await Ff(l,n)};var bi={exports:{}},Hf=bi.exports,ps;function Uf(){return ps||(ps=1,function(l,n){(function(r,o){o()})(Hf,function(){function r(g,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(g.type)?new Blob(["\uFEFF",g],{type:g.type}):g}function o(g,u,_){var x=new XMLHttpRequest;x.open("GET",g),x.responseType="blob",x.onload=function(){v(x.response,u,_)},x.onerror=function(){console.error("could not download file")},x.send()}function s(g){var u=new XMLHttpRequest;u.open("HEAD",g,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function c(g){try{g.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),g.dispatchEvent(u)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof $n.commonjsGlobal=="object"&&$n.commonjsGlobal.global===$n.commonjsGlobal?$n.commonjsGlobal:void 0,p=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),v=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!p?function(g,u,_){var x=m.URL||m.webkitURL,L=document.createElement("a");u=u||g.name||"download",L.download=u,L.rel="noopener",typeof g=="string"?(L.href=g,L.origin===location.origin?c(L):s(L.href)?o(g,u,_):c(L,L.target="_blank")):(L.href=x.createObjectURL(g),setTimeout(function(){x.revokeObjectURL(L.href)},4e4),setTimeout(function(){c(L)},0))}:"msSaveOrOpenBlob"in navigator?function(g,u,_){if(u=u||g.name||"download",typeof g!="string")navigator.msSaveOrOpenBlob(r(g,_),u);else if(s(g))o(g,u,_);else{var x=document.createElement("a");x.href=g,x.target="_blank",setTimeout(function(){c(x)})}}:function(g,u,_,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof g=="string")return o(g,u,_);var L=g.type==="application/octet-stream",C=/constructor/i.test(m.HTMLElement)||m.safari,U=/CriOS\/[\d]+/.test(navigator.userAgent);if((U||L&&C||p)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var D=I.result;D=U?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=D:location=D,x=null},I.readAsDataURL(g)}else{var H=m.URL||m.webkitURL,G=H.createObjectURL(g);x?x.location=G:location.href=G,x=null,setTimeout(function(){H.revokeObjectURL(G)},4e4)}});m.saveAs=v.saveAs=v,l.exports=v})}(bi)),bi.exports}Uf();const Jn=O.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}}}),qf=O.useLoginState(O.pinia),{loginUserInfo:ot}=O.storeToRefs(qf),Wf=async l=>{var o,s,c;let n=await O.getAllTables({platId:parseInt((o=ot==null?void 0:ot.value)==null?void 0:o.plat_id),tableNames:[l]});return n=(c=(s=n==null?void 0:n.data)==null?void 0:s.result)==null?void 0:c[0],await ec(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}]}]},Kf=O.useLoginState(),{loginUserInfo:gl}=O.storeToRefs(Kf);let hi="$R";const Er=O.useModelComp(O.pinia),tc=a.ref(!1),{itemData:Gf,itemGridData:ro,curStructureCompIds:fs,isSubmitCurStructure:Yf,routeToChildPath:Jf,pageMapState:mt,itemExtendData:vi,refreshTable:hs}=O.storeToRefs(Er),Mi=Jn(O.pinia),Tr=O.useMenuState(O.pinia),rr=a.shallowRef([]),{asideMenus:Xf,activeTopMenuPath:Zf,activeMenuPath:xl,platform:P6,buttonTriggerType:Qf,currentMenuPath:Zr}=O.storeToRefs(Tr),dn=O.useUnit(O.pinia),{selectTitle:Kn,chooseTitle:Si}=O.storeToRefs(dn);a.ref();const Bo=a.ref(!0),Yn=a.ref(0),yt=a.ref([]);a.ref(!1);const St=a.ref(!1),Ho=a.ref(),sc=a.ref(),cc=a.ref(),e0=()=>{Er.setItemGridData([]),Er.setIsEdit("edit"),Er.setSubmitCurStructure(xl.value!=="/平台管理/菜单管理")},a0=()=>{Er.setIsEdit("view"),Er.setRefreshCurStructure(!0)},l0=async l=>{var s;let n=Kn.value,r=n==null?void 0:n.findIndex(c=>(c==null?void 0:c.value)===(l==null?void 0:l.value)),o=n==null?void 0:n.filter((c,m)=>m<=r);dn.setSelectTitle(dl.safeClone(o)),o=(s=o==null?void 0:o.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Tr.setActiveMenuPath(null),Tr.setActiveMenuPath(o)},it=async(l,n,r,o="contentConfig")=>{var s;try{if(!Array.isArray(l))return;let c,m;n==="create"?(c={dataList:l==null?void 0:l.map(v=>{var g;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:o,parentTable:"",version:1},value:{pageData:{...v,compData:(g=v==null?void 0:v.compData)==null?void 0:g.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=_r.batchAddInsofDataApi):n==="update"?(c={dataList:l==null?void 0:l.map(v=>{var g;return{id:v==null?void 0:v.id,value:{pageData:{...v,compData:(g=v==null?void 0:v.compData)==null?void 0:g.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=_r.batchUpdateInsofDataApi):n==="delete"&&(c={ids:l},m=_r.batchDeleteInsofDataApi);const p=await m(c);if(((s=p==null?void 0:p.data)==null?void 0:s.code)===200)return p.data.result;throw Qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Qa.ElMessage.error("保存响应失败")}},vs=async(l,n,r,o)=>{var s,c,m,p,v,g,u,_,x,L,C;try{const U=(c=(s=l==null?void 0:l.results)==null?void 0:s.filter(S=>!(S!=null&&S.id)||typeof(S==null?void 0:S.id)=="string"))==null?void 0:c.map(S=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:n,relatedInfo:r},value:{tableData:S}})),I=(p=(m=l==null?void 0:l.results)==null?void 0:m.filter(S=>(S==null?void 0:S.id)&&typeof(S==null?void 0:S.id)=="number"))==null?void 0:p.map(S=>({id:S==null?void 0:S.id,value:{tableData:S}})),H=JSON.parse(JSON.stringify(l)),G=(v=H==null?void 0:H.results)==null?void 0:v.map(S=>S.id);let D;r?D=(_=(u=(g=mt.value)==null?void 0:g[xl.value])==null?void 0:u.filter(S=>{var y,k,F;return((y=S==null?void 0:S.key)==null?void 0:y.type)===n&&((F=(k=S==null?void 0:S.key)==null?void 0:k.relatedInfo)==null?void 0:F.target)===o}))==null?void 0:_.map(S=>S==null?void 0:S.id):D=(C=(L=(x=mt.value)==null?void 0:x[xl.value])==null?void 0:L.filter(S=>{var y;return((y=S==null?void 0:S.key)==null?void 0:y.type)===n}))==null?void 0:C.map(S=>S==null?void 0:S.id);const E=D==null?void 0:D.filter(S=>!(G!=null&&G.includes(S))&&typeof S=="number");(U==null?void 0:U.length)>0&&await _r.batchAddInsofDataApi({dataList:U}),(I==null?void 0:I.length)>0&&await _r.batchUpdateInsofDataApi({dataList:I}),(E==null?void 0:E.length)>0&&await _r.batchDeleteInsofDataApi({ids:E})}catch(U){throw new Error(U)}},r0=async l=>{var g,u,_,x,L,C,U,I,H,G;Tr.setContentLoading(!0);const n=JSON.parse(JSON.stringify(Gf.value));if(!Yf.value)return Tr.setCacheStructures({key:Qf.value,data:n}),Qa.ElMessage.success("已暂存");const r=n==null?void 0:n.map(D=>D.id),o=r.filter(D=>{var E;return!((E=fs.value)!=null&&E.includes(D))}),s=(g=fs.value)==null?void 0:g.filter(D=>!r.includes(D)),c=[...o,...s].filter(D=>typeof D!==null&&typeof D<"u"),m=n==null?void 0:n.filter(D=>!D.id),p=n==null?void 0:n.filter(D=>D.id);let v=[];if(c&&(c==null?void 0:c.length)>0&&v.push(it(c,"delete",l)),m&&(m==null?void 0:m.length)>0&&v.push(it(m,"create",l)),p&&(p==null?void 0:p.length)>0&&v.push(it(p,"update",l)),ro.value&&((u=ro.value)!=null&&u.isDelete&&((x=(_=ro.value)==null?void 0:_.results)==null?void 0:x.length)>0&&((C=(L=ro.value)==null?void 0:L.results)!=null&&C.every(D=>typeof D=="number"))?await _r.batchDeleteInsofDataApi({ids:(U=ro.value)==null?void 0:U.results}):(console.log("itemGridData.value",ro.value),v.push(await vs(ro.value,"gridLayout")))),vi.value)for(const D in vi.value)v.push(await vs((I=vi.value)==null?void 0:I[D],"extend",{target:D,compId:(G=(H=vi.value)==null?void 0:H[D])==null?void 0:G.compId},D));await Promise.all(v).then(()=>{Qa.ElMessage.success("保存成功"),Er.setRefreshCurStructure(!0)}).catch(D=>{Qa.ElMessage.success(D)}),Tr.setContentLoading(!1)},Uo=l=>No(l),n0=a.computed(()=>{var l;return(l=rr.value)==null?void 0:l.filter(n=>(n==null?void 0:n.affix)&&(n==null?void 0:n.affix)!=="default")}),uc=a.computed(()=>{var l;return(l=rr.value)==null?void 0:l.filter(n=>!(n!=null&&n.affix&&(n==null?void 0:n.affix)!=="default"))}),dc=a.ref(0),pc=a.ref(null),o0="ocr_committed_temp_ids_v1",i0=(l,n)=>`${o0}:${String(l??"")}:${String(n??"")}`,t0=(l,n,r)=>{try{const o=i0(l,n),s=sessionStorage.getItem(o),c=s?JSON.parse(s):[],m=Array.isArray(c)?c:[],p=Array.from(new Set([...m,...r||[]].map(v=>String(v)))).slice(-200);sessionStorage.setItem(o,JSON.stringify(p))}catch{}},Di=async(l,n="data",r)=>{var s,c,m,p,v,g,u,_,x,L,C,U,I,H,G,D,E,S,y,k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va,ue,Ae,Ue,Xe,_a,Be,il,vl,Jl,Ya;let o=((m=(c=(s=Kn.value)==null?void 0:s.filter(ha=>(ha==null?void 0:ha.condition)==="child"))==null?void 0:c[0])==null?void 0:m.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let ha=(p=l==null?void 0:l.fixContent)==null?void 0:p.map(ve=>{let Ia={};for(let We in ve)Array.isArray(ve==null?void 0:ve[We])?Ia[We]=JSON.stringify(ve==null?void 0:ve[We]):Ia[We]=ve==null?void 0:ve[We];return Ia}),ma=await O.quoteApi({platId:parseInt((v=gl==null?void 0:gl.value)==null?void 0:v.plat_id),type:"fatherSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});ma=(g=ma==null?void 0:ma.data)==null?void 0:g.result,ma=ma==null?void 0:ma.filter(ve=>{var Ia,We;return!((ve==null?void 0:ve.fatherPath)!==""&&((We=(Ia=ve==null?void 0:ve.quote)==null?void 0:Ia[0])==null?void 0:We.menus)===(xl==null?void 0:xl.value))});let ga=ma==null?void 0:ma.map(ve=>{var la,Ye;let Ia={},We=ha==null?void 0:ha[0],K;return Array.isArray((la=ve==null?void 0:ve.struct)==null?void 0:la[0])?K=ua.getColumnChild((Ye=ve==null?void 0:ve.struct)==null?void 0:Ye[0]):K=ve==null?void 0:ve.struct,K=K==null?void 0:K.filter(De=>(De==null?void 0:De.prop)!=="relatedId"),K==null||K.forEach(De=>{var Cl,tl;Ia[De.prop]=((Cl=De==null?void 0:De.words)!=null&&Cl[0]?(We==null?void 0:We[(tl=De==null?void 0:De.words)==null?void 0:tl[0]])??(We==null?void 0:We[De==null?void 0:De.prop]):We==null?void 0:We[De==null?void 0:De.prop])??""}),Ia.id="1",Ia.relatedId=`[${Ia.id}]`,delete Ia.sort,{tableName:"content_"+(ve==null?void 0:ve.id),tableContents:[Ia]}}),Je=[{tableName:(u=l==null?void 0:l.relatedContents)==null?void 0:u.find(ve=>ve==null?void 0:ve.includes("content")),tableContents:ha}];Je=[...Je,...ga];let Xa=await O.quoteApi({platId:parseInt((_=gl==null?void 0:gl.value)==null?void 0:_.plat_id),type:"sonSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});Xa=(L=(x=Xa==null?void 0:Xa.data)==null?void 0:x.result)==null?void 0:L.filter(ve=>!(Je!=null&&Je.find(Ia=>(Ia==null?void 0:Ia.tableName)==="content_"+(ve==null?void 0:ve.id)))),Xa=Xa==null?void 0:Xa.filter(ve=>{var Ia,We;return!((ve==null?void 0:ve.fatherPath)!==""&&((We=(Ia=ve==null?void 0:ve.quote)==null?void 0:Ia[0])==null?void 0:We.menus)===(xl==null?void 0:xl.value))});let Ee=Xa==null?void 0:Xa.map(ve=>{var la,Ye,De,Cl,tl,bl,Wa;let Ia={},We=ha==null?void 0:ha[0],K;return Array.isArray((la=ve==null?void 0:ve.struct)==null?void 0:la[0])?K=ua.getColumnChild((Ye=ve==null?void 0:ve.struct)==null?void 0:Ye[0]):K=ve==null?void 0:ve.struct,K=K==null?void 0:K.filter(Za=>(Za==null?void 0:Za.prop)!=="relatedId"),((Cl=(De=K==null?void 0:K[0])==null?void 0:De.words)!=null&&Cl[0]?We!=null&&We[(bl=(tl=K==null?void 0:K[0])==null?void 0:tl.words)==null?void 0:bl[0]]:We!=null&&We[(Wa=K==null?void 0:K[0])==null?void 0:Wa.prop])?(K==null||K.forEach(Za=>{var Na,de;Ia[Za.prop]=((Na=Za==null?void 0:Za.words)!=null&&Na[0]?(We==null?void 0:We[(de=Za==null?void 0:Za.words)==null?void 0:de[0]])??(We==null?void 0:We[Za==null?void 0:Za.prop]):We==null?void 0:We[Za==null?void 0:Za.prop])??""}),Ia.id="1",Ia.relatedId=`[${Ia.id}]`,delete Ia.sort):Ia=void 0,{tableName:"content_"+(ve==null?void 0:ve.id),tableContents:[Ia]}});Ee=Ee==null?void 0:Ee.filter(ve=>{var Ia;return!((Ia=ve==null?void 0:ve.tableContents)!=null&&Ia.every(We=>We===void 0))}),Je=[...Je,...Ee],await O.pageBatchAddApi({platId:parseInt((C=gl==null?void 0:gl.value)==null?void 0:C.plat_id),changeContents:Je});let Ge=[];Je==null||Je.forEach(ve=>{var Ia;(Ia=ve==null?void 0:ve.tableContents)==null||Ia.forEach(We=>{Ge.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(We),request_result:"{}",is_delete:!1,request_table:ve==null?void 0:ve.tableName,request_type:"add"})})}),await O.pageBatchAddApi({platId:parseInt((U=gl==null?void 0:gl.value)==null?void 0:U.plat_id),changeContents:[{tableName:"log",tableContents:Ge}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const ha=((l==null?void 0:l.ocrRows)||[]).map(Xa=>Xa==null?void 0:Xa.id).filter(Xa=>Xa!=null),ma=((l==null?void 0:l.ocrRows)||[]).map(Xa=>{const Ee={...Xa};return delete Ee._isOCRRow,delete Ee._ocrTableId,Object.keys(Ee).forEach(Ge=>{/(^|\.)证书附件$/.test(Ge)&&Array.isArray(Ee[Ge])&&(Ee[Ge]=JSON.stringify(Ee[Ge].map(ve=>({url:(ve==null?void 0:ve.url)||"",name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.fileName)||"",fileName:(ve==null?void 0:ve.fileName)||(ve==null?void 0:ve.name)||""})).filter(ve=>ve.url||ve.name)))}),Ee});let ga=[{tableName:(I=l==null?void 0:l.relatedContents)==null?void 0:I.find(Xa=>Xa==null?void 0:Xa.includes("content")),tableContents:ma}];await O.pageBatchAddApi({platId:parseInt((H=gl==null?void 0:gl.value)==null?void 0:H.plat_id),changeContents:ga});let Je=[];ga==null||ga.forEach(Xa=>{var Ee;(Ee=Xa==null?void 0:Xa.tableContents)==null||Ee.forEach(Ge=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ge),request_result:"{}",is_delete:!1,request_table:Xa==null?void 0:Xa.tableName,request_type:"ocrBatchAdd"})})}),await O.pageBatchAddApi({platId:parseInt((G=gl==null?void 0:gl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Je}]}),t0(l==null?void 0:l.parentTableId,l==null?void 0:l.index,ha)}if((l==null?void 0:l.buttonName)==="编辑"){const ma=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(K=>{const la={...K};return delete la._isOCRRow,delete la._ocrTableId,delete la._isTemp,delete la.tableEditType,delete la.index,la});let ga=ma==null?void 0:ma.map(K=>{let la={};for(let Ye in K)Array.isArray(K==null?void 0:K[Ye])?la[Ye]=JSON.stringify(K==null?void 0:K[Ye]):la[Ye]=K==null?void 0:K[Ye];return la}),Je=await O.quoteApi({platId:parseInt((D=gl==null?void 0:gl.value)==null?void 0:D.plat_id),type:"fatherSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});Je=(E=Je==null?void 0:Je.data)==null?void 0:E.result,Je=Je==null?void 0:Je.filter(K=>{var la,Ye;return!((K==null?void 0:K.fatherPath)!==""&&((Ye=(la=K==null?void 0:K.quote)==null?void 0:la[0])==null?void 0:Ye.menus)===(xl==null?void 0:xl.value))});let Xa=(S=ga==null?void 0:ga[0])==null?void 0:S.id,Ee=[{tableName:(y=l==null?void 0:l.relatedContents)==null?void 0:y.find(K=>K==null?void 0:K.includes("content")),tableContents:ga}],Ge=(k=Je==null?void 0:Je.map(K=>{var Ye,De,Cl,tl,bl;let la=(Ye=K==null?void 0:K.contents)==null?void 0:Ye.filter(Wa=>{var Za,Na;return JSON.stringify(Wa==null?void 0:Wa.relatedId)!=="{}"&&(Wa==null?void 0:Wa.relatedId)!==""&&(Wa!=null&&Wa.relatedId)?(Za=Wa==null?void 0:Wa.relatedId)==null?void 0:Za.includes(parseInt(Xa)):(Wa==null?void 0:Wa.sort)===((Na=ga==null?void 0:ga[0])==null?void 0:Na.sort)});if((la==null?void 0:la.length)>0){let Wa=ga==null?void 0:ga[0];Wa={...Wa,id:(De=la==null?void 0:la[0])==null?void 0:De.id};let Za={},Na=Wa,de;return Array.isArray((Cl=K==null?void 0:K.struct)==null?void 0:Cl[0])?de=ua.getColumnChild((tl=K==null?void 0:K.struct)==null?void 0:tl[0]):de=K==null?void 0:K.struct,de=de==null?void 0:de.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),de==null||de.forEach(Sa=>{var El,Vl;Za[Sa.prop]=((El=Sa==null?void 0:Sa.words)!=null&&El[0]?(Na==null?void 0:Na[(Vl=Sa==null?void 0:Sa.words)==null?void 0:Vl[0]])??(Na==null?void 0:Na[Sa==null?void 0:Sa.prop]):Na==null?void 0:Na[Sa==null?void 0:Sa.prop])??""}),Za.id=(bl=la==null?void 0:la[0])==null?void 0:bl.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(K==null?void 0:K.id),tableContents:[Za]}}else return}))==null?void 0:k.filter(K=>K);Ee=[...Ee,...Ge];let ve=await O.quoteApi({platId:parseInt((F=gl==null?void 0:gl.value)==null?void 0:F.plat_id),type:"sonSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});ve=(Y=($=ve==null?void 0:ve.data)==null?void 0:$.result)==null?void 0:Y.filter(K=>!(Ee!=null&&Ee.find(la=>(la==null?void 0:la.tableName)==="content_"+(K==null?void 0:K.id)))),ve=ve==null?void 0:ve.filter(K=>{var la,Ye;return!((K==null?void 0:K.fatherPath)!==""&&((Ye=(la=K==null?void 0:K.quote)==null?void 0:la[0])==null?void 0:Ye.menus)===(xl==null?void 0:xl.value))});let Ia=(pe=ve==null?void 0:ve.map(K=>{var Ye,De,Cl,tl,bl;let la=(Ye=K==null?void 0:K.contents)==null?void 0:Ye.filter(Wa=>{var Za,Na,de;return JSON.stringify(Wa==null?void 0:Wa.relatedId)!=="{}"&&(Wa==null?void 0:Wa.relatedId)!==""&&(Wa!=null&&Wa.relatedId)?(Za=Wa==null?void 0:Wa.relatedId)==null?void 0:Za.includes(parseInt(Xa)):(Wa==null?void 0:Wa.sort)===((Na=ga==null?void 0:ga[0])==null?void 0:Na.sort)||(Wa==null?void 0:Wa.sort)===(parseInt(((de=ga==null?void 0:ga[0])==null?void 0:de.sort)??"0")+1).toString()});if((la==null?void 0:la.length)>0){let Wa=ga==null?void 0:ga[0];Wa={...Wa,id:(De=la==null?void 0:la[0])==null?void 0:De.id};let Za={},Na=Wa,de;return Array.isArray((Cl=K==null?void 0:K.struct)==null?void 0:Cl[0])?de=ua.getColumnChild((tl=K==null?void 0:K.struct)==null?void 0:tl[0]):de=K==null?void 0:K.struct,de=de==null?void 0:de.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),de==null||de.forEach(Sa=>{var El,Vl,Fl,nr;((El=Sa==null?void 0:Sa.words)!=null&&El[0]?(Na==null?void 0:Na[(Vl=Sa==null?void 0:Sa.words)==null?void 0:Vl[0]])??(Na==null?void 0:Na[Sa==null?void 0:Sa.prop]):Na!=null&&Na[Sa==null?void 0:Sa.prop])&&(Za[Sa.prop]=((Fl=Sa==null?void 0:Sa.words)!=null&&Fl[0]?(Na==null?void 0:Na[(nr=Sa==null?void 0:Sa.words)==null?void 0:nr[0]])??(Na==null?void 0:Na[Sa==null?void 0:Sa.prop]):Na==null?void 0:Na[Sa==null?void 0:Sa.prop])??"")}),Za.id=(bl=la==null?void 0:la[0])==null?void 0:bl.id,delete Za.sort,delete Za.relatedId,{tableName:"content_"+(K==null?void 0:K.id),tableContents:[Za]}}else return}))==null?void 0:pe.filter(K=>K);Ee=[...Ee,...Ia],await O.pageBatchUpdateApi({platId:parseInt((Ne=gl==null?void 0:gl.value)==null?void 0:Ne.plat_id),changeContents:Ee});let We=[];Ee==null||Ee.forEach(K=>{var la;(la=K==null?void 0:K.tableContents)==null||la.forEach(Ye=>{We.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Ye),request_result:"{}",is_delete:!1,request_table:K==null?void 0:K.tableName,request_type:"update"})})}),await O.pageBatchAddApi({platId:parseInt((Ce=gl==null?void 0:gl.value)==null?void 0:Ce.plat_id),changeContents:[{tableName:"log",tableContents:We}]})}if((l==null?void 0:l.buttonName)==="删除"){let ha=[{tableName:(Q=l==null?void 0:l.relatedContents)==null?void 0:Q.find(ve=>ve==null?void 0:ve.includes("content")),tableContents:l==null?void 0:l.fixContent}],ma=await O.quoteApi({platId:parseInt((ye=gl==null?void 0:gl.value)==null?void 0:ye.plat_id),type:"fatherSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});ma=(X=ma==null?void 0:ma.data)==null?void 0:X.result,ma=ma==null?void 0:ma.filter(ve=>{var Ia,We;return!((ve==null?void 0:ve.fatherPath)!==""&&((We=(Ia=ve==null?void 0:ve.quote)==null?void 0:Ia[0])==null?void 0:We.menus)===(xl==null?void 0:xl.value))});let ga=(qe=(se=l==null?void 0:l.fixContent)==null?void 0:se[0])==null?void 0:qe.id,Je=(Da=ma==null?void 0:ma.map(ve=>{var We,K,la,Ye,De,Cl;let Ia=(We=ve==null?void 0:ve.contents)==null?void 0:We.filter(tl=>{var bl,Wa,Za;return JSON.stringify(tl==null?void 0:tl.relatedId)!=="{}"&&(tl==null?void 0:tl.relatedId)!==""&&(tl!=null&&tl.relatedId)?(bl=tl==null?void 0:tl.relatedId)==null?void 0:bl.includes(parseInt(ga)):(tl==null?void 0:tl.sort)===((Za=(Wa=l==null?void 0:l.fixContent)==null?void 0:Wa[0])==null?void 0:Za.sort)});if((Ia==null?void 0:Ia.length)>0){let tl=(K=l==null?void 0:l.fixContent)==null?void 0:K[0];tl={...tl,id:(la=Ia==null?void 0:Ia[0])==null?void 0:la.id};let bl={},Wa=tl,Za;return Array.isArray((Ye=ve==null?void 0:ve.struct)==null?void 0:Ye[0])?Za=ua.getColumnChild((De=ve==null?void 0:ve.struct)==null?void 0:De[0]):Za=ve==null?void 0:ve.struct,Za=Za==null?void 0:Za.filter(Na=>(Na==null?void 0:Na.prop)!=="relatedId"),Za==null||Za.forEach(Na=>{var de,Sa;bl[Na.prop]=((de=Na==null?void 0:Na.words)!=null&&de[0]?(Wa==null?void 0:Wa[(Sa=Na==null?void 0:Na.words)==null?void 0:Sa[0]])??(Wa==null?void 0:Wa[Na==null?void 0:Na.prop]):Wa==null?void 0:Wa[Na==null?void 0:Na.prop])??""}),bl.id=(Cl=Ia==null?void 0:Ia[0])==null?void 0:Cl.id,delete bl.sort,delete bl.relatedId,{tableName:"content_"+(ve==null?void 0:ve.id),tableContents:[bl]}}else return}))==null?void 0:Da.filter(ve=>ve);ha=[...ha,...Je];let Xa=await O.quoteApi({platId:parseInt((ne=gl==null?void 0:gl.value)==null?void 0:ne.plat_id),type:"sonSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});Xa=(re=(B=Xa==null?void 0:Xa.data)==null?void 0:B.result)==null?void 0:re.filter(ve=>!(ha!=null&&ha.find(Ia=>(Ia==null?void 0:Ia.tableName)==="content_"+(ve==null?void 0:ve.id)))),Xa=Xa==null?void 0:Xa.filter(ve=>{var Ia,We;return!((ve==null?void 0:ve.fatherPath)!==""&&((We=(Ia=ve==null?void 0:ve.quote)==null?void 0:Ia[0])==null?void 0:We.menus)===(xl==null?void 0:xl.value))});let Ee=(be=Xa==null?void 0:Xa.map(ve=>{var We,K,la,Ye,De,Cl;let Ia=(We=ve==null?void 0:ve.contents)==null?void 0:We.filter(tl=>{var bl,Wa,Za;return JSON.stringify(tl==null?void 0:tl.relatedId)!=="{}"&&(tl==null?void 0:tl.relatedId)!==""&&(tl!=null&&tl.relatedId)?(bl=tl==null?void 0:tl.relatedId)==null?void 0:bl.includes(parseInt(ga)):(tl==null?void 0:tl.sort)===((Za=(Wa=l==null?void 0:l.fixContent)==null?void 0:Wa[0])==null?void 0:Za.sort)});if((Ia==null?void 0:Ia.length)>0){let tl=(K=l==null?void 0:l.fixContent)==null?void 0:K[0];tl={...tl,id:(la=Ia==null?void 0:Ia[0])==null?void 0:la.id};let bl={},Wa=tl,Za;return Array.isArray((Ye=ve==null?void 0:ve.struct)==null?void 0:Ye[0])?Za=ua.getColumnChild((De=ve==null?void 0:ve.struct)==null?void 0:De[0]):Za=ve==null?void 0:ve.struct,Za=Za==null?void 0:Za.filter(Na=>(Na==null?void 0:Na.prop)!=="relatedId"),Za==null||Za.forEach(Na=>{var de,Sa;bl[Na.prop]=((de=Na==null?void 0:Na.words)!=null&&de[0]?(Wa==null?void 0:Wa[(Sa=Na==null?void 0:Na.words)==null?void 0:Sa[0]])??(Wa==null?void 0:Wa[Na==null?void 0:Na.prop]):Wa==null?void 0:Wa[Na==null?void 0:Na.prop])??""}),bl.id=(Cl=Ia==null?void 0:Ia[0])==null?void 0:Cl.id,delete bl.sort,delete bl.relatedId,{tableName:"content_"+(ve==null?void 0:ve.id),tableContents:[bl]}}else return}))==null?void 0:be.filter(ve=>ve);ha=[...ha,...Ee],await O.pageBatchDeleteApi({platId:parseInt((ce=gl==null?void 0:gl.value)==null?void 0:ce.plat_id),changeContents:ha});let Ge=[];ha==null||ha.forEach(ve=>{var Ia;(Ia=ve==null?void 0:ve.tableContents)==null||Ia.forEach(We=>{Ge.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(We),request_result:"{}",is_delete:!1,request_table:ve==null?void 0:ve.tableName,request_type:"delete"})})}),await O.pageBatchAddApi({platId:parseInt((Se=gl==null?void 0:gl.value)==null?void 0:Se.plat_id),changeContents:[{tableName:"log",tableContents:Ge}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let ha=await O.getPageDataApi({platId:parseInt((va=gl==null?void 0:gl.value)==null?void 0:va.plat_id),pageName:"menu"});if(ha=(Ca=ha==null?void 0:ha.data)==null?void 0:Ca.result,ha!=null&&ha.find(ma=>(ma==null?void 0:ma.father_name)===xl.value+"/")){cc.value=l,sc.value=ha==null?void 0:ha.filter(Je=>(Je==null?void 0:Je.father_name)===xl.value+"/");let ma=(le=(Ga=l==null?void 0:l.columns)==null?void 0:Ga.find(Je=>Je==null?void 0:Je.mainKey))==null?void 0:le.prop,ga=(Pe=(na=l==null?void 0:l.fixContent)==null?void 0:na[0])==null?void 0:Pe[ma];St.value=!0,Ho.value=[{prop:ma,label:ma,name:ma,value:ga}]}else{let ma=(wa=l==null?void 0:l.fixContent)==null?void 0:wa.map(Xa=>{let Ee={};for(let Ge in Xa)Array.isArray(Xa==null?void 0:Xa[Ge])?Ee[Ge]=JSON.stringify(Xa==null?void 0:Xa[Ge]):Ee[Ge]=Xa==null?void 0:Xa[Ge];return Ee.relatedId="",Ee}),ga=[{tableName:(Fe=l==null?void 0:l.relatedContents)==null?void 0:Fe.find(Xa=>Xa==null?void 0:Xa.includes("content")),tableContents:ma}];await O.pageBatchAddApi({platId:parseInt((ze=gl==null?void 0:gl.value)==null?void 0:ze.plat_id),changeContents:ga});let Je=[];ga==null||ga.forEach(Xa=>{var Ee;(Ee=Xa==null?void 0:Xa.tableContents)==null||Ee.forEach(Ge=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ge),request_result:"{}",is_delete:!1,request_table:Xa==null?void 0:Xa.tableName,request_type:"copyAdd"})})}),await O.pageBatchAddApi({platId:parseInt((Ve=gl==null?void 0:gl.value)==null?void 0:Ve.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let ha=((qa=(Ja=(ea=l==null?void 0:l.columns)==null?void 0:ea.map(K=>K==null?void 0:K.filter))==null?void 0:Ja.filter(K=>K!==""))==null?void 0:qa[0])??"";ha=Pa.analyzeSplitToContent(ha,","),ha=(ha==null?void 0:ha.find(K=>K==null?void 0:K.includes("@Filter")))??"";let ma=(P=l==null?void 0:l.fixContent)==null?void 0:P.map(K=>{let la={};for(let Ye in K)Array.isArray(K==null?void 0:K[Ye])?la[Ye]=JSON.stringify(K==null?void 0:K[Ye]):la[Ye]=K==null?void 0:K[Ye];return la}),ga=await O.quoteApi({platId:parseInt((V=gl==null?void 0:gl.value)==null?void 0:V.plat_id),type:"fatherSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});ga=(Z=ga==null?void 0:ga.data)==null?void 0:Z.result,ga=ga==null?void 0:ga.filter(K=>{var la,Ye;return!((K==null?void 0:K.fatherPath)!==""&&((Ye=(la=K==null?void 0:K.quote)==null?void 0:la[0])==null?void 0:Ye.menus)===(xl==null?void 0:xl.value))});let Je=(te=(oe=l==null?void 0:l.columns)==null?void 0:oe[0])==null?void 0:te.prop,Xa=(ka=ma==null?void 0:ma[0])==null?void 0:ka[Je],Ee=[{tableName:(oa=l==null?void 0:l.relatedContents)==null?void 0:oa.find(K=>K==null?void 0:K.includes("content")),tableContents:ma}],Ge=(Re=ga==null?void 0:ga.map(K=>{var Ye,De,Cl,tl,bl;let la=(Ye=K==null?void 0:K.contents)==null?void 0:Ye.filter(Wa=>{var Za;return(Za=Object.values(Wa))==null?void 0:Za.find(Na=>Na===Xa)});if((la==null?void 0:la.length)>0){let Wa=ma==null?void 0:ma[0];Wa={...Wa,id:(De=la==null?void 0:la[0])==null?void 0:De.id};let Za={},Na=Wa,de;return Array.isArray((Cl=K==null?void 0:K.struct)==null?void 0:Cl[0])?de=ua.getColumnChild((tl=K==null?void 0:K.struct)==null?void 0:tl[0]):de=K==null?void 0:K.struct,de=de==null?void 0:de.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),de==null||de.forEach(Sa=>{var El,Vl;Za[Sa.prop]=((El=Sa==null?void 0:Sa.words)!=null&&El[0]?(Na==null?void 0:Na[(Vl=Sa==null?void 0:Sa.words)==null?void 0:Vl[0]])??(Na==null?void 0:Na[Sa==null?void 0:Sa.prop]):Na==null?void 0:Na[Sa==null?void 0:Sa.prop])??""}),Za.id=(bl=la==null?void 0:la[0])==null?void 0:bl.id,delete Za.sort,{tableName:"content_"+(K==null?void 0:K.id),tableContents:[Za]}}else return}))==null?void 0:Re.filter(K=>K);Ee=[...Ee,...Ge];let ve=await O.quoteApi({platId:parseInt((we=gl==null?void 0:gl.value)==null?void 0:we.plat_id),type:"sonSyncs",related:[{menus:o!==""?xl.value+"/"+o:xl.value,groups:l==null?void 0:l.name}]});if(ve=(ya=(Ea=ve==null?void 0:ve.data)==null?void 0:Ea.result)==null?void 0:ya.filter(K=>!(Ee!=null&&Ee.find(la=>(la==null?void 0:la.tableName)==="content_"+(K==null?void 0:K.id)))),ve=ve==null?void 0:ve.filter(K=>{var la,Ye;return!((K==null?void 0:K.fatherPath)!==""&&((Ye=(la=K==null?void 0:K.quote)==null?void 0:la[0])==null?void 0:Ye.menus)===(xl==null?void 0:xl.value))}),ha&&ha!==""){(ha==null?void 0:ha[(ha==null?void 0:ha.length)-1])===","&&(ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1)),ha=(ja=(Fa=ha==null?void 0:ha.replace("(",hi))==null?void 0:Fa.split(hi))==null?void 0:ja[1],ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1),(ha==null?void 0:ha[0])==="*"&&(ha="{"+((Ze=(he=ha==null?void 0:ha.replace("{",hi))==null?void 0:he.split(hi))==null?void 0:Ze[1])),ha=(Te=ha==null?void 0:ha.replaceAll("{",""))==null?void 0:Te.replaceAll("}","");let K=ua.calculatorAndToOr(ha);K=K==null?void 0:K[0];let la;if((Qe=Object.values(K))!=null&&Qe.some(Ye=>(Ye==null?void 0:Ye[0])==="*")){let Ye=(Oe=(je=Kn.value)==null?void 0:je.find(De=>(De==null?void 0:De.condition)==="child"))!=null&&Oe.value?(Zr==null?void 0:Zr.value)+"/"+((pa=(_e=Kn.value)==null?void 0:_e.find(De=>(De==null?void 0:De.condition)==="child"))==null?void 0:pa.value):Zr==null?void 0:Zr.value;la=await Wr(Ye,!1)}for(let Ye in K)if(((ra=K==null?void 0:K[Ye])==null?void 0:ra[0])==="*"){let De=(Va=(Oa=(xa=K[Ye])==null?void 0:xa.slice(1,($a=K[Ye])==null?void 0:$a.length))==null?void 0:Oa.split(":"))==null?void 0:Va[0],Cl=(Ae=(ue=K[Ye])==null?void 0:ue.split(":"))==null?void 0:Ae[1],tl=(Ue=la==null?void 0:la.filter(bl=>(bl==null?void 0:bl.name)===De))==null?void 0:Ue[0];tl=(_a=(Xe=tl==null?void 0:tl.compData)==null?void 0:Xe.find(bl=>(bl==null?void 0:bl.key)==="tableContents"))==null?void 0:_a.contents,tl=(Be=tl==null?void 0:tl[0])==null?void 0:Be[Cl],K[Ye]=tl}ha=((il=Object.values(K))==null?void 0:il[0])??""}let Ia=(vl=ve==null?void 0:ve.map(K=>{var Ye,De,Cl,tl,bl;let la=(Ye=K==null?void 0:K.contents)==null?void 0:Ye.filter(Wa=>{var Za;return(Za=Object.values(Wa))==null?void 0:Za.find(Na=>Na===(ha===""?Xa:ha))});if((la==null?void 0:la.length)>0){let Wa=ma==null?void 0:ma[0];Wa={...Wa,id:(De=la==null?void 0:la[0])==null?void 0:De.id};let Za={},Na=Wa,de;return Array.isArray((Cl=K==null?void 0:K.struct)==null?void 0:Cl[0])?de=ua.getColumnChild((tl=K==null?void 0:K.struct)==null?void 0:tl[0]):de=K==null?void 0:K.struct,de=de==null?void 0:de.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),de==null||de.forEach(Sa=>{var Vl,Fl,nr,yr;let El=(Vl=l==null?void 0:l.columns)==null?void 0:Vl.find(Nl=>{var tr,Nr,Ll;return((Nr=(tr=Nl==null?void 0:Nl.words)==null?void 0:tr[0])==null?void 0:Nr.replaceAll("'",""))===(Sa==null?void 0:Sa.prop)&&((Ll=Nl==null?void 0:Nl.functionRelatedWords)==null?void 0:Ll.length)>0});El=(Fl=El==null?void 0:El.prop)==null?void 0:Fl.replaceAll("'",""),Za[Sa.prop]=((nr=Sa==null?void 0:Sa.words)!=null&&nr[0]?(Na==null?void 0:Na[(yr=Sa==null?void 0:Sa.words)==null?void 0:yr[0]])??(Na==null?void 0:Na[Sa==null?void 0:Sa.prop])??(Na==null?void 0:Na[El]):(Na==null?void 0:Na[Sa==null?void 0:Sa.prop])??(Na==null?void 0:Na[El]))??void 0}),Za.id=(bl=la==null?void 0:la[0])==null?void 0:bl.id,delete Za.sort,{tableName:"content_"+(K==null?void 0:K.id),tableContents:[Za]}}else return}))==null?void 0:vl.filter(K=>K);Ee=[...Ee,...Ia],await O.pageBatchUpdateApi({platId:parseInt((Jl=gl==null?void 0:gl.value)==null?void 0:Jl.plat_id),changeContents:Ee});let We=[];Ee==null||Ee.forEach(K=>{var la;(la=K==null?void 0:K.tableContents)==null||la.forEach(Ye=>{We.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ye),request_result:"{}",is_delete:!1,request_table:K==null?void 0:K.tableName,request_type:"method"})})}),await O.pageBatchAddApi({platId:parseInt((Ya=gl==null?void 0:gl.value)==null?void 0:Ya.plat_id),changeContents:[{tableName:"log",tableContents:We}]})}Er.setRefreshCurStructure(!0),await bt(l)},gt=async(l,n,r)=>{var s;let o=l==null?void 0:l.find(c=>(c==null?void 0:c.id)===n);if(o){let c=(s=o.compData)==null?void 0:s.map(m=>{var p;if((m==null?void 0:m.key)==="tableContents"){let v={...m,contents:r};return v.contents=(p=(v==null?void 0:v.contents)??[])==null?void 0:p.map(g=>{let u={};for(let _ in g)JSON.stringify(g==null?void 0:g[_])==="{}"?u[_]="":u[_]=g==null?void 0:g[_];return u}),v}return m});return o.compData=await _t(c,{}),l=l==null?void 0:l.map(m=>((m==null?void 0:m.id)===(o==null?void 0:o.id)&&(m=o),m)),l}else{let c=l==null?void 0:l.filter(p=>{var v;return(p==null?void 0:p.children)&&((v=p==null?void 0:p.children)==null?void 0:v.length)>0||(p==null?void 0:p.comp)==="Tabs"}),m=c==null?void 0:c.map(async p=>{var v;return p!=null&&p.children&&((v=p==null?void 0:p.children)==null?void 0:v.length)>0?p.children=await gt(p==null?void 0:p.children,n,r):p.compData=await gt(p==null?void 0:p.compData,n,r),p});return c=await Promise.all(m),c}},bt=async l=>{var c,m,p,v,g,u,_;let n=(c=l==null?void 0:l.relatedContents)==null?void 0:c.filter(x=>x==null?void 0:x.includes("content_")),r=await O.getAllTables({platId:parseInt((m=gl==null?void 0:gl.value)==null?void 0:m.plat_id),tableNames:n});if(r=(v=(p=r==null?void 0:r.data)==null?void 0:p.result)==null?void 0:v[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(x=>{x==null||delete x.source_table;const L={};for(let C in x){const U=x==null?void 0:x[C],I=U&&Object.prototype.toString.call(U)==="[object Object]"&&Object.keys(U).length===0,H=Array.isArray(U)&&U.length===0;U==null||U==="{}"||I||H?L[C]="":L[C]=U}return L});let o=(u=(g=n==null?void 0:n[0])==null?void 0:g.split("_"))==null?void 0:u[1],s=await gt(rr.value,o,r);rr.value=(_=rr.value)==null?void 0:_.map(x=>{var L,C;return(L=s==null?void 0:s[0])!=null&&L.tabInform&&((C=s==null?void 0:s[0])==null?void 0:C.tabInform)===(x==null?void 0:x.tabInform)?x=s==null?void 0:s[0]:(x!=null&&x.name?(x==null?void 0:x.name)===(s==null?void 0:s.name):(x==null?void 0:x.id)===(s==null?void 0:s.id))&&(x=s),x})},s0=l=>{let n=Ho.value;Ho.value=n==null?void 0:n.map(r=>(r.value=l==null?void 0:l[r==null?void 0:r.prop],r))},c0=async()=>{var x,L,C,U,I,H,G,D,E,S;let l=cc.value,n=sc.value,r=(L=(x=l==null?void 0:l.columns)==null?void 0:x.find(y=>y==null?void 0:y.mainKey))==null?void 0:L.prop,o=(U=(C=Ho.value)==null?void 0:C[0])==null?void 0:U.value,s=(I=l==null?void 0:l.fixContent)==null?void 0:I.map(y=>{var F;let k={};for(let $ in y)Array.isArray(y==null?void 0:y[$])?k[$]=JSON.stringify(y==null?void 0:y[$]):k[$]=y==null?void 0:y[$];return(F=l==null?void 0:l.columns)==null||F.forEach($=>{($==null?void 0:$.formType)==="Upload"&&(k==null?void 0:k[$==null?void 0:$.prop])===""&&(k[$==null?void 0:$.prop]="{}")}),k[r]=o,k}),c=[{tableName:(H=l==null?void 0:l.relatedContents)==null?void 0:H.find(y=>y==null?void 0:y.includes("content")),tableContents:s}];await O.pageBatchAddApi({platId:parseInt((G=gl==null?void 0:gl.value)==null?void 0:G.plat_id),changeContents:c}),n=n==null?void 0:n.filter(y=>{var k,F,$;return($=y==null?void 0:y.object_name)==null?void 0:$.includes((F=(k=l==null?void 0:l.fixContent)==null?void 0:k[0])==null?void 0:F[r])});let m=[],p=new Map;n==null||n.forEach(y=>{m.push(`content_${y==null?void 0:y.object_id}`),m.push(`struct_${y==null?void 0:y.object_id}`),p.set(y==null?void 0:y.object_id,y)});let v=await O.getAllTables({platId:parseInt((D=gl==null?void 0:gl.value)==null?void 0:D.plat_id),tableNames:m});v=(E=v==null?void 0:v.data)==null?void 0:E.result;let g=[],u=[];v=Pa.chunk(v,2),v==null||v.forEach(y=>{var $,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga,le;let k=p.get((Ne=(pe=(Y=($=y==null?void 0:y[1])==null?void 0:$[0])==null?void 0:Y.source_table)==null?void 0:pe.split("_"))==null?void 0:Ne[1]),F=(ye=(Q=(Ce=k==null?void 0:k.object_name)==null?void 0:Ce.split("/"))==null?void 0:Q.filter((na,Pe)=>{var wa,Fe;return((Fe=(wa=k==null?void 0:k.object_name)==null?void 0:wa.split("/"))==null?void 0:Fe.length)-1!==Pe}))==null?void 0:ye.join("/");if(F=F+"/"+o,u!=null&&u.find(na=>(na==null?void 0:na.path)===F)||u.push({fatherPath:k==null?void 0:k.father_name,isShow:k==null?void 0:k.is_show,path:F}),((se=(X=y==null?void 0:y[1])==null?void 0:X[0])==null?void 0:se.类型)==="Table"){let na=((ne=(Da=(qe=y==null?void 0:y[1])==null?void 0:qe[0])==null?void 0:Da.结构)==null?void 0:ne.contents)??[],Pe=dl.safeClone(na);Array.isArray(Pe==null?void 0:Pe[0])&&(Pe=ua.getColumnChild(Pe==null?void 0:Pe[0]));let wa=[];if(((B=y==null?void 0:y[0])==null?void 0:B.length)>0&&(wa=(re=y==null?void 0:y[0])==null?void 0:re.map(Fe=>Pe==null?void 0:Pe.map(Ve=>(Ve=(Fe==null?void 0:Fe[Ve==null?void 0:Ve.prop])??"",Ve)))),g!=null&&g.find(Fe=>(Fe==null?void 0:Fe.key)===F)){let Fe=(be=g==null?void 0:g.find(Ve=>(Ve==null?void 0:Ve.key)===F))==null?void 0:be.contents;Fe.push({isShow:k==null?void 0:k.is_show,filter:((va=(Se=(ce=y==null?void 0:y[1])==null?void 0:ce[0])==null?void 0:Se.引用)==null?void 0:va.contents)??"",key:"Table",name:Object.values(k==null?void 0:k.name),tableColumns:na,tableContents:wa});let ze=g==null?void 0:g.findIndex(Ve=>(Ve==null?void 0:Ve.key)===F);g[ze].contents=Fe}else g.push({key:F,contents:[{isShow:k==null?void 0:k.is_show,filter:((le=(Ga=(Ca=y==null?void 0:y[1])==null?void 0:Ca[0])==null?void 0:Ga.引用)==null?void 0:le.contents)??"",key:"Table",name:Object.values(k==null?void 0:k.name),tableColumns:na,tableContents:wa}]})}});let _=[];_.push({key:"menuPath",contents:u}),_=[..._,...g],await O.createPlatFormDataApi({platId:parseInt((S=gl==null?void 0:gl.value)==null?void 0:S.plat_id),changeData:_}),St.value=!1,Er.setRefreshTable(!0)},Bi=async(l,n)=>{},Ni=async l=>{rr.value=await ua.getDeepDiffItems(l),Er.setItemData(rr.value),Er.setOriginalData(rr.value)};a.ref();const u0=a.ref(null),d0=()=>{var l,n;console.log("倒计时结束时"),un.ElMessageBox.alert(`超时未提交,【${(n=(l=xl.value)==null?void 0:l.split("/"))==null?void 0:n[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},fc=a.ref([]),p0=a.computed(()=>{var l,n;return(n=(l=mt.value)==null?void 0:l[xl.value])==null?void 0:n.filter(r=>{var o;return((o=r==null?void 0:r.key)==null?void 0:o.type)==="gridLayout"})});a.watch(()=>[Zf.value],()=>{dn.setSelectTitle([]),dn.setChooseTitle([])},{deep:!0});a.watch(()=>Si.value,async(l,n)=>{var o,s,c,m,p,v;if(JSON.stringify(l)===JSON.stringify(n))return;let r=(o=Si.value)==null?void 0:o.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==Zr.value);if((r==null?void 0:r.length)>0){Tr.setContentLoading(!0);let g=((s=r==null?void 0:r[0])==null?void 0:s.relatedContent)??(xl==null?void 0:xl.value),u=g+"/"+((c=r==null?void 0:r[0])==null?void 0:c.value),_=!!((m=r==null?void 0:r[0])!=null&&m.parentContent),x=await Wr(u,_,{originPath:g});x=(p=x==null?void 0:x.filter(U=>U))==null?void 0:p.map(U=>(U.isShow=!0,U)),console.log(x,"loadingContents");let L=await ua.getDeepDiffItems(x),C=L==null?void 0:L.filter(U=>U==null?void 0:U.choice);Mi.setSelectTab((v=C==null?void 0:C[0])==null?void 0:v.choiceName),L=L==null?void 0:L.filter(U=>{var I;return!(U!=null&&U.choiceName)||(U==null?void 0:U.choiceName)===((I=C==null?void 0:C[0])==null?void 0:I.choiceName)}),rr.value=L,Tr.setContentLoading(!1)}});const f0=(l,n)=>{setTimeout(async()=>{var p,v,g;let r=(p=Si.value)==null?void 0:p.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==Zr.value),o=xl==null?void 0:xl.value,s=xl==null?void 0:xl.value;(r==null?void 0:r.length)>0&&(s=((v=r==null?void 0:r[0])==null?void 0:v.relatedContent)??(xl==null?void 0:xl.value),o=s+"/"+((g=r==null?void 0:r[0])==null?void 0:g.value));let c=await Wr(o,!1,{originPath:s});c=c==null?void 0:c.map(u=>(u.isShow=!0,u));let m=await ua.getDeepDiffItems(c);rr.value=m==null?void 0:m.filter(u=>!(u!=null&&u.step)||(u==null?void 0:u.step)===(l==null?void 0:l.title))},10)},h0=l=>{setTimeout(async()=>{var m,p,v;let n=(m=Si.value)==null?void 0:m.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==Zr.value),r=xl==null?void 0:xl.value,o=xl==null?void 0:xl.value;(n==null?void 0:n.length)>0&&(o=((p=n==null?void 0:n[0])==null?void 0:p.relatedContent)??(xl==null?void 0:xl.value),r=o+"/"+((v=n==null?void 0:n[0])==null?void 0:v.value));let s=await Wr(r,!1,{originPath:o});s=s==null?void 0:s.map(g=>(g.isShow=!0,g)),Mi.setSelectTab(l);let c=await ua.getDeepDiffItems(s);rr.value=c==null?void 0:c.filter(g=>!(g!=null&&g.choiceName)||(g==null?void 0:g.choiceName)===l)},10)};a.watch(()=>Xf.value,l=>{l!=null&&l.length||(rr.value=[])},{immediate:!0});a.watch(()=>[xl.value],async l=>{var c,m,p,v;if(!xl.value)return;if(xl.value==="/"){rr.value=[];return}Tr.setCurrentMenuPath(xl.value),Er.setLockingPage(""),rr.value=[];let n=a.getCurrentInstance();(c=n==null?void 0:n.scope)==null||c.stop(),n=null,Bo.value=!1,Tr.setContentLoading(!0),tc.value=!0;let r=l==null?void 0:l[0],o=r,s=(m=Kn.value)==null?void 0:m.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==xl.value&&!(g!=null&&g.relatedContent));if((s==null?void 0:s.length)>0&&(r=r+"/"+((p=s==null?void 0:s[0])==null?void 0:p.value)),r==="系统管理/日志管理")rr.value=await Wf("log");else{let g=await Wr(r,!0,{originPath:o});g=g==null?void 0:g.map(x=>(x.isShow=!0,x));let u=await ua.getDeepDiffItems(g),_=u==null?void 0:u.filter(x=>x==null?void 0:x.choice);Mi.setSelectTab((v=_==null?void 0:_[0])==null?void 0:v.choiceName),rr.value=u==null?void 0:u.filter(x=>{var L;return!(x!=null&&x.choiceName)||(x==null?void 0:x.choiceName)===((L=_==null?void 0:_[0])==null?void 0:L.choiceName)})}Tr.setContentLoading(!1),Er.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Er.setItemData(rr.value),Er.setOriginalData(rr.value),Er.setRefreshTable(!1),a.nextTick(()=>{Yn.value=Yn.value++,Bo.value=!0})},{immediate:!0});a.watch(()=>[hs.value],async()=>{var l,n,r,o;if(hs.value){rr.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,Bo.value=!1,Tr.setContentLoading(!0),tc.value=!0;let c=Zr==null?void 0:Zr.value,m=c,p=(n=Kn.value)==null?void 0:n.filter(_=>(_==null?void 0:_.condition)==="child"&&(_==null?void 0:_.value)!==""&&(_==null?void 0:_.parentContent)!==(Zr==null?void 0:Zr.value));(p==null?void 0:p.length)>0&&(c=c+"/"+((r=p==null?void 0:p[0])==null?void 0:r.value));let v=await Wr(c,!0,{originPath:m});v=v==null?void 0:v.map(_=>(_.isShow=!0,_));let g=await ua.getDeepDiffItems(v),u=g==null?void 0:g.filter(_=>_==null?void 0:_.choice);if(Mi.setSelectTab((o=u==null?void 0:u[0])==null?void 0:o.choiceName),rr.value=g==null?void 0:g.filter(_=>{var x;return!(_!=null&&_.choiceName)||(_==null?void 0:_.choiceName)===((x=u==null?void 0:u[0])==null?void 0:x.choiceName)}),Tr.setContentLoading(!1),Er.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Er.setItemData(rr.value),Er.setOriginalData(rr.value),Er.setRefreshTable(!1),(p==null?void 0:p.length)>0){let _=[...Kn.value,...p];dn.setSelectTitle(_)}a.nextTick(()=>{Yn.value=Yn.value++,Bo.value=!0})}},{immediate:!0,deep:!0});const v0=async()=>{Tr.setLinkMenuInfo(null),Tr.setActiveMenuPath(Jf.value),rr.value=null,Er.setRouteToChildPath(""),Tr.setChildMenu("")},m0=l=>new RegExp("button","i").test(l),y0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),hc=l=>{if(y0(l)){const n=l==null?void 0:l.split("^");(n==null?void 0:n.length)>0&&(n!=null&&n[0])&&Tr.setLinkMenuInfo({path:n==null?void 0:n[0],data:n==null?void 0:n[1]})}},vc=async(l,n,r)=>{var x,L,C,U,I,H,G,D,E,S,y,k;let o="",s="";for(let F in n)(n==null?void 0:n[F])===l&&(s=F);r==null||r.forEach(F=>{(F==null?void 0:F.prop)===s&&(o=F==null?void 0:F.fatherPath)});let c=o===""?xl.value:o;o!==""&&Tr.setCurrentMenuPath(c),Tr.setCurrentMenuPath(c+"/"+l),Tr.setContentLoading(!0),await Wr(c+"/"+l,!0,{originPath:c+"/",row:n});let m=await Wr(c,!1),p=(x=m==null?void 0:m.filter(F=>(F==null?void 0:F.comp)==="Table"))==null?void 0:x[0],v=((I=(U=(C=(L=p==null?void 0:p.compData)==null?void 0:L.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:C.contents)==null?void 0:U[0])==null?void 0:I.prop)??((S=(E=(D=(G=(H=p==null?void 0:p.compData)==null?void 0:H.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:G.contents)==null?void 0:D[0])==null?void 0:E[0])==null?void 0:S.prop),g=(k=(y=p==null?void 0:p.compData)==null?void 0:y.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:k.contents;g=g==null?void 0:g.map(F=>({label:F==null?void 0:F[v],value:F==null?void 0:F[v]}));let u=Kn.value,_={value:l,condition:"child",options:g,relatedContent:c,isShow:!0};u.push(_),dn.setSelectTitle(u),dn.setChooseTitle([_]),Tr.setContentLoading(!1),Er.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Er.setItemData(rr.value),Er.setOriginalData(rr.value)},g0=l=>{dc.value=l},_o=a.reactive({index:0,comp:null}),b0=a.computed(()=>{var l;return(l=rr.value)==null?void 0:l.map((n,r)=>({id:n.id,name:n.name,status:k0(n,r)}))}),mc=(l,n)=>{var v,g,u,_,x;const r=n?l:l-2,o=(v=rr.value)==null?void 0:v[r],s=(u=(g=o==null?void 0:o.compData)==null?void 0:g.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:u.contents,c=s==null?void 0:s.findIndex(L=>(L==null?void 0:L.isMainKey)&&(L==null?void 0:L.label)!=="操作"),m=c===-1?0:c,p=(x=(_=o==null?void 0:o.compData)==null?void 0:_.find(L=>(L==null?void 0:L.key)==="tableContents"))==null?void 0:x.contents;return{valid:p==null?void 0:p.every(L=>L==null?void 0:L[m+1]),length:(p==null?void 0:p.length)||0}},k0=(l,n)=>{var o;let r="process";if(((o=l==null?void 0:l.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:s,length:c}=mc(n,!0);_o.index===n?r="process":c===0?r="wait":r=s?"success":"error"}return r},yc=l=>{var r,o,s,c,m;const n=l+1;if(n>1&&((s=(o=(r=rr.value)==null?void 0:r[l])==null?void 0:o.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:p}=mc(n);p?(_o.index=n,_o.comp=(c=rr.value)==null?void 0:c[l]):Qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else _o.index=n,_o.comp=(m=rr.value)==null?void 0:m[l]},gc=a.computed(()=>{var l,n;return(n=(l=uc.value)==null?void 0:l[0])==null?void 0:n.isStepLayout});a.watch(()=>gc.value,l=>{l&&yc(0)},{immediate:!0});const x0={class:"table-content"},w0={class:"menu-config-wrap"},_0=["onClick"],C0={key:0,class:"viewport-wrap"},E0=["onClick"],S0={title:"选择显示列信息"},D0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},B0=["title"],N0={class:"col-operate-wrap"},T0={key:0,class:"col-operate-radio-wrapper"},A0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},z0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},M0={class:"pop-view"},I0={class:"pop-wrapper"},O0={class:"file-list-pop"},L0=["title","onClick"],R0=["onClick"],$0=["onClick"],V0={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},P0={class:"form-content"},F0={key:0,class:"dialog-footer"},j0={class:"dialog-footer"},H0={class:"ocr-dialog-content"},U0={class:"ocr-steps"},q0={key:0,class:"ocr-action-buttons"},W0={key:1,class:"ocr-preview-area"},K0={class:"ocr-file-grid"},G0={class:"file-thumbnail"},Y0=["src"],J0={key:1,class:"thumbnail-placeholder"},X0={class:"progress-svg",viewBox:"0 0 36 36"},Z0=["stroke","stroke-width","stroke-dasharray"],Q0={key:0,class:"progress-icon"},e3={key:1,class:"progress-icon"},a3=["onClick"],l3={class:"file-name"},r3={key:0,class:"ocr-recognize-button"},n3={key:2,class:"ocr-progress-section"},o3={key:3,class:"ocr-confirm-area"},i3={class:"ocr-preview-tip"},t3={class:"ocr-preview-table"},s3={style:{display:"flex","align-items":"center",gap:"8px"}},c3={key:0},u3={key:4,class:"ocr-success-area"},d3={key:0,class:"ocr-dialog-footer"},p3={class:"form-content"},f3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},h3={style:{display:"flex"}},ms="ss-ocr-upload-history",v3="ss-ocr-cert-history-v1",m3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(l,{emit:n}){var $t;const r=a.ref([]),o=Ct(O.pinia),s=a.ref(null),c=a.ref(new Set),m=a.ref(new Map),p=a.ref(new Map),v=new Map,g=a.ref(new Map),u=l,_=a.ref((u==null?void 0:u.allowSelect)??!0),x=a.ref((($t=u==null?void 0:u.config)==null?void 0:$t.showIndex)??!0),L=a.ref(),C=a.ref(!0),U=a.ref(!1),I=a.ref([]),H={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},G=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"}]}]),D=ua.useOriginalState(O.pinia);let E="$R";const{originalPath:S}=O.storeToRefs(D),y=S.value,k=a.computed(()=>{var h;const d=(h=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:h.filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate");return d.length>0?d.every(T=>!!(T!=null&&T.sortable)):!1});a.computed(()=>{var h;return(h=Ce.value)==null?void 0:h.every(T=>T==null?void 0:T.filterable)}),a.computed(()=>{var h;return(h=Ce.value)==null?void 0:h.every(T=>T==null?void 0:T.operable)});const F=a.ref(!0),$=a.ref([]),Y=a.reactive({column:{},status:!1,text:"合计"}),pe=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Ne=n,Ce=a.ref([]),Q=a.ref([]),ye=a.ref([]),X=a.reactive({prop:"",order:null}),se=a.ref([]),qe=a.ref(!1),Da=a.ref(!1),ne=a.ref(null),{isUseBackdrop:B,initTrackFileType:re,getFileExtension:be,setData:ce,getFileInfo:Se,getFilesInfo:va}=wi.useThreeSystem(),Ca=a.ref([]),Ga=a.ref(!1),le=a.ref(),na=O.useMenuState(),{importLoading:Pe,activeMenuPath:wa,contentLoading:Fe,linkMenuInfo:ze}=O.storeToRefs(na),Ve=ua.useTableComp(O.pinia),ea=O.useModelComp(O.pinia),Ja=Jn(O.pinia),{extraContents:qa,cacheUpdatingData:P,tableViewContents:V,tableLoading:Z,pageMapState:oe,lockingPage:te}=O.storeToRefs(ea),{selectTab:ka}=O.storeToRefs(Ja),{compType:oa,hasEditable:Re}=Ws.useRole(),we=a.ref([]),Ea=a.ref([]),ya=a.ref(new Map);a.ref(!1);const Fa=a.ref("");a.ref();const ja=a.ref(!0),he=a.ref(0),Ze=a.ref(!0),Te=a.ref(""),Qe=a.ref(!1),je=a.ref(null);a.ref([]);const Oe=a.ref({label:"查看三维模型"}),_e=a.ref(!1),pa=a.ref(),ra=a.ref([]),$a=a.ref([]),xa=a.ref(!1),Oa=a.ref([]),Va=a.ref([]),ue=a.ref([]),Ae=a.ref([]),Ue=a.ref([]),Xe=()=>{try{const d=localStorage.getItem(ms),h=d?JSON.parse(d):[];Ue.value=Array.isArray(h)?h:[]}catch{Ue.value=[]}},_a=()=>{try{localStorage.setItem(ms,JSON.stringify(Ue.value||[]))}catch{}},Be=d=>{var ee,ae,j;if(!d)return;const h=d.url||((ee=d==null?void 0:d.uploadResult)==null?void 0:ee.url)||"",T=d.name||((ae=d==null?void 0:d.uploadResult)==null?void 0:ae.name)||((j=d==null?void 0:d.uploadResult)==null?void 0:j.fileName)||"";if(!h&&!T)return;const z={name:T,url:h,ts:Date.now()},R=String(z.name||"").trim().toLowerCase(),N=(Ue.value||[]).findIndex(ge=>String((ge==null?void 0:ge.name)||"").trim().toLowerCase()===R);N>-1&&Ue.value.splice(N,1),Ue.value.unshift(z),Ue.value.length>20&&(Ue.value=Ue.value.slice(0,20)),_a()};Xe();const il=(d,h)=>`${v3}:${String(d??"")}:${String(h??"")}`,vl=(d,h)=>{try{const T=sessionStorage.getItem(il(d,h)),z=T?JSON.parse(T):[];return Array.isArray(z)?z:[]}catch{return[]}},Jl=(d,h,T)=>{try{sessionStorage.setItem(il(d,h),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},Ya=(d,h,T)=>{if(!h)return;const z=vl(d,h),R=[T,...z||[]].filter(Boolean).slice(0,1);return Jl(d,h,R),R},ha=(d,h,T)=>{if(!h||!T)return;const z=il(d,h),R=il(d,T);try{const N=sessionStorage.getItem(z);if(!N)return;const ee=(()=>{try{const ge=JSON.parse(N);return Array.isArray(ge)?ge:[]}catch{return[]}})(),ae=vl(d,T),j=[...ee,...ae||[]].filter(Boolean).sort((ge,xe)=>Number((xe==null?void 0:xe.ts)||0)-Number((ge==null?void 0:ge.ts)||0)).slice(0,1);sessionStorage.setItem(R,JSON.stringify(j)),sessionStorage.removeItem(z)}catch{}},ma=a.ref(!1),ga=a.ref(!1),Je=a.ref([]),Xa=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const Ee=a.ref(!1),Ge=a.ref([]),ve=a.ref(1),Ia=a.ref(new Map),We=a.ref(new Map),K=a.ref(0),la=a.ref(!1),Ye=a.ref([]),De=a.ref([]),Cl=d=>{var h;try{const T=(h=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:h.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(T==null?void 0:T.find(z=>(z==null?void 0:z.prop)===d||(z==null?void 0:z.label)===d))||null}catch{return null}},tl=d=>{const h=Cl(d),T=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"Input";return dl.getComponent(T)||dl.getComponent("Input")},bl=a.ref([]),Wa=a.ref(null),Za=a.ref([]),Na=a.ref(null),de=a.ref(""),Sa=a.ref(!1),El=a.ref([]),Vl=a.ref(""),Fl=a.ref(!1),nr=a.ref([]),yr=a.ref([]),Nl=a.ref([]),tr=a.ref(null),Nr=a.ref([]),Ll=a.ref("");a.computed(()=>{var d;try{const h=(d=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("编号")||""}catch{return""}});const lr=a.computed(()=>{var d;try{const h=(d=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("名称")||""}catch{return""}}),Qr=a.computed(()=>{var d;try{const h=(d=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("制造厂")||""}catch{return""}}),Ir=()=>{Fl.value=!1,nr.value=[],yr.value=[],Nl.value=[],tr.value=null,Nr.value=[],Ll.value=""},Ar=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,Sr=(d,h)=>{const T=(d==null?void 0:d.ocrRow)||{};for(const R of Object.keys(T))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Ar(T[R])&&(h[R]=T[R]);const z=Ea.value.find(R=>R.id===h.id);if(z)for(const R of Object.keys(T))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Ar(T[R])&&(z[R]=T[R]);ya.value&&ya.value.set(h.id,h),Ya(u==null?void 0:u.index,h.id,d==null?void 0:d.versionItem),yr.value=[...yr.value||[],JSON.parse(JSON.stringify(h))]},zr=async(d,h=null)=>{var T,z,R,N,ee,ae,j;try{const ge=(T=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:T.filter(ta=>(ta==null?void 0:ta.type)!=="operate"&&(ta==null?void 0:ta.label)!=="操作"&&(ta==null?void 0:ta.prop)!=="operate"),xe=new Map;ge==null||ge.forEach(ta=>{ta!=null&&ta.label&&(ta!=null&&ta.prop)&&xe.set(ta.label,ta.prop)});const $e=xe.get("系统编号")||xe.get("编号");if(!$e){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Ie=h||tr.value;if((Array.isArray(Ie==null?void 0:Ie.result)?Ie.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ta=0;ta<d.length;ta++){const Ha=d[ta],za=Ha[$e];if(!za){console.warn(`第 ${ta+1} 条匹配行缺少系统编号,跳过`);continue}const ia=`设备管理/试验设备/${za}`,el=await O.getPageDataApi({platId:parseInt((z=$l.value)==null?void 0:z.plat_id),pageName:ia});if(!((R=el==null?void 0:el.data)!=null&&R.result)||!Array.isArray(el.data.result)){console.warn(`未找到详情页数据: ${ia}`);continue}const ca=el.data.result.find(sa=>(sa==null?void 0:sa.property_name)==="校检记录");if(!ca){console.warn(`详情页 ${ia} 中未找到校检记录表`);continue}const Ua=(N=ca.contents)==null?void 0:N.find(sa=>(sa==null?void 0:sa.key)&&sa.key.startsWith("content_"));if(!Ua||!Ua.key){console.warn("校检记录表中未找到 content item");continue}const ie=Ua.key,Ta=Array.isArray(Ua.value)?Ua.value:[];if(Ta.length>=5){const me=[...Ta].sort((da,Ma)=>{const pl=Number((da==null?void 0:da.create_time)||0),ll=Number((Ma==null?void 0:Ma.create_time)||0);return pl-ll})[0];me!=null&&me.id&&await O.pageBatchDeleteApi({platId:parseInt((ee=$l.value)==null?void 0:ee.plat_id),changeContents:[{tableName:ie,tableContents:[{id:me.id}]}]})}const fa=(ae=ge==null?void 0:ge.find(sa=>(sa==null?void 0:sa.label)==="证书附件"))==null?void 0:ae.prop,Ba=String(Date.now()),Aa={id:Ba},A=Ta[0]||{},W=new Date().toISOString().split("T")[0];if(Object.keys(A||{}).forEach(sa=>{if(sa!=="id"){if(sa==="证书附件"){Aa[sa]="";return}if(sa==="校检日期"||sa==="检校日期"){Aa[sa]=Ha[sa]||Ha.校检日期||Ha.检校日期||W;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(sa)){Aa[sa]=Ha[sa]??"";return}Aa[sa]=Ha[sa]??""}}),fa&&Ha[fa]){const sa=Ha[fa];if(Array.isArray(sa)&&sa.length>0)Aa.证书附件=JSON.stringify(sa.map(me=>({url:(me==null?void 0:me.url)||"",name:(me==null?void 0:me.name)||(me==null?void 0:me.fileName)||"",fileName:(me==null?void 0:me.fileName)||(me==null?void 0:me.name)||""})).filter(me=>me.url||me.name));else if(typeof sa=="string")try{const me=JSON.parse(sa);Aa.证书附件=sa}catch{Aa.证书附件=JSON.stringify([{url:sa,name:sa,fileName:sa}])}}console.log(ie,"tableName","inspectionRecordRow",Aa),await O.pageBatchAddApi({platId:parseInt((j=$l.value)==null?void 0:j.plat_id),changeContents:[{tableName:ie,tableContents:[Aa]}]});const Me=ca==null?void 0:ca.object_id;if(Me&&Ba){const sa=fa&&Ha[fa]?Ha[fa]:null;let me=[],da="",Ma=!1;if(Array.isArray(sa)&&sa.length>0){me=sa.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 ll=sa[0];da=(ll==null?void 0:ll.url)||"";const ml=(ll==null?void 0:ll.name)||(ll==null?void 0:ll.fileName)||"";Ma=String(ml).toLowerCase().endsWith(".pdf")||String(da).toLowerCase().endsWith(".pdf")}else if(typeof sa=="string")try{const ll=JSON.parse(sa);Array.isArray(ll)?(me=ll.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),me.length>0&&(da=me[0].url||"",Ma=String(me[0].name).toLowerCase().endsWith(".pdf")||String(da).toLowerCase().endsWith(".pdf"))):(da=sa,Ma=String(sa).toLowerCase().endsWith(".pdf"))}catch{da=sa,Ma=String(sa).toLowerCase().endsWith(".pdf")}const pl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ta),label:new Date().toLocaleString(),certType:Ha.证书类型||"",certNo:Ha.证书编号||"",fileType:Ma?"pdf":"image",sourceUrl:Ma?da:"",images:me};Ya(Me,Ba,pl)}}}catch(ge){console.error("向校检记录表插入OCR识别结果失败:",ge),Qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Mr=d=>{const h=Array.isArray(d)?d:nr.value||[];if(h.length===0){Ir();return}if(h.find(N=>(N==null?void 0:N.__decision)==="replace"&&!(N!=null&&N.selectedTargetId))){Qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}h.forEach(N=>{var ae;const ee=N==null?void 0:N.__decision;if(!(!ee||ee==="skip")){if(ee==="add"){Ya(u==null?void 0:u.index,(ae=N==null?void 0:N.ocrRow)==null?void 0:ae.id,N==null?void 0:N.versionItem),Nl.value=[...Nl.value||[],N.ocrRow];return}if(ee==="replace"){const j=N==null?void 0:N.selectedTargetId,ge=(we.value||[]).find(xe=>String(xe==null?void 0:xe.id)===String(j));if(!ge)return;Sr(N,ge)}}}),(yr.value||[]).length>0&&(we.value=[...we.value||[]]),(Nl.value||[]).length>0&&(we.value=[...we.value||[],...Nl.value||[]],Ea.value=[...Ea.value||[],...Nl.value||[]],(Nl.value||[]).forEach(N=>{var ee,ae;return(ae=(ee=ya.value)==null?void 0:ee.set)==null?void 0:ae.call(ee,N.id,N)})),Gr.value=we.value;const z=yr.value||[],R=Nl.value||[];if(z.length>0&&(Ne("change",{buttonName:"编辑",singleContent:z,content:we.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:Ce.value,name:u==null?void 0:u.compName}),zr(z)),R.length>0){const N=tr.value;Ne("change",{buttonName:"OCR批量新增",content:we.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:Ce.value,ocrRows:R,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(N==null?void 0:N.result)?N.result:[]).map(ee=>(Array.isArray(ee==null?void 0:ee.图片信息)?ee.图片信息:[]).map(ae=>({url:(ae==null?void 0:ae.url)||"",name:(ae==null?void 0:ae.name)||"",fileName:(ae==null?void 0:ae.name)||""})).filter(ae=>ae.url)),ocrResult:N,matchedCount:(z||[]).length,newCount:(R||[]).length})}Qa.ElMessage.success("已提交候选处理结果"),Ir()},Dr=ic(),Vr=a.computed(()=>Dr.getConfig()),Or=a.ref(),sr=a.ref(),gn=ac(O.pinia),Gr=a.ref(),rn=a.ref(0),Nn=O.useUnit(O.pinia),{selectIndex:bn,selectMenu:vn,selectTitle:vr}=O.storeToRefs(Nn),{selectString:Hl}=O.storeToRefs(gn),dr=O.useLoginState(O.pinia),{loginUserInfo:$l}=O.storeToRefs(dr),Wl=a.ref(720),Il=a.ref(!1),mr=a.ref(!1),or=a.ref([]),jl=a.ref(),$r=a.ref(!0),Pr=a.ref(!0);a.ref([]);const kn=a.inject("contentRef");a.provide("contentRef",kn),a.provide("getSuggestListForCell",fu),a.provide("getSuggestLoadingForCell",(d,h)=>{const T=`${d==null?void 0:d.id}:${(h==null?void 0:h.prop)||(h==null?void 0:h.property)}`;return g.value.get(T)||!1}),a.watch(()=>{var d;return(d=we.value)==null?void 0:d.length},d=>{pe.total=d}),a.watch(()=>V.value,async()=>{var h,T,z,R,N,ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia;if(((h=V.value)==null?void 0:h.length)===0||!((T=u==null?void 0:u.itemData)!=null&&T.find(el=>(el==null?void 0:el.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(el=>(el==null?void 0:el.key)==="pageColumn")))return;let d=(ge=(j=(ae=(ee=(N=(R=u==null?void 0:u.itemData)==null?void 0:R.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:N.contents)==null?void 0:ee.split("["))==null?void 0:ae[1])==null?void 0:j.split("]"))==null?void 0:ge[0];((He=(Ie=($e=(xe=u==null?void 0:u.itemData)==null?void 0:xe.find(el=>(el==null?void 0:el.key)==="pageColumn"))==null?void 0:$e.contents)==null?void 0:Ie.split("["))==null?void 0:He[0])+((Ha=(ta=V.value)==null?void 0:ta.find(el=>(el==null?void 0:el.key)===d))==null?void 0:Ha.value),(ia=(za=u==null?void 0:u.itemData)==null?void 0:za.find(el=>(el==null?void 0:el.key)==="pageGroup"))==null||ia.contents,Rt(compData,u.allMapContents)},{deep:!0});const nn=d=>{var T,z,R,N,ee;const h=(z=(T=Ce.value)==null?void 0:T.filter(ae=>ae==null?void 0:ae.mainKey))==null?void 0:z.map(ae=>ae==null?void 0:ae.prop);if(h.length===0){const ae=(R=Ce.value)==null?void 0:R.map(j=>j==null?void 0:j.prop);return(N=ae==null?void 0:ae.map(j=>d==null?void 0:d[j]))==null?void 0:N.join("|")}return(ee=h==null?void 0:h.map(ae=>d==null?void 0:d[ae]))==null?void 0:ee.join("|")},Xn=d=>{var ae,j,ge,xe,$e;const h=(j=(ae=Ce.value)==null?void 0:ae.filter(Ie=>Ie==null?void 0:Ie.required))==null?void 0:j.map(Ie=>Ie==null?void 0:Ie.prop),T=[];if(d==null||d.forEach(Ie=>{h==null||h.forEach(He=>{const ta=Ie[He];(ta==null||ta==="")&&(T.includes(He)||T.push(He))})}),T.length>0)return Qa.ElMessage.warning(`请填写必填项:${T.join("、")}`);const z=new Map,R=new Map;(ge=we.value)==null||ge.forEach(Ie=>{const He=nn(Ie);z.set(He,Ie)}),d==null||d.forEach(Ie=>{const He=nn(Ie);R.set(He,Ie)});const N=d==null?void 0:d.filter(Ie=>z.has(nn(Ie))),ee=(xe=we.value)==null?void 0:xe.filter(Ie=>R.has(nn(Ie)));return(N==null?void 0:N.length)>0&&(i.columns=($e=Ce.value)==null?void 0:$e.filter(Ie=>(Ie==null?void 0:Ie.label)!=="操作"),i.existRows=ee,i.tableData=N,i.show=!0),d==null?void 0:d.filter(Ie=>{const He=nn(Ie);return!z.has(He)})},Tn=a.ref(""),Zn=a.ref(null),xn=async()=>{var d,h,T,z,R,N;try{const ee=await O.quoteApi({related:[{menus:wa.value,groups:u==null?void 0:u.compName}],platId:parseInt((d=$l.value)==null?void 0:d.plat_id)});if(((h=ee==null?void 0:ee.data)==null?void 0:h.code)===200){Zn.value=(T=ee==null?void 0:ee.data)==null?void 0:T.result;const ae=(z=Ce.value)==null?void 0:z.map(xe=>(xe==null?void 0:xe.prop)||(xe==null?void 0:xe.label)),j=An(ae,(R=ee==null?void 0:ee.data)==null?void 0:R.result),ge=j==null?void 0:j.flatMap(xe=>xe==null?void 0:xe.quote);(ge==null?void 0:ge.length)>0&&(Tn.value=(N=ge==null?void 0:ge.map(xe=>xe==null?void 0:xe.menus))==null?void 0:N.join("、"))}}catch(ee){throw new Error(ee)}};function An(d,h){var T;return(T=h.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(R=>R.words&&Array.isArray(R.words)?R.words.some(N=>d.includes(N)):!1):!1))==null?void 0:T.map(z=>{const R={...z};return R.struct&&Array.isArray(R.struct)&&(R.struct=R.struct.filter(N=>N.words&&Array.isArray(N.words)?N.words.some(ee=>d.includes(ee)):!1)),R})}const Pn=async(d,h)=>{var T,z,R,N,ee,ae,j,ge,xe,$e;try{Zn.value||await xn();const Ie=h==null?void 0:h.map(Ua=>{const ie=Object.keys(Ua),Ta={};return ie.forEach((fa,Ba)=>{Ta[d[Ba]]=Ua[fa]}),Ta}),He=Xn(Ie);if(!He||(He==null?void 0:He.length)===0)return;const ta=[];let Ha=(we.value||[]).slice();(He||[]).forEach(Ua=>{const ie={...Ua};try{ie.sort=Mn(0,Ha)}catch{}ta.push(ie),Ha.unshift(ie)});let za=await O.quoteApi({platId:parseInt((T=$l==null?void 0:$l.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:wa.value,groups:""},{menus:wa.value,groups:u==null?void 0:u.compName}]});za=(z=za==null?void 0:za.data)==null?void 0:z.result;let ia=za==null?void 0:za.map(Ua=>({tableName:"content_"+(Ua==null?void 0:Ua.id),tableContents:ta==null?void 0:ta.map((ie,Ta)=>({id:Ta,...ie}))})),el=[{tableName:(R=u==null?void 0:u.related)==null?void 0:R.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:ta==null?void 0:ta.map((Ua,ie)=>({id:ie,...Ua}))}];el=[...el,...ia];const ca=await O.pageBatchAddApi({platId:parseInt((N=$l.value)==null?void 0:N.plat_id),changeContents:el});if(((ee=ca==null?void 0:ca.data)==null?void 0:ee.code)===200){const Ua={buttonName:"新增",columns:Ce.value,fixContent:ta==null?void 0:ta.map((Ta,fa)=>({id:fa,...Ta})),relatedContents:u==null?void 0:u.related};await bt(Ua),((ae=i==null?void 0:i.existRows)==null?void 0:ae.length)>0?Qa.ElMessage.success("部分数据导入成功"):Qa.ElMessage.success("数据导入成功");let ie=[];el==null||el.forEach(Ta=>{var fa;(fa=Ta==null?void 0:Ta.tableContents)==null||fa.forEach(Ba=>{ie.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ba),request_result:"{}",is_delete:!1,request_table:Ta==null?void 0:Ta.tableName,request_type:"export"})})}),await O.pageBatchAddApi({platId:parseInt((j=$l==null?void 0:$l.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:ie}]})}else{let Ua=[];el==null||el.forEach(ie=>{var Ta;(Ta=ie==null?void 0:ie.tableContents)==null||Ta.forEach(fa=>{Ua.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(fa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"error"})})}),await O.pageBatchAddApi({platId:parseInt((ge=$l==null?void 0:$l.value)==null?void 0:ge.plat_id),changeContents:[{tableName:"log",tableContents:Ua}]}),Qa.ElMessage.error("数据导入响应失败")}}catch(Ie){throw Qa.ElMessage.error("数据导入处理失败"),await O.pageBatchAddApi({platId:parseInt((xe=$l==null?void 0:$l.value)==null?void 0:xe.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(Ie),is_delete:!1,request_table:($e=u==null?void 0:u.related)==null?void 0:$e.find(He=>He==null?void 0:He.includes("content")),request_type:"error"}]}]}),new Error(Ie)}},en=async d=>{var N,ee,ae,j,ge,xe,$e;let h=ye.value;h!=null&&h.find(Ie=>(d==null?void 0:d.key)===(Ie==null?void 0:Ie.key))&&(h=h==null?void 0:h.filter(Ie=>(d==null?void 0:d.key)!==(Ie==null?void 0:Ie.key))),h.push({key:d==null?void 0:d.key,value:[(ee=d==null?void 0:d.value)==null?void 0:ee[((N=d==null?void 0:d.value)==null?void 0:N.length)-1]]});let T=Ae.value;T=T==null?void 0:T.map(Ie=>{var He,ta;return(Ie==null?void 0:Ie.type)==="Select"&&(d==null?void 0:d.key)===(Ie==null?void 0:Ie.prop)&&Array.isArray(Ie.value)&&(He=Ie.value)!=null&&He.every(Ha=>typeof Ha=="string")&&(Ie.selectValue=(ta=h==null?void 0:h.find(Ha=>(Ha==null?void 0:Ha.key)===(Ie==null?void 0:Ie.prop)))==null?void 0:ta.value),Ie});let z=(j=(ae=T==null?void 0:T.find(Ie=>(Ie==null?void 0:Ie.prop)===(d==null?void 0:d.key)))==null?void 0:ae.optionUrl)==null?void 0:j.menuId,R=T==null?void 0:T.find(Ie=>(Ie==null?void 0:Ie.prop)===(d==null?void 0:d.key));if(z){let Ie=await vt(R==null?void 0:R.optionUrl,z),He,ta=$.value,Ha=($e=(xe=(ge=Ae.value)==null?void 0:ge.find(za=>{var ia;return(ia=R==null?void 0:R.optionUrl)==null?void 0:ia.menuId}))==null?void 0:xe.selectValue)==null?void 0:$e[0];if(Ie==null||Ie.forEach(za=>{var ia,el,ca,Ua,ie,Ta,fa,Ba,Aa,A;if(z){let W=(el=(ia=Ae.value)==null?void 0:ia.find(sa=>{var me,da;return((me=R==null?void 0:R.optionUrl)==null?void 0:me.menuId)===((da=sa==null?void 0:sa.optionUrl)==null?void 0:da.menuId)}))==null?void 0:el.prop,Me=(Ua=(ca=T==null?void 0:T.find(sa=>(sa==null?void 0:sa.prop)===W))==null?void 0:ca.selectValue)==null?void 0:Ua[0];W!=null&&W.includes("·")&&(W=(ie=W==null?void 0:W.split("·"))==null?void 0:ie[0],Me=(Aa=(Ba=(fa=d==null?void 0:d.value)==null?void 0:fa[((Ta=d==null?void 0:d.value)==null?void 0:Ta.length)-1])==null?void 0:Ba.split(" "))==null?void 0:Aa[0]),ta!=null&&ta.find(sa=>(sa==null?void 0:sa.value)===Ha)?He=(A=ta==null?void 0:ta.find(sa=>(sa==null?void 0:sa.value)===Ha))==null?void 0:A.objectValue:za[W]===Me&&(He=za)}}),He){let za=T;za=za==null?void 0:za.map(ia=>{var el,ca,Ua,ie,Ta,fa;return z&&(He!=null&&He[ia==null?void 0:ia.prop])&&Te.value==="新增"&&(ia==null?void 0:ia.prop)!==(R==null?void 0:R.prop)?ia.value=(He==null?void 0:He[ia==null?void 0:ia.prop])||(He==null?void 0:He[(ie=(Ua=(ca=(el=ia==null?void 0:ia.optionUrl)==null?void 0:el.groupSelect)==null?void 0:ca[1])==null?void 0:Ua.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")]):ia.value=(fa=(Ta=Ae.value)==null?void 0:Ta.find(Ba=>(Ba==null?void 0:Ba.prop)===(ia==null?void 0:ia.prop)))==null?void 0:fa.value,ia}),Ae.value=za}}ye.value=h},zn=async(d,h)=>{var T,z,R,N,ee;if((T=d==null?void 0:d.toString())!=null&&T.includes(".txt")||(z=d==null?void 0:d.toString())!=null&&z.includes(".cpt")||(R=d==null?void 0:d.toString())!=null&&R.includes(".cyd")){const ae=await Qa.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),j=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"});let ge=URL.createObjectURL(j);le.value=[{name:(ee=d==null?void 0:d.split("/"))==null?void 0:ee[((N=d==null?void 0:d.split("/"))==null?void 0:N.length)-1],blobUrl:ge}],Ga.value=!0}else Array.isArray(h)&&(h==null?void 0:h.length)>0&&Ne("routeUrl",{isEdit:!1,routerUrl:h})};a.onBeforeUnmount(()=>{Pr.value=!1;let d=rn.value;rn.value=d+1});const wn=a.reactive({prop:"",order:null}),Kr=a.computed(()=>{const d=(we.value??[]).slice(),h=wn.prop||X.prop,T=wn.order||X.order;if(!h||!T)return d;const z=T==="ascending",R=ee=>{if(h)return ee&&Object.prototype.hasOwnProperty.call(ee,h)?ee[h]:h.includes(".")?h.split(".").reduce((ae,j)=>ae==null?ae:ae[j],ee):ee==null?void 0:ee[h]},N=ee=>{if(ee==null)return{ok:!1,value:NaN};if(typeof ee=="number")return{ok:Number.isFinite(ee),value:ee};const ae=String(ee).trim();if(ae==="")return{ok:!1,value:NaN};const j=ae.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(j))return{ok:!1,value:NaN};const ge=Number(j);return{ok:Number.isFinite(ge),value:ge}};return d.sort((ee,ae)=>{const j=R(ee),ge=R(ae);if(j==null&&ge==null)return 0;if(j==null)return z?-1:1;if(ge==null)return z?1:-1;const xe=N(j),$e=N(ge);if(xe.ok&&$e.ok)return z?xe.value-$e.value:$e.value-xe.value;const Ie=ie=>{if(ie==null)return{ok:!1,value:NaN};const Ta=String(ie).trim();if(Ta==="")return{ok:!1,value:NaN};const fa=Ta.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!fa)return{ok:!1,value:NaN};const Ba=fa[1]?-1:1,Aa=Number(fa[2]),A=Number(fa[3]),W=Number(fa[4]);return[Aa,A,W].some(Me=>Number.isNaN(Me))?{ok:!1,value:NaN}:A>=60||W>=60?{ok:!1,value:NaN}:{ok:!0,value:Ba*(Aa*3600+A*60+W)}},He=Ie(j),ta=Ie(ge);if(He.ok&&ta.ok)return z?He.value-ta.value:ta.value-He.value;const Ha=new Date(j).getTime(),za=new Date(ge).getTime(),ia=!Number.isNaN(Ha),el=!Number.isNaN(za);if(ia&&el)return z?Ha-za:za-Ha;const ca=String(j),Ua=String(ge);return z?ca.localeCompare(Ua):Ua.localeCompare(ca)})}),Fn=a.computed(()=>{var T;const d=(pe.currentPage-1)*pe.pageSize,h=d+pe.pageSize;return Ne("getSliceContLength",pe),(T=Kr.value)==null?void 0:T.slice(d,h)}),mn=d=>{pe.currentPage=d,Ne("getSliceContLength",pe)},To=d=>{var z;pe.pageSize=d;const h=((z=we.value)==null?void 0:z.length)??0,T=d>0?Math.ceil(h/d):1;pe.currentPage>T&&(pe.currentPage=T||1,Qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Ne("getSliceContLength",pe)},Ii=({prop:d,order:h})=>{wn.prop=d,wn.order=h,pe.currentPage=1};function Oi(d){const h=[];function T(z,R=""){z.forEach(N=>{N.children&&N.children.length>0?T(N.children,N.prop):h.push(N.prop)})}return T(d),h}const _n=(d,h)=>{var ae,j,ge,xe;let T=(j=(ae=Ce.value)==null?void 0:ae.map($e=>$e==null?void 0:$e.prop))==null?void 0:j.filter($e=>$e!=="operate");((ge=Ce.value)==null?void 0:ge.some($e=>{var Ie;return((Ie=$e==null?void 0:$e.children)==null?void 0:Ie.length)>0}))&&(T=Oi((xe=Ce.value)==null?void 0:xe.filter($e=>($e==null?void 0:$e.prop)!=="operate")));let R;if(R=(d==null?void 0:d.length)===(T==null?void 0:T.length)?d:d.slice(0,T==null?void 0:T.length),!(R==null?void 0:R.every($e=>T==null?void 0:T.find(Ie=>$e===Ie))))return Qa.ElMessage.error("导入的数据表头不匹配");Pn(R,h)},Li=(d,h)=>{var R;const T=d==null?void 0:d.filter(N=>N!=="序号"),z=h==null?void 0:h.map(N=>{const ee=Object.entries(N);return ee.shift(),Object.fromEntries(ee)});ea.setRefreshCurStructure(!1),((R=Ce.value)==null?void 0:R.length)===0||_n(T,z)},Ri=(d,h,T,z)=>{const R=[],N=[],ee=ge=>Object.keys(ge).length;for(const ge in d)if(d[ge]!==void 0){const xe=d[ge],$e=[];for(const[Ie,He]of Object.entries(xe))$e.push(He),N.length<ee(xe)&&N.push(Ie);R.push($e)}R.unshift(N);const ae=ua.utils.aoa_to_sheet(R),j=ua.utils.book_new();ua.utils.book_append_sheet(j,ae,z),ua.writeFileSync(j,`${h}.xlsx`),or.value=[]},Wo=async(d,h,T,z=!1,R)=>{var N,ee,ae,j,ge,xe,$e,Ie;try{ea.setRefreshCurStructure(!1);const He=await _r.getInsofDataApi({id:u==null?void 0:u.index});if(((N=He==null?void 0:He.data)==null?void 0:N.code)===200){let ta=(ge=(j=(ae=(ee=He==null?void 0:He.data)==null?void 0:ee.result)==null?void 0:ae[0])==null?void 0:j.value)==null?void 0:ge.pageData;z?ta={...ta,compData:($e=ta==null?void 0:ta.compData)==null?void 0:$e.map(za=>{var ia;return(za==null?void 0:za.key)==="header"?{...za,contents:(ia=za==null?void 0:za.contents)==null?void 0:ia.map(el=>({...el,[d]:T}))}:za})}:ta={...ta,compData:(xe=ta==null?void 0:ta.compData)==null?void 0:xe.map(za=>{var ia,el;return(za==null?void 0:za.key)==="header"?{...za,contents:(ia=za==null?void 0:za.contents)==null?void 0:ia.map(ca=>{if(Array.isArray(ca))ca=ca==null?void 0:ca.map(Ua=>(Ua==null?void 0:Ua.prop)===(h==null?void 0:h.prop)?{...Ua,[d]:T}:Ua);else if((ca==null?void 0:ca.prop)===(h==null?void 0:h.prop))return{...ca,[d]:T};return ca})}:(za==null?void 0:za.key)==="tableToForm"&&R?{...za,contents:(el=za==null?void 0:za.contents)==null?void 0:el.map(ca=>(ca==null?void 0:ca.prop)===(h==null?void 0:h.prop)?{...ca,[R]:T}:ca)}:za})};const Ha=await _r.updateInsofDataApi({id:u==null?void 0:u.index,value:{pageData:ta}});((Ie=Ha==null?void 0:Ha.data)==null?void 0:Ie.code)===200?(Qa.ElMessage.success("编辑成功"),ea.setRefreshCurStructure(!0)):Qa.ElMessage.error("编辑响应失败")}}catch(He){Qa.ElMessage.error(He)}},Ko=async(d,h)=>{await Wo("label",h,d)},Go=async(d,h)=>{await Wo("columnType",h,d,!1,"type")},Fr=async({newRow:d,targetIndex:h})=>{var R;if(!Re(u.config,{type:oa.TABLE}))return;const z=(pe.currentPage-1)*pe.pageSize+(h??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Mn(z,we.value||[]))}catch{}we.value.splice(z,0,d),await a.nextTick(),m.value.has(d.id)||m.value.set(d.id,O.cloneDeep(d)),we.value=(R=we.value)==null?void 0:R.map(N=>({...N,tableEditType:(N==null?void 0:N.id)===d.id?"edit":(N==null?void 0:N.tableEditType)??"text"})),c.value.add(d.id),Il.value=!0},$i=(d,h,T,z=[])=>(!Array.isArray(h)||h.length===0||h.forEach(R=>{const N=R==null?void 0:R.prop;if(!N)return;let ee=d==null?void 0:d[N];if(ee==null||String(ee).trim()==="")return;ee=String(ee);const ae=new Set([...(Array.isArray(T)?T:[]).filter(xe=>(xe==null?void 0:xe.id)!==(d==null?void 0:d.id)).map(xe=>xe==null?void 0:xe[N]).filter(xe=>xe!=null).map(xe=>String(xe)),...(Array.isArray(z)?z:[]).map(xe=>xe==null?void 0:xe[N]).filter(xe=>xe!=null).map(xe=>String(xe))]);if(!ae.has(ee))return;let j=1,ge="";for(;ge=`${ee}(${j})`,!!ae.has(ge);)j++;d[N]=ge}),d),Ao=async()=>{var R,N,ee,ae,j,ge,xe,$e;const d=Array.from(c.value||[]);if(d.length===0)return;const h=(N=ua.getColumnChild((R=O.cloneDeep(Ce.value))==null?void 0:R.filter(Ie=>(Ie==null?void 0:Ie.label)!=="操作")))==null?void 0:N.filter(Ie=>(Ie==null?void 0:Ie.required)===!0);if((h==null?void 0:h.length)>0)for(let Ie=0;Ie<d.length;Ie++){const He=d[Ie],ta=(ee=we.value)==null?void 0:ee.find(Ha=>(Ha==null?void 0:Ha.id)===He);if(ta)for(let Ha=0;Ha<h.length;Ha++){const za=h[Ha],ia=za==null?void 0:za.prop,el=(za==null?void 0:za.label)??ia,ca=ta==null?void 0:ta[ia];if(ca===""||ca===null||ca===void 0||Array.isArray(ca)&&ca.length===0){Qa.ElMessage.error(`${el}不能为空`);return}}}const T=[],z=[];if(d.forEach(Ie=>{var el;const He=(el=we.value)==null?void 0:el.find(ca=>(ca==null?void 0:ca.id)===Ie);if(!He)return;if(He!=null&&He._isTemp){const Ua=(ua.getAllLeafNodes(Ce.value)||[]).filter(A=>(A==null?void 0:A.mainKey)===!0||(A==null?void 0:A.isMainKey)===!0),ie=we.value.findIndex(A=>(A==null?void 0:A.id)===Ie),Ta=ie>=0?ie+1:we.value.length+1;$i(He,Ua,we.value,T);const fa={id:Ta.toString()};(He==null?void 0:He.sort)!==void 0&&(He==null?void 0:He.sort)!==null&&String(He.sort).trim()!==""?fa.sort=String(He.sort):fa.sort=Mn(ie>=0?ie:we.value.length-1,we.value||[]),(ua.getAllLeafNodes(Ce.value)||[]).filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate").forEach(A=>{const W=A==null?void 0:A.prop;if(W){const Me=He[W];Me!==void 0?fa[W]=Me??"":fa[W]=""}}),T.push(fa);return}const Ha=(ua.getAllLeafNodes(Ce.value)||[]).filter(ca=>(ca==null?void 0:ca.type)!=="operate"&&(ca==null?void 0:ca.label)!=="操作"&&(ca==null?void 0:ca.prop)!=="operate"),za=new Set(Ha.map(ca=>ca==null?void 0:ca.prop).filter(Boolean)),ia={};for(const ca of za)Object.prototype.hasOwnProperty.call(He,ca)&&(ia[ca]=He[ca]);z.push({id:He.id,value:{tableData:ia}})}),ea.setTableLoading(u==null?void 0:u.index),z.length>0){const Ie=z.map(ta=>{const Ha={id:ta.id,...ta.value.tableData};return delete Ha._isOCRRow,delete Ha._ocrTableId,delete Ha._isTemp,delete Ha.tableEditType,delete Ha.index,Ha}),He=[{tableName:(ae=u==null?void 0:u.related)==null?void 0:ae.find(ta=>ta==null?void 0:ta.includes("content")),tableContents:Ie}];try{await O.pageBatchUpdateApi({platId:parseInt((j=$l.value)==null?void 0:j.plat_id),changeContents:He})}catch(ta){Qa.ElMessage.error(((xe=(ge=ta==null?void 0:ta.response)==null?void 0:ge.data)==null?void 0:xe.message)||(ta==null?void 0:ta.message)||"保存失败"),ea.setTableLoading(!1);return}}if(T.length>0){const Ie={fixContent:T,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:Ce.value};Ne("change",Ie)}Qa.ElMessage.success("保存成功"),c.value.clear(),m.value.clear(),we.value=($e=we.value)==null?void 0:$e.map(Ie=>({...Ie,tableEditType:"text"})),Il.value=!1,ea.setRefreshCurStructure(!0)},Vi=()=>{var h;const d=Array.from(c.value||[]);if(d.length===0){Il.value=!1;return}d.forEach(T=>{var N,ee;const z=m.value.get(T),R=(N=we.value)==null?void 0:N.find(ae=>(ae==null?void 0:ae.id)===T);if(R!=null&&R._isTemp){we.value=we.value.filter(ae=>(ae==null?void 0:ae.id)!==R.id);return}if(z){const ae=(ee=we.value)==null?void 0:ee.findIndex(j=>(j==null?void 0:j.id)===T);ae!==-1&&(we.value[ae]={...we.value[ae],...z})}}),c.value.clear(),m.value.clear(),we.value=(h=we.value)==null?void 0:h.map(T=>({...T,tableEditType:"text"})),Il.value=!1},zo=a.ref(!1),Yo=async d=>{var R,N,ee,ae;if(!Il.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const h=d==null?void 0:d.target;if(((N=(R=h==null?void 0:h.tagName)==null?void 0:R.toLowerCase)==null?void 0:N.call(R))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(h)||((ee=h==null?void 0:h.blur)==null||ee.call(h),(ae=d.preventDefault)==null||ae.call(d),await a.nextTick(),await Jo())},Jo=async()=>{if(P.value){Il.value=!1;return}if(!zo.value){zo.value=!0;try{Array.from(c.value||[]).length>0?await Ao():Il.value=!1}finally{Promise.resolve().then(()=>{zo.value=!1})}}},Pi=d=>{or.value=d},Fi=(d,h)=>{jl.value===h?$r.value=!1:$r.value=!0,jl.value=h==null?void 0:h.changeProp},Xo=d=>{if(!d)return;const{item:h,value:T}=d,z=Ae.value.find(R=>R.prop==h.prop);z&&z.contents.push({label:T,value:T})},Cn=a.computed(()=>{var T,z,R;const d=(T=Ce.value)==null?void 0:T.some(N=>N==null?void 0:N.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(R=(z=Ce.value)==null?void 0:z.filter(N=>(N==null?void 0:N.label)!=="操作"))==null?void 0:R.map(N=>({...N,filterable:!!(N!=null&&N.filterable),showSummary:!!(N!=null&&N.showSummary),operable:!!(N!=null&&N.operable),fixed:N==null?void 0:N.fixed}))}),En=async(d,h,T)=>{const z=O.cloneDeep(Ce.value);await a.nextTick();const R=z==null?void 0:z.map(ee=>(T==null?void 0:T.label)===(ee==null?void 0:ee.label)?{...ee,[h]:d}:ee),N=jn(R);await ds(u.index,N),Ce.value=R,Q.value=N},jn=d=>{var R;const h=d||[];return((R=ua.getAllLeafNodes(h)||[])==null?void 0:R.filter(N=>(N==null?void 0:N.prop)&&(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate")).map(N=>{const{prop:ee}=N;return $f(ee,N)})},ji=async d=>{let h=await Pf(u.index);h||(h=jn(d)),Q.value=h},Zo=async(d,h)=>{const T=O.cloneDeep(Ce.value),z=ee=>Array.isArray(ee)?ee.map(ae=>{const j=Array.isArray(ae==null?void 0:ae.children)&&ae.children.length>0,ge={...ae};return(ge==null?void 0:ge.prop)==="operate"||(ge==null?void 0:ge.label)==="操作"||(ge==null?void 0:ge.type)==="operate"?(ge.sortable=!1,ge.filterable=!1,ge.operable=!1):ge.sortable=j?!1:!!d,j&&(ge.children=z(ge.children)),ge}):ee,R=z(T),N=jn(R);await ds(u.index,N),Ce.value=R,Q.value=N,await a.nextTick(),rn.value=rn.value+1},Qo=()=>{Qe.value=!1},ei=d=>{Ne("clickTrigger",d)},Hn=async d=>{var N,ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca;const h=d==null?void 0:d.row,T=d==null?void 0:d.rowData,z=d==null?void 0:d.suffix;if((N=h==null?void 0:h.toString())!=null&&N.includes(".urdf")||d!=null&&d.isUrdf||z!=null&&z.includes(".urdf")){if(h.includes(",")){Qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(B(h)){const ie={files:[Se(h)],data:{}};ce(ie);return}Oa.value=[{url:h,extension:be(h)}],Da.value=!0,ne.value={data:O.cloneDeep(T)},qe.value=!0;return}let R=[];if((ee=h==null?void 0:h.toString())!=null&&ee.includes(".stl")||(ae=h==null?void 0:h.toString())!=null&&ae.includes(".STL")||(j=h==null?void 0:h.toString())!=null&&j.includes(".obj")||(ge=h==null?void 0:h.toString())!=null&&ge.includes(".mtl")){const Ua=(xe=h==null?void 0:h.toString())==null?void 0:xe.split(","),ie=va(Ua),Ta=ie==null?void 0:ie[0];if(B(Ta==null?void 0:Ta.extension)){ce({files:ie,data:{}});return}Oa.value=ie,Da.value=!1,qe.value=!0;return}if(($e=h==null?void 0:h.toString())!=null&&$e.includes(".stl")||(Ie=h==null?void 0:h.toString())!=null&&Ie.includes(".STL")||(He=h==null?void 0:h.toString())!=null&&He.includes(".obj")||(ta=h==null?void 0:h.toString())!=null&&ta.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let Ua,ie=[],Ta={};if(Array.isArray(h)?Ua=h:Ua=h==null?void 0:h.split(","),Ua==null||Ua.forEach(fa=>{fa.includes(".mtl")?ie.push(fa):Ta.blob=Ta.blob?Ta.blob+","+fa:fa}),(ie==null?void 0:ie.length)>0&&(Ta.mtlBlobs=ie),z&&(Ta.suffix=z),(za=(Ha=Object.values(Ta))==null?void 0:Ha[0])!=null&&za.includes("http:"))R.push(Ta);else{const fa=new Blob([Ta.blob],{type:"application/octet-stream;charset=UTF-8"});let Ba=URL.createObjectURL(fa),Aa="";(ia=h==null?void 0:h.split("/"))==null||ia.forEach((A,W)=>{var Me;W===((Me=h==null?void 0:h.split("/"))==null?void 0:Me.length)-1&&(Aa=A)}),(el=Ta.blob)!=null&&el.includes(".stl")&&(Aa=(Aa==null?void 0:Aa.replaceAll(">",""))+".urdf"),le.value=[{name:Aa,blobUrl:Ba}],Ga.value=!0}}else{const Ua=await Qa.axios.get(h,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ie=new Blob([Ua.data],{type:"application/octet-stream;charset=UTF-8"});let Ta=URL.createObjectURL(ie),fa="";if((ca=h==null?void 0:h.split("/"))==null||ca.forEach((Ba,Aa)=>{var A;Aa===((A=h==null?void 0:h.split("/"))==null?void 0:A.length)-1&&(fa=Ba)}),B(fa)){const Ba=re(fa),Aa=Se(h);ce({files:[Aa],data:{trackFileType:Ba}});return}le.value=[{name:fa,blobUrl:Ta}],Ga.value=!0}(R==null?void 0:R.length)>0&&o.setBlobUrls(R)},Qn=d=>{var z,R,N,ee;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const h=(ee=(z=d==null?void 0:d.url)==null?void 0:z.split("."))==null?void 0:ee[((N=(R=d==null?void 0:d.url)==null?void 0:R.split("."))==null?void 0:N.length)-1];return(d==null?void 0:d.name)+"."+h},ai=d=>{if(!d)return"未知文件";try{const z=Qn(d);if(typeof z=="string"&&z.includes("."))return z}catch{}const h=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",T=(d==null?void 0:d.suffix)||"";return h.includes(".")?h:`${h}${T}`},li=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const h=d.match(/^(\d+)\_(\d+)$/);if(!h)return d;const T=Number(h[1]),z=Number(h[2]);return!Number.isFinite(T)||!Number.isFinite(z)?d:String(T*1e3+z)},eo=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;const T=Number(h);return Number.isFinite(T)?T:null},Hi=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;if(/^\d+$/.test(h)){const R=Number(h);return Number.isFinite(R)?h.length<=10?R*1e3:R:null}const T=h.includes("T")?h:h.replace(" ","T"),z=Date.parse(T);return Number.isFinite(z)?z:null},ri=(d,h=[])=>{const T=Array.isArray(d)?d.slice():[];if(T.length<=1)return T;const z=new Map((h||[]).map((ee,ae)=>[String(ee),ae])),R=T.some(ee=>eo(ee==null?void 0:ee.sort)!==null),N=T.map((ee,ae)=>({r:ee,idx:ae,id:String((ee==null?void 0:ee.id)??""),sortVal:eo(ee==null?void 0:ee.sort),createTimeMs:Hi(ee==null?void 0:ee.create_time),prevIdx:z.has(String(ee==null?void 0:ee.id))?z.get(String(ee==null?void 0:ee.id)):Number.POSITIVE_INFINITY}));return N.sort((ee,ae)=>{if(R){const xe=ee.sortVal,$e=ae.sortVal;if(xe===null&&$e!==null)return 1;if(xe!==null&&$e===null)return-1;if(xe!==null&&$e!==null&&xe!==$e)return xe-$e}const j=ee.createTimeMs,ge=ae.createTimeMs;return j!==null&&ge!==null&&j!==ge?ge-j:j!==null&&ge===null?-1:j===null&&ge!==null?1:ee.prevIdx!==ae.prevIdx?ee.prevIdx-ae.prevIdx:ee.idx-ae.idx}),N.map(ee=>ee.r)},Mn=(d,h=[])=>{const T=h==null?void 0:h[d-1],z=h==null?void 0:h[d],R=eo(T==null?void 0:T.sort),N=eo(z==null?void 0:z.sort);let ee=null;R!==null&&N!==null&&N>R?ee=(R+N)/2:R!==null?ee=R+1:N!==null?ee=Math.max(N-1,0):ee=(d??0)+1;const ae=Number(ee.toFixed(6));return String(Number.isFinite(ae)?ae:ee)},Ui=async d=>{let h=null,T=null;if(d!=null&&d.id){const R=Vo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const N=await O.platformDownloadFile(d);h=URL.createObjectURL(N.data),T=ai(d)}finally{R.close()}}else if(d!=null&&d.downloadUrl){const R=await uo(),N=Vo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ee=await Qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:R,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{N.close()}),ae=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ae),T=d==null?void 0:d.name}else{const R=await O.platformDownloadFile({url:d==null?void 0:d.url});!d.url.toUpperCase().includes(".OBJ")&&!d.url.toUpperCase().includes(".STL")&&!d.url.toUpperCase().includes(".MTL")&&!d.url.toUpperCase().includes(".URDF")?(h=URL.createObjectURL(R.data),T=Qn(d)):h=d==null?void 0:d.url}if(B(h)){const R={row:`${h}`,suffix:be(T)};Hn(R);return}const z={name:T,blobUrl:h};le.value=[z],Ga.value=!0},co=async d=>{let h=null,T=null;if(d!=null&&d.id){const N=await O.platformDownloadFile(d);h=URL.createObjectURL(N.data),T=ai(d)}else if(d!=null&&d.downloadUrl){const N=await uo(),ee=await Qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:N,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ae=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ae),T=d==null?void 0:d.name}else{const N=await O.platformDownloadFile({url:d==null?void 0:d.url});h=URL.createObjectURL(N.data),T=Qn(d)}const z={name:T,blobUrl:h},R=document.createElement("a");R.href=z.blobUrl,R.download=z.name,R.style.display="none",document.body.appendChild(R),R.click(),setTimeout(()=>{document.body.removeChild(R)},100)},qi=(d,h)=>{var z;if(Object.values(h).length===0)return;let T=d;return Object.values(h).find(R=>{var N,ee,ae;return((N=R==null?void 0:R.toString())==null?void 0:N.includes(".txt"))||((ee=R==null?void 0:R.toString())==null?void 0:ee.includes(".cpt"))||((ae=R==null?void 0:R.toString())==null?void 0:ae.includes(".obj"))})?T=[...d,Oe.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(T=[...d,{label:"迁移"}]),T},Mo=()=>{U.value=!0},Wi=a.ref([]),Ki=async(d,h,T=!1)=>{var ee,ae,j,ge;if(!d)return;if(T){we.value=[...ya.value.values()].filter(xe=>Object.values(xe).some($e=>typeof $e=="string"?$e==null?void 0:$e.toLowerCase().includes(h==null?void 0:h.toLowerCase()):!1));return}let z={};for(let xe in d)(d==null?void 0:d[xe])!==""&&(z[xe]=d==null?void 0:d[xe]);if(JSON.stringify(z)==="{}"){we.value=Array.from(((ee=ya.value)==null?void 0:ee.values())??[]);return}let R=(ae=u==null?void 0:u.related)==null?void 0:ae.find(xe=>xe==null?void 0:xe.includes("content_")),N=await O.getFillFind({platId:parseInt((j=$l==null?void 0:$l.value)==null?void 0:j.plat_id),tableName:R,params:z});N=(ge=N==null?void 0:N.data)==null?void 0:ge.result,we.value=N,ea.setTableLoading(!1)},ni=async d=>{var T,z;if(!Re(u.config,{type:oa.TABLE})||!d)return;((T=Array.from(c.value))==null?void 0:T.length)>0&&await Ao();const h=d==null?void 0:d.id;h!=null&&(c.value.clear(),m.value.clear(),m.value.has(h)||m.value.set(h,O.cloneDeep(d)),we.value=(z=we.value)==null?void 0:z.map(R=>({...R,tableEditType:(R==null?void 0:R.id)===h?"edit":"text"})),c.value.add(h),Il.value=!0)},Un=async(d,h,T,z)=>{z!=null&&z.isExistChild&&Ne("clickMainKey",d,T,Ce.value)},Sn=()=>{Ga.value=!1},oi=d=>{Ne("rowClick",d)};a.watch(()=>u.changedContent,()=>{var T,z;if(!u.changedContent)return;let d=(T=we.value)==null?void 0:T.map(R=>{var N;return R.id===((N=u.changedContent)==null?void 0:N.id)&&(R={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete R.newId),R});const h=(z=u.itemData)==null?void 0:z.map(R=>((R==null?void 0:R.key)==="tableContents"&&(R.contents=d),R));we.value=d,Ne("contentChange",{contents:h,index:u.index}),Ne("change",{content:d,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Io=()=>{},Gi=async()=>{const d=wa.value,h=sessionStorage.getItem("systemKey"),T=await ua.getItemData(d,h,""),z=(T==null?void 0:T.find(ae=>(ae==null?void 0:ae.name)==="方法明细"))||(T==null?void 0:T[0]),R=(z==null?void 0:z.compData)||[],N=R==null?void 0:R.find(ae=>{const j=ae==null?void 0:ae.key;return j==="formContent"||j==="tableContents"});return N==null?void 0:N.contents},uo=async()=>{const h=Qa.Local.get("access-token");return h?`Bearer ${h}`:""},Yi=async(d,{token:h,inputData:T}={})=>await Qa.axios.post(d,T,{headers:{Authorization:h}}).catch(R=>(na.setImportLoading(!1),Promise.reject(R))),Ji=d=>{var z;let h={};const T=[];return h.form={},(z=O.cloneDeep(d))==null||z.forEach((R,N)=>{var ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca;if((R==null?void 0:R.comp)==="Table"){(ae=(ee=R==null?void 0:R.compData)==null?void 0:ee.find(fa=>(fa==null?void 0:fa.key)==="header"))==null||ae.contents;let Ua=(xe=(ge=(j=R==null?void 0:R.compData)==null?void 0:j.find(fa=>(fa==null?void 0:fa.key)==="tableContents"))==null?void 0:ge.contents)==null?void 0:xe.map(fa=>fa.slice(1));(Ha=(ta=(He=(Ie=($e=R==null?void 0:R.compData)==null?void 0:$e.find(fa=>(fa==null?void 0:fa.key)==="header"))==null?void 0:Ie.contents)==null?void 0:He[0])==null?void 0:ta[0])==null||Ha.label;let ie=(ia=(za=R==null?void 0:R.compData)==null?void 0:za.find(fa=>(fa==null?void 0:fa.key)==="header"))==null?void 0:ia.contents,Ta=[];Ua==null||Ua.forEach(fa=>{let Ba=[];fa==null||fa.forEach((Aa,A)=>{var Me;let W={};((Me=ie[A])==null?void 0:Me.label)!=="操作"&&(W[ie[A].label]=Aa,Ba.push(W))}),Ta.push(Ba)}),h[R.name]=Ta}else{const Ua=(ca=(el=R.compData)==null?void 0:el.find(ie=>(ie==null?void 0:ie.key)==="formContent"))==null?void 0:ca.contents;Ua==null||Ua.forEach(ie=>{var Ta,fa;if(ie.prop!==""){let Ba=ie==null?void 0:ie.value;Array.isArray(Ba)?Ba=((Ta=Ba==null?void 0:Ba[0])==null?void 0:Ta.oldUrl)||"http://222.92.178.198:62001/"+((fa=Ba==null?void 0:Ba[0])==null?void 0:fa.url):Ba=Ba.toString(),ie={key:(ie==null?void 0:ie.prop)??(ie==null?void 0:ie.label),value:Ba},T.push(ie)}})}}),h.form=ua.getFormContents(T),h},Xi=d=>{const h=[],T=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(T):h.push(z)};return T(d),h},Zi=async(d,h,T)=>{var ie,Ta,fa,Ba,Aa,A,W,Me,sa,me,da,Ma,pl,ll,ml,yl,Pl;na.setImportLoading(!0),ea.setFreshContent(!1);let z=await Gi().catch(al=>(na.setImportLoading(!1),Promise.reject(al)));z=z==null?void 0:z.filter(al=>{var kl;return((kl=al==null?void 0:al.find(Ka=>Ka==null?void 0:Ka.id))==null?void 0:kl.id)===(h==null?void 0:h.id)});let R=ua.getEqualChild([(ie=Ce.value)==null?void 0:ie.filter(al=>(al==null?void 0:al.label)!=="操作")]);const N=(fa=(Ta=ua.tableToForm(z,R))==null?void 0:Ta[0])==null?void 0:fa.find(al=>{const kl=al==null?void 0:al.key;return kl==="Interface"||kl==="方法体"}),ee=N==null?void 0:N.value;if(!ee){console.log("未搜索到isMain, 缺少算法执行接口"),na.setImportLoading(!1);return}const ae=Ce.value?ua.getEqualChild([Ce.value]):[],j=ae.find(al=>{const kl=al==null?void 0:al.prop;return kl==="Input1"||kl==="输入数据.输入1"||kl==="样本输入数据"}),ge=j==null?void 0:j.prop;let xe=h==null?void 0:h[ge];const $e=await uo().catch(al=>(na.setImportLoading(!1),Promise.reject(al)));let Ie=!0,He="";(Ba=Ce.value)==null||Ba.forEach(al=>{(al==null?void 0:al.prop)===ge&&(Ie=!!(al!=null&&al.childPath),He=al==null?void 0:al.childPath)});let ta="";if(Ie){let al=(A=(Aa=Ce.value)==null?void 0:Aa.find(hl=>(hl==null?void 0:hl.isMainKey)===!0))==null?void 0:A.prop;ta=h==null?void 0:h[al];let kl=He==null?void 0:He.split(y),Ka=[];kl==null||kl.forEach((hl,Sl)=>{(kl==null?void 0:kl.length)-1===Sl&&Ka.push(ta),Ka.push(hl)}),Ka=Ka==null?void 0:Ka[0];let fl=await ua.getItemData(Ka,sessionStorage.getItem("systemKey"),""),nl=fl==null?void 0:fl.filter(hl=>(hl==null?void 0:hl.name)===ge);nl=nl==null?void 0:nl.map(hl=>{var Sl;return hl.compData=(Sl=hl==null?void 0:hl.compData)==null?void 0:Sl.map(Al=>{var kr;return(Al==null?void 0:Al.key)==="tableContents"&&(Al.contents=(kr=Al==null?void 0:Al.contents)==null?void 0:kr.filter(Rl=>(Rl==null?void 0:Rl[1])===(h==null?void 0:h[ge]))),Al}),hl}),(!nl||(nl==null?void 0:nl.length)===0)&&(nl=fl,nl=nl==null?void 0:nl.map(hl=>{var Sl;return hl.compData=(Sl=hl==null?void 0:hl.compData)==null?void 0:Sl.map(Al=>{var kr;return(Al==null?void 0:Al.key)==="tableContents"&&(Al.contents=(kr=Al==null?void 0:Al.contents)==null?void 0:kr.filter(Rl=>{var wl,Ml;return(Rl==null?void 0:Rl[1])===(h==null?void 0:h[(Ml=(wl=Ce==null?void 0:Ce.value)==null?void 0:wl[0])==null?void 0:Ml.prop])})),Al}),hl})),xe=Ji(nl)}const Ha=await Yi(ee,{token:$e,inputData:xe}).catch(al=>(na.setImportLoading(!1),Promise.reject(al))),za=(W=Ha==null?void 0:Ha.data)==null?void 0:W.data,ia=ae.find(al=>(al==null?void 0:al.prop)==="Output1"),el=ia==null?void 0:ia.prop;let ca=[],Ua=[];if(za&&((Me=Object.values(za))==null?void 0:Me.length)>0){let al=[];const kl=new FormData,Ka=(sa=Xi(za))==null?void 0:sa.map(async nl=>{var hl,Sl;if(!Array.isArray(nl)&&(nl!=null&&nl.includes("http"))){let Al=await Qa.axios.get(nl,{responseType:"blob"}),kr=(Sl=nl==null?void 0:nl.split("/"))==null?void 0:Sl[((hl=nl==null?void 0:nl.split("/"))==null?void 0:hl.length)-1];kl.append("files",Al.data,kr)}else al.push(nl)});if(await Promise.all(Ka),!ua.isFormDataEmpty(kl)){let nl=await wu.uploadAmountApi(kl),hl=(da=(me=nl==null?void 0:nl.data)==null?void 0:me.result)==null?void 0:da.map(Sl=>{var Al,kr,Rl,wl,Ml,Gl;return{name:(Gl=(Ml=(wl=(Al=Sl==null?void 0:Sl.url)==null?void 0:Al.split("/"))==null?void 0:wl[((Rl=(kr=Sl==null?void 0:Sl.url)==null?void 0:kr.split("/"))==null?void 0:Rl.length)-1])==null?void 0:Ml.split("."))==null?void 0:Gl[0],url:Sl==null?void 0:Sl.url}});al=[...al,...hl]}let fl={};for(let nl in h)nl!=="id"&&(fl[nl]=h[nl]);fl[el]=al,Ua.push({id:h==null?void 0:h.id,value:{tableData:fl}})}if((Ua==null?void 0:Ua.length)>0){const al=Ua.map(Ka=>{const fl={id:Ka.id,...Ka.value.tableData};return delete fl._isOCRRow,delete fl._ocrTableId,delete fl._isTemp,delete fl.tableEditType,delete fl.index,fl}),kl=[{tableName:(Ma=u==null?void 0:u.related)==null?void 0:Ma.find(Ka=>Ka==null?void 0:Ka.includes("content")),tableContents:al}];await O.pageBatchUpdateApi({platId:parseInt((pl=$l.value)==null?void 0:pl.plat_id),changeContents:kl})}if((ca==null?void 0:ca.length)>0)try{await O.pageBatchAddApi({platId:parseInt((ll=$l.value)==null?void 0:ll.plat_id),changeContents:[{tableName:(ml=u==null?void 0:u.related)==null?void 0:ml.find(al=>al==null?void 0:al.includes("content")),tableContents:ca.map(al=>{var Ka,fl,nl;const kl={id:((Ka=al==null?void 0:al.key)==null?void 0:Ka.id)??((fl=al==null?void 0:al.key)==null?void 0:fl.rowId)??(al==null?void 0:al.id),...((nl=al==null?void 0:al.value)==null?void 0:nl.tableData)||{}};return delete kl._isOCRRow,delete kl._ocrTableId,delete kl._isTemp,delete kl.tableEditType,delete kl.index,Object.keys(kl).forEach(hl=>{hl==="证书附件"&&Array.isArray(kl[hl])&&(kl[hl]=JSON.stringify(kl[hl]))}),kl})}]})}catch(al){Qa.ElMessage.error(((Pl=(yl=al==null?void 0:al.response)==null?void 0:yl.data)==null?void 0:Pl.message)||(al==null?void 0:al.message)||"保存失败"),ea.setTableLoading(!1);return}Ro(!0),na.setImportLoading(!1),ea.setFreshContent(!0)},ii=(d,h)=>(d=d==null?void 0:d.map(T=>{var z,R;return T!=null&&T.children&&((z=T.children)!=null&&z.find(N=>N.id===(h==null?void 0:h.id))?T.children=(R=T.children)==null?void 0:R.filter(N=>(N==null?void 0:N.id)!==(h==null?void 0:h.id)):T.children=ii(T.children,h)),T}),d),po=a.ref(!1),Qi=()=>{po.value=!0},et=async d=>{var T,z,R,N;po.value=!1;const h=Array.isArray(d)?d:d?[d]:[];if(h.length!==0)for(const ee of h){const ae={name:ee.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(ee),raw:ee,uid:Date.now()+Math.random()};Je.value.push(ae),Bl(ae,"uploading"),Ol(ae,0);try{const j=new FormData;j.append("file",ee,ae.name);const ge=await O.platformUploadFile(j);ae.uploadResult=((T=ge==null?void 0:ge.data)==null?void 0:T.result)||{name:ae.name,url:"",fileName:ae.name},Be({name:((z=ae.uploadResult)==null?void 0:z.name)||ae.name,url:((R=ae.uploadResult)==null?void 0:R.url)||"",id:(N=ae.uploadResult)==null?void 0:N.id}),Bl(ae,"uploaded"),Ol(ae,100)}catch(j){console.error("文件上传失败:",j),Qa.ElMessage.error(`文件 ${ae.name} 上传失败,请重试`),Bl(ae,"pending"),Ol(ae,0);const ge=Je.value.findIndex(xe=>xe.uid===ae.uid);ge>-1&&Je.value.splice(ge,1)}}},t=a.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,h,T)=>{h===(u==null?void 0:u.index)?T(new Error("选择源不能和目标源一致")):T()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),i=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:""}),f=()=>{i.show=!1},b=async d=>{var h,T,z,R,N,ee,ae,j;try{if(d==="cancel"&&(i.show=!1),d==="replace"&&((h=i==null?void 0:i.existRows)==null?void 0:h.length)>0){await O.pageBatchDeleteApi({platId:parseInt((T=$l.value)==null?void 0:T.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(xe=>xe==null?void 0:xe.includes("content_")))||((R=u==null?void 0:u.related)==null?void 0:R.find(xe=>xe==null?void 0:xe.includes("content"))),tableContents:i==null?void 0:i.existRows}]});const ge=await O.pageBatchAddApi({platId:parseInt((N=$l.value)==null?void 0:N.plat_id),changeContents:[{tableName:(ee=u==null?void 0:u.related)==null?void 0:ee.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:(()=>{const xe=(we.value||[]).filter(ta=>!((i==null?void 0:i.existRows)||[]).some(Ha=>String(Ha==null?void 0:Ha.id)===String(ta==null?void 0:ta.id))),$e=(i==null?void 0:i.tableData)||[],Ie=[];let He=xe.slice();return $e.forEach(ta=>{const Ha={...ta};try{Ha.sort=Mn(0,He)}catch{}Ie.push(Ha),He.unshift(Ha)}),Ie.map((ta,Ha)=>({id:Ha,...ta}))})()}]});((ae=ge==null?void 0:ge.data)==null?void 0:ae.code)===200&&(await bt({buttonName:"新增",columns:Ce.value,fixContent:(j=i==null?void 0:i.tableData)==null?void 0:j.map((xe,$e)=>({id:$e,...xe})),relatedContents:u==null?void 0:u.related}),Qa.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{i.show=!1,i.columns=[],i.tableData=[],i.existRows=[]}},w=()=>{t.show=!1},M=d=>{var h,T;if((d==null?void 0:d.buttonName)==="取消")return t.show=!1;t.to=d==null?void 0:d.content,!(!(u!=null&&u.index)||!((h=t.to)!=null&&h.groupName))&&(u==null?void 0:u.index)!==((T=t.to)==null?void 0:T.groupName)&&(Ne("change",{buttonName:"迁移",value:{from:t.from,to:t.to,data:t.selectRow}}),t.show=!1)},q=async d=>{var h,T,z,R;if(d){if(!Dr.validateFileSize(d.raw)){Qa.ElMessage.warning(`文件大小不能超过 ${Vr.value.maxSize}MB`);const N=Je.value.findIndex(ee=>ee.uid===d.uid);N>-1&&Je.value.splice(N,1),J();return}if(!Dr.validateFileType(d.raw)){Qa.ElMessage.warning("请上传图片文件");const N=Je.value.findIndex(ee=>ee.uid===d.uid);N>-1&&Je.value.splice(N,1),J();return}Bl(d,"uploading"),Ol(d,0);try{const N=new FormData;N.append("file",d.raw,d.name);const ee=await O.platformUploadFile(N);d.uploadResult=((h=ee==null?void 0:ee.data)==null?void 0:h.result)||{name:d.name,url:"",fileName:d.name},Be({name:((T=d.uploadResult)==null?void 0:T.name)||d.name,url:((z=d.uploadResult)==null?void 0:z.url)||"",id:(R=d.uploadResult)==null?void 0:R.id}),Bl(d,"uploaded"),Ol(d,100)}catch(N){console.error("文件上传失败:",N),Qa.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),Bl(d,"pending"),Ol(d,0);const ee=Je.value.findIndex(ae=>ae.uid===d.uid);ee>-1&&Je.value.splice(ee,1)}finally{J()}}},J=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},fe=async()=>{var T,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Je.value.length===0){Qa.ElMessage.warning("请先选择要上传的图片");return}if(Je.value.filter(R=>{const N=ul(R);return N!=="uploaded"&&N!=="completed"&&N!=="failed"}).length>0){Qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ga.value=!0,K.value=0;let h=null;try{Je.value.forEach(ia=>{Bl(ia,"processing")});const R=Math.floor(Math.random()*10)+90;h=setInterval(()=>{K.value<R?K.value+=1:clearInterval(h)},50);const N=Je.value.map(ia=>{var el,ca,Ua;return{name:((el=ia.uploadResult)==null?void 0:el.name)||ia.name,url:((ca=ia.uploadResult)==null?void 0:ca.url)||"",fileName:((Ua=ia.uploadResult)==null?void 0:Ua.fileName)||ia.name}}),ee=Dr.extractTableHeaders(Ce.value),ae=N.map(ia=>({name:(ia==null?void 0:ia.fileName)||(ia==null?void 0:ia.name),url:(ia==null?void 0:ia.url)||""})),j=await Dr.recognize(ae,ee);if(console.log(j,"ocrResult"),clearInterval(h),h=null,(j==null?void 0:j.code)===500||(j==null?void 0:j.type)==="error"||!(j!=null&&j.result)){K.value=0,Je.value.forEach(ia=>{Bl(ia,"failed"),Ol(ia,0)}),Qa.ElMessage.error((j==null?void 0:j.message)||"OCR识别失败,请重试"),ga.value=!1;return}K.value=R;const ge=Array.isArray(j==null?void 0:j.result)?j.result:[];if(ge.length===0){K.value=0,Je.value.forEach(ia=>{Bl(ia,"failed"),Ol(ia,0)}),Qa.ElMessage.warning("OCR识别未返回有效数据"),ga.value=!1;return}const xe=new Set,$e=[];ge.forEach((ia,el)=>{const ca=ia!=null&&ia.数据&&typeof(ia==null?void 0:ia.数据)=="object"?ia.数据:{},Ua=Array.isArray(ia==null?void 0:ia.图片信息)?ia.图片信息:[],ie=new Map;Ua.forEach(fa=>{fa!=null&&fa.name&&ie.set(fa.name,fa.url||"")});const Ta={_index:el,_certType:(ia==null?void 0:ia.证书类型)||"",_certNo:(ia==null?void 0:ia.证书编号)||"",_ocrImages:Ua,__ocrFieldMeta:{}};Object.entries(ca).forEach(([fa,Ba])=>{let Aa="",A=0,W=[],Me="";Ba&&typeof Ba=="object"&&!Array.isArray(Ba)?(Aa=(Ba==null?void 0:Ba.value)??"",A=(Ba==null?void 0:Ba.score)??0,W=Array.isArray(Ba==null?void 0:Ba.bboxNorm)?Ba==null?void 0:Ba.bboxNorm:[],Me=(Ba==null?void 0:Ba.imageName)||""):Array.isArray(Ba)&&Ba.length>=2?(Aa=Ba[0]??"",A=Ba[1]??0):(Aa=Ba??"",A=0),Ta[fa]=Aa,Ta[`${fa}_accuracy`]=A,xe.add(fa),Ta.__ocrFieldMeta[fa]={value:Aa,score:A,bboxNorm:W,imageName:Me,imageUrl:Me&&ie.get(Me)||"",images:Ua}}),$e.push(Ta)});const Ie=[],He=new Set;$e.forEach(ia=>{ia&&xe.forEach(el=>{const ca=ia[`${el}_accuracy`];(typeof ca=="number"?ca>0:ca!=null&&String(ca).trim()!==""&&String(ca)!=="0")&&He.add(el)})}),xe.forEach(ia=>{Ie.push({prop:ia,label:ia,editable:!0,minWidth:230}),He.has(ia)&&Ie.push({prop:`${ia}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Je.value.forEach(ia=>{Bl(ia,"completed")}),K.value=100,De.value=Ie,Ye.value=$e,bl.value=N,Wa.value=j;const ta=["出厂编号","设备名称","制造厂"],Ha=Ie.filter(ia=>ia&&!ia.isAccuracy&&typeof ia.prop=="string").map(ia=>ia.prop),za=["出厂编号","设备名称","制造厂"];Za.value=Ha.filter(ia=>za.includes(ia)),console.log("[OCR] 默认勾选字段 props:",Za.value),ve.value=2,ga.value=!1,la.value=!1}catch(R){console.error("OCR处理失败:",R),h&&(clearInterval(h),h=null),Qa.ElMessage.error(((z=(T=R==null?void 0:R.response)==null?void 0:T.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ga.value=!1,K.value=0,Je.value.forEach(N=>{Bl(N,"pending"),Ol(N,0)})}},Le=d=>{if(d==null)return"";let h=String(d);return h=h.replace(/\s+/g," ").trim(),h=h.replace(/[!-~]/g,T=>String.fromCharCode(T.charCodeAt(0)-65248)),h=h.replace(/ /g," "),h=h.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),h},ke=()=>{var ia,el;const d=bl.value,h=Wa.value,T=Ye.value;if(!T||T.length===0){Qa.ElMessage.warning("暂无数据可添加");return}const z=(ia=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:ia.filter(ca=>(ca==null?void 0:ca.type)!=="operate"&&(ca==null?void 0:ca.label)!=="操作"&&(ca==null?void 0:ca.prop)!=="operate"),R=new Map,N=new Map,ee=(el=z==null?void 0:z.find(ca=>(ca==null?void 0:ca.label)==="证书附件"))==null?void 0:el.prop;z==null||z.forEach(ca=>{ca!=null&&ca.label&&(ca!=null&&ca.prop)&&(R.set(ca.label,ca.prop),N.set(ca.prop,ca.label))});const ae=Date.now(),j=ca=>String(ae*1e3+ca),ge=[],xe=[],$e=ca=>{const Ua=Ei&&Ei[ca]||[ca];for(const ie of Ua){const Ta=R.get(ie);if(Ta)return Ta}return""},Ie=$e("出厂编号"),He=$e("设备名称"),ta=$e("制造厂"),Ha=[],za=ca=>{var Aa,A;if(!ee)return[];const Ua=(Array.isArray(d)?d[ca]:null)||null,ie=(Ua==null?void 0:Ua.url)||"",Ta=(Ua==null?void 0:Ua.fileName)||(Ua==null?void 0:Ua.name)||"";return(String(Ta).toLowerCase().endsWith(".pdf")||String(ie).toLowerCase().endsWith(".pdf"))&&ie?[{url:ie,name:Ta,fileName:Ta}]:(Array.isArray((A=(Aa=h==null?void 0:h.result)==null?void 0:Aa[ca])==null?void 0:A.图片信息)?h.result[ca].图片信息:[]).map(W=>({url:(W==null?void 0:W.url)||"",name:(W==null?void 0:W.name)||"",fileName:(W==null?void 0:W.name)||""})).filter(W=>W.url)};if(T.forEach((ca,Ua)=>{var pl;const ie={id:j(Ua),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[ll,ml]of R.entries())Object.prototype.hasOwnProperty.call(ca,ll)&&(ie[ml]=ca[ll]);ee&&(ie[ee]=za(Ua));const Ta=(Array.isArray(h==null?void 0:h.result)?h.result[Ua]:null)||null,fa=(Array.isArray(d)?d[Ua]:null)||null,Ba=(fa==null?void 0:fa.url)||"",Aa=(fa==null?void 0:fa.fileName)||(fa==null?void 0:fa.name)||"",A=String(Aa).toLowerCase().endsWith(".pdf")||String(Ba).toLowerCase().endsWith(".pdf"),W={ts:Date.now(),versionId:String(Date.now())+"_"+String(Ua),label:new Date().toLocaleString(),certType:(Ta==null?void 0:Ta.证书类型)||"",certNo:(Ta==null?void 0:Ta.证书编号)||"",fileType:A?"pdf":"image",sourceUrl:A?Ba:"",images:Array.isArray(Ta==null?void 0:Ta.图片信息)?Ta.图片信息.map(ll=>({name:(ll==null?void 0:ll.name)||"",url:(ll==null?void 0:ll.url)||""})).filter(ll=>ll.url):[]},Me=ll=>Le(ll?ie==null?void 0:ie[ll]:""),sa=Me(Ie),me=Me(He),da=Me(ta);if(!!(Ie&&He&&ta&&sa&&me&&da)){const ll=(we.value||[]).find(ml=>{const yl=Le(Ie?ml==null?void 0:ml[Ie]:""),Pl=Le(He?ml==null?void 0:ml[He]:""),al=Le(ta?ml==null?void 0:ml[ta]:"");return yl&&Pl&&al&&yl===sa&&Pl===me&&al===da});if(ll){Ha.push({idx:Ua,ocrRow:ie,versionItem:W,ocrNo:sa,candidates:[ll],selectedTargetId:String((ll==null?void 0:ll.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(sa&&Ie){const ll=(we.value||[]).filter(ml=>{const yl=Le(Ie?ml==null?void 0:ml[Ie]:"");return yl&&yl===sa});if(ll.length>0){Ha.push({idx:Ua,ocrRow:ie,versionItem:W,ocrNo:sa,candidates:ll,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ie.sort===void 0||ie.sort===null||String(ie.sort).trim()===""){const ll=(we.value||[]).map(yl=>eo(yl==null?void 0:yl.sort)).filter(yl=>yl!==null),ml=ll.length>0?Math.max(...ll):((pl=we.value)==null?void 0:pl.length)??0;ie.sort=String(Number((ml+1).toFixed(6)))}}catch{}Ya(u==null?void 0:u.index,ie.id,W),Ha.push({idx:Ua,ocrRow:ie,versionItem:W,ocrNo:sa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Ha||[]).length>0){nr.value=(Ha||[]).map(ca=>({...ca,selectedTargetId:(ca==null?void 0:ca.selectedTargetId)||""})),Fl.value=!0,yr.value=xe,Nl.value=ge,tr.value=h,Nr.value=d,Ll.value=ee||"";return}},aa=(d,h,T)=>{Ye.value[d]&&(Ye.value[d][h]=T)},La=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,sl=d=>{if(d==null||d===0)return"#909399";const h=Number(d);return h>=.9?"#67c23a":h>=.7?"#e6a23c":"#f56c6c"},rl=d=>{var T,z,R,N;if(Na.value===d){Na.value=null,Sa.value=!1,de.value="";return}Na.value=d,de.value="";const h=(T=Ye.value)==null?void 0:T[d];if(h&&Array.isArray(h._ocrImages)&&h._ocrImages.length>0){El.value=h._ocrImages.map(j=>({name:(j==null?void 0:j.name)||"",url:(j==null?void 0:j.url)||""})).filter(j=>j.name||j.url);const ee=h.__ocrFieldMeta||{},ae=(z=Object.values(ee))==null?void 0:z.find(j=>j==null?void 0:j.imageName);Vl.value=(ae==null?void 0:ae.imageName)||((N=(R=El.value)==null?void 0:R[0])==null?void 0:N.name)||"",Sa.value=El.value.length>0}else El.value=[],Sa.value=!1,Vl.value=""},cl=()=>{ma.value=!1,Je.value=[],Xa.value=null,ve.value=1,Ia.value.clear(),We.value.clear(),K.value=0,Sa.value=!1},_l=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",ul=d=>{const h=d.uid||d.name;return Ia.value.get(h)||"pending"},Tl=d=>{const h=d.uid||d.name;return We.value.get(h)||0},Ol=(d,h)=>{const T=d.uid||d.name;We.value.set(T,Math.min(100,Math.max(0,h)))},Xl=d=>{const h=ul(d),T=100.53;if(h==="completed"||h==="uploaded")return`${T} ${T}`;if(h==="failed")return`${T} ${T}`;if(h==="uploading"){const z=Tl(d);return`${T*(z/100)} ${T}`}else if(h==="processing")return`${T*.5} ${T}`;return`0 ${T}`},Bl=(d,h)=>{const T=d.uid||d.name;Ia.value.set(T,h),(h==="completed"||h==="uploaded")&&Ol(d,100)},Ul=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const h=document.createElement("input");h.type="file",h.multiple=!0,h.accept="image/*,application/pdf",h.style.display="none",h.onchange=async T=>{const z=Array.from(T.target.files||[]);for(const R of z){const N={name:R.name,raw:R,uid:Date.now()+Math.random()};Je.value.push(N),await q(N)}T.target.value="",document.body.removeChild(h)},document.body.appendChild(h),h.click()}})},jr=()=>{ve.value>1&&ve.value--},wr=()=>{ve.value===1?Je.value.length>0&&!ga.value&&fe():ve.value===2&&(ke(),ve.value=3)},Yr=async d=>{await pn(d==null?void 0:d.row)},on=async({row:d,prop:h})=>{!d||!h||await pn(d,h)},pn=async(d,h)=>{var R,N;const T=d==null?void 0:d.id;if(!T){Qa.ElMessage.warning("暂无可预览数据");return}let z=vl(u==null?void 0:u.index,T);if(!z||z.length===0){const ee=sessionStorage.getItem("ocr_root_table_id"),ae=ee!==null?Number(ee):null;if(ae!=null&&ae!==""&&!Number.isNaN(ae)){const j=vl(ae,T);Array.isArray(j)&&j.length>0&&(Jl(u==null?void 0:u.index,T,j),z=j)}}if(!z||z.length===0){const ee=(R=ua.getAllLeafNodes(Ce.value)||[])==null?void 0:R.filter(j=>(j==null?void 0:j.type)!=="operate"&&(j==null?void 0:j.label)!=="操作"&&(j==null?void 0:j.prop)!=="operate"),ae=h||((N=ee==null?void 0:ee.find(j=>(j==null?void 0:j.label)==="证书附件"))==null?void 0:N.prop);if(ae&&d[ae]){const j=d[ae];let ge=[],xe="",$e=!1;if(typeof j=="string")try{const Ie=JSON.parse(j);Array.isArray(Ie)&&(ge=Ie.map(He=>({name:(He==null?void 0:He.name)||(He==null?void 0:He.fileName)||"",url:(He==null?void 0:He.url)||""})).filter(He=>He.url||He.name),ge.length>0&&(xe=ge[0].url||"",$e=String(ge[0].name).toLowerCase().endsWith(".pdf")||String(xe).toLowerCase().endsWith(".pdf")))}catch{xe=j,$e=String(j).toLowerCase().endsWith(".pdf"),ge=[{name:j,url:j}]}else Array.isArray(j)&&(ge=j.map(Ie=>({name:(Ie==null?void 0:Ie.name)||(Ie==null?void 0:Ie.fileName)||"",url:(Ie==null?void 0:Ie.url)||""})).filter(Ie=>Ie.url||Ie.name),ge.length>0&&(xe=ge[0].url||"",$e=String(ge[0].name).toLowerCase().endsWith(".pdf")||String(xe).toLowerCase().endsWith(".pdf")));if(ge.length>0||xe){const Ie={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:$e?"pdf":"image",sourceUrl:$e?xe:"",images:ge};z=[Ie],Ya(u==null?void 0:u.index,T,Ie)}}}if(!z||z.length===0){Qa.ElMessage.warning("暂无可预览数据");return}Ge.value=z,Ee.value=!0},fo=d=>{Je.value=Je.value.filter((h,T)=>T!==d)},In=async(d,h,T)=>{var z,R,N,ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca,Ua,ie,Ta,fa;if(Re(u.config,{type:oa.TABLE,tableOperate:d})){if(Fa.value="",xa.value=!0,ja.value=!0,Ne("onButtonClick",d,h),$.value=[],d==="删除")un.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ba,Aa,A,W;(Ba=we.value)!=null&&Ba.find(Me=>(Me==null?void 0:Me.id)===(h==null?void 0:h.id))?we.value=(Aa=O.cloneDeep(we.value))==null?void 0:Aa.filter(Me=>(Me==null?void 0:Me.id)!==(h==null?void 0:h.id)):we.value=ii(O.cloneDeep(we.value),h);try{h!=null&&h.id&&((W=(A=ya.value)==null?void 0:A.has)!=null&&W.call(A,h==null?void 0:h.id))&&ya.value.delete(h.id)}catch{}pf(Gr.value,vn.value,h==null?void 0:h.id),ea.setTableLoading(u==null?void 0:u.index),Ne("change",{content:we.value,fixContent:[h],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:d,columns:Ce.value,relatedContents:u==null?void 0:u.related}),console.log(h,"item")});else if(d==="批量删除"){if(((z=or.value)==null?void 0:z.length)===0)return Qa.ElMessage.warning("请先勾选操作的数据");un.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var A,W,Me,sa,me;const Ba=(A=or.value)==null?void 0:A.map(da=>da.id);we.value=(W=O.cloneDeep(we.value))==null?void 0:W.filter(da=>!(Ba!=null&&Ba.includes(da.id))),ea.setTableLoading(u==null?void 0:u.index),Ne("change",{content:we.value,fixContent:or.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:d,relatedContents:u==null?void 0:u.related,columns:Ce.value});const Aa=(Ba||[]).filter(Boolean);if(Aa.length>0&&Aa.every(da=>da!=null&&da!=="")){const da=(or.value||[]).map(Ma=>{const pl={...Ma};return delete pl._isOCRRow,delete pl._ocrTableId,delete pl._isTemp,delete pl.tableEditType,delete pl.index,pl});await O.pageBatchDeleteApi({platId:parseInt((Me=$l.value)==null?void 0:Me.plat_id),changeContents:[{tableName:((sa=u==null?void 0:u.related)==null?void 0:sa.find(Ma=>Ma==null?void 0:Ma.includes("content_")))||((me=u==null?void 0:u.related)==null?void 0:me.find(Ma=>Ma==null?void 0:Ma.includes("content"))),tableContents:da}]})}})}else if(d==="复制新增"){Te.value="复制新增",O.cloneDeep(h);const Ba=(R=Ce.value)==null?void 0:R.find(Aa=>Aa==null?void 0:Aa.isMainKey);Ba||((N=Ce.value)==null||N[0]),sr.value=h,Ro(!0)}else if(d==="新增")Te.value="新增",Oo(""),Qe.value=!0;else if(d==="编辑")Te.value="编辑",Oo(h),Qe.value=!0;else if(d==="查看")Te.value="查看",Oo(h),xa.value=!1,ja.value=!1,Qe.value=!0;else if(d==="查看三维模型"){const Ba={};for(let A in h)A!=="id"&&(Ba[A]=h[A]);let Aa=(ee=Object.values(Ba))==null?void 0:ee[1];Ve.setTableShowThree(Aa)}else if(d==="切换视图")tu();else if(((ae=T==null?void 0:T.extra)==null?void 0:ae.type)==="modelExample")Te.value=d,_e.value=!0;else if(d==="新建"){let Ba=oe.value,Aa=[];for(let me in Ba)me!=null&&me.includes(`loading${((j=$l.value)==null?void 0:j.account)||((ge=$l.value)==null?void 0:ge.账号)}`)&&(Aa=[...Aa,...me]);let A=[];for(let me in Ba)me!=null&&me.includes(`updateLoading${((xe=$l.value)==null?void 0:xe.account)||(($e=$l.value)==null?void 0:$e.账号)}`)&&(A=[...A,...me]);let W=Aa==null?void 0:Aa.map(me=>me==null?void 0:me.id);const Me=A==null?void 0:A.map(me=>me==null?void 0:me.id);W=[...O.cloneDeep(W),...Me],(W==null?void 0:W.length)>0&&(W!=null&&W.every(me=>me!==null&&me))&&await _r.batchDeleteInsofDataApi({ids:W});const sa=(Ie=ue.value)==null?void 0:Ie.find(me=>(me==null?void 0:me.label)==="新建");await Zc(!1,sa)}else if(d==="修改模板"){let Ba=O.cloneDeep(wa).value;ea.setRouteToChildPath(Ba),na.setActiveMenuPath(Ba+y)}else if(d==="执行")Zi(d,h);else if(d==="导出paraform"){const Ba=Vo.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Aa=["推力","真空","压力","温度","流量"],A=wl=>{var Ml,Gl,zl;return wl?typeof(wl==null?void 0:wl.value)=="string"?wl.value:((zl=(Gl=(Ml=wl==null?void 0:wl._custom)==null?void 0:Ml.value)==null?void 0:Gl.value)==null?void 0:zl.value)||"":""},W=Array.isArray(vr.value)?vr.value:[],Me=A(W.find(wl=>(wl==null?void 0:wl.condition)==="child")),sa=String(Me||"").slice(0,8),me=wl=>{if(wl==null)return"";const Ml=String(wl).trim();if(!Ml)return"";if(/^\d{8}$/.test(Ml))return Ml;const Gl=Ml.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Gl){const Kl=Gl[1],Ql=Gl[2].padStart(2,"0"),ql=Gl[3].padStart(2,"0");return`${Kl}${Ql}${ql}`}const zl=Ml.replace(/\D/g,"");return zl.length>=8?zl.slice(0,8):""},da=async wl=>{var Ml,Gl;if(!wl)return"";try{const zl=await Wr("试验任务/任务管理",!1),Kl=(fr,ir=[])=>{if(!Array.isArray(fr))return ir;for(const cr of fr)(cr==null?void 0:cr.comp)==="Table"&&(cr!=null&&cr.name)&&ir.push(cr),Array.isArray(cr==null?void 0:cr.children)&&Kl(cr.children,ir),Array.isArray(cr==null?void 0:cr.tab)&&Kl(cr.tab,ir),Array.isArray(cr==null?void 0:cr.choice)&&Kl(cr.choice,ir);return ir},ql=Kl(zl||[]).find(fr=>(fr==null?void 0:fr.name)==="任务列表"),pr=((Gl=(Ml=ql==null?void 0:ql.compData)==null?void 0:Ml.find(fr=>(fr==null?void 0:fr.key)==="tableContents"))==null?void 0:Gl.contents)||[];if(!Array.isArray(pr)||pr.length===0)return"";const Ur=pr.find(fr=>String((fr==null?void 0:fr["试验代号(名称)"])||"").slice(0,8)===wl);return me(Ur==null?void 0:Ur.计划试验时间)}catch(zl){return console.warn("获取任务列表计划试验时间失败:",zl),""}},Ma=(wa.value||"").replace(/\/+$/,""),pl=Me?`${Ma}/${Me}`:Ma,ll=await Wr(pl||wa.value,!1),ml=String(ka.value||"").trim(),yl=wl=>String(wl||"").trim(),Pl=(wl,Ml=[],Gl="")=>{if(!Array.isArray(wl))return Ml;for(const zl of wl){const Kl=yl((zl==null?void 0:zl.choiceName)||(zl==null?void 0:zl.name0)||Gl);(zl==null?void 0:zl.comp)==="Table"&&(zl==null?void 0:zl.name)&&Aa.includes(zl.name)&&(!ml||Kl===ml)&&Ml.push(zl),Array.isArray(zl==null?void 0:zl.children)&&Pl(zl.children,Ml,Kl),Array.isArray(zl==null?void 0:zl.tab)&&Pl(zl.tab,Ml,Kl),Array.isArray(zl==null?void 0:zl.choice)&&Pl(zl.choice,Ml,Kl)}return Ml},al=Pl(ll||[]),kl=new Map;for(const wl of al)wl!=null&&wl.name&&!kl.has(wl.name)&&kl.set(wl.name,wl);const Ka=Aa.map(wl=>kl.get(wl)).filter(Boolean);if(!Ka||Ka.length===0)return Qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const fl=wl=>{const Ml=new Map,Gl=(zl,Kl=[])=>{if(Array.isArray(zl))for(const Ql of zl){const ql=((Ql==null?void 0:Ql.label)??"").toString().trim(),pr=ql?[...Kl,ql]:[...Kl];if(Array.isArray(Ql==null?void 0:Ql.children)&&Ql.children.length>0)Gl(Ql.children,pr);else{const fr=((Ql==null?void 0:Ql.prop)??"").toString();if(!fr)continue;const ir=ql||fr,cr=(pr.length>0?[...Kl,ir]:[ir]).join(".");Ml.set(fr,cr)}}};return Gl(wl,[]),Ml},nl=(wl,Ml)=>{const Gl=fl(wl||[]),Kl=(ua.getAllLeafNodes(wl||[])||[]).filter(ql=>(ql==null?void 0:ql.prop)&&(ql==null?void 0:ql.type)!=="operate"&&(ql==null?void 0:ql.label)!=="操作"&&(ql==null?void 0:ql.prop)!=="operate"),Ql=Array.isArray(Ml)?Ml:[];return Ql.length===0?[]:Ql.map(ql=>{const pr={};return Kl.forEach(Ur=>{const fr=String(Ur.prop),ir=Gl.get(fr)||String(Ur.label||Ur.prop);pr[ir]=(ql==null?void 0:ql[fr])??""}),pr})},hl=Ka.map(wl=>{var Ql,ql;const Ml=(wl==null?void 0:wl.compData)||[];let Gl=(Ql=Ml==null?void 0:Ml.find(pr=>(pr==null?void 0:pr.key)==="header"))==null?void 0:Ql.contents;Array.isArray(Gl==null?void 0:Gl[0])&&(Gl=Gl[0]);const zl=((ql=Ml==null?void 0:Ml.find(pr=>(pr==null?void 0:pr.key)==="tableContents"))==null?void 0:ql.contents)||[];if(!Array.isArray(Gl)||Gl.length===0||!Array.isArray(zl)||zl.length===0)return null;const Kl=nl(Gl||[],zl||[]);return!Array.isArray(Kl)||Kl.length===0?null:{类型:wl==null?void 0:wl.name,数据:Kl}}).filter(Boolean);if(!hl||hl.length===0)return Qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Sl=await da(sa),Al={试验代号:sa,试验日期:Sl,ParaForm:hl},kr=await uo().catch(()=>""),Rl=await O.exportParaformApi(Al,kr);if(((He=Rl==null?void 0:Rl.data)==null?void 0:He.code)===200&&((Ha=(ta=Rl==null?void 0:Rl.data)==null?void 0:ta.result)!=null&&Ha.Excel文件)){const wl=Rl.data.result.Excel文件,Ml=await O.platformDownloadFile({url:wl}),Gl=new Blob([Ml.data],{type:"application/vnd.ms-excel"}),zl=URL.createObjectURL(Gl),Kl=$n.dayjs().format("YYYYMMDD"),ql=`${(sa||"UNKNOWN").trim()||"UNKNOWN"}_${Kl}_paraform.xls`,pr=document.createElement("a");pr.href=zl,pr.download=ql,pr.style.display="none",document.body.appendChild(pr),pr.click(),setTimeout(()=>{document.body.removeChild(pr),URL.revokeObjectURL(zl)},100);const Ur=Array.isArray((ia=(za=Rl==null?void 0:Rl.data)==null?void 0:za.result)==null?void 0:ia.warnings)?Rl.data.result.warnings:[];if(Ur.length>0){const fr=Ur.map((ir,cr)=>`${cr+1}. ${(ir==null?void 0:ir.field)||"未知字段"}:${(ir==null?void 0:ir.message)||""}`).join(`
|
|
24
|
+
`);Qa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
+
${fr}`,duration:5e3,showClose:!0})}else Qa.ElMessage.success("导出成功")}else Qa.ElMessage.error(((el=Rl==null?void 0:Rl.data)==null?void 0:el.message)||"导出失败")}catch(Aa){console.error("导出paraform失败:",Aa),Qa.ElMessage.error("导出失败:"+((Aa==null?void 0:Aa.message)||"未知错误"))}finally{Ba.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ca=or.value)==null?void 0:ca.length)===0)return Qa.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Ua=we.value)==null?void 0:Ua.length)===0)return Qa.ElMessage.warning("暂无数据导出");let Ba=["序号",...(Ta=(ie=Ce.value)==null?void 0:ie.map(Me=>Me==null?void 0:Me.prop))==null?void 0:Ta.filter(Me=>Me!=="操作")],Aa=d==="导出全部"?we.value:or.value;const A=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Aa=Aa==null?void 0:Aa.map(Me=>Object.fromEntries(Object.entries(Me).filter(([sa])=>!A.includes(sa)))),Ba=["序号",...Ba],Aa=Aa==null?void 0:Aa.map((Me,sa)=>({序号:sa+1,...Me}));let W=(u==null?void 0:u.compName)||"表格信息";Ri(Aa,W,Ba,W)}else if(d==="OCR识别")ma.value=!0,Je.value=[],ve.value=1,Ia.value.clear(),We.value.clear(),K.value=0;else if(d==="迁移")t.selectRow=h,t.show=!0;else if(d==="生成方法"){let Ba=await Af(h),Aa;h!==""?Aa=[h]:Aa=O.cloneDeep(we.value),Aa=Aa==null?void 0:Aa.map(W=>(W.输出值=Ba,W));const A={fixContent:Aa,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:Ce.value,name:u==null?void 0:u.groupNames};Ne("change",A)}else if(((fa=T==null?void 0:T.extra)==null?void 0:fa.type)==="methodButton"){let Ba;h!==""?Ba=[h]:Ba=O.cloneDeep(we.value);const A={fixContent:await ft(Ba,Ce==null?void 0:Ce.value,"Manual",we.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:Ce.value,name:u==null?void 0:u.groupNames};Ne("change",A)}}},Jc=async(d,h)=>{var T,z,R,N,ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca,Ua,ie;try{let Ta,fa;const Ba=(T=oe.value[wa.value+y])==null?void 0:T.filter(Ma=>{var pl;return((pl=Ma==null?void 0:Ma.key)==null?void 0:pl.type)==="structureMethod"}),Aa=(z=oe.value[wa.value+y])==null?void 0:z.filter(Ma=>{var pl;return((pl=Ma==null?void 0:Ma.key)==null?void 0:pl.type)==="structure"}),A=Ba==null?void 0:Ba.find(Ma=>{var pl,ll;return((ll=(pl=Ma==null?void 0:Ma.value)==null?void 0:pl.pageData)==null?void 0:ll.method)==="保存"});if(!A)return;const W=(ae=(ee=oe.value[(N=(R=A==null?void 0:A.value)==null?void 0:R.pageData)==null?void 0:N.path])==null?void 0:ee.filter(Ma=>{var pl;return((pl=Ma==null?void 0:Ma.key)==null?void 0:pl.type)==="data"}))==null?void 0:ae.find(Ma=>{var pl,ll,ml,yl;return((ll=(pl=Ma==null?void 0:Ma.value)==null?void 0:pl.tableData)==null?void 0:ll.算法名称)===((yl=(ml=A==null?void 0:A.value)==null?void 0:ml.pageData)==null?void 0:yl.method)});if(!W)return;const Me={buttonName:(ge=(j=A==null?void 0:A.value)==null?void 0:j.pageData)==null?void 0:ge.method,api:($e=(xe=W==null?void 0:W.value)==null?void 0:xe.tableData)==null?void 0:$e.算法体,content:Aa==null?void 0:Aa.map(Ma=>{var pl;return(pl=Ma==null?void 0:Ma.value)==null?void 0:pl.pageData}),extraContent:[],extraValues:(He=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:He.data,methodName:(Ha=(ta=A==null?void 0:A.value)==null?void 0:ta.pageData)==null?void 0:Ha.path};if(!d)return;const sa={...d,compData:(za=d==null?void 0:d.compData)==null?void 0:za.map(Ma=>{var pl;return(Ma==null?void 0:Ma.key)==="formContent"?{...Ma,contents:(pl=Ma==null?void 0:Ma.contents)==null?void 0:pl.map(ll=>(ll==null?void 0:ll.prop)===h?{...ll,value:""}:ll)}:Ma})},me={key:{pageKey:wa.value+y,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:sa}},da=await Qa.axios.post(Me.api,me,{headers:{"Content-Type":"application/json"}});return((ia=da==null?void 0:da.data)==null?void 0:ia.code)===200&&(Ta=(ca=(el=da==null?void 0:da.data)==null?void 0:el.result)==null?void 0:ca.latestReportCode,fa=(ie=(Ua=da==null?void 0:da.data)==null?void 0:Ua.result)==null?void 0:ie.status),{newMainKeyValue:Ta,newStatus:fa}}catch(Ta){throw Qa.ElMessage.error(Ta),new Error(Ta)}},Nt=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const Xc=async(d,h,T)=>{var j,ge;let z=d==null?void 0:d[h==null?void 0:h.prop],R=1,N,ee;const ae=O.cloneDeep(wa).value+y+z;if(ae){Nt.value="",N=(j=oe.value[ae])==null?void 0:j.filter(Ie=>{var He;return((He=Ie==null?void 0:Ie.key)==null?void 0:He.type)==="structure"});const xe=N==null?void 0:N.find(Ie=>{var He,ta,Ha;return((Ha=(ta=(He=Ie==null?void 0:Ie.value)==null?void 0:He.pageData)==null?void 0:ta.comp)==null?void 0:Ha.toUpperCase())==="FORM"});ee={...(ge=xe==null?void 0:xe.value)==null?void 0:ge.pageData,id:xe==null?void 0:xe.id};const $e=await Jc(ee,h==null?void 0:h.prop);if(Nt.value=$e==null?void 0:$e.newStatus,$e!=null&&$e.newMainKeyValue)return $e==null?void 0:$e.newMainKeyValue}if(we.value.some(xe=>(xe==null?void 0:xe[h==null?void 0:h.prop])===z)){const xe=z;for(;we.value.some($e=>($e==null?void 0:$e[h==null?void 0:h.prop])===`${xe}(${R})`);)R++;z=`${xe}(${R})`}return z},Zc=async(d,h,T)=>{var N,ee,ae,j;let z,R;if(await Xc(T==null?void 0:T.data,T==null?void 0:T.firstCol),z=O.cloneDeep(wa).value+y,R=O.cloneDeep(z)+`loading${((N=$l.value)==null?void 0:N.account)||((ee=$l.value)==null?void 0:ee.账号)}`,h){const ge=(j=(ae=oe.value[R])==null?void 0:ae.filter(xe=>{var $e;return(($e=xe==null?void 0:xe.key)==null?void 0:$e.parentTable)===""}))==null?void 0:j.map(xe=>{var $e;return{id:xe==null?void 0:xe.id,...($e=xe==null?void 0:xe.value)==null?void 0:$e.pageData}});(ge==null?void 0:ge.length)>0||await ua.loadingConstruct(z,R,null,null,null),ea.setRouteToChildPath(O.cloneDeep(wa).value),na.setActiveMenuPath(R)}else ea.setRouteToChildPath(O.cloneDeep(wa).value),na.setActiveMenuPath(R)},Qc=()=>{qe.value=!1,Oa.value=[],Da.value=!1},Oo=d=>{var N,ee,ae,j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca,Ua,ie,Ta,fa,Ba,Aa;const h=[];se.value=O.cloneDeep(Ce.value),(ee=ua.getColumnChild((N=O.cloneDeep(Ce.value))==null?void 0:N.filter(A=>(A==null?void 0:A.label)!=="操作")))==null||ee.forEach((A,W)=>{var Me,sa,me;A!=null&&A.formType&&((Me=A==null?void 0:A.formType)==null?void 0:Me.toUpperCase())==="SELECT"||A!=null&&A.menuId?h.push({label:(sa=A==null?void 0:A.prop)!=null&&sa.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",name:(A==null?void 0:A.prop)??"t"+W,prop:A==null?void 0:A.prop,type:"Select",value:(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??W,contents:(A==null?void 0:A.options)??[],width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,relatedValueId:A==null?void 0:A.relatedValueId,disabled:A==null?void 0:A.disabled,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,allSelectionContents:(A==null?void 0:A.allSelectionContents)??[],filterContent:A==null?void 0:A.filterContent,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter}):h.push({label:(me=A==null?void 0:A.prop)!=null&&me.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",prop:A==null?void 0:A.prop,name:(A==null?void 0:A.prop)??"t"+W,type:!(A!=null&&A.formType)||(A==null?void 0:A.formType)===""?"Input":A==null?void 0:A.formType,value:(A==null?void 0:A.formType)==="Upload"?(d==null?void 0:d[A==null?void 0:A.prop])??"{}":(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??W,contents:(A==null?void 0:A.options)??[],width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,relatedValueId:A==null?void 0:A.relatedValueId,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter})}),d===""||!d||(Fa.value=(d==null?void 0:d.id)??"");let T=ua.getColumnChild((ae=O.cloneDeep(Ce.value))==null?void 0:ae.filter(A=>(A==null?void 0:A.label)!=="操作"));ra.value&&((j=ra.value)==null?void 0:j.length)>0&&(ra.value=(ge=O.cloneDeep(ra).value)==null?void 0:ge.map(A=>{var Me;let W=(A==null?void 0:A.prop)||((Me=T==null?void 0:T.find(sa=>(sa==null?void 0:sa.label)===(A==null?void 0:A.label)))==null?void 0:Me.prop);return W&&(A.value=d[W]),A})),Ae.value=ra.value&&((xe=ra.value)==null?void 0:xe.length)>0?ua.getTableFormToForm(ra.value):h,Ae.value=(($e=Ae.value)==null?void 0:$e.map(A=>({...A,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled})))??Ae.value;let z=[],R=((ta=(He=(Ie=u.itemData)==null?void 0:Ie.filter(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:He[0])==null?void 0:ta.contents)??"";if(R=Pa.analyzeSplitToContent(R,","),(R==null?void 0:R.length)>0&&(z=R.flat()),(z==null?void 0:z.length)>0){let A=z==null?void 0:z.filter(da=>da==null?void 0:da.includes("@Type"));if(A=A==null?void 0:A[(A==null?void 0:A.length)-1],(A==null?void 0:A[(A==null?void 0:A.length)-1])===","&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),A){let da=(za=(Ha=A==null?void 0:A.replace("=",E))==null?void 0:Ha.split(E))==null?void 0:za[1];((ia=da==null?void 0:da.trim())==null?void 0:ia.toUpperCase())==="MANUAL"&&(u==null||u.index,Ae.value=(el=Ae.value)==null?void 0:el.map((Ma,pl)=>Ma))}let W=(ca=Ae.value)==null?void 0:ca.filter(da=>da==null?void 0:da.mainKey),Me;W==null||W.forEach(da=>{var pl;if(Me!==void 0)return;let Ma=da==null?void 0:da.menus;((pl=W==null?void 0:W.filter(ll=>ll==null?void 0:ll.mainKey))==null?void 0:pl.length)>1&&(Me=Ma,da==null||da.groups)});let sa=[],me=new Map;if(W==null||W.forEach(da=>{var Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl,nl,hl,Sl;if((Ma=da==null?void 0:da.prop)!=null&&Ma.includes(".")){let Al=[];me.get(((ll=(pl=da==null?void 0:da.prop)==null?void 0:pl.split("."))==null?void 0:ll[0])+(da!=null&&da.isMainPath?0:1)+((ml=da==null?void 0:da.groups)==null?void 0:ml[0]))&&(Al=me.get(((Pl=(yl=da==null?void 0:da.prop)==null?void 0:yl.split("."))==null?void 0:Pl[0])+(da!=null&&da.isMainPath?0:1)+((al=da==null?void 0:da.groups)==null?void 0:al[0]))),Al.push(da),me.set(((Ka=(kl=da==null?void 0:da.prop)==null?void 0:kl.split("."))==null?void 0:Ka[0])+(da!=null&&da.isMainPath?0:1)+((fl=da==null?void 0:da.groups)==null?void 0:fl[0]),Al)}else{let Al=[];me.get("normal"+(da!=null&&da.isMainPath?0:1)+((nl=da==null?void 0:da.groups)==null?void 0:nl[0]))&&(Al=me.get("normal"+(da!=null&&da.isMainPath?0:1)+((hl=da==null?void 0:da.groups)==null?void 0:hl[0]))),Al.push(da),me.set("normal"+(da!=null&&da.isMainPath?0:1)+((Sl=da==null?void 0:da.groups)==null?void 0:Sl[0]),Al)}}),sa=Array.from(me.values()),(sa==null?void 0:sa.length)>0)for(let da in sa){let Ma=sa==null?void 0:sa[da];if((Ma==null?void 0:Ma.length)!==1){if((Ma==null?void 0:Ma.length)>1){let pl=Ma==null?void 0:Ma.map(fl=>fl==null?void 0:fl.prop),ll=Ma==null?void 0:Ma.map(fl=>fl==null?void 0:fl.label),ml=Ma==null?void 0:Ma.map(fl=>fl==null?void 0:fl.value),yl=(Ua=O.cloneDeep(Ma))==null?void 0:Ua[0],Pl=(ie=Ae.value)==null?void 0:ie.findIndex(fl=>(fl==null?void 0:fl.prop)===(yl==null?void 0:yl.prop)),al=(Ta=Ae.value)==null?void 0:Ta.slice(0,Pl),kl=(Ba=Ae.value)==null?void 0:Ba.slice(Pl,(fa=Ae.value)==null?void 0:fa.length);yl.label=ll==null?void 0:ll.join("·"),yl.value=ml==null?void 0:ml.join(" "),yl.value.trim()===""&&(yl.value=""),yl.prop=pl==null?void 0:pl.join("·");let Ka=Ma==null?void 0:Ma.map(fl=>{var nl;return(nl=fl==null?void 0:fl.words)==null?void 0:nl.join(".")});yl.relatedWords=Ka,yl.usingType="parent",kl.unshift(yl),Ae.value=[...al,...kl],Ae.value=(Aa=Ae.value)==null?void 0:Aa.map(fl=>(pl!=null&&pl.find(nl=>nl===(fl==null?void 0:fl.prop))&&(fl.isFormColHidden=!0,fl.relatedWords=Ka),fl))}}}}},eu=()=>{var h;const d=(h=s.value)==null?void 0:h.$el;d&&Pa.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var ee;const{oldIndex:z,newIndex:R}=T;if(z===R)return;const N=Cn.value.splice(z,1)[0];Cn.value.splice(R,0,N),Ce.value=(ee=Ce.value)==null?void 0:ee.slice().sort((ae,j)=>{if(ae.label==="操作")return 1;if(j.label==="操作")return-1;const ge=Cn.value.findIndex($e=>$e.label===ae.label),xe=Cn.value.findIndex($e=>$e.label===j.label);return ge-xe})}})};a.onMounted(()=>{pa.value=window.innerWidth-240*2,window.addEventListener("keydown",Yo)});const au=()=>{a.nextTick(()=>{eu()})},at=(d,h)=>{var z;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let T;return d.children=(z=d.children)==null?void 0:z.map(R=>{var N,ee;if((R==null?void 0:R.id)===Fa.value){let ae={};for(let j in R){let ge=(N=h==null?void 0:h.find(xe=>(xe==null?void 0:xe.prop)===j))==null?void 0:N.label;ge?ae[j]=(ee=sr.value)==null?void 0:ee[ge]:ae[j]=R[j]??""}R=Object.assign(ae,sr.value),T=R}else{let ae=at(R,h);R=ae==null?void 0:ae.contents,T=ae==null?void 0:ae.currentSelectContents}return R}),{contents:d,currentSelectContents:T}},Tt=(d,h)=>{let T,z;return d!=null&&d.find(R=>(R==null?void 0:R.id)===Fa.value)?T=d==null?void 0:d.map(R=>{var N,ee,ae;if((R==null?void 0:R.id)===Fa.value){let j={};for(let xe in R){let $e=(N=h==null?void 0:h.find(Ie=>(Ie==null?void 0:Ie.prop)===xe))==null?void 0:N.label;$e?j[xe]=((ee=sr.value)==null?void 0:ee[$e])??"":j[xe]=R[xe]??""}let ge=sr.value;for(let xe in j)(ae=sr.value)!=null&&ae[xe]||(ge[xe]=(j==null?void 0:j[xe])??"");R=ge,z=R}return R}):T=d==null?void 0:d.map(R=>{var N,ee,ae,j;if((R==null?void 0:R.id)===Fa.value){let ge={};for(let xe in R){let $e=(N=h==null?void 0:h.find(Ie=>(Ie==null?void 0:Ie.prop)===xe))==null?void 0:N.label;$e?ge[xe]=(ee=sr.value)==null?void 0:ee[$e]:ge[xe]=R[xe]??""}R=Object.assign(ge,sr.value),z=R}else R=(ae=at(R,h))==null?void 0:ae.contents,z=(j=at(R,h))==null?void 0:j.currentSelectContents;return R}),{newContents:T,currentSelectContents:z}},At=(d,h,T)=>{var z,R;return d[h==null?void 0:h.prop]=T,typeof d.id=="number"&&(d.id=(z=d.id)==null?void 0:z.toString()),d.children&&((R=d.children)==null?void 0:R.length)>0&&(d.children=d.children.map(At)),d},zt=d=>{var T;const h=[];return h.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((T=d.children)==null||T.forEach(z=>{h.push(...zt(z))})),(h==null?void 0:h.length)>0?h==null?void 0:h.map(z=>{const R={...z};return delete R.children,R}):[]},ti=["Pacific6000数据采集装置.通道号","通道号"],Lo=d=>{if(!d)return"";const h=ti.map(T=>d==null?void 0:d[T]).find(T=>T!=null&&String(T).trim()!=="");return h==null?"":String(h).trim()},lt=async(d,h=void 0)=>{if(!d)return!1;try{const T=He=>{var ta,Ha,za;return He?typeof(He==null?void 0:He.value)=="string"?He.value:((za=(Ha=(ta=He==null?void 0:He._custom)==null?void 0:ta.value)==null?void 0:Ha.value)==null?void 0:za.value)||"":""},z=Array.isArray(vr.value)?vr.value:[],R=T(z.find(He=>(He==null?void 0:He.condition)==="child")),N=(wa.value||"").replace(/\/+$/,""),ee=R?`${N}/${R}`:N,ae=await Wr(ee||wa.value,!1),j=String(ka.value||"").trim(),ge=He=>String(He||"").trim(),xe=(He,ta=[],Ha="")=>{if(!Array.isArray(He))return ta;for(const za of He){const ia=ge((za==null?void 0:za.choiceName)||(za==null?void 0:za.name0)||Ha);(za==null?void 0:za.comp)==="Table"&&(!j||ia===j)&&ta.push(za),Array.isArray(za==null?void 0:za.children)&&xe(za.children,ta,ia),Array.isArray(za==null?void 0:za.tab)&&xe(za.tab,ta,ia),Array.isArray(za==null?void 0:za.choice)&&xe(za.choice,ta,ia)}return ta},$e=xe(ae||[]),Ie=String((u==null?void 0:u.compName)||"");return $e.some(He=>{var Ha,za;const ta=((za=(Ha=He==null?void 0:He.compData)==null?void 0:Ha.find(ia=>(ia==null?void 0:ia.key)==="tableContents"))==null?void 0:za.contents)||[];return!Array.isArray(ta)||ta.length===0?!1:ta.some(ia=>{if(String((He==null?void 0:He.name)||"")===Ie&&(ia==null?void 0:ia.id)===h)return!1;const ca=Lo(ia);return!!ca&&ca===d})})}catch{return(we.value||[]).some(z=>{if((z==null?void 0:z.id)===h)return!1;const R=Lo(z);return!!R&&R===d})}},Ro=async(d=!0,h,T)=>{var ge,xe,$e,Ie,He,ta,Ha,za,ia,el,ca,Ua,ie,Ta,fa,Ba,Aa,A,W,Me,sa,me,da,Ma,pl,ll,ml,yl,Pl,al,kl;if(sr.value){const Ka=(xe=ua.getColumnChild((ge=O.cloneDeep(Ce.value))==null?void 0:ge.filter(nl=>(nl==null?void 0:nl.label)!=="操作")))==null?void 0:xe.filter(nl=>(nl==null?void 0:nl.required)===!0);for(let nl=0;nl<((Ka==null?void 0:Ka.length)??0);nl++){const hl=Ka[nl],Sl=hl==null?void 0:hl.prop,Al=(hl==null?void 0:hl.label)??Sl,kr=($e=sr.value)==null?void 0:$e[Sl];if(kr===""||kr===null||kr===void 0||Array.isArray(kr)&&kr.length===0){Qa.ElMessage.error(`${Al}不能为空`);return}}const fl=Lo(sr.value);if(fl&&await lt(fl,Fa.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=ua.getColumnChild((Ie=O.cloneDeep(Ce.value))==null?void 0:Ie.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")),R,N=O.cloneDeep(we.value);if(!sr.value){Qe.value=!1;return}if(Fa.value===""){he.value++;let Ka;Ka={id:he.value.toString()};try{Ka.sort=Mn(0,we.value||[])}catch{}Ka!=null&&Ka.children&&(Ka={...Ka,children:(He=Ka.children)==null?void 0:He.map(nl=>At(nl,h,T))});const fl=Object.assign(sr.value,Ka);N.unshift(fl),R=fl}else N=(ta=Tt(N,z))==null?void 0:ta.newContents,R=(Ha=Tt(N,z))==null?void 0:Ha.currentSelectContents;const ee=(za=u.itemData)==null?void 0:za.filter(Ka=>(Ka==null?void 0:Ka.key)==="childTree")[0];if(((ia=ee==null?void 0:ee.contents)==null?void 0:ia.length)>0){Te.value="编辑";const Ka=[];N==null||N.forEach((hl,Sl)=>{var kr;let Al={};if(Array.isArray(hl)){let Rl=[];hl==null||hl.filter(wl=>!(wl!=null&&wl.id)).forEach((wl,Ml)=>{var Gl,zl,Kl,Ql,ql,pr,Ur;if((zl=(Gl=Or.value)==null?void 0:Gl[Ml])!=null&&zl.prop&&!Array.isArray(wl)){let fr={};fr[Or.value[Ml].column]=wl,qa!=null&&qa.value&&((Kl=qa==null?void 0:qa.value)==null?void 0:Kl.length)>0&&((Ql=qa==null?void 0:qa.value)!=null&&Ql.find(ir=>JSON.stringify(ir==null?void 0:ir[0])===JSON.stringify(fr)))&&(Rl=(ql=qa==null?void 0:qa.value)==null?void 0:ql.find(ir=>JSON.stringify(ir==null?void 0:ir[0])===JSON.stringify(fr))),Rl&&Rl.length>0?Al[Or.value[Ml].prop]=Rl!=null&&Rl.find(ir=>{var cr;return((cr=Object.keys(ir))==null?void 0:cr[0])===Or.value[Ml].column})?(pr=Rl==null?void 0:Rl.find(ir=>{var cr;return((cr=Object.keys(ir))==null?void 0:cr[0])===Or.value[Ml].column}))==null?void 0:pr[Or.value[Ml].column]:wl:Al[Or.value[Ml].prop]=wl}else Array.isArray(wl)&&((Ur=Or.value[Ml])!=null&&Ur.prop?Al[Or.value[Ml].prop]=wl:Al.children=ht(wl,Or.value))})}else Al=hl;if(Array.isArray(hl)&&hl.some(Rl=>Rl==null?void 0:Rl.id)){const Rl=(kr=hl==null?void 0:hl.find(wl=>wl.id))==null?void 0:kr.id;Ka.push(Object.assign(Al,{id:li(Rl)}))}else Al.id?Ka.push(Al):Ka.push(Object.assign(Al,{id:Sl.toString()}))});const fl=(we.value||[]).map(hl=>String(hl==null?void 0:hl.id)),nl=ri(Ka,fl);we.value=Lt(nl,ee,Ce.value)}It(we.value),Gr.value=we.value;const ae=hf(Gr.value,vn.value,N);let j=[];if(P.value?(j=(el=O.cloneDeep(P).value.singleContent)==null?void 0:el.filter(Ka=>(Ka==null?void 0:Ka.id)!==(R==null?void 0:R.id)),j.push(R)):j=[R],Il.value){const Ka={content:ae,singleContent:((ca=ee==null?void 0:ee.contents)==null?void 0:ca.length)>0?j==null?void 0:j.flatMap(zt):j,index:u==null?void 0:u.index,buttonName:"编辑",column:Ce.value,parentTableId:u==null?void 0:u.parentTableId};ea.setCacheUpdatingData(Ka)}if((Ua=Ce.value)==null||Ua.forEach(Ka=>{(Ka==null?void 0:Ka.formType)==="Upload"&&(R[Ka.prop]=R[Ka.prop]===""?"{}":typeof R[Ka.prop]!="string"?JSON.stringify(R[Ka.prop]):R[Ka.prop])}),d){(Ba=(fa=(Ta=(ie=u.itemData)==null?void 0:ie.find(nl=>(nl==null?void 0:nl.key)==="filterAllType"))==null?void 0:Ta.value)==null?void 0:fa.find(nl=>(nl==null?void 0:nl.value)==="onConditionContents"))==null||Ba.content;let Ka=(Aa=u.itemData)==null?void 0:Aa.filter(nl=>(nl==null?void 0:nl.key)==="filterAllType");Ka=Array.from(new Map(Ka.filter(Boolean).map((nl,hl)=>[nl.value,{...nl,_idx:hl}])).values()).sort((nl,hl)=>nl._idx-hl._idx).map(({_idx:nl,...hl})=>hl),Ka=(A=Ka==null?void 0:Ka[(Ka==null?void 0:Ka.length)-1])==null?void 0:A.value;const fl={fixContent:[R],buttonName:Te.value,relatedContents:u==null?void 0:u.related,columns:Ce.value,name:u==null?void 0:u.groupNames};ea.setTableLoading(u==null?void 0:u.index),Qe.value=!1,sr.value=void 0,Ne("change",fl)}if((sa=(Me=(W=Ae.value)==null?void 0:W[0])==null?void 0:Me.optionUrl)!=null&&sa.menuId){Qe.value=!1;let Ka=(me=u.itemData)==null?void 0:me.filter(fl=>(fl==null?void 0:fl.key)==="filterAllType");if((Ka==null?void 0:Ka.length)>0){let fl=Ka==null?void 0:Ka.map(Sl=>Sl==null?void 0:Sl.value),nl=(pl=(Ma=(da=fl.flat().find(Sl=>{var Al;return(Al=Sl==null?void 0:Sl.content)==null?void 0:Al.includes("@Num")}))==null?void 0:da.content)==null?void 0:Ma.split(":"))==null?void 0:pl[1];((yl=(ml=(ll=fl.flat().find(Sl=>{var Al;return(Al=Sl==null?void 0:Sl.content)==null?void 0:Al.includes("@Type:")}))==null?void 0:ll.content)==null?void 0:ml.split(":"))==null?void 0:yl[1])!=="Manual"&&(nl=parseInt(nl),we.value=(kl=we.value)==null?void 0:kl.slice(((Pl=we.value)==null?void 0:Pl.length)-nl,(al=we.value)==null?void 0:al.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Yo),Ce.value=[],we.value=[],se.value=[],Ca.value=[],ra.value=[],$a.value=[],Oa.value=[],Va.value=[],Ae.value=[],or.value=[],s.value=null,Tn.value=""});const si=async(d,h,T)=>{var He,ta,Ha,za,ia,el,ca,Ua,ie,Ta,fa,Ba,Aa;jl.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const z=O.cloneDeep(u.itemData),R=((He=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:He.contents)??[];let N=R==null?void 0:R.find((A,W)=>{var Me,sa,me;return(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value||(W==null?void 0:W.toString())===((me=(sa=(Me=jl.value)==null?void 0:Me.split("a"))==null?void 0:sa[1])==null?void 0:me.toString())});const ee=ua.getColumnChild((ta=O.cloneDeep(Ce.value))==null?void 0:ta.filter(A=>(A==null?void 0:A.label)!=="操作"));if(N||(N=ee==null?void 0:ee.find(A=>(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value)),N&&!((Ha=N==null?void 0:N.menus)!=null&&Ha.length)&&!((za=N==null?void 0:N.groups)!=null&&za.length)&&!((ia=N==null?void 0:N.words)!=null&&ia.length)){const A=(el=Ae.value)==null?void 0:el.find(W=>(W==null?void 0:W.prop)===jl.value);A&&(N={...N,menus:(A==null?void 0:A.menus)??(N==null?void 0:N.menus),groups:(A==null?void 0:A.groups)??(N==null?void 0:N.groups),words:(A==null?void 0:A.words)??(N==null?void 0:N.words),bindMenus:(A==null?void 0:A.bindMenus)??(N==null?void 0:N.bindMenus),isMainPath:(A==null?void 0:A.isMainPath)??(N==null?void 0:N.isMainPath),relatedContents:(A==null?void 0:A.relatedContents)??(N==null?void 0:N.relatedContents),endChildMenu:(A==null?void 0:A.endChildMenu)??(N==null?void 0:N.endChildMenu)})}if(N&&((ca=Ae==null?void 0:Ae.value)==null||ca.forEach(A=>{var W,Me,sa,me,da;(A==null?void 0:A.prop)===(N==null?void 0:N.prop)&&(A!=null&&A.endChildMenu)&&((W=N==null?void 0:N.prop)!=null&&W.includes(".")&&((sa=(Me=N==null?void 0:N.prop)==null?void 0:Me.split("."))==null?void 0:sa[0])!==((da=(me=A==null?void 0:A.prop)==null?void 0:me.split("."))==null?void 0:da[0])?N.endChildMenu=A==null?void 0:A.value:N.endChildMenu=A==null?void 0:A.endChildMenu)})),!N)return;const ae=jl.value,j=(Ua=we.value)==null?void 0:Ua.findIndex(A=>(A==null?void 0:A.id)===(h==null?void 0:h.id));j!==-1&&ae&&(we.value[j]={...we.value[j],[ae]:d});const ge=A=>{Array.isArray(A)&&A.forEach(W=>{Array.isArray(W==null?void 0:W.allSelectionContents)&&W.allSelectionContents.length>0&&(W.contactValue=we.value[j]??h),Array.isArray(W==null?void 0:W.children)&&W.children.length>0&&ge(W.children)})};ge(Ce.value),N.value=d,N.endChildMenu=N.endChildMenu||"";let xe=N!=null&&N.isMainPath&&(N!=null&&N.mainKey)?N==null?void 0:N.value:"";const $e=A=>{Array.isArray(A)&&A.forEach(W=>{var sa,me;if(((W==null?void 0:W.type)==="Select"||(W==null?void 0:W.formType)&&W.formType.toUpperCase()==="SELECT"||(W==null?void 0:W.columnType)&&W.columnType.toUpperCase()==="SELECT")&&Array.isArray(W==null?void 0:W.menus)&&W.menus.length>0&&W.menus[W.menus.length-1]===""&&(N!=null&&N.isMainPath)&&(N!=null&&N.mainKey)){const da=(sa=W==null?void 0:W.prop)!=null&&sa.includes(".")?W.prop.split(".")[0]:null,Ma=(me=N==null?void 0:N.prop)!=null&&me.includes(".")?N.prop.split(".")[0]:null;(!da||!Ma||da===Ma)&&(W.endChildMenu=xe)}Array.isArray(W==null?void 0:W.children)&&W.children.length>0&&$e(W.children)})};if($e(Ce.value),!!(N!=null&&N.mainKey)&&Array.isArray(N==null?void 0:N.menus)&&(N==null?void 0:N.menus.length)>0&&(N!=null&&N.value)&&(N==null?void 0:N.value)!==""){let A=N!=null&&N.relatedContents&&((ie=N==null?void 0:N.relatedContents)==null?void 0:ie.length)>0?(Ta=N==null?void 0:N.relatedContents)==null?void 0:Ta.find(W=>{var Me,sa,me,da;return(W==null?void 0:W[(da=(Me=N==null?void 0:N.prop)==null?void 0:Me.split("."))==null?void 0:da[((me=(sa=N==null?void 0:N.prop)==null?void 0:sa.split("."))==null?void 0:me.length)-1]])===(N==null?void 0:N.value)}):await is(N);if(A){const W={...h};ee==null||ee.forEach(Me=>{var sa,me,da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl,nl,hl,Sl;(Me==null?void 0:Me.prop)!==(N==null?void 0:N.prop)&&(N!=null&&N.relatedContents&&((sa=N==null?void 0:N.relatedContents)==null?void 0:sa.length)>0?(me=Me==null?void 0:Me.prop)!=null&&me.includes(".")&&((Ma=(da=Me==null?void 0:Me.prop)==null?void 0:da.split("."))==null?void 0:Ma[0])===((ll=(pl=N==null?void 0:N.prop)==null?void 0:pl.split("."))==null?void 0:ll[0])?W[Me.prop]=A[(al=(ml=Me==null?void 0:Me.prop)==null?void 0:ml.split("."))==null?void 0:al[((Pl=(yl=Me==null?void 0:Me.prop)==null?void 0:yl.split("."))==null?void 0:Pl.length)-1]]??W[Me.prop]:W[Me.prop]=(A==null?void 0:A[Me.prop])??W[Me.prop]:Pa.same((N==null?void 0:N.menus)??[],(Me==null?void 0:Me.menus)??[])&&Pa.same((N==null?void 0:N.groups)??[],(Me==null?void 0:Me.groups)??[])&&!Pa.same((N==null?void 0:N.words)??[],(Me==null?void 0:Me.words)??[])?(kl=Me==null?void 0:Me.prop)!=null&&kl.includes(".")&&((fl=(Ka=Me==null?void 0:Me.prop)==null?void 0:Ka.split("."))==null?void 0:fl[0])!==((hl=(nl=N==null?void 0:N.prop)==null?void 0:nl.split("."))==null?void 0:hl[0])||(W[Me.prop]=(A==null?void 0:A[(Sl=Me==null?void 0:Me.words)==null?void 0:Sl.join(".")])??(A==null?void 0:A[Me.prop])??W[Me.prop]):(!(Me!=null&&Me.isMainPath)&&Pa.same((N==null?void 0:N.bindMenus)??[],(Me==null?void 0:Me.bindMenus)??[]),W[Me.prop]=(A==null?void 0:A[Me.prop])??W[Me.prop]))}),we.value=(fa=O.cloneDeep(we.value))==null?void 0:fa.map(Me=>(Me==null?void 0:Me.id)===(h==null?void 0:h.id)?{...W,id:Me==null?void 0:Me.id}:Me)}}if((Ba=N==null?void 0:N.optionUrl)!=null&&Ba.menuSelect){let A="";ee==null||ee.forEach(sa=>{var me,da,Ma,pl,ll;A===""&&((Ma=(da=(me=sa==null?void 0:sa.optionUrl)==null?void 0:me.groupSelect)==null?void 0:da[1])!=null&&Ma.includes("["))&&(A=(ll=(pl=sa==null?void 0:sa.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:ll[1])});let W=await vt(N),Me;if(W==null||W.forEach(sa=>{var me,da,Ma,pl,ll,ml,yl,Pl,al,kl;A===((da=(me=N==null?void 0:N.optionUrl)==null?void 0:me.groupSelect)==null?void 0:da[1])&&((ll=(pl=(Ma=N==null?void 0:N.optionUrl)==null?void 0:Ma.groupSelect)==null?void 0:pl[1])!=null&&ll.includes("["))&&((kl=O.cloneDeep(sa))==null?void 0:kl[(al=(Pl=(yl=(ml=N==null?void 0:N.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:al.replaceAll("]","")])===(N==null?void 0:N.value)&&(Me=sa)}),Me){const sa={...h};ee==null||ee.forEach(me=>{var da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl;(Me!=null&&Me[me==null?void 0:me.label]||Me!=null&&Me[(ll=(pl=(Ma=(da=me==null?void 0:me.optionUrl)==null?void 0:da.groupSelect)==null?void 0:Ma[1])==null?void 0:pl.replaceAll("[",""))==null?void 0:ll.replaceAll("]","")])&&((Pl=(yl=(ml=me==null?void 0:me.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])!=null&&Pl.includes("["))&&(sa[me.prop]=(Me==null?void 0:Me[me==null?void 0:me.label])||(Me==null?void 0:Me[(fl=(Ka=(kl=(al=me==null?void 0:me.optionUrl)==null?void 0:al.groupSelect)==null?void 0:kl[1])==null?void 0:Ka.replaceAll("[",""))==null?void 0:fl.replaceAll("]","")]))}),we.value=(Aa=O.cloneDeep(we.value))==null?void 0:Aa.map(me=>(me==null?void 0:me.id)===(h==null?void 0:h.id)?{...sa,id:me==null?void 0:me.id}:me)}}},lu=async d=>{var He,ta,Ha,za,ia,el,ca,Ua,ie,Ta,fa,Ba,Aa,A;if(!d)return;const h=O.cloneDeep(sr.value||{});sr.value=d;const T=Lo(h),z=Lo(sr.value);if(z&&z!==T&&await lt(z,Fa.value||void 0)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),ti.forEach(Me=>{if(Object.prototype.hasOwnProperty.call(sr.value||{},Me)||Object.prototype.hasOwnProperty.call(h||{},Me)){const sa=(h==null?void 0:h[Me])??"";sr.value[Me]=sa,d[Me]=sa}}),Ae.value=(Ae.value||[]).map(Me=>{if(!(Me!=null&&Me.prop)||!ti.includes(Me.prop))return Me;const sa=(h==null?void 0:h[Me.prop])??"";return{...Me,value:sa,selectValue:sa===""?[]:[sa]}});return}let R=O.cloneDeep(u.itemData);R==null||R.map(W=>{var Me,sa,me,da;return(W==null?void 0:W.key)==="header"&&(Array.isArray((Me=W.contents)==null?void 0:Me[0])?W.contents=(me=ua.getColumnChild((sa=W.contents)==null?void 0:sa[0]))==null?void 0:me.map((Ma,pl)=>{var ll,ml,yl,Pl,al,kl;return((yl=(ml=(ll=Ae.value)==null?void 0:ll.find(Ka=>(Ka==null?void 0:Ka.prop)===(Ma==null?void 0:Ma.prop)))==null?void 0:ml.optionUrl)==null?void 0:yl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[pl])?Ma.value=[(al=Object.values(d))==null?void 0:al[pl]]:Ma.value=(kl=Object.values(d))==null?void 0:kl[pl],Ma}):W.contents=(da=W.contents)==null?void 0:da.map((Ma,pl)=>{var ll,ml,yl,Pl,al,kl;return((yl=(ml=(ll=Ae.value)==null?void 0:ll.find(Ka=>(Ka==null?void 0:Ka.prop)===(Ma==null?void 0:Ma.prop)))==null?void 0:ml.optionUrl)==null?void 0:yl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[pl])?Ma.value=[(al=Object.values(d))==null?void 0:al[pl]]:Ma.value=(kl=Object.values(d))==null?void 0:kl[pl],Ma})),W});let N=Ae.value,ee=(He=R==null?void 0:R.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:He.contents;if(jl.value||(N=N==null?void 0:N.map(W=>{var Me;return W.value=W.value??((Me=ee==null?void 0:ee.find((sa,me)=>(sa==null?void 0:sa.prop)===(W==null?void 0:W.name)))==null?void 0:Me.value),W})),!$r.value)return;let ae=O.cloneDeep(jl.value);(ta=jl.value)!=null&&ta.includes("·")&&(jl.value=(za=(Ha=jl.value)==null?void 0:Ha.split("·"))==null?void 0:za[0]);let j=(el=(ia=R==null?void 0:R.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:ia.contents)==null?void 0:el.find((W,Me)=>(W==null?void 0:W.prop)===jl.value);(ca=Ae==null?void 0:Ae.value)==null||ca.forEach(W=>{var Me,sa,me,da,Ma,pl,ll,ml,yl;(W==null?void 0:W.prop)===(j==null?void 0:j.prop)&&(W!=null&&W.endChildMenu)&&((Me=j==null?void 0:j.prop)!=null&&Me.includes(".")&&((me=(sa=j==null?void 0:j.prop)==null?void 0:sa.split("."))==null?void 0:me[0])!==((Ma=(da=W==null?void 0:W.prop)==null?void 0:da.split("."))==null?void 0:Ma[0])?j.endChildMenu=(ll=(pl=W==null?void 0:W.value)==null?void 0:pl.split(" "))==null?void 0:ll[0]:j.endChildMenu=(yl=(ml=W==null?void 0:W.endChildMenu)==null?void 0:ml.split(" "))==null?void 0:yl[0])});let ge=j!=null&&j.isMainPath&&(j!=null&&j.mainKey)?j==null?void 0:j.value:"",xe=N,$e=ye.value;if($e!=null&&$e.find(W=>(j==null?void 0:j.prop)===(W==null?void 0:W.key))&&($e=$e==null?void 0:$e.filter(W=>(j==null?void 0:j.prop)!==(W==null?void 0:W.key))),$e!=null&&$e.find(W=>ae===(W==null?void 0:W.key))&&($e=$e==null?void 0:$e.filter(W=>ae!==(W==null?void 0:W.key))),(j==null?void 0:j.formType)==="Select"&&(xe=xe==null?void 0:xe.map(W=>{var Me,sa,me,da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl,nl,hl;return(W==null?void 0:W.type)==="Select"&&(((Me=W==null?void 0:W.allSelectionContents)==null?void 0:Me.length)>0&&(W.contactValue=d),((j==null?void 0:j.prop)===(W==null?void 0:W.prop)||ae===(W==null?void 0:W.prop))&&j&&(Array.isArray(j.value)&&((sa=j.value)==null?void 0:sa.length)>0&&((me=j.value)!=null&&me.every(Sl=>typeof Sl=="string"))?($e.push({key:W==null?void 0:W.prop,value:[(Ma=j.value)==null?void 0:Ma[((da=j.value)==null?void 0:da.length)-1]]}),W.selectValue=(pl=$e==null?void 0:$e.find(Sl=>(Sl==null?void 0:Sl.key)===(W==null?void 0:W.prop)))==null?void 0:pl.value):Array.isArray(j.value)&&((ll=j.value)==null?void 0:ll.length)===0?($e=[],W.selectValue=[],d[W==null?void 0:W.prop]=""):Array.isArray(W.value)&&$e.push({key:W==null?void 0:W.prop,value:[(ml=W.value)==null?void 0:ml[(W==null?void 0:W.length)-1]]})),((Pl=W==null?void 0:W.menus)==null?void 0:Pl[((yl=W==null?void 0:W.menus)==null?void 0:yl.length)-1])===""&&(j!=null&&j.isMainPath)&&(j!=null&&j.mainKey)&&((al=W==null?void 0:W.prop)!=null&&al.includes(".")&&((Ka=(kl=W==null?void 0:W.prop)==null?void 0:kl.split("."))==null?void 0:Ka[0])!==((nl=(fl=j==null?void 0:j.prop)==null?void 0:fl.split("."))==null?void 0:nl[0])||(W.endChildMenu=(hl=ge==null?void 0:ge.split(" "))==null?void 0:hl[0]))),W.value=(d==null?void 0:d[W==null?void 0:W.prop])??(W==null?void 0:W.value),W})),ye.value=$e,xe!=null&&xe.some(W=>(W==null?void 0:W.functionName)&&(W==null?void 0:W.functionName)!=="")){let W=await ft([d],Ce==null?void 0:Ce.value,"Auto",we.value),Me=[];(Ua=xe==null?void 0:xe.filter(me=>(me==null?void 0:me.functionName)&&(me==null?void 0:me.functionName)!==""))==null||Ua.forEach(me=>{var da;((da=me==null?void 0:me.functionRelatedWords)==null?void 0:da.length)>0&&(Me=[...Me,...me==null?void 0:me.functionRelatedWords])}),Me=Me==null?void 0:Me.filter(me=>(me==null?void 0:me[0])!=="@");let sa=[];for(let me in W==null?void 0:W[0])Me!=null&&Me.find(da=>me===da||(me==null?void 0:me.includes("."+da)))&&sa.push(((ie=W==null?void 0:W[0])==null?void 0:ie[me])!=="");(W==null?void 0:W.length)>0&&sa.every(me=>me)&&(xe=xe==null?void 0:xe.map(me=>{var da;return me.value=((da=W==null?void 0:W[0])==null?void 0:da[me==null?void 0:me.prop])??me.value,me})),sr.value=W==null?void 0:W[0]}if(Ae.value=xe,j=Object.assign({},j??{},{relatedWords:(fa=(Ta=Ae==null?void 0:Ae.value)==null?void 0:Ta.find(W=>(W==null?void 0:W.prop)===(j==null?void 0:j.prop)))==null?void 0:fa.relatedWords}),(j==null?void 0:j.mainKey)&&(j!=null&&j.value)&&(j==null?void 0:j.value)!==""){let W=j!=null&&j.relatedContents&&((Ba=j==null?void 0:j.relatedContents)==null?void 0:Ba.length)>0?(Aa=j==null?void 0:j.relatedContents)==null?void 0:Aa.find(Me=>{var sa,me,da,Ma;return(Me==null?void 0:Me[(Ma=(sa=j==null?void 0:j.prop)==null?void 0:sa.split("."))==null?void 0:Ma[((da=(me=j==null?void 0:j.prop)==null?void 0:me.split("."))==null?void 0:da.length)-1]])===(j==null?void 0:j.value)}):await is(j);if(W&&JSON.stringify(W)!=="{}"){let Me=xe;Me=Me==null?void 0:Me.map(me=>{var da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl,nl,hl,Sl,Al,kr,Rl,wl,Ml,Gl,zl;if((j==null?void 0:j.prop)===(me==null?void 0:me.prop))me.value=(W==null?void 0:W[(da=me==null?void 0:me.words)==null?void 0:da.join(".")])??(W==null?void 0:W[me==null?void 0:me.prop])??W[(ml=(Ma=me==null?void 0:me.prop)==null?void 0:Ma.split("."))==null?void 0:ml[((ll=(pl=me==null?void 0:me.prop)==null?void 0:pl.split("."))==null?void 0:ll.length)-1]];else if(j!=null&&j.relatedContents&&((yl=j==null?void 0:j.relatedContents)==null?void 0:yl.length)>0)me.value=(Pl=me==null?void 0:me.prop)!=null&&Pl.includes(".")&&((kl=(al=me==null?void 0:me.prop)==null?void 0:al.split("."))==null?void 0:kl[0])===((fl=(Ka=j==null?void 0:j.prop)==null?void 0:Ka.split("."))==null?void 0:fl[0])?W[(Al=(nl=me==null?void 0:me.prop)==null?void 0:nl.split("."))==null?void 0:Al[((Sl=(hl=me==null?void 0:me.prop)==null?void 0:hl.split("."))==null?void 0:Sl.length)-1]]:(W==null?void 0:W[me==null?void 0:me.prop])??(me==null?void 0:me.value);else if(Pa.same((j==null?void 0:j.menus)??[],(me==null?void 0:me.menus)??[])&&Pa.same((j==null?void 0:j.groups)??[],(me==null?void 0:me.groups)??[])&&!Pa.same((j==null?void 0:j.words)??[],(me==null?void 0:me.words)??[]))if((kr=me==null?void 0:me.prop)!=null&&kr.includes(".")&&((wl=(Rl=me==null?void 0:me.prop)==null?void 0:Rl.split("."))==null?void 0:wl[0])!==((Gl=(Ml=j==null?void 0:j.prop)==null?void 0:Ml.split("."))==null?void 0:Gl[0])){let Kl=Object.keys(W);Kl=Kl==null?void 0:Kl.find(Ql=>{var ql;return Ql==null?void 0:Ql.includes("."+((ql=me==null?void 0:me.words)==null?void 0:ql.join(".")))}),me.value=(W==null?void 0:W[Kl])??(W==null?void 0:W[me==null?void 0:me.prop])??me.value}else{let Kl=Object.keys(W);Kl=Kl==null?void 0:Kl.find(Ql=>{var ql;return Ql==null?void 0:Ql.includes("."+((ql=me==null?void 0:me.words)==null?void 0:ql.join(".")))}),me.value=(W==null?void 0:W[(zl=me==null?void 0:me.words)==null?void 0:zl.join(".")])??(W==null?void 0:W[Kl])??(W==null?void 0:W[me==null?void 0:me.prop])??me.value}else!(me!=null&&me.isMainPath)&&Pa.same((j==null?void 0:j.bindMenus)??[],(me==null?void 0:me.bindMenus)??[]),me.value=(W==null?void 0:W[me==null?void 0:me.prop])??me.value;return me}),Ae.value=Me;let sa={};(A=Ae.value)==null||A.forEach(me=>{sa[me.prop]=me==null?void 0:me.value}),sr.value=sa}}$r.value=!0,U.value=!1},ru=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",nu=d=>{var N,ee;const h=(ee=(N=ra.value)==null?void 0:N.find(ae=>(ae==null?void 0:ae.label)===(d==null?void 0:d.label)))==null?void 0:ee.multiple,T=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;we.value.forEach(ae=>{const j=ae==null?void 0:ae[T];h&&_i.isString(j)&&(ae[T]=[j]),!h&&!_i.isString(j)&&(ae[T]="")})},Mt=(d,h)=>{var T;return h==null||h.forEach(z=>{d[z==null?void 0:z.prop]=z==null?void 0:z.value}),d.children&&((T=d.children)==null?void 0:T.length)>0&&(d.children=d.children.map(z=>Mt(z,h))),d},rt=d=>{var T,z,R,N,ee,ae;Oo("");const h=(T=Ae.value)==null?void 0:T.reduce((j,ge)=>(j[ge.name]=ge.value,j),{});if(((z=Object.keys(h))==null?void 0:z.length)>0){sr.value=h,Fa.value="",he.value=(R=we.value)==null?void 0:R.length,Va.value=(N=ue.value)==null?void 0:N.filter(ge=>(ge==null?void 0:ge.label)!=="新增");const j=(ae=(ee=se.value)==null?void 0:ee.filter(ge=>(ge==null?void 0:ge.label)!=="操作"))==null?void 0:ae.map(ge=>{var $e,Ie,He;const xe=(Ie=($e=ra.value)==null?void 0:$e.find(ta=>(ta==null?void 0:ta.label)===(ge==null?void 0:ge.label)))==null?void 0:Ie.multiple;return nu(ge),{...ge,contents:(ge==null?void 0:ge.options)??[],optionUrl:ge!=null&&ge.formMenuSelect&&((He=ge==null?void 0:ge.formMenuSelect)==null?void 0:He.length)>0?{groupSelect:ge==null?void 0:ge.groupSelect,menuSelect:ge==null?void 0:ge.formMenuSelect,selectRelateType:"",type:ge==null?void 0:ge.formType,multiple:xe}:null}});Ce.value=j==null?void 0:j.map(ge=>Mt(ge,[{prop:"type",value:"edit"},{prop:"columnType",value:ru(ge==null?void 0:ge.formType)||(ge==null?void 0:ge.columnType)}])),d==="createClick"&&(Te.value="新增",Ro(!0))}},ho={START:"开始时间",END:"结束时间",HOURS:"工时"},ou=(d,h)=>Number($n.dayjs(h).diff($n.dayjs(d),"day",!0).toFixed(1)),It=d=>{var N;const h=u.itemData,T=(N=h==null?void 0:h.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:N.contents,z=new Map;return T==null||T.forEach((ee,ae)=>{const{label:j}=ee;z.set(j,ae)}),!z.has(ho.START)||!z.has(ho.END)||!z.has(ho.HOURS)?d:d==null?void 0:d.map(ee=>{const ae=ee==null?void 0:ee[ho.START],j=ee==null?void 0:ee[ho.END],ge=ou(ae,j);return ae&&j&&(ee[ho.HOURS]=`${ge}天`),ee})},Ot=(d,h,T=0)=>{if(T>((h==null?void 0:h.length)??""))return d;const z=h==null?void 0:h[T],R=new Map;for(const ee of d){const ae=ee[z];R.has(ae)||R.set(ae,[]),R.get(ae)&&R.get(ae).push(ee)}const N=[];for(const[ee,ae]of R){const[j,...ge]=ae,xe={...j};T+1===((h==null?void 0:h.length)??"")?xe.children=ae==null?void 0:ae.map($e=>($e.level=O.cloneDeep(T)+1,$e)).filter(($e,Ie)=>Ie!==0):ge.length>0&&(xe.children=Ot(ge,h,T+1)),xe.level=T,N.push(xe)}return N},Lt=(d,h,T)=>{var R;if(!(h!=null&&h.contents)||((R=h==null?void 0:h.contents)==null?void 0:R.length)===0)return d;let z=[];return z=Ot(d,h==null?void 0:h.contents,0),z},Rt=async(d,h)=>{var za,ia,el,ca,Ua,ie,Ta,fa,Ba,Aa,A,W,Me,sa,me,da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl,nl,hl,Sl,Al,kr,Rl,wl,Ml,Gl,zl,Kl,Ql,ql,pr,Ur,fr,ir,cr,Vt,Pt,Ft;const T=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="header");d==null||d.filter(ba=>(ba==null?void 0:ba.key)==="tableIndexColumn")[0];const z=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="childTree")[0];let R=!0;if((el=(ia=(za=d==null?void 0:d.find(ba=>(ba==null?void 0:ba.key)==="filterAllType"))==null?void 0:za.value)==null?void 0:ia.find(ba=>(ba==null?void 0:ba.value)==="onPamButtonContents"))!=null&&el.content){let ba=(ie=(Ua=(ca=d==null?void 0:d.find(Dl=>(Dl==null?void 0:Dl.key)==="filterAllType"))==null?void 0:ca.value)==null?void 0:Ua.find(Dl=>(Dl==null?void 0:Dl.value)==="onPamButtonContents"))==null?void 0:ie.content;ba=(Ta=ba==null?void 0:ba.split(":"))==null?void 0:Ta[1],ba=(fa=ba.slice(1,(ba==null?void 0:ba.length)-1))==null?void 0:fa.split(","),R=!!(ba!=null&&ba.find(Dl=>Dl==="操作"))}const N=d==null?void 0:d.find(ba=>(ba==null?void 0:ba.key)==="page"),ee=d==null?void 0:d.find(ba=>(ba==null?void 0:ba.key)==="rowButton"),ae=d==null?void 0:d.find(ba=>(ba==null?void 0:ba.key)==="extraButton"),j=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="tableContents"),ge=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="bottomButton"),xe=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="tableIndex");ra.value=(Aa=(Ba=d==null?void 0:d.filter(ba=>(ba==null?void 0:ba.key)==="tableToForm"))==null?void 0:Ba[0])==null?void 0:Aa.contents,Ze.value=(N==null?void 0:N.contents)??!0;let $e=[];Hl.value===""?$e=T==null?void 0:T[0]:$e=(T==null?void 0:T.find(ba=>(ba==null?void 0:ba.selectLabel)==="("+Hl.value+")"))??(T==null?void 0:T.find(ba=>!(ba!=null&&ba.selectLabel)));let Ie=[];Hl.value===""?Ie=xe==null?void 0:xe[0]:Ie=(xe==null?void 0:xe.find(ba=>(ba==null?void 0:ba.selectLabel)==="("+Hl.value+")"))??(xe==null?void 0:xe.find(ba=>!(ba!=null&&ba.selectLabel)));let He=[],ta=[];if(((A=$e==null?void 0:$e.contents)==null?void 0:A.length)>0){let ba=[],Dl=$e==null?void 0:$e.contents;if(Array.isArray(Dl==null?void 0:Dl[0])&&((W=Dl==null?void 0:Dl[0])!=null&&W.every(ol=>!(ol!=null&&ol.children)))&&(Dl=Dl==null?void 0:Dl[0]),Dl.some(ol=>Array.isArray(ol)&&(ol==null?void 0:ol.find(Ke=>Ke.children))))ba=(Me=ua.getGradeColumns(Dl,R))==null?void 0:Me[0],ba!=null&&ba.find(ol=>(ol==null?void 0:ol.label)==="操作")||ba.push({label:"操作",prop:"operate",type:"operate"});else{let ol=Dl.some(Ke=>Array.isArray(Ke))?Dl==null?void 0:Dl[0]:Dl;ol!=null&&ol.find(Ke=>(Ke==null?void 0:Ke.label)==="操作")||ol.push({label:"操作",prop:"operate",type:"operate"}),ol==null||ol.forEach((Ke,Zl)=>{var Lr,Br,Rr,Cr,lo,yo,go,gr,yn,qn,bo,ln,Wn,qt,Wt,Kt,Gt,Yt,Jt,Xt;if((Br=(Lr=wa.value)==null?void 0:Lr.split("/"))==null||Br.forEach(er=>{var hr,Dn,Zt;er!==""&&((Zt=(Dn=(hr=er==null?void 0:er.split(y+"updateLoading"))==null?void 0:hr[0])==null?void 0:Dn.split(y+"loading"))==null||Zt[0])}),Ke!=null&&Ke.methodContent){let er=(lo=(Cr=(Rr=Ke==null?void 0:Ke.methodContent)==null?void 0:Rr.replace("@","%%#"))==null?void 0:Cr.split("%%#"))==null?void 0:lo[1];if(er=er==null?void 0:er.slice(0,(er==null?void 0:er.length)-1),er=ua.contentTransArrayToAllNoExtra(er??"",","),(yo=er==null?void 0:er.find(hr=>hr==null?void 0:hr.includes("@Button")))!=null&&yo.includes("Prop")&&((go=er==null?void 0:er.find(hr=>hr==null?void 0:hr.includes("Type")))!=null&&go.includes("Manual"))){let hr=(yn=(gr=er==null?void 0:er.find(Dn=>Dn==null?void 0:Dn.includes("@Button")))==null?void 0:gr.split(":"))==null?void 0:yn[1];hr=((ln=(bo=(qn=hr==null?void 0:hr.replaceAll("[",""))==null?void 0:qn.replaceAll("]",""))==null?void 0:bo.split(","))==null?void 0:ln[1])??"算法执行",He.push(hr)}else if((Wn=er==null?void 0:er.find(hr=>hr==null?void 0:hr.includes("@Button")))!=null&&Wn.includes("Row")&&((qt=er==null?void 0:er.find(hr=>hr==null?void 0:hr.includes("Type")))!=null&&qt.includes("Manual"))){let hr=(Kt=(Wt=er==null?void 0:er.find(Dn=>Dn==null?void 0:Dn.includes("@Button")))==null?void 0:Wt.split(":"))==null?void 0:Kt[1];hr=((Jt=(Yt=(Gt=hr==null?void 0:hr.replaceAll("[",""))==null?void 0:Gt.replaceAll("]",""))==null?void 0:Yt.split(","))==null?void 0:Jt[1])??"算法执行",ta.push(hr)}}(Xt=ra.value)==null||Xt.find(er=>(er==null?void 0:er.prop)===(Ke==null?void 0:Ke.prop)),ba.push({label:(Ke==null?void 0:Ke.label)==="操作"?R?"操作":"":(Ke==null?void 0:Ke.label)??"",prop:(Ke==null?void 0:Ke.label)==="操作"?"operate":(Ke==null?void 0:Ke.prop)??"a"+Zl,width:Ke!=null&&Ke.width?parseInt(Ke.width):"",fixed:(Ke==null?void 0:Ke.fixed)??void 0,sortable:(Ke==null?void 0:Ke.sortable)??!1,filterable:(Ke==null?void 0:Ke.filterable)??!1,operable:(Ke==null?void 0:Ke.operable)??!1,showSummary:(Ke==null?void 0:Ke.showSummary)??!1,align:(Ke==null?void 0:Ke.align)??"left",showOverflowTooltip:(Ke==null?void 0:Ke.showOverflowTooltip)??!0,isNotDrag:(Ke==null?void 0:Ke.isNotDrag)??!1,isEditCol:(Ke==null?void 0:Ke.isEditCol)??!1,isOperate:(Ke==null?void 0:Ke.isOperate)??!1,id:(Ke==null?void 0:Ke.id)??Zl,type:(Ke==null?void 0:Ke.label)==="操作"?"operate":void 0,formType:(Ke==null?void 0:Ke.formType)??(Ke!=null&&Ke.groupSelect?"Select":""),disabled:Ke==null?void 0:Ke.disabled,options:(Ke==null?void 0:Ke.options)??[],value:(Ke==null?void 0:Ke.value)??"",isExistChild:(Ke==null?void 0:Ke.isExistChild)??!1,mainKey:(Ke==null?void 0:Ke.mainKey)??Zl===0,allSelectionContents:(Ke==null?void 0:Ke.allContents)??[],filterContent:Ke==null?void 0:Ke.filterContents,menus:Ke==null?void 0:Ke.menus,groups:Ke==null?void 0:Ke.groups,words:Ke==null?void 0:Ke.words,filter:Ke==null?void 0:Ke.filter,bindMenus:Ke==null?void 0:Ke.bindMenus,fatherPath:Ke==null?void 0:Ke.fatherPath,isMainPath:Ke==null?void 0:Ke.isMainPath,required:(Ke==null?void 0:Ke.required)??!1,relatedContents:Ke==null?void 0:Ke.relatedContents,functionName:Ke==null?void 0:Ke.functionName,functionRelatedWords:Ke==null?void 0:Ke.functionRelatedWords,calculatorFilter:Ke==null?void 0:Ke.calculatorFilter,relatedPages:Ke==null?void 0:Ke.relatedPages})})}I.value=(sa=ge==null?void 0:ge[0])==null?void 0:sa.contents;const tn=ua.getNewColumnChild(ba),jt=ol=>Array.isArray(ol)?ol.map(Ke=>(Array.isArray(Ke==null?void 0:Ke.children)&&Ke.children.length>0?(Ke.sortable=!1,jt(Ke.children)):(Ke==null?void 0:Ke.prop)==="operate"||(Ke==null?void 0:Ke.label)==="操作"||(Ke==null?void 0:Ke.type)==="operate"||(Ke.sortable=!1),Ke)):ol;jt(tn),await ji(tn),Lf(Q.value,tn),Ce.value=tn,Ca.value=tn,r.value=(me=Ce.value)==null?void 0:me.map(ol=>ol==null?void 0:ol.label);let sn=(Ma=(da=ua.getAllLeafNodes(Ce.value))==null?void 0:da.filter(ol=>(ol==null?void 0:ol.type)!=="operate"))==null?void 0:Ma.map((ol,Ke)=>({prop:(ol==null?void 0:ol.prop)??"a"+Ke,column:ol.label}));Or.value=sn;let an=[];Hl.value===""?an=j==null?void 0:j[0]:an=(j==null?void 0:j.find(ol=>(ol==null?void 0:ol.selectLabel)==="("+Hl.value+")"))??(j==null?void 0:j.find(ol=>!(ol!=null&&ol.selectLabel)));let ao=Array.isArray((pl=an==null?void 0:an.contents)==null?void 0:pl[0])&&((ll=an==null?void 0:an.contents)!=null&&ll[0].every(ol=>Array.isArray(ol)))?(ml=an==null?void 0:an.contents)==null?void 0:ml[0]:an==null?void 0:an.contents;Ie!=null&&Ie.contents&&((yl=Ie==null?void 0:Ie.contents)==null?void 0:yl.length)!==0&&(ao=(Pl=O.cloneDeep(ao))==null?void 0:Pl.map((ol,Ke)=>{if(!Array.isArray(ol)){let Zl={};for(let Lr in ol)Lr!=="id"&&Lr!=="index"&&(Zl[Lr]=ol[Lr]);ol=Object.values(Zl)}return ol}));const gu=!!((al=Ce.value)!=null&&al.find(ol=>ol.prop==="index"));ao=lc(ao,Ie==null?void 0:Ie.contents,gu);const vo=[];ao==null||ao.forEach((ol,Ke)=>{var Lr;let Zl={};if(Array.isArray(ol)){let Br=[];ol==null||ol.filter(Rr=>!(Rr!=null&&Rr.id)).forEach((Rr,Cr)=>{var lo,yo,go,gr,yn,qn;if((lo=sn==null?void 0:sn[Cr])!=null&&lo.prop&&!Array.isArray(Rr)){let bo={};bo[sn[Cr].column]=Rr,qa!=null&&qa.value&&((yo=qa==null?void 0:qa.value)==null?void 0:yo.length)>0&&((go=qa==null?void 0:qa.value)!=null&&go.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(bo)))&&(Br=(gr=qa==null?void 0:qa.value)==null?void 0:gr.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(bo))),Br&&Br.length>0?Zl[sn[Cr].prop]=Br!=null&&Br.find(ln=>{var Wn;return((Wn=Object.keys(ln))==null?void 0:Wn[0])===sn[Cr].column})?(yn=Br==null?void 0:Br.find(ln=>{var Wn;return((Wn=Object.keys(ln))==null?void 0:Wn[0])===sn[Cr].column}))==null?void 0:yn[sn[Cr].column]:Rr:Zl[sn[Cr].prop]=Rr}else Array.isArray(Rr)&&((qn=sn[Cr])!=null&&qn.prop?Zl[sn[Cr].prop]=Rr:Zl.children=ht(Rr,sn))})}else Zl=ol;if(Array.isArray(ol)&&ol.some(Br=>Br==null?void 0:Br.id)){const Br=(Lr=ol==null?void 0:ol.find(Rr=>Rr.id))==null?void 0:Lr.id;vo.push(Object.assign(Zl,{id:li(Br)}))}else Zl.id?vo.push(Zl):vo.push(Object.assign(Zl,{id:Ke.toString()}))});try{const ol=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ke=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Zl=ol==null?void 0:ol.tableId,Lr=ol==null?void 0:ol.compIndex;if(Zl&&Array.isArray(Ke)&&Ke.length>0&&String(Zl)===String(u==null?void 0:u.parentTableId)&&String(Lr)===String(u==null?void 0:u.index)){const Br=new Set(vo.map(Cr=>String(Cr==null?void 0:Cr.id))),Rr=Ke.filter(Cr=>!Br.has(String(Cr)));if(Rr.length>0){const Cr=ol==null?void 0:ol.pageKey,lo=Cr!=null&&Cr.startsWith("/")?Cr.substring(1):Cr;((h==null?void 0:h[Cr])||(h==null?void 0:h[lo])||[]).filter(gr=>{var yn,qn;return((yn=gr==null?void 0:gr.key)==null?void 0:yn.type)==="data"&&String((qn=gr==null?void 0:gr.key)==null?void 0:qn.tableId)===String(Zl)&&Rr.includes(gr==null?void 0:gr.id)}).forEach(gr=>{var yn;Br.has(String(gr==null?void 0:gr.id))||(vo.push({id:gr==null?void 0:gr.id,...((yn=gr==null?void 0:gr.value)==null?void 0:yn.tableData)||{}}),Br.add(String(gr==null?void 0:gr.id)))})}}}catch{}let mo=null;try{const ol=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ke=JSON.parse(sessionStorage.getItem(ol)||"null");Array.isArray(Ke)&&Ke.length>0&&(mo=new Set(Ke.map(Zl=>String(Zl))))}catch{}const Ht=Array.from(((kl=ya.value)==null?void 0:kl.values())||[]).filter(ol=>!(!(ol!=null&&ol._isOCRRow&&(ol==null?void 0:ol._ocrTableId)===(u==null?void 0:u.index))||mo&&mo.has(String(ol==null?void 0:ol.id)))),bu=(we.value||[]).map(ol=>String(ol==null?void 0:ol.id)),Ut=ri(vo,bu);if(we.value=Lt(Ut,z,Ce.value),Ea.value=Ut,(Ka=Ea.value)==null||Ka.forEach(ol=>{var Ke;(Ke=ya.value)==null||Ke.set(ol.id,ol)}),mo&&mo.size>0)try{const ol=new Set(Array.from(mo.values()));we.value=(we.value||[]).filter(Ke=>!ol.has(String(Ke==null?void 0:Ke.id))),Ea.value=(Ea.value||[]).filter(Ke=>!ol.has(String(Ke==null?void 0:Ke.id))),ol.forEach(Ke=>{var Zl,Lr;try{(Lr=(Zl=ya.value)==null?void 0:Zl.delete)==null||Lr.call(Zl,Ke)}catch{}})}catch{}const ci=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),nt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(ci&&Array.isArray(nt)&&nt.length>0&&String(ci==null?void 0:ci.compIndex)===String(u==null?void 0:u.index)){const ol=new Set((Ea.value||[]).map(Ke=>String(Ke==null?void 0:Ke.id)));nt.filter(Ke=>!ol.has(String(Ke)))}if(Ht.length>0){const ol=new Set((we.value||[]).map(Zl=>Zl==null?void 0:Zl.id)),Ke=Ht.filter(Zl=>!ol.has(Zl.id));Ke.length>0&&(we.value=[...we.value||[],...Ke],Ea.value=[...Ea.value||[],...Ke],Ke.forEach(Zl=>{var Lr;return(Lr=ya.value)==null?void 0:Lr.set(Zl.id,Zl)}))}}else Ce.value=[],se.value=[],we.value=[],Ea.value=[],ya.value=new Map;if(ta=[...new Set(ta)],ta=ta==null?void 0:ta.map(ba=>({label:ba,type:"methodButton"})),((fl=ee==null?void 0:ee.contents)==null?void 0:fl.length)>0?$a.value=ee==null?void 0:ee.contents:$a.value=[],$a.value=[...$a.value,...ta],He=[...new Set(He)],He=He==null?void 0:He.map(ba=>({label:ba,type:"methodButton"})),((nl=ae==null?void 0:ae.contents)==null?void 0:nl.length)>0)if((Al=(Sl=(hl=d==null?void 0:d.find(ba=>(ba==null?void 0:ba.key)==="filterAllType"))==null?void 0:hl.value)==null?void 0:Sl.find(ba=>(ba==null?void 0:ba.value)==="onButtonContents"))!=null&&Al.content){let ba=(wl=(Rl=(kr=d==null?void 0:d.find(Dl=>(Dl==null?void 0:Dl.key)==="filterAllType"))==null?void 0:kr.value)==null?void 0:Rl.find(Dl=>(Dl==null?void 0:Dl.value)==="onButtonContents"))==null?void 0:wl.content;if(ba=(Ml=ba==null?void 0:ba.split(":"))==null?void 0:Ml[1],ba=(Gl=ba.slice(1,(ba==null?void 0:ba.length)-1))==null?void 0:Gl.split(","),Va.value=(zl=ae==null?void 0:ae.contents)==null?void 0:zl.filter(Dl=>ba==null?void 0:ba.find(tn=>tn===(Dl==null?void 0:Dl.label))),ue.value=(Kl=ae==null?void 0:ae.contents)==null?void 0:Kl.filter(Dl=>ba==null?void 0:ba.find(tn=>tn===(Dl==null?void 0:Dl.label))),(Ql=ae==null?void 0:ae.contents)!=null&&Ql.some(Dl=>(Dl==null?void 0:Dl.label)==="OCR识别")&&!((ql=Va.value)!=null&&ql.some(Dl=>(Dl==null?void 0:Dl.label)==="OCR识别"))){const Dl=(pr=ae==null?void 0:ae.contents)==null?void 0:pr.find(tn=>(tn==null?void 0:tn.label)==="OCR识别");Va.value=[...Va.value,Dl],ue.value=[...ue.value,Dl]}C.value=!!(ba!=null&&ba.find(Dl=>Dl==="搜索")),F.value=!!(ba!=null&&ba.find(Dl=>Dl==="块状显示"))}else Va.value=ae==null?void 0:ae.contents,ue.value=ae==null?void 0:ae.contents;else Va.value=[],ue.value=[];Va.value=[...Va.value,...He],ue.value=[...ue.value,...He],typeof wa.value=="string"&&wa.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((Ur=Va.value)!=null&&Ur.some(ba=>(ba==null?void 0:ba.label)==="OCR识别")||(Va.value=[...Va.value||[],{label:"OCR识别"}]),(fr=ue.value)!=null&&fr.some(ba=>(ba==null?void 0:ba.label)==="OCR识别")||(ue.value=[...ue.value||[],{label:"OCR识别"}])):(Va.value=(Va.value||[]).filter(ba=>(ba==null?void 0:ba.label)!=="OCR识别"),ue.value=(ue.value||[]).filter(ba=>(ba==null?void 0:ba.label)!=="OCR识别")),(ir=Va.value)!=null&&ir.some(ba=>(ba==null?void 0:ba.label)==="切换视图")||(Va.value=[...Va.value||[],{label:"切换视图"}]),(cr=ue.value)!=null&&cr.some(ba=>(ba==null?void 0:ba.label)==="切换视图")||(ue.value=[...ue.value||[],{label:"切换视图"}]),he.value=((Vt=we==null?void 0:we.value)==null?void 0:Vt.length)??0,It(we.value),Gr.value=we.value,Il.value&&(Ce.value=(Ft=(Pt=se.value)==null?void 0:Pt.filter(ba=>(ba==null?void 0:ba.label)!=="操作"))==null?void 0:Ft.map(ba=>{var Dl;return{...ba,type:"edit",optionUrl:ba!=null&&ba.formMenuSelect&&((Dl=ba==null?void 0:ba.formMenuSelect)==null?void 0:Dl.length)>0?{groupSelect:ba==null?void 0:ba.groupSelect,menuSelect:ba==null?void 0:ba.formMenuSelect,selectRelateType:"",type:ba==null?void 0:ba.formType}:null}}),rt())};a.watch(()=>[u.itemData,Hl.value,bn.value,vn.value,qa==null?void 0:qa.value],async()=>{var d,h,T,z,R,N;if((d=u==null?void 0:u.itemData)!=null&&d.find(ee=>(ee==null?void 0:ee.key)==="columnPath")&&!((h=V.value)!=null&&h.find(ee=>{var ae,j;return(ee==null?void 0:ee.key)===((j=(ae=u==null?void 0:u.itemData)==null?void 0:ae.find(ge=>(ge==null?void 0:ge.key)==="columnPath"))==null?void 0:j.contents)}))){let ee=V.value,ae={key:(z=(T=u==null?void 0:u.itemData)==null?void 0:T.find(j=>(j==null?void 0:j.key)==="columnPath"))==null?void 0:z.contents,value:(N=(R=u==null?void 0:u.itemData)==null?void 0:R.find(j=>(j==null?void 0:j.key)==="columnUsingPath"))==null?void 0:N.contents};ee!=null&&ee.find(j=>(j==null?void 0:j.key)===(ae==null?void 0:ae.key))?ee=ee==null?void 0:ee.map(j=>((j==null?void 0:j.key)===(ae==null?void 0:ae.key)&&(j.value=ae.value),j)):ee.push(ae),ea.setTableViewContents(ee)}await Rt(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&(Oo(d==null?void 0:d.form),Te.value=d==null?void 0:d.dialogTitle,xa.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const iu=()=>{var d;(d=L.value)!=null&&d.includes("read")&&(Il.value=!Il.value)},tu=()=>{mr.value=!mr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var h;L.value=d,(d==null?void 0:d.length)===0?Il.value=!1:(d!=null&&d.includes("read")||(Il.value=!0),d!=null&&d.includes("edit")||(Il.value=!1)),x.value=((h=u==null?void 0:u.config)==null?void 0:h.showIndex)||Il.value},{immediate:!0}),a.watch(()=>Il.value,d=>{var h;d?(rt("viewChange"),ea.setCacheUpdatingData(null)):(Va.value=ue.value,Ce.value=Ca.value,P.value&&(ea.setTableLoading(u==null?void 0:u.index),Ne("change",P.value))),x.value=d||((h=u==null?void 0:u.config)==null?void 0:h.showIndex),or.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Fn.value)==null?void 0:d.length},d=>{d===0&&(pe.currentPage=1)}),a.watch(()=>u==null?void 0:u.compNames,d=>{t.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),a.ref(!1);const su=(d,h)=>{var T;rt("createClick"),h===pe.pageSize&&(pe.currentPage=Math.ceil(((T=we.value)==null?void 0:T.length)/pe.pageSize))},cu=async(d,h,T)=>{var R,N,ee,ae,j;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop);if(z&&ti.includes(z)&&T!==void 0&&T!==null&&String(T).trim()!==""){const ge=String(T).trim();if(await lt(ge,d==null?void 0:d.id)){Qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const $e=(R=we.value)==null?void 0:R.findIndex(He=>(He==null?void 0:He.id)===(d==null?void 0:d.id)),Ie=$e!==-1?(ee=(N=we.value)==null?void 0:N[$e])==null?void 0:ee[z]:void 0;z&&(d[z]=Ie??"");return}}if(Il.value){const ge=d==null?void 0:d.id;ge!=null&&(m.value.has(ge)||m.value.set(ge,O.cloneDeep(d)),c.value.add(ge));const xe=(ae=we.value)==null?void 0:ae.findIndex($e=>($e==null?void 0:$e.id)===(d==null?void 0:d.id));xe!==-1&&z&&(we.value[xe]={...we.value[xe],[z]:T}),si(T,d,h);return}si(T,d,h),sr.value=O.cloneDeep(d),Fa.value=d==null?void 0:d.id,he.value=(j=we.value)==null?void 0:j.length,Te.value=d!=null&&d._isTemp?"新增":"编辑",Ro(!1)},uu=async()=>{var d,h;try{const T=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const R=z.split("_")[1];R&&(T.push(`content_${R}`),T.push(`struct_${R}`))}})),T.length===0&&(u!=null&&u.itemData)){const z=(h=(d=u.itemData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:h.contents;z&&(T.push(`content_${z}`),T.push(`struct_${z}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},du=async(d,h,T)=>{var N,ee;if(!T||typeof T!="string"||T.trim()===""){const ae=(h==null?void 0:h.property)??(h==null?void 0:h.prop),j=`${d==null?void 0:d.id}:${ae}`;p.value.delete(j),g.value.set(j,!1);return}const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),R=`${d==null?void 0:d.id}:${z}`;g.value.set(R,!0);try{const ae=await uu();if(ae.length===0){console.warn("未找到同名表,跳过全局搜索"),p.value.delete(R),g.value.set(R,!1);return}const j=parseInt((N=$l.value)==null?void 0:N.plat_id);if(!j){console.warn("platId 无效,跳过全局搜索"),p.value.delete(R),g.value.set(R,!1);return}const ge=await O.getAllTables({platId:j,tableNames:ae}),xe=((ee=ge==null?void 0:ge.data)==null?void 0:ee.result)||[],$e=[],Ie=[];for(let He=0;He<xe.length;He+=2)He+1<xe.length&&Ie.push([xe[He],xe[He+1]]);Ie.forEach(([He,ta])=>{var Ua;if(!Array.isArray(He)||He.length===0||!Array.isArray(ta)||ta.length===0)return;const Ha=ta[0];let za=((Ua=Ha==null?void 0:Ha.结构)==null?void 0:Ua.contents)??[];if(!Array.isArray(za)||za.length===0)return;let ia=O.cloneDeep(za);if(Array.isArray(ia==null?void 0:ia[0])&&(ia=ua.getColumnChild(ia[0])),!Array.isArray(ia)||ia.length===0||!ia.some(ie=>(ie==null?void 0:ie.prop)===z))return;[...He].sort((ie,Ta)=>{const fa=Number((ie==null?void 0:ie.update_time)??0);return Number((Ta==null?void 0:Ta.update_time)??0)-fa}).slice(0,20).forEach(ie=>{const Ta=ie[z];if(Ta!=null){const fa=String(Ta);fa.toLowerCase().includes(T.toLowerCase())&&$e.findIndex(Aa=>{var A;return ie.id&&((A=Aa.rowData)==null?void 0:A.id)===ie.id?!0:Aa.label===fa})===-1&&$e.push({label:fa,rowData:O.cloneDeep(ie),sourceTable:(Ha==null?void 0:Ha.source_table)||""})}})}),p.value.set(R,$e)}catch(ae){console.error("全局搜索建议失败:",ae),p.value.delete(R)}finally{g.value.set(R,!1)}},pu=(d,h,T)=>{if(!Il.value)return;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),R=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"";if(R&&R.toUpperCase()!=="INPUT"&&R!=="")return;const N=`${d==null?void 0:d.id}:${z}`;if(v.has(N)&&clearTimeout(v.get(N)),!T||T.trim()===""){p.value.delete(N),g.value.set(N,!1);return}const ee=setTimeout(()=>{du(d,{prop:z,property:z},T),v.delete(N)},300);v.set(N,ee)};function fu(d,h){const T=`${d==null?void 0:d.id}:${(h==null?void 0:h.property)??(h==null?void 0:h.prop)}`;return p.value.get(T)||[]}const hu=(d,h,T)=>{var xe;if(!T||!T.rowData)return;const z=T.rowData,R=d==null?void 0:d.id,N=(h==null?void 0:h.property)??(h==null?void 0:h.prop),ae=(ua.getAllLeafNodes(Ce.value)||[]).filter($e=>($e==null?void 0:$e.type)!=="operate"&&($e==null?void 0:$e.label)!=="操作"&&($e==null?void 0:$e.prop)!=="operate");ae.forEach($e=>{const Ie=$e==null?void 0:$e.prop;Ie&&z[Ie]!==void 0&&(d[Ie]=z[Ie])});const j=(xe=we.value)==null?void 0:xe.findIndex($e=>($e==null?void 0:$e.id)===R);j!==-1&&ae.forEach($e=>{const Ie=$e==null?void 0:$e.prop;Ie&&z[Ie]!==void 0&&(we.value[j][Ie]=z[Ie])}),R!=null&&(m.value.has(R)||m.value.set(R,O.cloneDeep(d)),c.value.add(R));const ge=`${R}:${N}`;p.value.delete(ge),g.value.set(ge,!1),si(d[N],d,h)},Hr=d=>{var j,ge,xe,$e,Ie,He,ta,Ha,za,ia,el;const{row:h,column:T,item:z,slotData:R}=d;let N=h!=null&&h[T==null?void 0:T.prop]||(h==null?void 0:h[T==null?void 0:T.prop])===0?((ge=(j=h==null?void 0:h[T==null?void 0:T.prop])==null?void 0:j[0])==null?void 0:ge.contents)??((h==null?void 0:h[T==null?void 0:T.prop])===0?"0":h==null?void 0:h[T==null?void 0:T.prop]):(($e=(xe=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:xe[0])==null?void 0:$e.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((He=(Ie=R==null?void 0:R[z==null?void 0:z.prop])==null?void 0:Ie[0])==null?void 0:He.contents)??(R==null?void 0:R[z==null?void 0:z.prop])??((za=(Ha=h==null?void 0:h[(ta=z==null?void 0:z.child)==null?void 0:ta.prop])==null?void 0:Ha[0])==null?void 0:za.contents)??(h==null?void 0:h[(ia=z==null?void 0:z.child)==null?void 0:ia.prop]),ae=Array.isArray(N)&&!(N!=null&&N.every(ca=>typeof ca=="string"||typeof ca=="number"))?"查看":N;if(ae=Array.isArray(ae)?ae.join(","):ae,(T==null?void 0:T.formType)==="Date")if(!ae||ae===""||ae===null||ae===void 0)ae="";else{const ca=$n.dayjs(ae,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ae=ca.isValid()?ca.format("YYYYMMDD"):ae??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((el=T==null?void 0:T.relatedPages)==null?void 0:el.length)>0&&(ae="详情页"),ae},vu=d=>{var ge,xe,$e,Ie,He,ta,Ha,za,ia,el;const{row:h,column:T,item:z,slotData:R}=d;let N=h!=null&&h[T==null?void 0:T.prop]?((xe=(ge=h==null?void 0:h[T==null?void 0:T.prop])==null?void 0:ge[0])==null?void 0:xe.contents)??(h==null?void 0:h[T==null?void 0:T.prop]):((Ie=($e=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:$e[0])==null?void 0:Ie.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((ta=(He=R==null?void 0:R[z==null?void 0:z.prop])==null?void 0:He[0])==null?void 0:ta.contents)??(R==null?void 0:R[z==null?void 0:z.prop])??((ia=(za=h==null?void 0:h[(Ha=z==null?void 0:z.child)==null?void 0:Ha.prop])==null?void 0:za[0])==null?void 0:ia.contents)??(h==null?void 0:h[(el=z==null?void 0:z.child)==null?void 0:el.prop]);const ae=Array.isArray(N)&&!(N!=null&&N.every(ca=>typeof ca=="string"||typeof ca=="number")),j=Array.isArray(N)&&(N==null?void 0:N.find(ca=>ca==null?void 0:ca.url));return ae&&j},mu=d=>{var R,N;if(!(d!=null&&d.column))return!1;const h=wa.value==="试验任务/任务管理",T=(u==null?void 0:u.compName)==="任务列表",z=((R=d==null?void 0:d.column)==null?void 0:R.label)==="任务状态"||((N=d==null?void 0:d.column)==null?void 0:N.prop)==="任务状态";return h&&T&&z},yu=(d,h)=>d.find(T=>Object.values(T).some(z=>z===h));return a.watch(()=>ze.value,async d=>{if(d){na.setContentLoading(!0),await a.nextTick();const h=yu(we.value,d==null?void 0:d.data);if(!h)return na.setContentLoading(!1);await Un(d==null?void 0:d.data,null,h,{data:d==null?void 0:d.data}),na.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.cacheNewData,d=>{var h;d&&(Array.isArray(d)?d.forEach(T=>{var z,R,N,ee,ae;if(换,String(T==null?void 0:T.compId)===String(u==null?void 0:u.index)&&(T!=null&&T.resId)&&((z=T==null?void 0:T.data)!=null&&z.id)){const j=(R=T==null?void 0:T.data)==null?void 0:R.id,ge=T==null?void 0:T.resId;if(we.value=(N=we.value)==null?void 0:N.map(xe=>{if((xe==null?void 0:xe.id)===j){const $e={...xe,id:ge};return delete $e._isOCRRow,delete $e._ocrTableId,$e}return xe}),(ae=(ee=ya.value)==null?void 0:ee.has)!=null&&ae.call(ee,j)){const $e={...ya.value.get(j)||{},id:ge};delete $e._isOCRRow,delete $e._ocrTableId,ya.value.delete(j),ya.value.set(ge,$e)}ha(u==null?void 0:u.index,j,ge)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(we.value=(h=we.value)==null?void 0:h.map(T=>{var z;if((T==null?void 0:T.id)===((z=d==null?void 0:d.data)==null?void 0:z.id)){const R={...T,id:d==null?void 0:d.resId};return delete R._isOCRRow,delete R._ocrTableId,R}return T})))},{immediate:!0,deep:!0}),(d,h)=>{var ia,el,ca,Ua;const T=a.resolveComponent("svg-icon"),z=a.resolveComponent("el-popover"),R=a.resolveComponent("el-switch"),N=a.resolveComponent("el-checkbox"),ee=a.resolveComponent("el-radio"),ae=a.resolveComponent("el-radio-group"),j=a.resolveComponent("el-checkbox-group"),ge=a.resolveComponent("el-button"),xe=a.resolveComponent("el-icon"),$e=a.resolveComponent("el-progress"),Ie=a.resolveComponent("el-alert"),He=a.resolveComponent("el-table-column"),ta=a.resolveComponent("el-table"),Ha=a.resolveComponent("el-upload"),za=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",x0,[Pr.value?(a.openBlock(),a.createBlock(dl.ssTable,{id:"excel-table",pageObj:pe,showIndex:x.value,isTree:(ia=l.compItem)==null?void 0:ia.isTree,summaryInfo:Y,columns:Ce.value,defaultSort:X,isCardViewport:mr.value,checkedColumns:r.value,key:rn.value+Ce.value,tableData:Fn.value,isEditViewport:Il.value,isShowPagination:Ze.value,isShowEdit:!1,isShowDelete:!1,allowSelect:_.value,onDbClickRow:ni,extraButton:Va.value,rowButton:$a.value,cacheExtraButtons:ue.value,isClearSelection:((el=or.value)==null?void 0:el.length)===0,onDoCurrentChange:mn,onDoSizeChange:To,onSortChange:Ii,onContentClick:Un,onRowClick:oi,onSelectChange:Pi,onCellChange:cu,onCellInput:pu,onSelectSuggest:hu,onChange:si,onPreview:Hn,onSubmitEditingTable:Jo,onHandleColEditChange:Ko,onHandleColTypeChange:Go,onClickButton:In,onAddNewRow:Fr,bottomButton:I.value},a.createSlots({headerButton:a.withCtx(ie=>{var Ta,fa;return[l.showHeader?(a.openBlock(),a.createBlock(Zp,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(te)===a.unref(wa),filterValues:Wi.value,selectNums:(Ta=or.value)==null?void 0:Ta.length,dataNums:(fa=we.value)==null?void 0:fa.length,compName:l.compName,isDevMode:l.isDevMode,buttons:ie.buttons,onButtonClick:h[1]||(h[1]=(Ba,Aa,A)=>In(Ba,Aa,{extra:A})),columns:Ce.value,onFilter:Ki,onGetImportData:Li,level:l.level,filterShow:C.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var ie,Ta,fa,Ba;return[((ie=we.value)==null?void 0:ie.length)>0&&l.allowOperate&&F.value?(a.openBlock(),a.createElementBlock("div",C0,[(Ta=L.value)!=null&&Ta.includes("read")&&((fa=L.value)!=null&&fa.includes("edit"))&&((Ba=$a.value)!=null&&Ba.some(Aa=>(Aa==null?void 0:Aa.label)==="编辑"))&&!mr.value&&a.unref(te)!==a.unref(wa)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:iu},[a.createVNode(T,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:ie,index:Ta})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:fa=>su(ie,Ta)},[a.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,E0)]),operateCol:a.withCtx(()=>[a.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:au},{reference:a.withCtx(()=>[a.createElementVNode("span",S0,[a.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",D0,[h[20]||(h[20]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(R,{"model-value":k.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:h[2]||(h[2]=ie=>Zo(ie))},null,8,["model-value"]),h[21]||(h[21]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(j,{modelValue:r.value,"onUpdate:modelValue":h[3]||(h[3]=ie=>r.value=ie),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Cn.value,ie=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ie.label},[a.createVNode(N,{value:ie.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:ie.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(ie.label),9,B0)]),_:2},1032,["value"]),a.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(T,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ta;return[a.createElementVNode("div",N0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ta=Object.keys(ie))==null?void 0:Ta.filter(fa=>{var Ba;return(Ba=G.value)==null?void 0:Ba.find(Aa=>(Aa==null?void 0:Aa.value)===fa)}),fa=>{var Ba,Aa;return a.openBlock(),a.createElementBlock("div",{key:fa},[H[fa]=="radio"?(a.openBlock(),a.createElementBlock("div",T0,[h[19]||(h[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(ae,{"model-value":ie==null?void 0:ie[fa],onChange:A=>En(A,fa,ie)},{default:a.withCtx(()=>{var A,W;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((W=(A=G.value)==null?void 0:A.find(Me=>(Me==null?void 0:Me.value)===fa))==null?void 0:W.options,Me=>(a.openBlock(),a.createBlock(ee,{key:Me==null?void 0:Me.value,label:Me==null?void 0:Me.value,value:Me==null?void 0:Me.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Me==null?void 0:Me.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),H[fa]=="switch"?(a.openBlock(),a.createBlock(R,{key:1,"model-value":ie==null?void 0:ie[fa],"active-text":(Aa=(Ba=G.value)==null?void 0:Ba.find(A=>(A==null?void 0:A.value)===fa))==null?void 0:Aa.label,onChange:A=>En(A,fa,ie)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",A0,[a.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(ie=>{var Ta,fa,Ba,Aa,A,W,Me,sa,me,da,Ma,pl,ll,ml,yl,Pl,al,kl,Ka,fl;return[((Ta=ie==null?void 0:ie.column)==null?void 0:Ta.label)==="证书附件"||((fa=ie==null?void 0:ie.column)==null?void 0:fa.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",z0,[a.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(nl=>Yr(ie),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):vu(ie)?(a.openBlock(),a.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",M0,a.toDisplayString(Hr(ie)),1)]),default:a.withCtx(()=>{var nl,hl;return[a.createElementVNode("div",I0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((hl=ie==null?void 0:ie.row)==null?void 0:hl[(nl=ie==null?void 0:ie.column)==null?void 0:nl.prop],Sl=>(a.openBlock(),a.createElementBlock("div",O0,[a.createElementVNode("div",{class:"prop-url",title:Qn(Sl),onClick:Al=>Ui(Sl)},a.toDisplayString(Qn(Sl)),9,L0),a.createElementVNode("div",{class:"prop-download",onClick:Al=>co(Sl)}," 下载 ",8,R0)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[mu(ie)?(a.openBlock(),a.createBlock(Tu,{key:0,value:Hr(ie)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Hr(ie))&&((Aa=(Ba=Hr(ie))==null?void 0:Ba.toString())!=null&&Aa.includes(".txt")||(W=(A=Hr(ie))==null?void 0:A.toString())!=null&&W.includes(".cpt")||(sa=(Me=Hr(ie))==null?void 0:Me.toString())!=null&&sa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Hr(ie))&&((da=(me=Hr(ie))==null?void 0:me.toString())!=null&&da.includes(".txt")||(pl=(Ma=Hr(ie))==null?void 0:Ma.toString())!=null&&pl.includes(".cpt")||(ml=(ll=Hr(ie))==null?void 0:ll.toString())!=null&&ml.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Hr(ie))&&((Pl=(yl=Hr(ie))==null?void 0:yl.toString())!=null&&Pl.includes(".txt")||(kl=(al=Hr(ie))==null?void 0:al.toString())!=null&&kl.includes(".cpt")||(fl=(Ka=Hr(ie))==null?void 0:Ka.toString())!=null&&fl.includes(".cyd"))?"pointer":"",marginLeft:(ie==null?void 0:ie.colIndex)===0?`${((ie==null?void 0:ie.level)??0)*20}px`:0}),onClick:nl=>{var hl;return zn(Hr(ie),((hl=ie==null?void 0:ie.column)==null?void 0:hl.relatedPages)??[])}},a.toDisplayString(Hr(ie)===0?"0":Hr(ie)),13,$0))],64))]}),_:2},[((ca=$a.value)==null?void 0:ca.length)>0?{name:"actions",fn:a.withCtx(({item:ie,fIndex:Ta})=>[a.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:h[0]||(h[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",w0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(qi($a.value,ie),(fa,Ba)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:Ba,onClick:a.withModifiers(Aa=>In(fa==null?void 0:fa.label,ie,{extra:fa}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:fa==null?void 0:fa.textColor}),class:"extra-button-label"},a.toDisplayString(fa==null?void 0:fa.label),5)],8,_0))),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),Il.value?(a.openBlock(),a.createElementBlock("div",V0,[a.createVNode(ge,{id:"themeBorderButton",onClick:Vi},{default:a.withCtx(()=>h[22]||(h[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(ge,{class:"ok-button",id:"themeButton",onClick:Ao},{default:a.withCtx(()=>h[23]||(h[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(xr.ssDialog,{title:Te.value,visible:Qe.value,width:Wl.value,onBeforeDestroy:Qo,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",P0,[a.createVNode(dl.ssForm,{ref_key:"formRef",ref:je,rowContents:Ae.value,showOperator:!1,onChange:lu,isEnableWrap:!1,onFixChangeValue:Mo,onClickTrigger:ei,isEdit:ja.value,onBlurChange:Fi,onCreate:Xo,onTagChange:en},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[xa.value?(a.openBlock(),a.createElementBlock("div",F0,[a.createVNode(ge,{onClick:h[4]||(h[4]=ie=>Qe.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>h[24]||(h[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(ge,{class:"ok-button",onClick:h[5]||(h[5]=ie=>Ro(!0)),id:"themeButton"},{default:a.withCtx(()=>h[25]||(h[25]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[25]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(xr.ssDialog,{title:Te.value,visible:_e.value,width:pa.value,onBeforeDestroy:h[7]||(h[7]=ie=>_e.value=!1)},{default:a.withCtx(()=>[a.createVNode(df)]),footer:a.withCtx(()=>[a.createElementVNode("div",j0,[a.createVNode(ge,{onClick:h[6]||(h[6]=ie=>_e.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>h[26]||(h[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(ge,{class:"ok-button",onClick:Io,id:"themeButton"},{default:a.withCtx(()=>h[27]||(h[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),Ga.value?(a.openBlock(),a.createBlock(dl.ssFilePreview,{key:2,fileDataList:le.value,onDestroy:Sn},null,8,["fileDataList"])):a.createCommentVNode("",!0),qe.value?(a.openBlock(),a.createBlock(xr.ssDialog,{key:3,visible:qe.value,onBeforeDestroy:Qc,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(wi.ThreeViewerHost,{files:Oa.value,threeData:ne.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(xr.ssDialog,{title:"OCR扫描录入",visible:ma.value,"close-on-click-modal":!1,onBeforeDestroy:cl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[h[38]||(h[38]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",H0,[a.createElementVNode("div",U0,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ve.value===1}])},h[28]||(h[28]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),h[31]||(h[31]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ve.value===2}])},h[29]||(h[29]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),h[32]||(h[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ve.value===3}])},h[30]||(h[30]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),ve.value===1?(a.openBlock(),a.createElementBlock("div",q0,[a.createVNode(ge,{onClick:Qi,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:a.withCtx(()=>h[33]||(h[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(ge,{onClick:Ul,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:a.withCtx(()=>h[34]||(h[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),ve.value===1?(a.openBlock(),a.createElementBlock("div",W0,[a.createElementVNode("div",K0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Je.value,(ie,Ta)=>{var fa;return a.openBlock(),a.createElementBlock("div",{key:Ta,class:"ocr-file-item"},[a.createElementVNode("div",G0,[ie.raw&&((fa=ie.raw.type)!=null&&fa.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:_l(ie),alt:"预览",class:"thumbnail-image"},null,8,Y0)):(a.openBlock(),a.createElementBlock("div",J0,[a.createVNode(xe,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:ul(ie)==="uploading",processing:ul(ie)==="processing",completed:ul(ie)==="completed"||ul(ie)==="uploaded",failed:ul(ie)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",X0,[h[35]||(h[35]=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:ul(ie)==="completed"||ul(ie)==="uploaded",uploading:ul(ie)==="uploading",processing:ul(ie)==="processing",failed:ul(ie)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:ul(ie)==="failed"?"#f56c6c":ul(ie)==="completed"||ul(ie)==="uploaded"?"#67c23a":"#409eff","stroke-width":ul(ie)==="completed"||ul(ie)==="uploaded"||ul(ie)==="failed"?3:2,"stroke-dasharray":Xl(ie),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,Z0)])),ul(ie)==="completed"||ul(ie)==="uploaded"?(a.openBlock(),a.createElementBlock("div",Q0,[a.createVNode(xe,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1})])):a.createCommentVNode("",!0),ul(ie)==="failed"?(a.openBlock(),a.createElementBlock("div",e3,[a.createVNode(xe,{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:Ba=>fo(Ta)},[a.createVNode(xe,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.close_default))]),_:1})],8,a3)]),a.createElementVNode("div",l3,a.toDisplayString(ie.name||"文件名123"),1)])}),128))]),Je.value.length>0?(a.openBlock(),a.createElementBlock("div",r3,[a.createVNode(ge,{onClick:fe,class:"ocr-start-recognize-btn",disabled:ga.value||Je.value.length===0,size:"default"},{default:a.withCtx(()=>h[36]||(h[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),ve.value===1?(a.openBlock(),a.createElementBlock("div",n3,[a.createVNode($e,{percentage:K.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),ve.value===2?(a.openBlock(),a.createElementBlock("div",o3,[a.createElementVNode("div",i3,[a.createVNode(Ie,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",t3,[a.createVNode(ta,{data:Ye.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(He,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.value,ie=>(a.openBlock(),a.createBlock(He,{key:ie.prop,prop:ie.prop,"min-width":ie.minWidth||230,"class-name":ie.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",s3,[a.createElementVNode("span",null,a.toDisplayString(ie.label),1)])]),default:a.withCtx(({row:Ta,$index:fa})=>{var Ba,Aa,A;return[ie.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:sl(Ta[ie.prop]),fontWeight:500})},a.toDisplayString(La(Ta[ie.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Na.value!==fa?(a.openBlock(),a.createElementBlock("span",c3,a.toDisplayString(Ta[ie.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(tl(ie.prop)),{key:1,modelValue:Ta[ie.prop],"onUpdate:modelValue":W=>Ta[ie.prop]=W,size:"small",placeholder:"请输入"+ie.label,content:((Ba=Cl(ie.prop))==null?void 0:Ba.contents)??((Aa=Cl(ie.prop))==null?void 0:Aa.options)??[],optionUrl:(A=Cl(ie.prop))==null?void 0:A.optionUrl,onChange:W=>aa(fa,ie.prop,W),onFocus:W=>de.value=ie.prop,onBlur:h[8]||(h[8]=W=>de.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(He,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:ie})=>[Na.value===ie?(a.openBlock(),a.createBlock(xe,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Ta=>rl(ie),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Ta=>rl(ie),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),ve.value===3?(a.openBlock(),a.createElementBlock("div",u3,[a.createVNode(xe,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Qa.check_default))]),_:1}),h[37]||(h[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(Ha,{ref:"ocrUploadRef","file-list":Je.value,"onUpdate:fileList":h[9]||(h[9]=ie=>Je.value=ie),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":q,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[ve.value!==3?(a.openBlock(),a.createElementBlock("div",d3,[a.createVNode(ge,{onClick:jr,class:"ocr-start-recognize-btn",disabled:ve.value===1||ga.value},{default:a.withCtx(()=>h[39]||(h[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(ge,{onClick:wr,class:"ocr-start-recognize-btn",disabled:ga.value},{default:a.withCtx(()=>h[40]||(h[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(Nf,{visible:po.value,onConfirm:et,onCancel:h[10]||(h[10]=ie=>po.value=!1)},null,8,["visible"]),a.createVNode(dd,{visible:Ee.value,"onUpdate:visible":h[11]||(h[11]=ie=>Ee.value=ie),versions:Ge.value},null,8,["visible","versions"]),a.createVNode(Xu,{visible:Sa.value,"onUpdate:visible":h[12]||(h[12]=ie=>Sa.value=ie),images:El.value,"default-image-name":Vl.value,"field-meta":Na.value!==null?((Ua=Ye.value[Na.value])==null?void 0:Ua.__ocrFieldMeta)||{}:{},"focused-field-name":de.value,onClose:h[13]||(h[13]=ie=>Sa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(Cd,{visible:Fl.value,"onUpdate:visible":h[14]||(h[14]=ie=>Fl.value=ie),candidates:nr.value,"name-prop":lr.value,"mfr-prop":Qr.value,columns:Ce.value,onSubmit:Mr,onPreviewFile:on},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(Ad,{visible:la.value,"onUpdate:visible":h[15]||(h[15]=ie=>la.value=ie),ocrPreviewData:Ye.value,"onUpdate:ocrPreviewData":h[16]||(h[16]=ie=>Ye.value=ie),ocrSelectedFields:Za.value,"onUpdate:ocrSelectedFields":h[17]||(h[17]=ie=>Za.value=ie),ocrPreviewColumns:De.value,onConfirm:ke,onFieldChange:h[18]||(h[18]=({rowIndex:ie,prop:Ta,value:fa})=>aa(ie,Ta,fa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(xr.ssDialog,{title:t.title,visible:t.show,width:t.width,onBeforeDestroy:w},{default:a.withCtx(()=>[a.createElementVNode("div",p3,[a.createVNode(dl.ssForm,{rowContents:t==null?void 0:t.contents,formRules:t==null?void 0:t.formRules,showOperator:!1,buttonValue:t.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(xr.ssDialog,{title:i.title,visible:i.show,width:i.width,alignCenter:!0,onBeforeDestroy:f},{header:a.withCtx(()=>[a.createVNode(za,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>h[41]||(h[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",f3,[a.createVNode(za,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Tn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",h3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i==null?void 0:i.buttonValue,ie=>(a.openBlock(),a.createBlock(ge,{key:ie==null?void 0:ie.label,style:a.normalizeStyle({background:ie==null?void 0:ie.background,color:ie==null?void 0:ie.color}),onClick:Ta=>b(ie==null?void 0:ie.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ie==null?void 0:ie.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(Qp,{columns:i==null?void 0:i.columns,tableData:i==null?void 0:i.tableData},{content:a.withCtx(({row:ie,item:Ta,slotData:fa,scope:Ba,column:Aa,columnProp:A,$index:W})=>[a.createTextVNode(a.toDisplayString((ie==null?void 0:ie[(Aa==null?void 0:Aa.prop)||(Aa==null?void 0:Aa.label)])||(fa==null?void 0:fa[Aa==null?void 0:Aa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},bc=Yl._export_sfc(m3,[["__scopeId","data-v-d384572e"]]),y3={key:1,class:"static-form-body"},g3=["onClick"],b3={key:1},k3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0}},emits:["update:backGroundImage"],setup(l,{emit:n}){const r=l,o=n,s=y=>{switch(y){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},c=a.computed(()=>{var $;const y=($=r.itemData)==null?void 0:$.find(Y=>(Y==null?void 0:Y.key)==="formContent"),k=(y==null?void 0:y.contents)||[];return(r.fields&&r.fields.length>0?r.fields:k).filter(Y=>(Y==null?void 0:Y.label)||(Y==null?void 0:Y.isHideInForm)).map(Y=>{let pe=Y==null?void 0:Y.value;Array.isArray(pe)&&(pe=pe.map(ye=>ye==null?"":typeof ye=="object"?ye.label??ye.value??ye.name??JSON.stringify(ye):String(ye)).filter(Boolean).join(",")),pe!=null&&typeof pe=="object"&&(pe=pe.label??pe.value??pe.name??JSON.stringify(pe));const Ne=Y.isHideInForm?"":Y.label??"",Ce=pe==null||pe===""?"-":String(pe),Q=Ne==="使用状态";return{label:Ne,value:Ce,isStatus:Q,tagType:Q?s(Ce):"",width:Y.width??1,field:Y}})}),m=a.ref(null),p=a.ref(null),v=y=>{if(Array.isArray(y)&&y.length>=3){const[k,F,$,Y]=y;return Y!==void 0?`rgba(${k}, ${F}, ${$}, ${Y})`:`rgb(${k}, ${F}, ${$})`}if(typeof y=="string"){const k=y.trim();if(k.startsWith("[")&&k.endsWith("]")){const F=k.slice(1,-1).split(",").map($=>Number($.trim()));if(F.length>=3&&F.every($=>!Number.isNaN($))){const[$,Y,pe,Ne]=F;return Ne!==void 0?`rgba(${$}, ${Y}, ${pe}, ${Ne})`:`rgb(${$}, ${Y}, ${pe})`}}return k}},g=a.computed(()=>{const y=Number(r==null?void 0:r.textSize),k=v(r==null?void 0:r.textColor),F={},$={},Y={},pe={};return!Number.isNaN(y)&&y&&(F.fontSize=`${y}px`,$.fontSize=`${y+1}px`,Y.fontSize=`${y}px`,pe.fontSize=`${y}px`),k&&($.color=k,Y.color=k,pe.color=k),{item:F,label:$,value:Y,empty:pe}}),u=a.ref(""),_=a.ref(""),x=a.ref(!1),L=async y=>{if(y){_.value&&(URL.revokeObjectURL(_.value),_.value="");try{const k=await O.platformDownloadFile({url:y}),F=new Blob([k==null?void 0:k.data],{type:(k==null?void 0:k.headers["content-type"])||"image/*"});_.value=URL.createObjectURL(F)}catch{_.value=""}}};a.watch(()=>r==null?void 0:r.backGroundImage,y=>{y&&(u.value=y)},{immediate:!0}),a.watch(u,y=>{L(y)},{immediate:!0});const C=()=>{var y;(y=p.value)==null||y.click()},U=async y=>{var $,Y,pe;const k=y.target,F=($=k==null?void 0:k.files)==null?void 0:$[0];if(!F){k.value="";return}x.value=!0;try{const Ne=new FormData;Ne.append("file",F);const Ce=await O.platformUploadFile(Ne),Q=(pe=(Y=Ce==null?void 0:Ce.data)==null?void 0:Y.result)==null?void 0:pe.url;Q?(u.value=Q,o("update:backGroundImage",Q),L(Q),Qa.ElMessage.success("背景图片上传成功")):Qa.ElMessage.error("背景图片上传失败")}catch{Qa.ElMessage.error("背景图片上传失败")}finally{x.value=!1,k.value=""}},I=a.computed(()=>_.value?{backgroundImage:`url(${_.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),H=y=>dl.getComponent(y),G=y=>{if(!y)return;const k=y.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},D=(y,k,F)=>{r.disabled||(m.value=k,a.nextTick(()=>{G(F.currentTarget)}))},E=()=>{m.value=null},S=y=>{const k=y!=null&&y.width&&y.width>0?y.width:1,$=`calc((100% - ${(k-1)*48}px) / ${k})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(y,k)=>{const F=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",{class:"static-form-card",style:a.normalizeStyle(I.value),onClick:k[2]||(k[2]=$=>(r==null?void 0:r.backGround)==="Yes"&&C())},[(r==null?void 0:r.backGround)==="Yes"?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=a.withModifiers($=>C(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:U},null,544),k[3]||(k[3]=a.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),c.value.length?(a.openBlock(),a.createElementBlock("div",y3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,Y)=>{var pe,Ne,Ce,Q,ye,X,se,qe;return a.openBlock(),a.createElementBlock("div",{key:Y,class:"static-form-item",style:a.normalizeStyle({...S($),...g.value.item}),onClick:k[1]||(k[1]=a.withModifiers(()=>{},["stop"]))},[$.label?(a.openBlock(),a.createElementBlock("div",{key:0,class:"static-form-label",style:a.normalizeStyle(g.value.label)},a.toDisplayString($.label)+": ",5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"static-form-value",style:a.normalizeStyle(g.value.value),onClick:Da=>D($,Y,Da)},[m.value===Y&&$.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(H(((pe=$.field)==null?void 0:pe.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":Da=>$.field.value=Da,isEdit:!0,disabled:(Ne=$.field)==null?void 0:Ne.disabled,content:((Ce=$.field)==null?void 0:Ce.contents)??[],optionUrl:$.field,originalValue:(Q=$.field)==null?void 0:Q.value,config:(ye=$.field)==null?void 0:ye.config,configModel:((X=$.field)==null?void 0:X.prop)??((se=$.field)==null?void 0:se.name),selectedTagList:((qe=$.field)==null?void 0:qe.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[$.isStatus?(a.openBlock(),a.createBlock(F,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",b3,a.toDisplayString($.value??"-"),1))],64))],12,g3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"static-form-empty",style:a.normalizeStyle(g.value.empty)}," 暂无数据 ",4))],4)}}}),kc=Yl._export_sfc(k3,[["__scopeId","data-v-f2084144"]]),x3={class:"form-content"},w3={title:"选择标签"},_3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},C3={class:"col-operate-wrap"},E3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},S3={__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=()=>{m.value=!1,p.value=!1,v.value=[]},o=l;a.computed(()=>{var Te;const he=(Te=Se.value)==null?void 0:Te.split("/");return(he==null?void 0:he.some(Qe=>(Qe==null?void 0:Qe.includes("updateLoading"))||(Qe==null?void 0:Qe.includes("loading"))))?!1:qe.value==="view"});const s=n,c=a.ref([]),m=a.ref(!1),p=a.ref(!1),v=a.ref([]),{getFileExtension:g}=wi.useThreeSystem(),u=a.ref(),_=a.ref(!1),x=a.ref(!1),L=O.useUnit(O.pinia),{chooseTitle:C}=O.storeToRefs(L),U=a.ref([]),I=a.ref(),H=a.ref(!1),G=a.ref([]),D=ac(O.pinia),E=Ct(O.pinia),S=a.ref(!1),y=a.ref(),k=a.ref(),F=a.ref(),$=a.ref(),Y=a.ref(),pe=O.useLoginState(O.pinia),{loginUserInfo:Ne}=O.storeToRefs(pe),Ce=a.ref(),Q=a.ref(!0),ye=O.useModelComp(O.pinia),{tableViewContents:X,itemData:se,isEdit:qe,routeToChildPath:Da,lockingPage:ne}=O.storeToRefs(ye),B=a.ref(null),re=a.ref(!1),be=a.ref(!1),ce=O.useMenuState(),{activeMenuPath:Se}=O.storeToRefs(ce),va=ua.useOriginalState(O.pinia),{originalPath:Ca}=O.storeToRefs(va),{compType:Ga,hasEditable:le}=Ws.useRole(),na=()=>!le(o.config,{type:Ga.FORM});a.computed(()=>Se.value==="设备管理/试验设备"&&o.compName==="设备概要");const Pe=a.ref([]),wa=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Fe=async he=>{be.value=he,await V("disabled",null,he,!0)},ze=async he=>{await V("operable",null,he,!0)};a.watch(()=>Se.value,async()=>{c.value=[],v.value=[]},{deep:!0,immediate:!0});const Ve=()=>{a.nextTick(()=>{P()})},ea=he=>{var Ze;c.value=(Ze=c.value)==null?void 0:Ze.map(Te=>({...Te,isFormColHidden:!(he!=null&&he.includes(Te.label))}))};a.onUnmounted(()=>{B.value=null});const Ja=he=>{s("clickTrigger",he)},qa=async he=>{var Ze,Te,Qe,je,Oe,_e;if(he===""){let pa="";(Ze=c.value)==null||Ze.forEach(Oa=>{Oa!=null&&Oa.isMain&&(pa=Oa==null?void 0:Oa.value)});let ra=await ua.getItemData(Da.value,sessionStorage.getItem("systemKey"),"");pa=((_e=(Oe=(je=(Qe=(Te=ra==null?void 0:ra[0])==null?void 0:Te.compData)==null?void 0:Qe.find(Oa=>(Oa==null?void 0:Oa.key)==="mainRouters"))==null?void 0:je.contents)==null?void 0:Oe[0])==null?void 0:_e.routerContent)+Ca.value+pa;let xa=await ua.getItemData(pa,sessionStorage.getItem("systemKey"),"");H.value=!0,G.value=xa==null?void 0:xa.filter(Oa=>(Oa==null?void 0:Oa.comp)!=="methodButton"),s("routeUrl",G.value)}},P=()=>{var Ze;const he=(Ze=B.value)==null?void 0:Ze.$el;he&&Pa.Sortable.create(he,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Te=>{const{oldIndex:Qe,newIndex:je}=Te;if(Qe===je)return;const Oe=c.value.splice(Qe,1)[0];c.value.splice(je,0,Oe)}})},V=async(he,Ze,Te,Qe=!1)=>{try{ye.setRefreshCurStructure(!1)}catch{Qa.ElMessage.error("编辑处理失败")}},Z=async(he,Ze)=>{await V()},oe=async(he,Ze)=>{he&&await V()},te=async(he,Ze,Te)=>{await V(Ze,Te,he,!1)},ka=(he,Ze)=>{Ce.value===Ze?Q.value=!1:Q.value=!0,Ce.value=Ze==null?void 0:Ze.changeProp},oa=he=>{$.value=he;const Ze=o.itemData,Te=Ze==null?void 0:Ze.find(Qe=>(Qe==null?void 0:Qe.key)==="backGroundImage");Te?Te.contents=he:Ze==null||Ze.push({key:"backGroundImage",contents:he}),s("change",{key:"backGroundImage",contents:he})},Re=async he=>{var Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va,ue,Ae,Ue,Xe;let Ze=[];if((Te=he==null?void 0:he.toString())!=null&&Te.includes(".urdf")){if(he.includes(",")){Qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}v.value=[{url:he,extension:g(he)}],p.value=!0,m.value=!0;return}if((Qe=he==null?void 0:he.toString())!=null&&Qe.includes(".stl")||(je=he==null?void 0:he.toString())!=null&&je.includes(".STL")||(Oe=he==null?void 0:he.toString())!=null&&Oe.includes(".obj")||(_e=he==null?void 0:he.toString())!=null&&_e.includes(".mtl")){const Be=((pa=he==null?void 0:he.toString())==null?void 0:pa.split(",")).map(il=>({url:il,extension:g(il)}));v.value=Be,p.value=!1,m.value=!0;return}if((ra=he==null?void 0:he.toString())!=null&&ra.includes(".stl")||($a=he==null?void 0:he.toString())!=null&&$a.includes(".STL")||(xa=he==null?void 0:he.toString())!=null&&xa.includes(".obj")||(Oa=he==null?void 0:he.toString())!=null&&Oa.includes(".mtl")){let _a,Be=[],il={};if(Array.isArray(he)?_a=he:_a=he==null?void 0:he.split(","),_a==null||_a.forEach(vl=>{vl.includes(".mtl")?Be.push(vl):il.blob=il.blob?il.blob+","+vl:vl}),(Be==null?void 0:Be.length)>0&&(il.mtlBlobs=Be),(ue=(Va=Object.values(il))==null?void 0:Va[0])!=null&&ue.includes("http:"))Ze.push(il);else{const vl=new Blob([il.blob],{type:"application/octet-stream;charset=UTF-8"});let Jl=URL.createObjectURL(vl),Ya="";(Ae=he==null?void 0:he.split("/"))==null||Ae.forEach((ha,ma)=>{var ga;ma===((ga=he==null?void 0:he.split("/"))==null?void 0:ga.length)-1&&(Ya=ha)}),(Ue=il.blob)!=null&&Ue.includes(".stl")&&(Ya=(Ya==null?void 0:Ya.replaceAll(">",""))+".urdf"),I.value=[{name:Ya,blobUrl:Jl}],x.value=!0}}else{const _a=Vo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Be=await Qa.axios.get(he,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{_a.close()}),il=new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"});let vl=URL.createObjectURL(il),Jl="";(Xe=he==null?void 0:he.split("/"))==null||Xe.forEach((Ya,ha)=>{var ma;ha===((ma=he==null?void 0:he.split("/"))==null?void 0:ma.length)-1&&(Jl=Ya)}),I.value=[{name:Jl,blobUrl:vl}],x.value=!0}(Ze==null?void 0:Ze.length)>0&&E.setBlobUrls(Ze)},we=()=>{x.value=!1},Ea=he=>{var Oe,_e,pa,ra;const Ze=(_e=(Oe=dl.safeClone(o.itemData))==null?void 0:Oe.find($a=>($a==null?void 0:$a.key)==="formContent"))==null?void 0:_e.contents,Te=dl.safeClone(he.content);let Qe={};Te&&((pa=Object.values(Te))==null?void 0:pa.length)>0&&((ra=Object.values(Te))==null||ra.forEach(($a,xa)=>{Qe[Ze[xa].key]=$a}));const je={content:Qe,index:o==null?void 0:o.index,buttonName:he==null?void 0:he.buttonName};s("change",je)};a.computed(()=>"http://222.92.178.198:62001");const ya=async he=>{var Va,ue,Ae,Ue,Xe,_a,Be,il,vl,Jl,Ya,ha,ma,ga,Je,Xa;if(!he)return;(ue=(Va=o==null?void 0:o.itemData)==null?void 0:Va.find(Ee=>(Ee==null?void 0:Ee.key)==="parentFormPath"))==null||ue.contents;let Ze=X.value;(Ze==null?void 0:Ze.length)>0&&(Ze=Ze==null?void 0:Ze.map(Ee=>{var ve,Ia,We,K;let Ge=(ve=Ee==null?void 0:Ee.key)==null?void 0:ve.split("/");return(o==null?void 0:o.compName)===(Ge==null?void 0:Ge[0])&&(Ia=c.value)!=null&&Ia.find(la=>(la==null?void 0:la.prop)===(Ge==null?void 0:Ge[1]))&&(Ee.value=(K=(We=c.value)==null?void 0:We.find(la=>(la==null?void 0:la.prop)===(Ge==null?void 0:Ge[1])))==null?void 0:K.value),Ee}),ye.setTableViewContents(Ze));const Te=dl.safeClone(o.itemData);let Qe=Te==null?void 0:Te.map(Ee=>{var Ge;return(Ee==null?void 0:Ee.key)==="formContent"&&((Ge=Ee.contents)==null||Ge.map((ve,Ia)=>{var We,K,la,Ye,De,Cl,tl,bl,Wa,Za,Na,de,Sa,El,Vl,Fl,nr,yr,Nl,tr,Nr;return ve.type=(K=(We=c.value)==null?void 0:We.find(Ll=>(Ll==null?void 0:Ll.prop)===(ve==null?void 0:ve.prop)))==null?void 0:K.type,ve.options=ve!=null&&ve.options?ve.options:((De=(Ye=(la=ve==null?void 0:ve.key)==null?void 0:la.split("$"))==null?void 0:Ye[1])==null?void 0:De.length)>0?(Wa=(bl=Du((tl=(Cl=ve==null?void 0:ve.key)==null?void 0:Cl.split("$"))==null?void 0:tl[1]))==null?void 0:bl.split(","))==null?void 0:Wa.map(Ll=>({label:Ll,value:Ll})):[],(Za=ve==null?void 0:ve.key)!=null&&Za.includes("$")&&(ve.key=(de=(Na=ve==null?void 0:ve.key)==null?void 0:Na.split("$"))==null?void 0:de[0]),ve.signature=(El=(Sa=c.value)==null?void 0:Sa.find(Ll=>(Ll==null?void 0:Ll.prop)===(ve==null?void 0:ve.prop)))==null?void 0:El.signature,ve.isLoginUser=(Fl=(Vl=c.value)==null?void 0:Vl.find(Ll=>(Ll==null?void 0:Ll.prop)===(ve==null?void 0:ve.prop)))==null?void 0:Fl.isLoginUser,ve.value=(nr=Object.values(he))==null?void 0:nr[Ia],ve.isFormColHidden=(Nl=(yr=c.value)==null?void 0:yr.find(Ll=>(Ll==null?void 0:Ll.prop)===(ve==null?void 0:ve.prop)))==null?void 0:Nl.isFormColHidden,ve.isHideInForm=(Nr=(tr=c.value)==null?void 0:tr.find(Ll=>(Ll==null?void 0:Ll.prop)===(ve==null?void 0:ve.prop)))==null?void 0:Nr.isHideInForm,ve})),Ee}),je=c.value,Oe=(Ue=(Ae=dl.safeClone(Qe))==null?void 0:Ae.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:Ue.contents;if(je=je==null?void 0:je.map(Ee=>{var Ge,ve;return(Ee==null?void 0:Ee.type)==="Select"&&((Ge=Ee==null?void 0:Ee.allSelectionContents)==null?void 0:Ge.length)>0&&(Ee.contactValue=he),Ee.value=(ve=Oe==null?void 0:Oe.find((Ia,We)=>((Ia==null?void 0:Ia.id)??We)===(Ee==null?void 0:Ee.id)))==null?void 0:ve.value,Ee}),!Q.value){s("contentChange",{contents:Qe,index:o.index});return}let _e="",pa=(Be=(_a=(Xe=dl.safeClone(Qe))==null?void 0:Xe.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:_a.contents)==null?void 0:Be.find((Ee,Ge)=>{var ve,Ia,We;return(Ee==null?void 0:Ee.label)===Ce.value||Ge.toString()===((We=(Ia=(ve=Ce.value)==null?void 0:ve.split("t"))==null?void 0:Ia[1])==null?void 0:We.toString())}),ra=(il=pa==null?void 0:pa.optionUrl)==null?void 0:il.menuSelect,$a=!0;if((Ya=(Jl=(vl=dl.safeClone(Qe))==null?void 0:vl.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:Jl.contents)==null||Ya.forEach(Ee=>{var Ge,ve,Ia,We,K,la;$a&&((Ia=(ve=(Ge=Ee==null?void 0:Ee.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:ve[1])!=null&&Ia.includes("["))&&(_e=(K=(We=Ee==null?void 0:Ee.optionUrl)==null?void 0:We.groupSelect)==null?void 0:K[1],JSON.stringify(ra)===JSON.stringify((la=Ee==null?void 0:Ee.optionUrl)==null?void 0:la.menuSelect)&&($a=!1))}),(ha=pa==null?void 0:pa.optionUrl)!=null&&ha.menuSelect&&Q.value){let Ee=await vt(pa),Ge,ve=(ma=pa==null?void 0:pa.optionUrl)==null?void 0:ma.menuSelect;if(Ee==null||Ee.forEach(Ia=>{var We,K,la,Ye,De,Cl,tl,bl,Wa,Za;_e===((K=(We=pa==null?void 0:pa.optionUrl)==null?void 0:We.groupSelect)==null?void 0:K[1])&&((De=(Ye=(la=pa==null?void 0:pa.optionUrl)==null?void 0:la.groupSelect)==null?void 0:Ye[1])!=null&&De.includes("["))&&((Za=dl.safeClone(Ia))==null?void 0:Za[(Wa=(bl=(tl=(Cl=pa==null?void 0:pa.optionUrl)==null?void 0:Cl.groupSelect)==null?void 0:tl[1])==null?void 0:bl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])===(pa==null?void 0:pa.value)&&(Ge=Ia)}),Ge){let Ia=dl.safeClone(je);Ia=Ia==null?void 0:Ia.map(K=>{var la,Ye,De,Cl,tl,bl,Wa,Za,Na,de,Sa;return(Ge!=null&&Ge[K==null?void 0:K.label]||Ge!=null&&Ge[(Cl=(De=(Ye=(la=K==null?void 0:K.optionUrl)==null?void 0:la.groupSelect)==null?void 0:Ye[1])==null?void 0:De.replaceAll("[",""))==null?void 0:Cl.replaceAll("]","")])&&((Wa=(bl=(tl=K==null?void 0:K.optionUrl)==null?void 0:tl.groupSelect)==null?void 0:bl[1])!=null&&Wa.includes("["))&&ve!=null&&ve.every(El=>{var Vl,Fl;return(Fl=(Vl=K==null?void 0:K.optionUrl)==null?void 0:Vl.menuSelect)==null?void 0:Fl.includes(El)})&&(K.value=(Ge==null?void 0:Ge[K==null?void 0:K.label])||(Ge==null?void 0:Ge[(Sa=(de=(Na=(Za=K==null?void 0:K.optionUrl)==null?void 0:Za.groupSelect)==null?void 0:Na[1])==null?void 0:de.replaceAll("[",""))==null?void 0:Sa.replaceAll("]","")]),Array.isArray(K.value)&&K.value.every(El=>(El==null?void 0:El.url)&&(El==null?void 0:El.name))&&(K.type="Upload")),K}),Ia=Ia==null?void 0:Ia.map(K=>{var la,Ye,De;return(la=K==null?void 0:K.optionUrl)!=null&&la.oldMenuSelect&&(K.optionUrl.menuSelect=(De=(Ye=dl.safeClone(K))==null?void 0:Ye.optionUrl)==null?void 0:De.oldMenuSelect),K}),c.value=dl.safeClone(Ia);let We=dl.safeClone(Ia);We=We==null?void 0:We.map(K=>{var la,Ye,De,Cl,tl,bl;return(Ye=(la=K==null?void 0:K.optionUrl)==null?void 0:la.menuSelect)!=null&&Ye.some(Wa=>Wa==null?void 0:Wa.includes("["))&&(K.optionUrl.oldMenuSelect=(Cl=(De=dl.safeClone(K))==null?void 0:De.optionUrl)==null?void 0:Cl.menuSelect,K.optionUrl.menuSelect=(bl=(tl=K==null?void 0:K.optionUrl)==null?void 0:tl.menuSelect)==null?void 0:bl.map(Wa=>{var Za,Na,de,Sa;if(Wa!=null&&Wa.includes("[")){let El=(Na=(Za=Wa==null?void 0:Wa.replaceAll("[","").replaceAll("]",""))==null?void 0:Za.split(":"))==null?void 0:Na[1];Wa=(Sa=(de=dl.safeClone(Ia))==null?void 0:de.find(Vl=>(Vl==null?void 0:Vl.label)===El))==null?void 0:Sa.value}return Wa})),K}),c.value=We}else c.value=je;Qe=Qe==null?void 0:Qe.map(Ia=>{var We;return(Ia==null?void 0:Ia.key)==="formContent"&&(Ia.contents=(We=Ia.contents)==null?void 0:We.map(K=>{var la,Ye,De,Cl;return K.value=((Ye=(la=c.value)==null?void 0:la.find(tl=>(tl==null?void 0:tl.label)===(K==null?void 0:K.key)))==null?void 0:Ye.value)??(K==null?void 0:K.value),K.type=((Cl=(De=c.value)==null?void 0:De.find(tl=>(tl==null?void 0:tl.prop)===(K==null?void 0:K.key)))==null?void 0:Cl.type)??(K==null?void 0:K.type),K})),Ia})}Q.value=!1,s("contentChange",{contents:Qe,index:o.index});let xa=[],Oa=[];if((Je=dl.safeClone((ga=Qe==null?void 0:Qe.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:ga.contents))==null||Je.forEach(Ee=>{var Ge;Array.isArray(Ee==null?void 0:Ee.value)&&((Ge=Ee==null?void 0:Ee.value)!=null&&Ge.find(ve=>{var Ia;return(Ia=ve==null?void 0:ve.url)==null?void 0:Ia.includes(".obj")}))&&(Oa=Ee==null?void 0:Ee.value)}),(Oa==null?void 0:Oa.length)>0){const Ee=(Xa=dl.safeClone(Oa))==null?void 0:Xa.filter(Ge=>{var ve;return(ve=Ge==null?void 0:Ge.url)==null?void 0:ve.includes(".obj")});Ee==null||Ee.forEach(Ge=>{var Ia,We,K,la;const ve=(Ia=Oa==null?void 0:Oa.filter(Ye=>{var De;return(Ye==null?void 0:Ye.name)===(Ge==null?void 0:Ge.name)&&((De=Ye==null?void 0:Ye.url)==null?void 0:De.includes(".mtl"))}))==null?void 0:Ia.map(Ye=>Ye==null?void 0:Ye.url);xa.push({objUrl:Ge==null?void 0:Ge.url,mtlUrls:((We=Oa==null?void 0:Oa.filter(Ye=>{var De;return(Ye==null?void 0:Ye.name)===(Ge==null?void 0:Ge.name)&&((De=Ye==null?void 0:Ye.url)==null?void 0:De.includes(".mtl"))}))==null?void 0:We.length)===1?(la=(K=Oa==null?void 0:Oa.filter(Ye=>{var De;return(Ye==null?void 0:Ye.name)===(Ge==null?void 0:Ge.name)&&((De=Ye==null?void 0:Ye.url)==null?void 0:De.includes(".mtl"))}))==null?void 0:K[0])==null?void 0:la.url:ve})}),E.setObjUrl(xa)}},Fa=(he,Ze,Te)=>{let Qe="";const je=Ze==null?void 0:Ze.map(Oe=>{var _e;return(_e=Oe==null?void 0:Oe.value)==null?void 0:_e.pageData});return je==null||je.forEach(Oe=>{var _e;(Oe==null?void 0:Oe.name)===(he==null?void 0:he[0])&&((_e=Oe==null?void 0:Oe.compData)==null||_e.forEach(pa=>{var ra;(pa==null?void 0:pa.key)==="formContent"&&((ra=pa==null?void 0:pa.contents)==null||ra.forEach($a=>{var xa;($a==null?void 0:$a.prop)===(he==null?void 0:he[1])&&(Qe=($a==null?void 0:$a.value)===""?ua.judgeContents((xa=dl.safeClone($a))==null?void 0:xa.optionUrl,Te):$a==null?void 0:$a.value)}))}))}),Qe},ja=(he,Ze,Te,Qe)=>{var pa,ra;let je="",Oe="";(pa=dl.safeClone(Ze))==null||pa.forEach(($a,xa)=>{$a!=null&&$a.includes("[")?Oe=Oe+Ca.value+he[xa]:Oe=Oe===""?Oe+$a:Oe+"/"+$a});let _e=(ra=Qe[Oe])==null?void 0:ra.map($a=>{var xa;return(xa=$a==null?void 0:$a.value)==null?void 0:xa.pageData});return _e==null||_e.forEach($a=>{var xa;($a==null?void 0:$a.name)===(Te==null?void 0:Te[0])&&((xa=$a==null?void 0:$a.compData)==null||xa.forEach(Oa=>{var Va;(Oa==null?void 0:Oa.key)==="formContent"&&((Va=Oa==null?void 0:Oa.contents)==null||Va.forEach(ue=>{(ue==null?void 0:ue.prop)===(Te==null?void 0:Te[1])&&(je=ue==null?void 0:ue.value)}))}))}),je};return a.watch(()=>o.itemData,async()=>{var Va,ue,Ae,Ue,Xe,_a,Be,il,vl,Jl,Ya,ha,ma,ga,Je,Xa,Ee,Ge,ve,Ia,We,K,la;const he=(Va=o.itemData)==null?void 0:Va.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"),Ze=(ue=dl.safeClone(o.itemData))==null?void 0:ue.find(Ye=>(Ye==null?void 0:Ye.key)==="formButton"),Te=(Ae=dl.safeClone(o.itemData))==null?void 0:Ae.find(Ye=>(Ye==null?void 0:Ye.key)==="formFlex"),Qe=(Ue=dl.safeClone(o.itemData))==null?void 0:Ue.find(Ye=>(Ye==null?void 0:Ye.key)==="formWrap"),je=(Xe=dl.safeClone(o.itemData))==null?void 0:Xe.find(Ye=>(Ye==null?void 0:Ye.key)==="enableWrap"),Oe=(_a=dl.safeClone(o.itemData))==null?void 0:_a.find(Ye=>(Ye==null?void 0:Ye.key)==="textSize"),_e=(Be=dl.safeClone(o.itemData))==null?void 0:Be.find(Ye=>(Ye==null?void 0:Ye.key)==="textRGBA"),pa=(il=dl.safeClone(o.itemData))==null?void 0:il.find(Ye=>(Ye==null?void 0:Ye.key)==="backGround"),ra=(vl=dl.safeClone(o.itemData))==null?void 0:vl.find(Ye=>(Ye==null?void 0:Ye.key)==="backGroundImage");(Qe==null?void 0:Qe.contents)==="纵向"?_.value=!1:_.value=!0;const $a=Number(Oe==null?void 0:Oe.contents);y.value=Number.isNaN($a)?void 0:$a,k.value=_e==null?void 0:_e.contents,F.value=pa==null?void 0:pa.contents,$.value=ra==null?void 0:ra.contents;const xa=je==null?void 0:je.contents;if(xa===void 0?S.value=no.BLOCK:typeof xa=="boolean"?S.value=xa?no.ORDINARY:no.BLOCK:S.value=xa,Y.value=typeof(Te==null?void 0:Te.contents)!="boolean"?!(!(Te!=null&&Te.contents)===""||((Jl=Te==null?void 0:Te.contents)==null?void 0:Jl.toUpperCase())==="VERTICAL"):Te==null?void 0:Te.contents,((Ya=he==null?void 0:he.contents)==null?void 0:Ya.length)>0&&Array.isArray(he==null?void 0:he.contents)){let Ye=o.allMapContents;const De=(ma=(ha=dl.safeClone(he))==null?void 0:ha.contents)==null?void 0:ma.map((de,Sa)=>{var Sr,zr,Mr,Dr,Vr,Or,sr,gn,Gr,rn,Nn,bn,vn;let El=(de==null?void 0:de.label)??(de==null?void 0:de.key)??"";de==null||de.type;let Vl=(de==null?void 0:de.options)??[];if((Sr=de==null?void 0:de.key)!=null&&Sr.includes("$")&&(El=(zr=dl.safeClone(de==null?void 0:de.key).split("$"))==null?void 0:zr[0],((Dr=(Mr=dl.safeClone(de==null?void 0:de.key).split("$"))==null?void 0:Mr[1])==null?void 0:Dr.length)>0)){const[vr,Hl]=(Or=(Vr=dl.safeClone(de==null?void 0:de.key).split("$"))==null?void 0:Vr[1])==null?void 0:Or.split(/[()]/);(sr=ua.FormType.find(dr=>(dr==null?void 0:dr.key)===vr))==null||sr.value,((gn=Hl==null?void 0:Hl.split(","))==null?void 0:gn.length)>0&&(Vl=(Gr=Hl==null?void 0:Hl.split(","))==null?void 0:Gr.map(dr=>({label:dr,value:dr})))}let Fl=de==null?void 0:de.options;((rn=de==null?void 0:de.optionUrl)==null?void 0:rn.selectRelateType)==="自定义绑定"&&(Fl=(bn=(Nn=de==null?void 0:de.optionUrl)==null?void 0:Nn.defaultSelect)==null?void 0:bn.map(vr=>({label:vr,value:vr})));let nr=(de==null?void 0:de.menuPath)??[],yr=(de==null?void 0:de.groups)??[],Nl=(de==null?void 0:de.columns)??[],tr=!1,Nr=(de==null?void 0:de.isFormColHidden)??!1,Ll="",lr=de!=null&&de.value?de.value:(Fl==null?void 0:Fl.length)>0?(vn=Fl==null?void 0:Fl[0])==null?void 0:vn.value:(de==null?void 0:de.value)??"",Qr=!1,Ir="Input";return((Fl==null?void 0:Fl.length)>0||(nr==null?void 0:nr.length)>0)&&(Ir="Select"),(Array.isArray(Ll)&&(Ll!=null&&Ll.every(vr=>(vr==null?void 0:vr.name)&&(vr==null?void 0:vr.url)))||Array.isArray(lr)&&(lr!=null&&lr.every(vr=>(vr==null?void 0:vr.name)&&(vr==null?void 0:vr.url))))&&(Ir="upload"),de!=null&&de.isMainUrl&&(Ir="Url"),{label:El??"",name:El??"t"+Sa,prop:El??dl.safeClone(de==null?void 0:de.key),type:(de==null?void 0:de.type)??Ir,value:(de==null?void 0:de.type)==="Date"&&lr===""?new Date:lr,id:(de==null?void 0:de.id)??Sa,contents:(Fl==null?void 0:Fl.length)>0?Fl:Vl??[],width:(de==null?void 0:de.width)??1,isLoginUser:tr,config:de==null?void 0:de.config,optionUrl:(de==null?void 0:de.optionUrl)??de,isFormColHidden:Nr,isHideInForm:(de==null?void 0:de.isHideInForm)??!1,signature:Qr,isMain:de==null?void 0:de.isMain,required:(de==null?void 0:de.required)??!1,isMainUrl:de==null?void 0:de.isMainUrl,operable:(de==null?void 0:de.operable)??!1,disabled:(de==null?void 0:de.disabled)??!1,isSync:de==null?void 0:de.isSync,menus:nr,groups:yr,words:Nl,allSelectionContents:de==null?void 0:de.allContents,filterContent:de==null?void 0:de.filterContents}}),Cl=De==null?void 0:De.map(de=>de==null?void 0:de.value);let tl="";Cl==null||Cl.forEach(de=>{de!==""&&de!==void 0&&(tl=tl===""?de:tl+"/"+de)}),D.setSelectArray(Cl),D.setSelectString(tl);let bl=(ga=dl.safeClone(De))==null?void 0:ga.map(de=>(de!=null&&de.value&&ua.IsJson(de==null?void 0:de.value)&&Array.isArray(JSON.parse(de==null?void 0:de.value))&&(de.value=JSON.parse(de.value)),de)),Wa={};bl==null||bl.forEach(de=>{Wa[de.label]=de==null?void 0:de.value}),bl=bl==null?void 0:bl.map(de=>{var Sa,El,Vl,Fl,nr,yr,Nl,tr,Nr;if((de==null?void 0:de.type)==="Select"&&((Sa=de==null?void 0:de.allSelectionContents)==null?void 0:Sa.length)>0&&(de.contactValue=Wa),(Vl=(El=de==null?void 0:de.optionUrl)==null?void 0:El.menuSelect)!=null&&Vl.some(Ll=>Ll==null?void 0:Ll.includes("["))){let Ll="";de.optionUrl.oldMenuSelect=(nr=(Fl=dl.safeClone(de))==null?void 0:Fl.optionUrl)==null?void 0:nr.menuSelect,de.optionUrl.menuSelect=(Nl=(yr=de==null?void 0:de.optionUrl)==null?void 0:yr.menuSelect)==null?void 0:Nl.map(lr=>{var Qr,Ir,Ar,Sr,zr,Mr;if(lr!=null&&lr.includes("[")){let Dr=(Ir=(Qr=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:Qr.split(":"))==null?void 0:Ir[1];Ll=Fa((Ar=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:Ar.split(":"),Ye==null?void 0:Ye[Se.value],Ye),lr=((zr=(Sr=dl.safeClone(bl))==null?void 0:Sr.find(Vr=>(Vr==null?void 0:Vr.label)===Dr))==null?void 0:zr.value)||Fa((Mr=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:Mr.split(":"),Ye==null?void 0:Ye[Se.value],Ye)}return lr}),Ll!==""&&de.value===""&&(de.value=ja(de.optionUrl.menuSelect,de.optionUrl.oldMenuSelect,(tr=de==null?void 0:de.optionUrl)==null?void 0:tr.groupSelect,Ye),Array.isArray(de.value)&&((Nr=de.value)!=null&&Nr.every(lr=>lr==null?void 0:lr.url))&&(de.type="UPLOAD"))}return de}),c.value=bl,be.value=((Je=c.value)==null?void 0:Je.every(de=>de==null?void 0:de.disabled))||ne.value===Se.value,re.value=(Xa=c.value)==null?void 0:Xa.every(de=>de==null?void 0:de.operable),Pe.value=(Ee=c.value)==null?void 0:Ee.map(de=>de==null?void 0:de.label);let Za=[],Na=[];if((Ge=dl.safeClone(c.value))==null||Ge.forEach(de=>{var Sa;Array.isArray(de==null?void 0:de.value)&&((Sa=de==null?void 0:de.value)!=null&&Sa.find(El=>{var Vl;return(Vl=El==null?void 0:El.url)==null?void 0:Vl.includes(".obj")}))&&(Na=de==null?void 0:de.value)}),(Na==null?void 0:Na.length)>0){const de=(ve=dl.safeClone(Na))==null?void 0:ve.filter(Sa=>{var El;return(El=Sa==null?void 0:Sa.url)==null?void 0:El.includes(".obj")});de==null||de.forEach(Sa=>{var Vl,Fl,nr,yr;const El=(Vl=Na==null?void 0:Na.filter(Nl=>{var tr;return(Nl==null?void 0:Nl.name)===(Sa==null?void 0:Sa.name)&&((tr=Nl==null?void 0:Nl.url)==null?void 0:tr.includes(".mtl"))}))==null?void 0:Vl.map(Nl=>Nl==null?void 0:Nl.url);Za.push({objUrl:Sa==null?void 0:Sa.url,mtlUrls:((Fl=Na==null?void 0:Na.filter(Nl=>{var tr;return(Nl==null?void 0:Nl.name)===(Sa==null?void 0:Sa.name)&&((tr=Nl==null?void 0:Nl.url)==null?void 0:tr.includes(".mtl"))}))==null?void 0:Fl.length)===1?(yr=(nr=Na==null?void 0:Na.filter(Nl=>{var tr;return(Nl==null?void 0:Nl.name)===(Sa==null?void 0:Sa.name)&&((tr=Nl==null?void 0:Nl.url)==null?void 0:tr.includes(".mtl"))}))==null?void 0:nr[0])==null?void 0:yr.url:El})}),E.setObjUrl(Za)}(Ia=dl.safeClone(c.value))==null||Ia.forEach(de=>{var Sa,El,Vl,Fl,nr,yr,Nl,tr,Nr,Ll,lr,Qr,Ir;if((El=(Sa=de==null?void 0:de.value)==null?void 0:Sa.toString())!=null&&El.includes(".stl")||(Fl=(Vl=de==null?void 0:de.value)==null?void 0:Vl.toString())!=null&&Fl.includes(".STL")||(yr=(nr=de==null?void 0:de.value)==null?void 0:nr.toString())!=null&&yr.includes(".obj")||(tr=(Nl=de==null?void 0:de.value)==null?void 0:Nl.toString())!=null&&tr.includes(".mtl")||(Ll=(Nr=de==null?void 0:de.value)==null?void 0:Nr.toString())!=null&&Ll.includes(".urdf")){let Ar={},Sr=[],zr;Array.isArray(de==null?void 0:de.value)?zr=de==null?void 0:de.value:zr=(lr=de==null?void 0:de.value)==null?void 0:lr.split(","),zr==null||zr.forEach(Mr=>{Mr.includes(".mtl")?Sr.push(Mr):Ar.blob=Ar.blob==="undefined"?Mr:Ar.blob+","+Mr}),(Sr==null?void 0:Sr.length)>0&&(Ar.mtlBlobs=Sr),(Ir=(Qr=Object.values(Ar))==null?void 0:Qr[0])!=null&&Ir.includes("http:")}})}else c.value=[];let Oa=X.value;if((Oa==null?void 0:Oa.length)>0&&(Oa=Oa==null?void 0:Oa.map(Ye=>{var Cl,tl,bl,Wa;let De=(Cl=Ye==null?void 0:Ye.key)==null?void 0:Cl.split("/");return(o==null?void 0:o.compName)===(De==null?void 0:De[0])&&(tl=c.value)!=null&&tl.find(Za=>(Za==null?void 0:Za.prop)===(De==null?void 0:De[1]))&&(Ye.value=(Wa=(bl=c.value)==null?void 0:bl.find(Za=>(Za==null?void 0:Za.prop)===(De==null?void 0:De[1])))==null?void 0:Wa.value),Ye}),ye.setTableViewContents(Oa)),o!=null&&o.formRules)u.value=o==null?void 0:o.formRules;else{let Ye={};(We=dl.safeClone(c).value)==null||We.forEach(De=>{((De==null?void 0:De.isMain)===!0||(De==null?void 0:De.required)===!0)&&(Ye[(De==null?void 0:De.prop)??(De==null?void 0:De.name)]=[{required:!0,message:`${(De==null?void 0:De.label)||(De==null?void 0:De.prop)||(De==null?void 0:De.name)}不能为空`}])}),u.value=Ye}if(((K=Ze==null?void 0:Ze.contents)==null?void 0:K.length)>0){const Ye=[];(la=Ze==null?void 0:Ze.contents)==null||la.forEach((De,Cl)=>{(De==null?void 0:De.label)!==""&&Ye.push({label:(De==null?void 0:De.label)??"",id:(De==null?void 0:De.id)??Cl,type:(De==null?void 0:De.type)??"",background:De==null?void 0:De.background})}),U.value=Ye}else U.value=[]},{deep:!0,immediate:!0}),a.watch(()=>ne.value,he=>{be.value=he===Se.value},{immediate:!0}),(he,Ze)=>{var pa;const Te=a.resolveComponent("svg-icon"),Qe=a.resolveComponent("el-switch"),je=a.resolveComponent("el-checkbox"),Oe=a.resolveComponent("el-popover"),_e=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",x3,[S.value===a.unref(no).TEXT?(a.openBlock(),a.createBlock(kc,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:y.value,textColor:k.value,backGround:F.value,backGroundImage:$.value,disabled:be.value||na(),"onUpdate:backGroundImage":oa},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):S.value===a.unref(no).BLOCK?(a.openBlock(),a.createBlock(of,{key:1,items:(pa=c.value)==null?void 0:pa.map(ra=>({label:ra!=null&&ra.isHideInForm?"":ra==null?void 0:ra.label,value:ra==null?void 0:ra.value,width:(ra==null?void 0:ra.width)??1,field:ra})),textSize:y.value,textColor:k.value,backGround:F.value,backGroundImage:$.value,disabled:be.value||na(),"onUpdate:backGroundImage":oa},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":S.value===a.unref(no).ORDINARY})},[a.createVNode(dl.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:U.value,isRowFlex:!1,isEnableWrap:!0,textSize:y.value,textColor:k.value,backGround:F.value,backGroundImage:$.value,onOnButtonClick:Ea,onChange:ya,formDisabled:be.value||na(),formLabelsOperable:re.value,isButtonRow:_.value,onPreview:Re,onBlurChange:ka,onHandleColEditChange:Z,onHandleColTypeChange:oe,onRouteUrl:qa,onClickTrigger:Ja,"onUpdate:backGroundImage":oa},{operateCol:a.withCtx(({renderColumns:ra,formDisabled:$a,formLabelsOperable:xa})=>[a.createVNode(Oe,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ve},{reference:a.withCtx(()=>[a.createElementVNode("span",w3,[a.createVNode(Te,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",_3,[Ze[1]||(Ze[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Qe,{"model-value":$a,"active-text":"禁用","inactive-text":"",onChange:Fe,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Qe,{"model-value":xa,"active-text":"编辑所有标签","inactive-text":"",onChange:ze},null,8,["model-value"]),Ze[2]||(Ze[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(_e,{modelValue:Pe.value,"onUpdate:modelValue":Ze[0]||(Ze[0]=Oa=>Pe.value=Oa),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:B,onChange:ea},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ra,Oa=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oa.label},[a.createVNode(je,{value:Oa.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(Oa.label),1)]),_:2},1032,["value"]),a.createVNode(Oe,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(Te,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Va;return[a.createElementVNode("div",C3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Va=Object.keys(Oa))==null?void 0:Va.filter(ue=>{var Ae;return(Ae=wa.value)==null?void 0:Ae.find(Ue=>(Ue==null?void 0:Ue.value)===ue)}),ue=>{var Ae,Ue;return a.openBlock(),a.createElementBlock("div",{key:ue},[a.createVNode(dl._sfc_main$1,{value:Oa==null?void 0:Oa[ue],"active-text":(Ue=(Ae=wa.value)==null?void 0:Ae.find(Xe=>(Xe==null?void 0:Xe.value)===ue))==null?void 0:Ue.label,inactiveText:"",onChange:Xe=>te(Xe,ue,Oa)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",E3,[a.createVNode(Te,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow"])],2)),x.value?(a.openBlock(),a.createBlock(dl.ssFilePreview,{key:3,fileDataList:I.value,onDestroy:we},null,8,["fileDataList"])):a.createCommentVNode("",!0),m.value?(a.openBlock(),a.createBlock(xr.ssDialog,{key:4,visible:m.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(wi.ThreeViewerHost,{files:v.value,onGetAnimationData:he.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ys=Yl._export_sfc(S3,[["__scopeId","data-v-14c62655"]]),Ti=a.ref(0),xc=l=>{var n;return!l||(l==null?void 0:l.length)===0?[]:(n=O.cloneDeep(l))==null?void 0:n.map(o=>(Ti.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Ti.value,children:xc(o==null?void 0:o.children)},o))},D3=l=>{var r;return(r=O.cloneDeep(l))==null?void 0:r.map(o=>(Ti.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Ti.value,children:xc(o==null?void 0:o.children)},o))},wc=(l,n)=>{var r;return l!=null&&l.find(o=>(o==null?void 0:o.id)===n)?(r=O.cloneDeep(l))==null?void 0:r.filter(s=>(s==null?void 0:s.id)!==n):(l=l==null?void 0:l.map(o=>(o.children=wc(o==null?void 0:o.children,n),o)),l)},_c=(l,n)=>{var r;return l!=null&&l.find(o=>(o==null?void 0:o.id)===(n==null?void 0:n.id))?(r=O.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(o=>(o.children=_c(o==null?void 0:o.children,n),o)),l)},Cc=(l,n)=>{var r;return l!=null&&l.find(o=>{var s;return(o==null?void 0:o.id)===((s=n==null?void 0:n.contents)==null?void 0:s.id)})?(r=O.cloneDeep(l))==null?void 0:r.map(s=>{var c;return(s==null?void 0:s.id)===((c=n==null?void 0:n.contents)==null?void 0:c.id)&&(s=n==null?void 0:n.contents),s}):(l=l==null?void 0:l.map(o=>(o.children=Cc(o==null?void 0:o.children,n),o)),l)},Ec=(l,n)=>{var r;return l!=null&&l.find(o=>(o==null?void 0:o.id)===(n==null?void 0:n.id))?(r=O.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(o=>(o.children=Ec(o==null?void 0:o.children,n),o)),l)},ar=[{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"}],B3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],N3=[{label:"新增",value:"add"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:N3},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:B3},{key:"textColor",label:"按钮颜色",type:"Color"}],T3={class:"table-header-child"},A3={class:"table-header-child-main"},z3={class:"table-header-child-content"},M3={class:"table-header-child-content-item"},I3={class:"fix-button"},O3={key:0},L3={class:"form-content"},R3={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(!1),c=a.ref(""),m=ua.useTableComp(O.pinia),{tableIndex:p}=O.storeToRefs(m);a.ref(0);const v=a.ref(""),g=a.ref([]),u=a.ref([]),_=D=>{var S;s.value=!0;let E=[];ar==null||ar.forEach(y=>{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),E.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:D[y.key],id:p.value,contents:y==null?void 0:y.options})}),D!=null&&D.children&&((S=D==null?void 0:D.children)==null?void 0:S.length)>0&&E.push({children:D==null?void 0:D.children,isFormColHidden:!0}),v.value=D==null?void 0:D.id,g.value=E,u.value=E},x=D=>{o("fixChange",O.cloneDeep(D))},L=D=>{o("deleteChange",O.cloneDeep(D))},C=D=>{s.value=!0;let E=[];ar==null||ar.forEach(S=>{let y=O.cloneDeep(p.value)+1;m.setTableIndex(y),E.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:p.value,contents:S==null?void 0:S.options})}),c.value=D==null?void 0:D.id,g.value=E,u.value=E},U=D=>{let E=O.cloneDeep(u.value);E=E==null?void 0:E.map(S=>(S.children||(S.value=D==null?void 0:D[S.name]),S)),u.value=E},I=()=>{var E,S;g.value=u.value;let D={};if(v.value!=="")D.id=v.value,(E=g.value)==null||E.forEach(y=>{const k=ar==null?void 0:ar.find(F=>(F==null?void 0:F.label)===(y==null?void 0:y.label));k?D[k.key]=y.value:y!=null&&y.children&&y.children.length>0&&(D.children=y.children)}),s.value=!1,o("fixChange",{contents:O.cloneDeep(D),id:c.value,type:"fix"});else{let y=O.cloneDeep(p.value)+1;m.setTableIndex(y),D.id="id"+p.value,(S=g.value)==null||S.forEach(k=>{const F=ar==null?void 0:ar.find($=>($==null?void 0:$.label)===(k==null?void 0:k.label));F?D[F.key]=k.value:k!=null&&k.children&&k.children.length>0&&(D.children=k.children)}),s.value=!1,o("fixChange",{contents:O.cloneDeep(D),id:c.value,type:"add"})}v.value="",g.value=[],u.value=[]},H=()=>{s.value=!1,v.value="",c.value="",g.value=[],u.value=[]},G=D=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",D),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,E)=>{const S=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",T3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(y,k)=>(a.openBlock(),a.createElementBlock("div",A3,[a.createElementVNode("div",z3,[a.createElementVNode("div",M3,a.toDisplayString(y.label),1),a.createElementVNode("div",I3,[a.createVNode(S,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>C(y)},null,8,["onClick"]),a.createVNode(S,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>_(y)},null,8,["onClick"]),a.createVNode(S,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>G(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(a.openBlock(),a.createElementBlock("div",O3,[a.createVNode(Sc,{tableChildContents:y==null?void 0:y.children,onDeleteChange:L,onFixChange:x},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(xr.ssDialog,{visible:s.value,onBeforeDestroy:H,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",L3,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:U},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:H,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:I},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},$3=Yl._export_sfc(R3,[["__scopeId","data-v-e0fef72d"]]),V3={class:"table-header-child"},P3={class:"table-header-child-main"},F3={class:"table-header-child-content"},j3={class:"table-header-child-content-item"},H3={class:"fix-button"},U3={key:0},q3={class:"form-content"},W3={class:"dialog-footer"},K3={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(!1),c=a.ref(""),m=ua.useTableComp(O.pinia),{tableIndex:p}=O.storeToRefs(m),v=a.ref(""),g=a.ref([]),u=a.ref([]),_=D=>{o("fixChange",O.cloneDeep(D))},x=D=>{var S;s.value=!0;let E=[];ar==null||ar.forEach(y=>{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),E.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:D[y.key],id:p.value,contents:y==null?void 0:y.options})}),D!=null&&D.children&&((S=D==null?void 0:D.children)==null?void 0:S.length)>0&&E.push({children:D==null?void 0:D.children,isFormColHidden:!0}),v.value=D==null?void 0:D.id,g.value=E,u.value=E},L=D=>{s.value=!0;let E=[];ar==null||ar.forEach(S=>{let y=O.cloneDeep(p.value)+1;m.setTableIndex(y),E.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:p.value,contents:S==null?void 0:S.options})}),c.value=D==null?void 0:D.id,g.value=E,u.value=E},C=D=>{let E=O.cloneDeep(u.value);E=E==null?void 0:E.map(S=>(S.children||(S.value=D==null?void 0:D[S.name]),S)),u.value=E},U=()=>{var E,S;g.value=u.value;let D={};if(v.value!=="")D.id=v.value,(E=g.value)==null||E.forEach(y=>{const k=ar==null?void 0:ar.find(F=>(F==null?void 0:F.label)===(y==null?void 0:y.label));k?D[k.key]=y.value:y!=null&&y.children&&y.children.length>0&&(D.children=y.children)}),s.value=!1,o("fixChange",{contents:O.cloneDeep(D),id:c.value,type:"fix"});else{let y=O.cloneDeep(p.value)+1;m.setTableIndex(y),D.id="idChild"+p.value,(S=g.value)==null||S.forEach(k=>{const F=ar==null?void 0:ar.find($=>($==null?void 0:$.label)===(k==null?void 0:k.label));F?D[F.key]=k.value:k!=null&&k.children&&k.children.length>0&&(D.children=k.children)}),s.value=!1,o("fixChange",{contents:O.cloneDeep(D),id:c.value,type:"add"})}v.value="",g.value=[],u.value=[]},I=()=>{s.value=!1,v.value="",c.value="",g.value=[],u.value=[]},H=D=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",D),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},G=D=>{o("deleteChange",D)};return(D,E)=>{const S=a.resolveComponent("svg-icon"),y=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",V3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r==null?void 0:r.tableChildContents,(k,F)=>(a.openBlock(),a.createElementBlock("div",P3,[a.createElementVNode("div",F3,[a.createElementVNode("div",j3,a.toDisplayString(k.label),1),a.createElementVNode("div",H3,[a.createVNode(S,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(k)},null,8,["onClick"]),a.createVNode(S,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>x(k)},null,8,["onClick"]),a.createVNode(S,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>H(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",U3,[a.createVNode($3,{tableChildContents:k==null?void 0:k.children,onDeleteChange:G,onFixChange:_},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(xr.ssDialog,{visible:s.value,onBeforeDestroy:I,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",q3,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",W3,[a.createVNode(y,{onClick:I,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>E[0]||(E[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(y,{class:"ok-button button",onClick:U,id:"themeButton"},{default:a.withCtx(()=>E[1]||(E[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Sc=Yl._export_sfc(K3,[["__scopeId","data-v-ebd68fa1"]]),G3={class:"table-operate-content"},Y3={class:"table-operate-item"},J3={class:"operate-title"},X3={class:"operate-content"},Z3={class:"fix-content"},Q3={class:"fix-content-label"},e1={class:"fix-button"},a1={key:0},l1={class:"operate-title"},r1={class:"operate-content"},n1={class:"fix-content"},o1={class:"fix-content-label"},i1={class:"fix-button"},s1={class:"operate-title"},c1={class:"operate-content"},u1={class:"fix-content"},d1={class:"fix-content-label"},p1={class:"fix-button"},f1={class:"operate-title"},h1={class:"operate-content"},v1={class:"fix-content"},m1={class:"fix-content-label"},y1={class:"fix-button"},g1={class:"operate-content"},b1={style:{display:"flex","justify-content":"space-between"}},k1={class:"form-content"},x1={class:"dialog-footer"},w1={class:"form-content"},_1={class:"dialog-footer"},C1={class:"form-content"},E1={class:"dialog-footer"},S1={class:"form-content"},D1={class:"dialog-footer"},B1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.ref([]),c=a.ref(!1),m=a.ref(!1),p=a.ref([]),v=a.ref(!1),g=a.ref([]),u=a.ref(!1),_=a.ref([]),x=a.ref(""),L=a.ref(""),C=a.ref([]),U=a.ref([]),I=a.ref([]),H=a.ref([]),G=a.ref(!1),D=a.ref([]),E=a.ref([]),S=a.ref(0),y=a.ref([]),k=a.ref([]),F=a.ref([]),$=()=>{G.value=!0;let P=[];Ln==null||Ln.forEach(V=>{S.value++,P.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:S.value,contents:V==null?void 0:V.options})}),D.value=P,E.value=P},Y=()=>{var V,Z,oe;m.value=!0;let P=[];(oe=(Z=(V=ua.FormContent)==null?void 0:V.find(te=>(te==null?void 0:te.key)==="Input"))==null?void 0:Z.value)==null||oe.forEach(te=>{S.value++,P.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?void 0:te.label)==="类型"?"Input":"",id:S.value,contents:te==null?void 0:te.options})}),y.value=P,k.value=P},pe=P=>{P||(y.value=k.value)},Ne=async P=>{var V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja;if((P==null?void 0:P.类型)!==((Z=(V=k.value)==null?void 0:V.find(he=>(he==null?void 0:he.label)==="类型"))==null?void 0:Z.value)){let he=[],Ze=await((ka=(te=(oe=ua.FormContent)==null?void 0:oe.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:te.value)==null?void 0:ka.value)?await((ya=(Ea=(we=ua.FormContent)==null?void 0:we.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ea.value)==null?void 0:ya.value):(Re=(oa=ua.FormContent)==null?void 0:oa.find(Te=>(Te==null?void 0:Te.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Re.value;if(Ze==null||Ze.forEach(Te=>{S.value++,he.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:S.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.菜单选项&&((Fa=P==null?void 0:P.菜单选项)==null?void 0:Fa.length)>0){const Te=await ua.menuToContentType(P==null?void 0:P.菜单选项);he=he==null?void 0:he.map(Qe=>((Qe==null?void 0:Qe.name)==="组信息选项"&&(Qe.contents=Te),Qe))}k.value=await ua.selectToBase(O.cloneDeep(he)),y.value=await ua.selectToBase(O.cloneDeep(he))}else{let he=O.cloneDeep(y.value);if(he=he==null?void 0:he.map(Ze=>(Ze.value=P==null?void 0:P[Ze.name],Ze)),P!=null&&P.菜单选项&&((ja=P==null?void 0:P.菜单选项)==null?void 0:ja.length)>0){const Ze=await ua.menuToContentType(P==null?void 0:P.菜单选项);he=he==null?void 0:he.map(Te=>((Te==null?void 0:Te.name)==="组信息选项"&&(Te.contents=Ze),Te))}he=ua.formToOptionsContents(he),k.value=await ua.selectToBase(O.cloneDeep(he))}},Ce=async P=>{await Ne(P),y.value=k.value},Q=(P,V)=>{if((V==null?void 0:V.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const Z=V==null?void 0:V.optionUrl;return(Z==null?void 0:Z.selectRelateType)||V[P.key]}if((V==null?void 0:V.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const Z=V==null?void 0:V.optionUrl;return(Z==null?void 0:Z.menuSelect)||V[P.key]}if((V==null?void 0:V.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const Z=V==null?void 0:V.optionUrl;return(Z==null?void 0:Z.groupSelect)||V[P.key]}if((V==null?void 0:V.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(V==null?void 0:V.value)||V[P.key];if((V==null?void 0:V.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const Z=V[P.key];return Gs(Z)?Z:P.default}return(P==null?void 0:P.label)==="类型"&&V[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!V[P.key]?!1:V[P.key]},ye=async P=>{var oe,te,ka,oa,Re,we,Ea,ya,Fa;m.value=!0;let V=[];const Z=await((ka=(te=(oe=ua.FormContent)==null?void 0:oe.find(ja=>(ja==null?void 0:ja.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:te.value)==null?void 0:ka.value)?await((ya=(Ea=(we=ua.FormContent)==null?void 0:we.find(ja=>(ja==null?void 0:ja.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ea.value)==null?void 0:ya.value):(Re=(oa=ua.FormContent)==null?void 0:oa.find(ja=>(ja==null?void 0:ja.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Re.value;if(Z==null||Z.forEach(ja=>{S.value++,V.push({label:ja==null?void 0:ja.label,name:(ja==null?void 0:ja.name)||(ja==null?void 0:ja.label),type:ja.type,value:(ja==null?void 0:ja.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):Q(ja,P),id:S.value,contents:ja==null?void 0:ja.options})}),P!=null&&P.menuSelect&&((Fa=P==null?void 0:P.menuSelect)==null?void 0:Fa.length)>0){const ja=await ua.menuToContentType(P==null?void 0:P.menuSelect);V=V==null?void 0:V.map(he=>((he==null?void 0:he.name)==="组信息选项"&&(he.contents=ja),he))}x.value=P==null?void 0:P.id,y.value=await ua.selectToBase(ua.formToOptionsContents(V)),k.value=await ua.selectToBase(ua.formToOptionsContents(V))},X=P=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,Z;F.value=(V=O.cloneDeep(F.value))==null?void 0:V.filter(oe=>(oe==null?void 0:oe.id)!==(P==null?void 0:P.id)),o("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(oe=>((oe==null?void 0:oe.key)==="tableToForm"&&(oe.contents=F.value),oe))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=()=>{m.value=!1,y.value=[],x.value=""},qe=async()=>{var oe,te,ka,oa,Re,we,Ea,ya,Fa,ja;y.value=k.value;let P={};x.value!==""?P.id=x.value:(S.value++,P.id="id"+S.value);let V=await((ka=(te=(oe=ua.FormContent)==null?void 0:oe.find(he=>{var Ze,Te;return(he==null?void 0:he.key)===(((Te=(Ze=y.value)==null?void 0:Ze.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:te.value)==null?void 0:ka.value)??((Re=(oa=ua.FormContent)==null?void 0:oa.find(he=>{var Ze,Te;return(he==null?void 0:he.key)===(((Te=(Ze=y.value)==null?void 0:Ze.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:Re.value);if((we=y.value)==null||we.forEach(he=>{const Ze=V==null?void 0:V.find(Te=>(Te==null?void 0:Te.label)===(he==null?void 0:he.label));Ze&&(P[Ze.key]=he.value)}),P.name=P.label,(Ea=F.value)!=null&&Ea.find(he=>he.id===P.id))F.value=(ya=F.value)==null?void 0:ya.map(he=>(he.id===P.id&&(he=P),he));else{let he=O.cloneDeep(F.value);F.value||(F.value=[]),he.push(P),F.value=he}F.value=F.value.map(({id:he,...Ze})=>Ze),m.value=!1,x.value="";let Z=O.cloneDeep(r.originalItemContents);(Fa=O.cloneDeep(r.originalItemContents))!=null&&Fa.find(he=>(he==null?void 0:he.key)==="tableToForm")?Z=(ja=O.cloneDeep(r.originalItemContents))==null?void 0:ja.map(he=>((he==null?void 0:he.key)==="tableToForm"&&(he.contents=F.value),he)):Z.push({key:"tableToForm",contents:F.value}),o("change",Z)},Da=P=>{G.value=!0;let V=[];Ln==null||Ln.forEach(Z=>{S.value++,V.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:P[Z.key],id:S.value,contents:Z==null?void 0:Z.options})}),x.value=P==null?void 0:P.id,D.value=V,E.value=V};a.watch(()=>u.value,()=>{var V,Z;let P=O.cloneDeep(r.originalItemContents);(V=O.cloneDeep(r.originalItemContents))!=null&&V.find(oe=>(oe==null?void 0:oe.key)==="page")?P=(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(oe=>((oe==null?void 0:oe.key)==="page"&&(oe.contents=u.value),oe)):P.push({key:"page",contents:u.value}),o("change",P)},{deep:!0});const ne=P=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,Z;U.value=(V=O.cloneDeep(U.value))==null?void 0:V.filter(oe=>(oe==null?void 0:oe.id)!==(P==null?void 0:P.id)),o("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(oe=>((oe==null?void 0:oe.key)==="extraButton"&&(oe.contents=U.value),oe))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var Z,oe,te,ka,oa;D.value=E.value;let P={};if(x.value!==""?P.id=x.value:(S.value++,P.id="id"+S.value),(Z=D.value)==null||Z.forEach(Re=>{const we=Ln==null?void 0:Ln.find(Ea=>(Ea==null?void 0:Ea.label)===(Re==null?void 0:Re.label));we?P[we.key]=Re.value:Re!=null&&Re.children&&Re.children.length>0&&(P.children=Re.children)}),(oe=U.value)!=null&&oe.find(Re=>Re.id===P.id))U.value=(te=U.value)==null?void 0:te.map(Re=>(Re.id===P.id&&(Re=P),Re));else{let Re=O.cloneDeep(U.value)??[];Re.push(P),U.value=Re}G.value=!1,x.value="";let V=O.cloneDeep(r.originalItemContents);(ka=O.cloneDeep(r.originalItemContents))!=null&&ka.find(Re=>(Re==null?void 0:Re.key)==="extraButton")?V=(oa=O.cloneDeep(r.originalItemContents))==null?void 0:oa.map(Re=>((Re==null?void 0:Re.key)==="extraButton"&&(Re.contents=U.value),Re)):V.push({key:"extraButton",contents:U.value}),o("change",V)},re=P=>{let V=O.cloneDeep(E.value);V=V==null?void 0:V.map(Z=>(Z.children||(Z.value=P==null?void 0:P[Z.name]),Z)),E.value=V},be=()=>{G.value=!1,D.value=[],x.value=""},ce=P=>{v.value=!0;let V=[];Rn==null||Rn.forEach(Z=>{S.value++,V.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:P[Z.key],id:S.value,contents:Z==null?void 0:Z.options})}),x.value=P==null?void 0:P.id,I.value=V,H.value=V},Se=P=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,Z;C.value=(V=O.cloneDeep(C.value))==null?void 0:V.filter(oe=>(oe==null?void 0:oe.id)!==(P==null?void 0:P.id)),o("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(oe=>((oe==null?void 0:oe.key)==="rowButton"&&(oe.contents=C.value),oe))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},va=()=>{c.value=!0;let P=[];ar==null||ar.forEach(V=>{S.value++,P.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:S.value,contents:V==null?void 0:V.options})}),g.value=P,_.value=P},Ca=()=>{v.value=!0;let P=[];Rn==null||Rn.forEach(V=>{S.value++,P.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:S.value,contents:V==null?void 0:V.options})}),I.value=P,H.value=P},Ga=P=>{let V=O.cloneDeep(H.value);V=V==null?void 0:V.map(Z=>(Z.children||(Z.value=P==null?void 0:P[Z.name]),Z)),H.value=V},le=()=>{var Z,oe,te,ka,oa;I.value=H.value;let P={};if(x.value!==""?P.id=x.value:(S.value++,P.id="id"+S.value),(Z=I.value)==null||Z.forEach(Re=>{const we=Rn==null?void 0:Rn.find(Ea=>(Ea==null?void 0:Ea.label)===(Re==null?void 0:Re.label));we?P[we.key]=Re.value:Re!=null&&Re.children&&Re.children.length>0&&(P.children=Re.children)}),(oe=C.value)!=null&&oe.find(Re=>Re.id===P.id))C.value=(te=C.value)==null?void 0:te.map(Re=>(Re.id===P.id&&(Re=P),Re));else{let Re=O.cloneDeep(C.value);Re.push(P),C.value=Re}v.value=!1,x.value="";let V=O.cloneDeep(r.originalItemContents);(ka=O.cloneDeep(r.originalItemContents))!=null&&ka.find(Re=>(Re==null?void 0:Re.key)==="rowButton")?V=(oa=O.cloneDeep(r.originalItemContents))==null?void 0:oa.map(Re=>((Re==null?void 0:Re.key)==="rowButton"&&(Re.contents=C.value),Re)):V.push({key:"rowButton",contents:C.value}),o("change",V)},na=()=>{v.value=!1,x.value="",H.value=[],I.value=[]},Pe=P=>{c.value=!0;let V=[];ar==null||ar.forEach(Z=>{S.value++,V.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:"",id:S.value,contents:Z==null?void 0:Z.options})}),g.value=V,L.value=P==null?void 0:P.id,_.value=V},wa=P=>{var V;p.value=wc(O.cloneDeep(p.value),P==null?void 0:P.id),o("change",(V=O.cloneDeep(r.originalItemContents))==null?void 0:V.map(Z=>{var oe;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(oe=p.value)!=null&&oe.some(te=>te==null?void 0:te.children)?[p.value]:p.value),Z}))},Fe=P=>{var Z,oe,te;P.type==="fix"?P.id!==""?p.value=Cc(p.value,P):p.value=_c(p.value,P==null?void 0:P.contents):p.value=Ec(p.value,P),p.value=(Z=p.value)!=null&&Z.some(ka=>ka==null?void 0:ka.children)?[p.value]:p.value,x.value="";let V=O.cloneDeep(r.originalItemContents);(oe=O.cloneDeep(r.originalItemContents))!=null&&oe.find(ka=>(ka==null?void 0:ka.key)==="header")?V=(te=O.cloneDeep(r.originalItemContents))==null?void 0:te.map(ka=>((ka==null?void 0:ka.key)==="header"&&(ka.contents=p.value),ka)):V.push({key:"header",contents:p.value}),o("change",V)},ze=P=>{var Z;c.value=!0;let V=[];ar==null||ar.forEach(oe=>{S.value++,V.push({label:oe==null?void 0:oe.label,name:oe==null?void 0:oe.label,type:oe.type,value:P[oe.key],id:S.value,contents:oe==null?void 0:oe.options})}),P!=null&&P.children&&((Z=P==null?void 0:P.children)==null?void 0:Z.length)>0&&V.push({children:P==null?void 0:P.children,isFormColHidden:!0}),x.value=P==null?void 0:P.id,L.value="",g.value=V,_.value=V},Ve=P=>{let V=O.cloneDeep(_.value);V=V==null?void 0:V.map(Z=>(Z.children||(Z.value=P==null?void 0:P[Z.name]),Z)),_.value=V},ea=()=>{c.value=!1,x.value="",L.value="",_.value=[]},Ja=()=>{var Z,oe,te,ka,oa,Re;g.value=_.value;let P={};if(x.value!==""?P.id=x.value:(S.value++,P.id="id"+S.value),(Z=g.value)==null||Z.forEach(we=>{const Ea=ar==null?void 0:ar.find(ya=>(ya==null?void 0:ya.label)===(we==null?void 0:we.label));Ea?P[Ea.key]=we.value:we!=null&&we.children&&we.children.length>0&&(P.children=we.children)}),(oe=p.value)!=null&&oe.find(we=>we.id===P.id))p.value=(te=p.value)==null?void 0:te.map(we=>(we.id===P.id&&(we=P),we));else{let we=O.cloneDeep(p.value)??[];L.value===""?we.push(P):we=we==null?void 0:we.map(Ea=>(Ea.id===L.value&&(Ea.children||(Ea.children=[]),Ea.children.push(P)),Ea)),p.value=we}p.value=(ka=p.value)!=null&&ka.some(we=>we==null?void 0:we.children)?[p.value]:p.value,c.value=!1,x.value="",L.value="";let V=O.cloneDeep(r.originalItemContents);(oa=O.cloneDeep(r.originalItemContents))!=null&&oa.find(we=>(we==null?void 0:we.key)==="header")?V=(Re=O.cloneDeep(r.originalItemContents))==null?void 0:Re.map(we=>((we==null?void 0:we.key)==="header"&&(we.contents=p.value),we)):V.push({key:"header",contents:p.value}),o("change",V)},qa=P=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,Z;p.value=(V=O.cloneDeep(p.value))==null?void 0:V.filter(oe=>(oe==null?void 0:oe.id)!==(P==null?void 0:P.id)),o("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(oe=>{var te;return(oe==null?void 0:oe.key)==="header"&&(oe.contents=(te=p.value)!=null&&te.some(ka=>ka==null?void 0:ka.children)?[p.value]:p.value),oe})),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>r.originalItemContents,()=>{var P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(s.value=O.cloneDeep(r.originalItemContents),p.value=(V=(P=s.value)==null?void 0:P.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:V.contents,C.value=(oe=(Z=s.value)==null?void 0:Z.find(_e=>(_e==null?void 0:_e.key)==="rowButton"))==null?void 0:oe.contents,U.value=(ka=(te=s.value)==null?void 0:te.find(_e=>(_e==null?void 0:_e.key)==="extraButton"))==null?void 0:ka.contents,u.value=(Re=(oa=s.value)==null?void 0:oa.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&Re.contents?!!((Ea=(we=s.value)==null?void 0:we.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&Ea.contents):!1,F.value=(Fa=(ya=s.value)==null?void 0:ya.find(_e=>(_e==null?void 0:_e.key)==="tableToForm"))==null?void 0:Fa.contents,p.value=(ja=p.value)==null?void 0:ja.map((_e,pa)=>(Array.isArray(_e)?_e=D3(_e):_e={label:(_e==null?void 0:_e.label)??"",prop:(_e==null?void 0:_e.label)==="操作"?"operate":_e==null?void 0:_e.prop,width:_e!=null&&_e.width?parseInt(_e.width):"",fixed:(_e==null?void 0:_e.fixed)??void 0,sortable:(_e==null?void 0:_e.sortable)??!1,align:(_e==null?void 0:_e.align)??"left",showOverflowTooltip:(_e==null?void 0:_e.showOverflowTooltip)??!0,isNotDrag:(_e==null?void 0:_e.isNotDrag)??!1,isEditCol:(_e==null?void 0:_e.isEditCol)??!1,isOperate:(_e==null?void 0:_e.isOperate)??!1,id:(_e==null?void 0:_e.id)??pa,formMenuSelect:(_e==null?void 0:_e.formMenuSelect)??void 0,groupSelect:(_e==null?void 0:_e.groupSelect)??void 0},_e)),p.value=(he=p.value)!=null&&he.every(_e=>Array.isArray(_e))?(Ze=p.value)==null?void 0:Ze[0]:p.value,C.value=(Te=C.value)==null?void 0:Te.map((_e,pa)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",textColor:(_e==null?void 0:_e.textColor)??"#000000",id:(_e==null?void 0:_e.id)??pa}),U.value=(Qe=U.value)==null?void 0:Qe.map((_e,pa)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",background:(_e==null?void 0:_e.background)??"var(--ssComponent-primary-color)",id:(_e==null?void 0:_e.id)??pa}),F.value)F.value=(Oe=F.value)==null?void 0:Oe.map(_e=>{S.value++;let pa=_e;return pa.id=S.value,pa});else{let _e=[];const pa=(je=ua.getColumnChild(O.cloneDeep(p.value)))==null?void 0:je.filter(ra=>(ra==null?void 0:ra.prop)!=="operate");pa==null||pa.forEach(ra=>{var $a;S.value++,_e.push({label:ra==null?void 0:ra.label,name:(ra==null?void 0:ra.prop)||(ra==null?void 0:ra.label),type:ra!=null&&ra.groupSelect?"Select":"Input",value:"",id:S.value,contents:ra==null?void 0:ra.options,menuSelect:ra==null?void 0:ra.formMenuSelect,groupSelect:($a=ra==null?void 0:ra.groupSelect)==null?void 0:$a.split(":"),selectRelateType:"关联绑定列"})}),F.value=_e}},{deep:!0,immediate:!0}),(P,V)=>{const Z=a.resolveComponent("svg-icon"),oe=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",G3,[a.createElementVNode("div",Y3,[a.createElementVNode("div",J3,[V[2]||(V[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(oe,{class:"icon-content",onClick:va,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[V[1]||(V[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",X3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(te,ka)=>(a.openBlock(),a.createElementBlock("div",{key:ka},[a.createElementVNode("div",Z3,[a.createElementVNode("div",Q3,a.toDisplayString(te==null?void 0:te.label),1),a.createElementVNode("div",e1,[a.createVNode(Z,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Pe(te)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>ze(te)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>qa(te)},null,8,["onClick"])])]),te!=null&&te.children&&te.children.length>0?(a.openBlock(),a.createElementBlock("div",a1,[a.createVNode(Sc,{tableChildContents:te==null?void 0:te.children,onDeleteChange:wa,onFixChange:Fe},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",l1,[V[4]||(V[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Ca},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[V[3]||(V[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",r1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.value,(te,ka)=>(a.openBlock(),a.createElementBlock("div",{key:ka},[a.createElementVNode("div",n1,[a.createElementVNode("div",o1,a.toDisplayString(te==null?void 0:te.label),1),a.createElementVNode("div",i1,[a.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>ce(te)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>Se(te)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",s1,[V[6]||(V[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:$},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[V[5]||(V[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",c1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(U.value,(te,ka)=>(a.openBlock(),a.createElementBlock("div",{key:ka},[a.createElementVNode("div",u1,[a.createElementVNode("div",d1,a.toDisplayString(te==null?void 0:te.label),1),a.createElementVNode("div",p1,[a.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>Da(te)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>ne(te)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",f1,[V[8]||(V[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Y},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[V[7]||(V[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",h1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(F.value,(te,ka)=>(a.openBlock(),a.createElementBlock("div",{key:ka},[a.createElementVNode("div",v1,[a.createElementVNode("div",m1,a.toDisplayString(te==null?void 0:te.label),1),a.createElementVNode("div",y1,[a.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:oa=>ye(te)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:oa=>X(te)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",g1,[a.createElementVNode("div",b1,[V[9]||(V[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(dl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":V[0]||(V[0]=te=>u.value=te)},null,8,["modelValue"])])])]),a.createVNode(xr.ssDialog,{visible:c.value,onBeforeDestroy:ea,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",k1,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:Ve},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",x1,[a.createVNode(oe,{onClick:ea,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>V[11]||(V[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(oe,{class:"ok-button button",onClick:Ja,id:"themeButton"},{default:a.withCtx(()=>V[12]||(V[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(xr.ssDialog,{visible:v.value,onBeforeDestroy:na,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",w1,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ga},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",_1,[a.createVNode(oe,{onClick:na,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>V[13]||(V[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(oe,{class:"ok-button button",onClick:le,id:"themeButton"},{default:a.withCtx(()=>V[14]||(V[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(xr.ssDialog,{visible:G.value,onBeforeDestroy:be,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",C1,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",E1,[a.createVNode(oe,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>V[15]||(V[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(oe,{class:"ok-button button",onClick:B,id:"themeButton"},{default:a.withCtx(()=>V[16]||(V[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(xr.ssDialog,{visible:m.value,onBeforeDestroy:se,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",S1,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Ne,onChangeVisible:pe,onBlurChange:Ce},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",D1,[a.createVNode(oe,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>V[17]||(V[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(oe,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:a.withCtx(()=>V[18]||(V[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},N1=Yl._export_sfc(B1,[["__scopeId","data-v-7a6b87b5"]]),T1=O.useModelComp(O.pinia),{pageMapState:A1}=O.storeToRefs(T1),z1=O.useMenuState(O.pinia),{activeMenuPath:M1}=O.storeToRefs(z1),I1=a.ref(24),O1=a.ref(6),L1=a.ref(70),R1=a.ref(.18),$1=a.ref(45),V1=(l,n,r,o)=>{var s,c,m,p,v,g,u,_,x,L,C,U,I,H,G,D;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||n%2*12,y:((p=(m=l==null?void 0:l.value)==null?void 0:m.tableData)==null?void 0:p.y)||n,w:((g=(v=l==null?void 0:l.value)==null?void 0:v.tableData)==null?void 0:g.w)||I1.value,h:((_=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:_.h)||r,minW:((L=(x=l==null?void 0:l.value)==null?void 0:x.tableData)==null?void 0:L.minW)||O1.value,minH:((U=(C=l==null?void 0:l.value)==null?void 0:C.tableData)==null?void 0:U.minH)||R1.value,maxH:((H=(I=l==null?void 0:l.value)==null?void 0:I.tableData)==null?void 0:H.maxH)||$1.value,i:((D=(G=l==null?void 0:l.value)==null?void 0:G.tableData)==null?void 0:D.i)||n,id:(l==null?void 0:l.id)||n+"",component:o}},P1=(l,n)=>{var o,s,c,m,p,v,g,u;let r=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((o=l==null?void 0:l.comp)==null?void 0:o.toUpperCase())==="TABLE"){if(((m=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:m.length)===0)return 2}else((p=l==null?void 0:l.comp)==null?void 0:p.toUpperCase())==="FORM"&&(r=((u=(g=(v=l==null?void 0:l.compData)==null?void 0:v.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:g.contents)==null?void 0:u.length)/5);return r*2},Dc=(l,n,r)=>{var m,p;const o=(p=(m=A1.value)==null?void 0:m[M1.value])==null?void 0:p.filter(v=>{var g;return((g=v==null?void 0:v.key)==null?void 0:g.type)==="gridLayout"}),s=o==null?void 0:o.find(v=>{var g,u,_;return((_=(u=(g=v==null?void 0:v.value)==null?void 0:g.tableData)==null?void 0:u.component)==null?void 0:_.id)===l.id}),c=P1(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((v,g)=>Dc(v,g))),{...V1(s,n,c,l)}},F1=(l,n)=>{if((l==null?void 0:l.length)===0)return[];const r=O.cloneDeep(l);return Array.isArray(l)?r==null?void 0:r.map((o,s)=>Dc(o,s)):[]},j1=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}]}]}}),H1=(l,n)=>l==null?void 0:l.map(r=>{for(const o in n)if(o===(r==null?void 0:r.prop))return{...r,value:n[o]};return r}),U1=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,o=n,s=a.ref([]);a.watch(()=>r.compType,p=>{var u;const v=j1(r==null?void 0:r.optionItems),g=p?(u=v[p==null?void 0:p.toUpperCase()])==null?void 0:u[r==null?void 0:r.target]:[];s.value=g==null?void 0:g.map(_=>{for(const[x,L]of Object.entries((r==null?void 0:r.comp)||{}))if((_==null?void 0:_.prop)===x)return{..._,value:L};return _})},{immediate:!0});const c=p=>dl.getComponent(p),m=p=>{var v,g;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.value)==="horizontal"?s.value=(v=s.value)==null?void 0:v.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(x=>({...x,disabled:!0}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!0}:u}):s.value=(g=s.value)==null?void 0:g.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(x=>({...x,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),o("change",{target:r==null?void 0:r.target,styleConfigs:s.value,prop:p==null?void 0:p.prop})};return(p,v)=>{const g=a.resolveComponent("el-col"),u=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,_=>(a.openBlock(),a.createBlock(u,{class:"style-row",key:_==null?void 0:_.prop},{default:a.withCtx(()=>[a.createVNode(g,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),a.createVNode(g,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(_.type)),{modelValue:_.value,"onUpdate:modelValue":x=>_.value=x,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:x=>m(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),q1=Yl._export_sfc(U1,[["__scopeId","data-v-6c233914"]]),W1=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,o=n,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),m=H=>H==null?void 0:H.reduce((G,D)=>(G[D==null?void 0:D.prop]=D==null?void 0:D.rule,G),{}),p=a.computed(()=>({formRules:m(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),v=a.ref([]),g=a.ref(""),u=(H,G,D)=>{var y;let E=[];(r==null?void 0:r.activeTabName)==="任务配置"?(E=[{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:H},{label:"按钮名称",value:"按钮名称",children:G}]},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(E=[{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:(y=r==null?void 0:r.relatedData)==null?void 0:y.map(k=>({label:k==null?void 0:k.任务名称,value:k==null?void 0:k.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let S;return D&&(D==null?void 0:D.length)>0?S=[...E,..._(H,G,D)]:S=E,S},_=(H,G,D)=>{const E=[{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 D?E==null?void 0:E.filter(S=>D==null?void 0:D.includes(S==null?void 0:S.prop)):E},x=(H,G)=>{var k,F,$,Y,pe,Ne,Ce,Q,ye;const D=((pe=(Y=($=(F=(k=r==null?void 0:r.comp)==null?void 0:k.compData)==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:$.contents)==null?void 0:Y.filter(X=>(X==null?void 0:X.label)!=="操作"))==null?void 0:pe.map(X=>({value:X==null?void 0:X.prop,label:X.label})))||[],E=/button/i,S=((ye=(Q=(Ce=(Ne=r==null?void 0:r.comp)==null?void 0:Ne.compData)==null?void 0:Ce.filter(X=>E.test(X==null?void 0:X.key)))==null?void 0:Q.flatMap(X=>X==null?void 0:X.contents))==null?void 0:ye.map(X=>({value:X==null?void 0:X.label,label:X.label})))||[],y=u(D,S,H);v.value=G?H1(y,G):y,H&&(H==null?void 0:H.length)>0&&c.value.push(...H==null?void 0:H.map(X=>({prop:X,rule:s})))};a.onMounted(()=>{x(null,r==null?void 0:r.extendItem)});const L=H=>{const G=H==null?void 0:H[g.value];if(g.value==="执行任务"){if(!(G!=null&&G.join("/")))return;const D=G==null?void 0:G.join("/");x(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,H)}},C=H=>{o("change",{target:r==null?void 0:r.target,extendConfigs:H})},U=(H,G)=>{g.value=G==null?void 0:G.changeProp,L(H)},I=H=>{o("onButtonClick",H)};return(H,G)=>(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:v.value,key:v.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:C,onBlurChange:U,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue"]))}}),K1=Yl._export_sfc(W1,[["__scopeId","data-v-7c660c1f"]]),G1={};function Y1(l,n){return null}const J1=Yl._export_sfc(G1,[["render",Y1]]),X1={class:"form-operate-content"},Z1={class:"form-operate-item"},Q1={class:"operate-title"},e2={class:"operate-content"},a2={class:"fix-content"},l2={class:"fix-button"},r2={class:"operate-title"},n2={class:"operate-content"},o2={class:"fix-content"},i2={class:"fix-button"},t2={style:{display:"flex","justify-content":"space-between"}},s2={class:"form-content"},c2={class:"dialog-footer"},u2={class:"form-content"},d2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(!1),c=a.ref([]),m=a.ref([]),p=a.ref(!1),v=a.ref([]),g=a.ref([]),u=a.ref(""),_=a.ref(!1),x=a.ref(0),L=a.ref([]),C=a.ref([]),U=(Q,ye)=>{if((ye==null?void 0:ye.type)=="Select"&&(Q==null?void 0:Q.key)==="selectRelateType"){const X=ye==null?void 0:ye.optionUrl;return(X==null?void 0:X.selectRelateType)||ye[Q.key]}if((ye==null?void 0:ye.type)=="Select"&&(Q==null?void 0:Q.key)==="menuSelect"){const X=ye==null?void 0:ye.optionUrl;return(X==null?void 0:X.menuSelect)||ye[Q.key]}if((ye==null?void 0:ye.type)=="Select"&&(Q==null?void 0:Q.key)==="groupSelect"){const X=ye==null?void 0:ye.optionUrl;return(X==null?void 0:X.groupSelect)||ye[Q.key]}if((ye==null?void 0:ye.type)=="Select"&&(Q==null?void 0:Q.key)==="originalContent")return(ye==null?void 0:ye.value)||ye[Q.key];if((ye==null?void 0:ye.type)=="Select"&&(Q==null?void 0:Q.key)==="multiple"){const X=ye[Q.key];return Gs(X)?X:Q.default}return(Q==null?void 0:Q.label)==="类型"&&ye[Q.key]===""?"Input":(Q==null?void 0:Q.key)==="isFormColHidden"&&!ye[Q.key]?!1:ye[Q.key]},I=async Q=>{var se,qe,Da,ne,B,re;s.value=!0;let ye=[];const X=await((Da=(qe=(se=ua.FormContent)==null?void 0:se.find(be=>(be==null?void 0:be.key)===((Q==null?void 0:Q.type)===""?"Input":Q==null?void 0:Q.type)))==null?void 0:qe.value)==null?void 0:Da.value)??((B=(ne=ua.FormContent)==null?void 0:ne.find(be=>(be==null?void 0:be.key)===((Q==null?void 0:Q.type)===""?"Input":Q==null?void 0:Q.type)))==null?void 0:B.value);if(X==null||X.forEach(be=>{x.value++,ye.push({label:be==null?void 0:be.label,name:be==null?void 0:be.label,type:be.type,prop:be==null?void 0:be.prop,value:U(be,Q),id:x.value,contents:be==null?void 0:be.options,width:(Q==null?void 0:Q.width)??1})}),Q!=null&&Q.menuSelect&&((re=Q==null?void 0:Q.menuSelect)==null?void 0:re.length)>0){const be=await ua.menuToContentType(Q==null?void 0:Q.menuSelect);ye=ye==null?void 0:ye.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=be),ce))}u.value=Q==null?void 0:Q.id,c.value=await ua.selectToBase(ua.formToOptionsContents(ye)),m.value=await ua.selectToBase(ua.formToOptionsContents(ye))},H=Q=>{var X;p.value=!0;let ye=[];(X=ua.FormButton)==null||X.forEach(se=>{x.value++,ye.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"&&Q[se.key]===""?"normal":Q[se.key],id:x.value,contents:se==null?void 0:se.options})}),L.value=ye,C.value=ye,u.value=Q==null?void 0:Q.id};a.watch(()=>_.value,()=>{var ye,X;let Q=O.cloneDeep(r.originalItemContents);(ye=O.cloneDeep(r.originalItemContents))!=null&&ye.find(se=>(se==null?void 0:se.key)==="enableWrap")?Q=(X=O.cloneDeep(r.originalItemContents))==null?void 0:X.map(se=>((se==null?void 0:se.key)==="enableWrap"&&(se.contents=!_.value),se)):Q.push({key:"enableWrap",contents:!_.value}),o("change",Q)},{deep:!0});const G=()=>{var X,se,qe,Da,ne;L.value=C.value;let Q={};if(u.value!==""?Q.id=u.value:(x.value++,Q.id="id"+x.value),(X=L.value)==null||X.forEach(B=>{var be;const re=(be=ua.FormButton)==null?void 0:be.find(ce=>(ce==null?void 0:ce.label)===(B==null?void 0:B.label));re&&(Q[re.key]=B.value)}),(se=v.value)!=null&&se.find(B=>B.id===Q.id))v.value=(qe=v.value)==null?void 0:qe.map(B=>(B.id===Q.id&&(B=Q),B));else{let B=O.cloneDeep(v.value);v.value||(v.value=[]),B.push(Q),v.value=B}p.value=!1,u.value="";let ye=O.cloneDeep(r.originalItemContents);(Da=O.cloneDeep(r.originalItemContents))!=null&&Da.find(B=>(B==null?void 0:B.key)==="formButton")?ye=(ne=O.cloneDeep(r.originalItemContents))==null?void 0:ne.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=v.value),B)):ye.push({key:"formButton",contents:v.value}),o("change",ye)},D=Q=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ye,X;g.value=(ye=O.cloneDeep(g.value))==null?void 0:ye.filter(se=>(se==null?void 0:se.id)!==(Q==null?void 0:Q.id)),o("change",(X=O.cloneDeep(r.originalItemContents))==null?void 0:X.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=g.value),se))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=Q=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ye,X;v.value=(ye=O.cloneDeep(v.value))==null?void 0:ye.filter(se=>(se==null?void 0:se.id)!==(Q==null?void 0:Q.id)),o("change",(X=O.cloneDeep(r.originalItemContents))==null?void 0:X.map(se=>((se==null?void 0:se.key)==="formButton"&&(se.contents=v.value),se))),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>{var ye;p.value=!0;let Q=[];(ye=ua.FormButton)==null||ye.forEach(X=>{x.value++,Q.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:(X==null?void 0:X.label)==="类型"?"normal":"",id:x.value,contents:X==null?void 0:X.options})}),L.value=Q,C.value=Q},y=()=>{var ye,X,se;s.value=!0;let Q=[];(se=(X=(ye=ua.FormContent)==null?void 0:ye.find(qe=>(qe==null?void 0:qe.key)==="Input"))==null?void 0:X.value)==null||se.forEach(qe=>{x.value++,Q.push({label:qe==null?void 0:qe.label,name:qe==null?void 0:qe.label,type:qe.type,value:(qe==null?void 0:qe.label)==="类型"?"Input":"",id:x.value,contents:qe==null?void 0:qe.options})}),c.value=Q,m.value=Q},k=Q=>{let ye=O.cloneDeep(C.value);ye=ye==null?void 0:ye.map(X=>(X.value=Q==null?void 0:Q[X.name],X)),C.value=ye},F=Q=>{const ye=Q.find(qe=>(qe==null?void 0:qe.name)==="类型");if((ye==null?void 0:ye.value)!="Select")return;const X=Q.find(qe=>(qe==null?void 0:qe.name)==="多选"),se=Q.find(qe=>(qe==null?void 0:qe.name)==="初始值");X!=null&&X.value&&_i.isString(se.value)&&(se.value=[se.value]),!(X!=null&&X.value)&&!_i.isString(se.value)&&(se.value="")},$=async Q=>{var ye,X,se,qe,Da,ne,B,re,be,ce,Se,va;if((Q==null?void 0:Q.类型)!==((X=(ye=m.value)==null?void 0:ye.find(Ca=>(Ca==null?void 0:Ca.label)==="类型"))==null?void 0:X.value)){let Ca=[];const Ga=await((Da=(qe=(se=ua.FormContent)==null?void 0:se.find(le=>(le==null?void 0:le.key)===((Q==null?void 0:Q.类型)===""?"Input":Q==null?void 0:Q.类型)))==null?void 0:qe.value)==null?void 0:Da.value)?await((ce=(be=(re=ua.FormContent)==null?void 0:re.find(le=>(le==null?void 0:le.key)===((Q==null?void 0:Q.类型)===""?"Input":Q==null?void 0:Q.类型)))==null?void 0:be.value)==null?void 0:ce.value):(B=(ne=ua.FormContent)==null?void 0:ne.find(le=>(le==null?void 0:le.key)===((Q==null?void 0:Q.类型)===""?"Input":Q==null?void 0:Q.类型)))==null?void 0:B.value;if(Ga==null||Ga.forEach(le=>{var Pe,wa;x.value++;const na=Su(le==null?void 0:le.default)?(Q==null?void 0:Q[le.label])??le.value??"":le==null?void 0:le.default;Ca.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:na,prop:le==null?void 0:le.prop,id:x.value,contents:le==null?void 0:le.options,width:((wa=(Pe=m.value)==null?void 0:Pe[0])==null?void 0:wa.width)??1})}),Q!=null&&Q.菜单选项&&((Se=Q==null?void 0:Q.菜单选项)==null?void 0:Se.length)>0){const le=await ua.menuToContentType(Q==null?void 0:Q.菜单选项);Ca=Ca==null?void 0:Ca.map(na=>((na==null?void 0:na.name)==="组信息选项"&&(na.contents=le),na))}F(Ca),m.value=await ua.selectToBase(O.cloneDeep(Ca)),c.value=await ua.selectToBase(O.cloneDeep(Ca))}else{let Ca=O.cloneDeep(m.value);if(Ca=Ca==null?void 0:Ca.map(Ga=>(Ga.value=Q==null?void 0:Q[Ga.name],Ga)),Q!=null&&Q.菜单选项&&((va=Q==null?void 0:Q.菜单选项)==null?void 0:va.length)>0){const Ga=await ua.menuToContentType(Q==null?void 0:Q.菜单选项);Ca=Ca==null?void 0:Ca.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=Ga),le))}Ca=ua.formToOptionsContents(Ca),F(Ca),m.value=await ua.selectToBase(O.cloneDeep(Ca))}},Y=Q=>{Q||(c.value=m.value)},pe=async Q=>{await $(Q),c.value=m.value},Ne=Pa.debounce(async()=>{var se,qe,Da,ne,B,re,be,ce,Se,va,Ca,Ga;c.value=m.value;let Q={};Q.width=((qe=(se=c.value)==null?void 0:se[0])==null?void 0:qe.width)??1,u.value!==""?Q.id=u.value:(x.value++,Q.id="id"+x.value);let ye=await((B=(ne=(Da=ua.FormContent)==null?void 0:Da.find(le=>{var na,Pe;return(le==null?void 0:le.key)===(((Pe=(na=c.value)==null?void 0:na.find(wa=>(wa==null?void 0:wa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:ne.value)==null?void 0:B.value)??((be=(re=ua.FormContent)==null?void 0:re.find(le=>{var na,Pe;return(le==null?void 0:le.key)===(((Pe=(na=c.value)==null?void 0:na.find(wa=>(wa==null?void 0:wa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:be.value);if((ce=c.value)==null||ce.forEach(le=>{const na=ye==null?void 0:ye.find(Pe=>(Pe==null?void 0:Pe.label)===(le==null?void 0:le.label));na&&(Q[na.key]=le.value)}),Q.width=Q.width?Q.width:1,Q.key=Q==null?void 0:Q.label,Q.isFormColHidden=Q==null?void 0:Q.isFormColHidden,(Se=g.value)!=null&&Se.find(le=>le.id===Q.id))g.value=(va=g.value)==null?void 0:va.map(le=>(le.id===Q.id&&(le=Q),le));else{let le=O.cloneDeep(g.value);le.push(Q),g.value=le}g.value=g.value.map(({id:le,...na})=>na),s.value=!1,u.value="";let X=O.cloneDeep(r.originalItemContents);(Ca=O.cloneDeep(r.originalItemContents))!=null&&Ca.find(le=>(le==null?void 0:le.key)==="formContent")?X=(Ga=O.cloneDeep(r.originalItemContents))==null?void 0:Ga.map(le=>((le==null?void 0:le.key)==="formContent"&&(le.contents=g.value),le)):X.push({key:"formContent",contents:g.value}),o("change",X)},300),Ce=()=>{s.value=!1,p.value=!1,u.value="",m.value=[],C.value=[]};return a.watch(()=>r.originalItemContents,()=>{var ye,X,se,qe,Da,ne;if(!r.originalItemContents||r.originalItemContents.length===0)return;const Q=O.cloneDeep(r.originalItemContents);g.value=((ye=Q==null?void 0:Q.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:ye.contents)??[],v.value=((X=Q==null?void 0:Q.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:X.contents)??[],_.value=(se=Q==null?void 0:Q.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&se.contents?!((qe=Q==null?void 0:Q.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&qe.contents):!0,g.value=(Da=O.cloneDeep(g.value))==null?void 0:Da.map((B,re)=>{var ce;let be=B;return be.id=(B==null?void 0:B.id)??re,B!=null&&B.label||(B.label=(B==null?void 0:B.key)??(B==null?void 0:B.label)??""),B!=null&&B.type||(B.type=(B==null?void 0:B.type)??""),B.contents=((ce=B==null?void 0:B.options)==null?void 0:ce.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,be}),g.value=ua.formToOptionsContents(g.value),v.value=(ne=v.value)==null?void 0:ne.map((B,re)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:re})},{deep:!0,immediate:!0}),(Q,ye)=>{const X=a.resolveComponent("svg-icon"),se=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",X1,[a.createElementVNode("div",Z1,[a.createElementVNode("div",Q1,[ye[2]||(ye[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(se,{class:"icon-content",id:"themeButton",onClick:y},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ye[1]||(ye[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",e2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(qe,Da)=>(a.openBlock(),a.createElementBlock("div",{key:Da},[a.createElementVNode("div",a2,[a.createElementVNode("div",null,a.toDisplayString(qe.label),1),a.createElementVNode("div",l2,[a.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ne=>I(qe)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ne=>D(qe)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",r2,[ye[4]||(ye[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(se,{class:"icon-content",id:"themeButton",onClick:S},{icon:a.withCtx(()=>[a.createVNode(X,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ye[3]||(ye[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",n2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(qe,Da)=>(a.openBlock(),a.createElementBlock("div",{key:Da},[a.createElementVNode("div",o2,[a.createElementVNode("div",null,a.toDisplayString(qe.label),1),a.createElementVNode("div",i2,[a.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ne=>H(qe)},null,8,["onClick"]),a.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ne=>E(qe)},null,8,["onClick"])])])]))),128))]),ye[6]||(ye[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",t2,[ye[5]||(ye[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(dl._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":ye[0]||(ye[0]=qe=>_.value=qe)},null,8,["modelValue"])])]),a.createVNode(xr.ssDialog,{visible:s.value,onBeforeDestroy:Ce,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",s2,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:$,onChangeVisible:Y,onBlurChange:pe},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",c2,[a.createVNode(se,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>ye[7]||(ye[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(se,{class:"ok-button button",onClick:a.unref(Ne),id:"themeButton"},{default:a.withCtx(()=>ye[8]||(ye[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(xr.ssDialog,{visible:p.value,onBeforeDestroy:Ce,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",u2,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:L.value,key:L.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:Ce,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:G},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gs=Yl._export_sfc(d2,[["__scopeId","data-v-20850524"]]),p2={class:"step-module content"},f2={class:"module-data"},h2={class:"step-module layout"},v2={class:"form-content"},m2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=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}]),c=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=a.reactive({visible:!1,width:"40%",title:"步骤条"}),v=a.ref("create"),g=a.ref({}),u=a.ref([]),_=I=>{var H;g.value=I,o("change",(H=C())==null?void 0:H.compData)},x=(I,H)=>{var G,D;switch(I){case"create":(G=c.value)==null||G.forEach(E=>{E.value=""}),v.value="create",p.visible=!0;break;case"update":(D=c.value)==null||D.forEach(E=>{E.value=H[E==null?void 0:E.prop]}),v.value="update",p.visible=!0;break;case"delete":u.value.splice(H,1),v.value="delete";break}},L=I=>{var H,G,D;if((I==null?void 0:I.buttonName)==="确认"){const E=O.cloneDeep(I==null?void 0:I.content);switch(Object.keys(E).forEach(S=>{E[S]===""&&delete E[S]}),v.value){case"create":u.value.push({...E,index:((H=u.value)==null?void 0:H.length)+1});break;case"update":u.value=(G=u.value)==null?void 0:G.map(S=>S.index===(E==null?void 0:E.index)?{...S,title:E==null?void 0:E.title,description:E==null?void 0:E.description}:S);break}o("change",(D=C())==null?void 0:D.compData),p.visible=!1}else p.visible=!1},C=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:g.value}]}),U=()=>{p.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,I=>{var H,G;I&&(g.value=((H=I==null?void 0:I.find(D=>D.key==="stepConfig"))==null?void 0:H.contents)??{},u.value=((G=I==null?void 0:I.find(D=>D.key==="stepList"))==null?void 0:G.contents)??[])},{immediate:!0}),(I,H)=>{const G=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",p2,[H[2]||(H[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:H[0]||(H[0]=E=>x("create"))},{icon:a.withCtx(()=>[a.createVNode(G,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[1]||(H[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",f2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(E,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(E==null?void 0:E.title),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:y=>x("update",{...E,index:S+1})},{default:a.withCtx(()=>H[3]||(H[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:y=>x("delete",S)},{default:a.withCtx(()=>H[4]||(H[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",h2,[H[5]||(H[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(dl.ssForm,{rowContents:s.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(xr.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:U,width:p.width},{default:a.withCtx(()=>[a.createElementVNode("div",v2,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),y2=Yl._export_sfc(m2,[["__scopeId","data-v-7dbd17f2"]]),g2={class:"step-module content"},b2={class:"module-data"},k2={class:"step-module layout"},x2={class:"form-content"},w2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.ref("create"),c=a.ref({}),m=a.ref([]),p=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:""}]),g=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),u=a.reactive({visible:!1,width:"40%",title:"时间线"}),_=I=>{var H;c.value=I,o("change",(H=C())==null?void 0:H.compData)},x=(I,H)=>{var G,D;switch(I){case"create":(G=v.value)==null||G.forEach(E=>{E.value=""}),s.value="create",u.visible=!0;break;case"update":(D=v.value)==null||D.forEach(E=>{E.value=H[E==null?void 0:E.prop]}),s.value="update",u.visible=!0;break;case"delete":m.value.splice(H,1),s.value="delete";break}},L=I=>{var H,G,D,E;if((I==null?void 0:I.buttonName)==="确认"){const S=O.cloneDeep(I==null?void 0:I.content);switch(Object.keys(S).forEach(y=>{S[y]===""&&delete S[y]}),s.value){case"create":(G=m.value)==null||G.push({...S,index:((H=m.value)==null?void 0:H.length)+1});break;case"update":m.value=(D=m.value)==null?void 0:D.map(y=>y.index===(S==null?void 0:S.index)?{...y,content:S==null?void 0:S.content,timestamp:S==null?void 0:S.timestamp}:y);break}o("change",(E=C())==null?void 0:E.compData),u.visible=!1}else u.visible=!1},C=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:m.value},{key:"timeLineConfig",contents:c.value}]}),U=()=>{u.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,I=>{var H,G;I&&(c.value=((H=I==null?void 0:I.find(D=>D.key==="timeLineConfig"))==null?void 0:H.contents)??{},m.value=((G=I==null?void 0:I.find(D=>D.key==="timeLineList"))==null?void 0:G.contents)??[])},{immediate:!0}),(I,H)=>{const G=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",g2,[H[2]||(H[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:H[0]||(H[0]=E=>x("create"))},{icon:a.withCtx(()=>[a.createVNode(G,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[1]||(H[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",b2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(E,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(E==null?void 0:E.content),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:y=>x("update",{...E,index:S+1})},{default:a.withCtx(()=>H[3]||(H[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:y=>x("delete",S)},{default:a.withCtx(()=>H[4]||(H[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",k2,[H[5]||(H[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(dl.ssForm,{rowContents:p.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(xr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:U,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",x2,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),_2=Yl._export_sfc(w2,[["__scopeId","data-v-39ffc861"]]),C2={};function E2(l,n){return a.openBlock(),a.createElementBlock("div")}const S2=Yl._export_sfc(C2,[["render",E2]]),D2={class:"extra-content"},B2={key:0},N2={key:1},T2={class:"dialog-footer"},A2={__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,o=a.ref(0),s=a.ref(),c=a.ref(),m=n,p=a.ref(!1),v=a.ref({}),g=a.ref({}),u=a.ref();a.watch(()=>[r.itemData],()=>{var E;const D=O.cloneDeep(r.itemData);s.value=(E=O.cloneDeep(D))==null?void 0:E.map(S=>{var y;if(S.key==="extra"){let k=[];(y=S.value)==null||y.forEach(F=>{var $;k.push(($=Object.values(F))==null?void 0:$[0])}),S.value=k}return S})},{deep:!0,immediate:!0});const _=(D,E,S,y)=>{var F;let k={};((F=D==null?void 0:D[0])==null?void 0:F.contents)==="详情"&&(p.value=!0,k[E]=D,c.value=D==null?void 0:D.filter($=>($==null?void 0:$.key)!=="tableContentName"),v.value=k,g.value=S,u.value=y.id)},x=D=>{var $,Y,pe,Ne;const E=(Y=($=Object.values(O.cloneDeep(v.value)))==null?void 0:$[0])==null?void 0:Y.filter(Ce=>(Ce==null?void 0:Ce.key)==="tableContentName"),S=(Ne=(pe=Object.values(O.cloneDeep(v.value)))==null?void 0:pe[0])==null?void 0:Ne.filter(Ce=>(Ce==null?void 0:Ce.key)!=="tableContentName"),y=S==null?void 0:S.map((Ce,Q)=>{var ye;return Q===D.index&&(Ce==null?void 0:Ce.comp)==="Table"&&(Ce.compData=(ye=Ce.compData)==null?void 0:ye.map(X=>{var se,qe;return(X==null?void 0:X.key)==="tableContents"&&(X.contents=(qe=(se=D.content)==null?void 0:se.map(Da=>{let ne={};for(let B in Da)B!=="id"&&(ne[B]=Da[B]);return ne}))==null?void 0:qe.map(Da=>Object.values(Da))),X})),Ce});y.unshift(E==null?void 0:E[0]);let k=O.cloneDeep(v.value),F={};for(let Ce in k)F[Ce]=y;v.value=F},L=()=>{p.value=!1,v.value={},g.value={},u.value=void 0,o.value++},C=D=>{var $,Y,pe,Ne;const E=(Y=($=Object.values(O.cloneDeep(v.value)))==null?void 0:$[0])==null?void 0:Y.filter(Ce=>(Ce==null?void 0:Ce.key)==="tableContentName"),S=(Ne=(pe=Object.values(O.cloneDeep(v.value)))==null?void 0:pe[0])==null?void 0:Ne.filter(Ce=>(Ce==null?void 0:Ce.key)!=="tableContentName"),y=S==null?void 0:S.map((Ce,Q)=>(Q===D.index&&(Ce.compData=D.contents),Ce));y.unshift(E==null?void 0:E[0]);let k=O.cloneDeep(v.value),F={};for(let Ce in k)F[Ce]=y;v.value=F},U=()=>{var E,S;let D={};for(let y in g.value)y===((E=Object.keys(v.value))==null?void 0:E[0])?D[y]=(S=Object.values(v.value))==null?void 0:S[0]:D[y]=g.value[y];m("change",{buttonName:"编辑",index:u.value,singleContent:D},"methodData"),p.value=!1,v.value={},g.value={},u.value=void 0},I=()=>{p.value=!1,v.value={},g.value={},u.value=void 0},H=D=>{m("change",D,"methodData")},G=D=>No(D);return(D,E)=>{const S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",D2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(y,k)=>(a.openBlock(),a.createElementBlock("div",{key:o.value},[(y==null?void 0:y.key)==="extra"?(a.openBlock(),a.createElementBlock("div",B2)):(a.openBlock(),a.createElementBlock("div",N2,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(G(y.comp)),{itemData:y==null?void 0:y.compData,childItemData:y==null?void 0:y.itemChildData,key:k,index:(y==null?void 0:y.id)??k,onContentClick:_,onChange:H},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(xr.ssDialog,{visible:p.value,onBeforeDestroy:I},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(y,k)=>(a.openBlock(),a.createElementBlock("div",{key:k,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(G(y.comp)),{itemData:y==null?void 0:y.compData,onChange:x,childItemData:y==null?void 0:y.itemChildData,key:k,onContentChange:C,index:(y==null?void 0:y.id)??k,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",T2,[a.createVNode(S,{class:"cancel-button footer-button",onClick:L,id:"themeBorderButton"},{default:a.withCtx(()=>E[0]||(E[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(S,{class:"confirm-button footer-button",onClick:U,id:"themeButton"},{default:a.withCtx(()=>E[1]||(E[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},z2=Yl._export_sfc(A2,[["__scopeId","data-v-2d9c5ab2"]]),M2={key:0,class:"method-content"},I2={__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(O.pinia),{originalPath:o}=O.storeToRefs(r),s=l,c=a.ref(!1),m=a.ref(),p=ua.useTableComp(O.pinia),{multipleTableConst:v}=O.storeToRefs(p),g=O.useModelComp(O.pinia),u=a.ref(!1),_=O.useMenuState(O.pinia),x=O.useLoginState(O.pinia),{itemData:L,isEdit:C,routeToChildPath:U,tableViewContents:I,lockingPage:H,payloadTypes:G}=O.storeToRefs(g),{activeMenuPath:D,platform:E,childMenu:S}=O.storeToRefs(_),{loginUserInfo:y}=O.storeToRefs(x),k=a.ref(!1),F=async()=>{var ne,B;(ne=n.value)!=null&&ne.find(re=>(re==null?void 0:re.buttonName)==="保存")&&await X((B=n.value)==null?void 0:B.find(re=>(re==null?void 0:re.buttonName)==="保存")),await ua.onSaveBack()};a.watch(()=>L.value,async()=>{C.value==="view"&&!k.value&&await Da(O.cloneDeep(s.itemData)),k.value=!1},{deep:!0});const $=()=>{c.value=!1,m.value=void 0},Y=ne=>ne.map(B=>{const re={};for(const be in B){const ce=B[be];if(be.includes(v.value)){const Se=be.split(v.value);let va=re;Se.forEach((Ca,Ga)=>{Ga===Se.length-1?va[Ca]=ce:(va[Ca]||(va[Ca]={}),va=va[Ca])})}else re[be]=ce}return re}),pe=async(ne,B,re=[])=>{var ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa;let be=(ce=O.cloneDeep(B))==null?void 0:ce.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(ne!=null&&ne.includes("[")){let P=(le=(Ga=(Ca=(va=(Se=O.cloneDeep(ne))==null?void 0:Se.split("["))==null?void 0:va[1])==null?void 0:Ca.split("]"))==null?void 0:Ga[0])==null?void 0:le.split(":"),V="";if(P!=null&&P[0]){let Z=(na=be==null?void 0:be.find(oe=>(oe==null?void 0:oe.name)===(P==null?void 0:P[0])))==null?void 0:na.compData;if(!Z){let oe=(Pe=ne==null?void 0:ne.split("["))==null?void 0:Pe[0],te=await ua.getItemData(oe,sessionStorage.getItem("systemKey"),"",!1,"","",re);Z=(wa=te==null?void 0:te.find(ka=>(ka==null?void 0:ka.name)===(P==null?void 0:P[0])))==null?void 0:wa.compData}Z==null||Z.forEach(oe=>{var te,ka,oa,Re,we,Ea;if((oe==null?void 0:oe.key)==="formContent")(te=oe==null?void 0:oe.contents)==null||te.forEach(ya=>{var Fa;(ya==null?void 0:ya.key)===(P==null?void 0:P[1])&&(Array.isArray(ya==null?void 0:ya.value)?V=ya==null?void 0:ya.value:V=(Fa=ya==null?void 0:ya.value)==null?void 0:Fa.toString())});else if((oe==null?void 0:oe.key)==="tableContents"){let ya=[],Fa=(ka=Z==null?void 0:Z.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:ka.contents,ja=(P==null?void 0:P[1])??"";if(Fa!=null&&Fa.every(he=>Array.isArray(he))){let he=ua.getColumnChild((we=Fa==null?void 0:Fa[0])==null?void 0:we.filter(Ze=>(Ze==null?void 0:Ze.label)!=="操作"));(Ea=oe.contents)==null||Ea.forEach(Ze=>{let Te={};Ze=Ze==null?void 0:Ze.filter(Qe=>!(Qe!=null&&Qe.id)),he==null||he.forEach((Qe,je)=>{let Oe=Ze[je];typeof Ze[je]=="number"&&(Oe=Ze[je].toString()),(ja===""||ja===Qe.prop)&&(Te[Qe.prop]=Oe)}),ya.push(Te)}),ya=Y(ya)}else{let he=(oa=Fa==null?void 0:Fa.map(Ze=>Ze==null?void 0:Ze.label))==null?void 0:oa.filter(Ze=>Ze!=="操作");(Re=oe.contents)==null||Re.forEach(Ze=>{let Te={};Ze=Ze==null?void 0:Ze.filter(Qe=>!(Qe!=null&&Qe.id)),he==null||he.forEach((Qe,je)=>{let Oe=Ze[je];typeof Ze[je]=="number"&&(Oe=Ze[je].toString()),(ja===""||ja===Qe)&&(Te[Qe]=Oe)}),ya.push(Te)})}V=ya}})}return V}else if(ne!=null&&ne.includes("/")){let P={};return(Fe=O.cloneDeep(be))==null||Fe.forEach((V,Z)=>{var oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra;if((V==null?void 0:V.comp)==="Table"){let $a=Array.isArray((ka=(te=(oe=V==null?void 0:V.compData)==null?void 0:oe.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:te.contents)==null?void 0:ka[0])?(Ea=(we=(Re=(oa=V==null?void 0:V.compData)==null?void 0:oa.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Re.contents)==null?void 0:we[0])==null?void 0:Ea.some(ue=>ue==null?void 0:ue.children):[],xa=(ja=(Fa=(ya=V==null?void 0:V.compData)==null?void 0:ya.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:ja.map(ue=>(ue!=null&&ue.find(Ae=>Ae==null?void 0:Ae.id)&&(ue=ue.slice(1)),ue)),Oa=(je=(Qe=(Te=(Ze=(he=V==null?void 0:V.compData)==null?void 0:he.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Ze.contents)==null?void 0:Te[0])==null?void 0:Qe[0])==null?void 0:je.label,Va=(_e=(Oe=V==null?void 0:V.compData)==null?void 0:Oe.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:_e.contents;if($a)($a==null?void 0:$a.length)===0?P[V.name]=P!=null&&P[V.name]?P[V.name]:ua.tableToForm(xa,Va):P[Oa]=ua.tableToForm(xa,Va);else{const ue=[];Va=Va.slice(1,Va.length-1),Va==null||Va.forEach((Ae,Ue)=>{xa==null||xa.forEach(Xe=>{ue.push({key:Ae.label+Xe[0],value:Xe[Ue+1]})})}),P["form"+Z]=ue}}else{const $a=(ra=(pa=V.compData)==null?void 0:pa.find(Oa=>(Oa==null?void 0:Oa.key)==="formContent"))==null?void 0:ra.contents;P!=null&&P.form||(P.form=[]);const xa=[];$a==null||$a.forEach(Oa=>{Oa.key!==""&&(Oa={key:(Oa==null?void 0:Oa.key)??(Oa==null?void 0:Oa.label),value:Oa==null?void 0:Oa.value},xa.push(Oa))}),P.form=[...xa,...O.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(ne==="createInsofDataApi"){let P=(ze=O.cloneDeep(B))==null?void 0:ze[0];return P={comp:(Ve=O.cloneDeep(P))==null?void 0:Ve.comp,compData:(ea=O.cloneDeep(P))==null?void 0:ea.compData,name:(Ja=O.cloneDeep(P))==null?void 0:Ja.name,isShow:(qa=O.cloneDeep(P))==null?void 0:qa.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:P}}}return ne}},Ne=async(ne,B,re)=>{var Se,va,Ca;let be=await ua.getItemData(B,sessionStorage.getItem("systemKey"),""),ce=be==null?void 0:be.find(Ga=>(Ga==null?void 0:Ga.name)===(re==null?void 0:re[0]));if(ce){if((ce==null?void 0:ce.comp)==="Table"){let Ga={};for(let Ve in O.cloneDeep(ne))O.cloneDeep(ne)[Ve]!=="loginUser"?Ga[Ve]=O.cloneDeep(ne)[Ve]:Ga[Ve]=((Se=y.value)==null?void 0:Se.account)||((va=y.value)==null?void 0:va.账号);let le=[],na=Ga;Array.isArray(ne)||(na=[Ga]),na==null||na.forEach(Ve=>{le.push({[Ve[re[1]]]:Ve})});let Pe=[],wa=le==null?void 0:le.map(Ve=>{var ea;return(ea=Object.keys(Ve))==null?void 0:ea[0]});be==null||be.forEach(Ve=>{var ea;(Ve==null?void 0:Ve.name)===(re==null?void 0:re[0])&&((ea=Ve==null?void 0:Ve.compData)==null||ea.forEach(Ja=>{var qa;(Ja==null?void 0:Ja.key)==="tableContents"&&((qa=Ja==null?void 0:Ja.contents)==null||qa.forEach(P=>{P!=null&&P.some(V=>wa.includes(V))&&Pe.push({[P.find(V=>V.id).id]:P.find(V=>wa.includes(V))})}))}))});let Fe=Pe==null?void 0:Pe.map(Ve=>{var ea;return(ea=Object.keys(Ve))==null?void 0:ea[0]}),ze=[];if(Fe==null||Fe.forEach(Ve=>{var qa;let ea=(qa=Pe==null?void 0:Pe.find(P=>{var V;return((V=Object.keys(P))==null?void 0:V[0].toString())===Ve.toString()}))==null?void 0:qa[Ve],Ja=le==null?void 0:le.find(P=>{var V;return((V=Object.keys(P))==null?void 0:V[0])===ea});ze.push({id:parseInt(Ve),value:{tableData:Ja[ea]}})}),(ze==null?void 0:ze.length)>0)return ze}else if((ce==null?void 0:ce.comp)==="Form"){let Ga=O.cloneDeep(ce);Ga.compData=(Ca=Ga.compData)==null?void 0:Ca.map(Pe=>{var wa;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(wa=Pe.contents)==null?void 0:wa.map(Fe=>((Fe==null?void 0:Fe.key)===(re==null?void 0:re[1])&&(Fe.value=(ne==null?void 0:ne[Fe==null?void 0:Fe.prop])||ne),Fe))),Pe});let le={};for(let Pe in Ga)Pe!=="id"&&(le[Pe]=Ga[Pe]);let na=[];if(na.push({id:ce==null?void 0:ce.id,keyType:re==null?void 0:re[1],value:{pageData:le}}),(na==null?void 0:na.length)>0)return na}}},Ce=async(ne,B,re)=>{var Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze;let be=await ua.getItemData(B,sessionStorage.getItem("systemKey"),""),ce=be==null?void 0:be.find(Ve=>(Ve==null?void 0:Ve.name)===(re==null?void 0:re[0]));if(ce){if((ce==null?void 0:ce.comp)==="Table"){let Ve={};for(let ea in O.cloneDeep(ne))O.cloneDeep(ne)[ea]!=="loginUser"?Ve[ea]=O.cloneDeep(ne)[ea]:Ve[ea]=((Se=y.value)==null?void 0:Se.account)||((va=y.value)==null?void 0:va.账号);await _r.createInsofDataApi({key:{type:"data",pageKey:B,tableId:ce==null?void 0:ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ve}})}else if((ce==null?void 0:ce.comp)==="Form"){let Ve=O.cloneDeep(ce),ea=Object.keys(ne),Ja="";(Ga=(Ca=O.cloneDeep(Ve))==null?void 0:Ca.compData)==null||Ga.forEach(te=>{var ka,oa;(te==null?void 0:te.key)==="formContent"&&((oa=(ka=O.cloneDeep(te))==null?void 0:ka.contents)==null||oa.forEach(Re=>{var we;ea.includes(Re==null?void 0:Re.key)&&(Re==null?void 0:Re.value)===((we=y.value)==null?void 0:we.姓名)&&(Ja=Re==null?void 0:Re.key)}))});let qa=[];(le=Object.values(ne[Ja]))==null||le.forEach(te=>{te!=null&&te.includes("(")&&qa.push(te)}),qa=[...new Set(qa)];const P=qa==null?void 0:qa.map(async te=>{var Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa;let ka="";(Ze=(he=(ja=(Fa=(ya=(Ea=O.cloneDeep(te))==null?void 0:Ea.split("("))==null?void 0:ya[1])==null?void 0:Fa.split(")"))==null?void 0:ja[0])==null?void 0:he.split(":"))==null||Ze.forEach(ra=>{ka=ka===""?ka+ra.replaceAll("'",""):ka+"/"+ra.replaceAll("'","")});let oa=[];(pa=(_e=(Oe=(je=(Qe=(Te=O.cloneDeep(te))==null?void 0:Te.split("<"))==null?void 0:Qe[1])==null?void 0:je.split(">"))==null?void 0:Oe[0])==null?void 0:_e.split(":"))==null||pa.forEach(ra=>{oa.push(ra.replaceAll("'",""))});const Re=await ua.getItemData(ka,sessionStorage.getItem("systemKey"),"");let we="";return Re==null||Re.forEach(ra=>{var $a;ra.name===(oa==null?void 0:oa[0])&&(($a=ra==null?void 0:ra.compData)==null||$a.forEach(xa=>{var Oa;(xa==null?void 0:xa.key)==="formContent"&&((Oa=xa.contents)==null||Oa.forEach(Va=>{(Va==null?void 0:Va.key)===(oa==null?void 0:oa[1])&&(we=Va==null?void 0:Va.value)}))}))}),{[te]:we}}),V=await Promise.all(P);Ve.compData=(Pe=(na=O.cloneDeep(Ve))==null?void 0:na.compData)==null?void 0:Pe.map(te=>{var ka,oa;return(te==null?void 0:te.key)==="formContent"&&(te.contents=(oa=(ka=O.cloneDeep(te))==null?void 0:ka.contents)==null?void 0:oa.map(Re=>{var we,Ea,ya,Fa;return(we=ne[Ja])!=null&&we[Re==null?void 0:Re.key]&&(ne[Ja][Re==null?void 0:Re.key].includes("(")?Re.value=(Ea=V==null?void 0:V.find(ja=>{var he;return((he=Object.keys(ja))==null?void 0:he[0])===ne[Ja][Re==null?void 0:Re.key]}))==null?void 0:Ea[ne[Ja][Re==null?void 0:Re.key]]:Re.value=(Fa=(ya=O.cloneDeep(ne))==null?void 0:ya[Ja])==null?void 0:Fa[Re==null?void 0:Re.key]),Re})),te});const Z=await _r.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((wa=Z==null?void 0:Z.data)==null?void 0:wa.type)==="success"&&((ze=(Fe=Z==null?void 0:Z.data)==null?void 0:Fe.result)==null||ze.forEach(te=>{var ka,oa;((oa=(ka=te==null?void 0:te.value)==null?void 0:ka.pageData)==null?void 0:oa.name)===(re==null?void 0:re[0])&&(oe=te.id)}),await _r.updateInsofDataApi({id:oe,value:{pageData:Ve}}))}}},Q=(ne,B="",re={})=>{for(const[be,ce]of Object.entries(ne)){const Se=B?`${B}.${be}`:be;ce!==null&&typeof ce=="object"&&!Array.isArray(ce)&&Object.prototype.toString.call(ce)!=="[object Date]"?Q(ce,Se,re):re[Se]=ce}return re},ye=async(ne,B,re,be)=>{var va,Ca,Ga,le,na,Pe,wa,Fe,ze,Ve,ea,Ja,qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa;let ce=await ua.getItemData(B,sessionStorage.getItem("systemKey"),""),Se=ce==null?void 0:ce.find(ja=>(ja==null?void 0:ja.name)===(re==null?void 0:re[0]));if(Se){if(!(re!=null&&re[1])&&(Se==null?void 0:Se.comp)==="Table"){let ja={},he=[],Ze=(Ca=(va=Se==null?void 0:Se.compData)==null?void 0:va.find(je=>(je==null?void 0:je.key)==="header"))==null?void 0:Ca.contents;Ze!=null&&Ze.every(je=>Array.isArray(je))?he=(le=ua.getColumnChild((Ga=Ze==null?void 0:Ze[0])==null?void 0:Ga.filter(je=>(je==null?void 0:je.label)!=="操作")))==null?void 0:le.map(je=>je==null?void 0:je.prop):he=Ze==null?void 0:Ze.map(je=>je==null?void 0:je.label);for(let je in O.cloneDeep(ne))if(O.cloneDeep(ne)[je]!=="loginUser"){let Oe=Q(O.cloneDeep(ne)[je]),_e={};for(let pa in Oe)if(he!=null&&he.find(ra=>ra===pa))_e[pa]=Oe[pa];else if(he!=null&&he.find(ra=>(ra==null?void 0:ra.toUpperCase())===(pa==null?void 0:pa.toUpperCase()))){let ra=he==null?void 0:he.find($a=>($a==null?void 0:$a.toUpperCase())===(pa==null?void 0:pa.toUpperCase()));_e[ra]=Oe[pa]}ja[je]=_e}else ja[je]=((na=y.value)==null?void 0:na.account)||((Pe=y.value)==null?void 0:Pe.账号);let Te=await _r.getInsofDataApi({keyLikes:{tableId:Se==null?void 0:Se.id}});if(((Fe=(wa=Te==null?void 0:Te.data)==null?void 0:wa.result)==null?void 0:Fe.length)>0){let je=(Ve=(ze=Te==null?void 0:Te.data)==null?void 0:ze.result)==null?void 0:Ve.map(Oe=>Oe==null?void 0:Oe.id);(je==null?void 0:je.length)>0&&await _r.batchDeleteInsofDataApi({ids:je})}let Qe=[];if((ea=Se==null?void 0:Se.compData)!=null&&ea.find(je=>(je==null?void 0:je.key)==="pageColumn")&&((P=(qa=(Ja=Se==null?void 0:Se.compData)==null?void 0:Ja.find(je=>(je==null?void 0:je.key)==="pageColumn"))==null?void 0:qa.contents)!=null&&P.includes("["))){const je=await _r.getInsofDataApi({id:Se==null?void 0:Se.tableId});let Oe=((te=(oe=(Z=(V=je==null?void 0:je.data)==null?void 0:V.result)==null?void 0:Z[0])==null?void 0:oe.key)==null?void 0:te.pageKey)??"";(ka=Object.values(ja))==null||ka.forEach(_e=>{Qe.push({key:{type:"data",pageKey:Oe,tableId:Se==null?void 0:Se.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})})}else(oa=Object.values(ja))==null||oa.forEach(je=>{Qe.push({key:{type:"data",pageKey:B,tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:je}})});(Qe==null?void 0:Qe.length)>0&&await _r.batchAddInsofDataApi({dataList:Qe})}else if(!(re!=null&&re[1])&&(Se==null?void 0:Se.comp)==="Form"){let ja=O.cloneDeep(Se);ja.compData=(we=(Re=O.cloneDeep(ja))==null?void 0:Re.compData)==null?void 0:we.map(Te=>{var Qe,je;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(je=(Qe=O.cloneDeep(Te))==null?void 0:Qe.contents)==null?void 0:je.map(Oe=>{var _e,pa;return(_e=O.cloneDeep(ne))!=null&&_e[Oe==null?void 0:Oe.key]&&(Oe.value=(pa=O.cloneDeep(ne))==null?void 0:pa[Oe==null?void 0:Oe.key]),Oe})),Te});const he=await _r.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let Ze="";((Ea=he==null?void 0:he.data)==null?void 0:Ea.type)==="success"&&((Fa=(ya=he==null?void 0:he.data)==null?void 0:ya.result)==null||Fa.forEach(Te=>{var Qe,je;((je=(Qe=Te==null?void 0:Te.value)==null?void 0:Qe.pageData)==null?void 0:je.name)===(re==null?void 0:re[0])&&(Ze=Te.id)}),await _r.updateInsofDataApi({id:Ze,value:{pageData:ja}}))}}},X=async ne=>{var B,re,be,ce,Se,va,Ca,Ga,le,na,Pe,wa,Fe,ze;_.setImportLoading(!0);try{if(ne.api){let Ve=new WeakMap,ea=await ua.getItemData((S==null?void 0:S.value)===""?D.value:S==null?void 0:S.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ve),Ja="";if(ea=ea==null?void 0:ea.map(oa=>{var Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe;if((oa==null?void 0:oa.comp)==="Form")oa.compData=(Re=oa.compData)==null?void 0:Re.map(_e=>{var pa;return(_e==null?void 0:_e.key)==="formContent"&&(_e.contents=(pa=_e.contents)==null?void 0:pa.map(ra=>{var $a;if((ra==null?void 0:ra.value)===""&&(ra==null?void 0:ra.type)==="Select"){let xa=ua.judgeContents(($a=O.cloneDeep(ra))==null?void 0:$a.optionUrl,Ve);ra.value=ra.value||xa}return ra})),_e});else if((oa==null?void 0:oa.comp)==="Table"&&(we=oa.compData)!=null&&we.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")){let _e=(ya=(Ea=oa.compData)==null?void 0:Ea.find(xa=>(xa==null?void 0:xa.key)==="pageColumn"))==null?void 0:ya.contents,pa=((ja=(Fa=oa.compData)==null?void 0:Fa.find(xa=>(xa==null?void 0:xa.key)==="pageGroup"))==null?void 0:ja.contents)??"",ra=(Te=(Ze=(he=_e==null?void 0:_e.split("["))==null?void 0:he[1])==null?void 0:Ze.split("]"))==null?void 0:Te[0];Ja=((Qe=_e==null?void 0:_e.split("["))==null?void 0:Qe[0])+((Oe=(je=I.value)==null?void 0:je.find(xa=>(xa==null?void 0:xa.key)===ra))==null?void 0:Oe.value)}return oa}),!(Ja===""||Ja==="")){const oa=await ua.getItemData(Ja,sessionStorage.getItem("systemKey"),"",!1,"","",Ve);ea=ea==null?void 0:ea.map(Re=>{var we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa;if((Re==null?void 0:Re.comp)==="Table"&&(we=Re.compData)!=null&&we.find(ra=>(ra==null?void 0:ra.key)==="pageColumn")){let ra=(ya=(Ea=Re.compData)==null?void 0:Ea.find(ue=>(ue==null?void 0:ue.key)==="pageColumn"))==null?void 0:ya.contents,$a=((ja=(Fa=Re.compData)==null?void 0:Fa.find(ue=>(ue==null?void 0:ue.key)==="pageGroup"))==null?void 0:ja.contents)??"",xa=(Te=(Ze=(he=ra==null?void 0:ra.split("["))==null?void 0:he[1])==null?void 0:Ze.split("]"))==null?void 0:Te[0],Oa=((Qe=ra==null?void 0:ra.split("["))==null?void 0:Qe[0])+((Oe=(je=I.value)==null?void 0:je.find(ue=>(ue==null?void 0:ue.key)===xa))==null?void 0:Oe.value),Va=(_e=oa==null?void 0:oa.find(ue=>(ue==null?void 0:ue.name)===($a===""?s==null?void 0:s.compName:$a)))==null?void 0:_e.compData;Re.compData=(pa=Re.compData)==null?void 0:pa.map(ue=>{var Ae;return(ue==null?void 0:ue.key)==="tableContents"&&(ue.contents=(Ae=Va==null?void 0:Va.find(Ue=>(Ue==null?void 0:Ue.key)==="tableContents"))==null?void 0:Ae.contents),ue})}return Re})}let qa={};if(((re=(B=ne==null?void 0:ne.extraValues)==null?void 0:B.input)==null?void 0:re.length)>0){const oa=(ce=(be=ne==null?void 0:ne.extraValues)==null?void 0:be.input)==null?void 0:ce.map(async Re=>{var we;se!=null&&se.find(Ea=>Ea===Re)?qa=await pe(Re,ea):qa[Object.keys(Re)[0]]=await pe((we=Object.values(Re))==null?void 0:we[0],ea,Ve)});await Promise.all(oa)}else qa=await pe("/",ea);let P=!1;(va=(Se=ne==null?void 0:ne.extraValues)==null?void 0:Se.output)==null||va.forEach(oa=>{var Re,we;(we=(Re=Object.values(oa))==null?void 0:Re[0])!=null&&we.includes(".doc")&&(P=!0)});let V;if(P){const oa=Vo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});V=await Qa.axios.post(ne.api,qa,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{oa.close()})}else V=await Qa.axios.post(ne.api,qa,{headers:{"Content-Type":"application/json"}});let Z=(na=(le=(Ga=(Ca=O.cloneDeep(ne))==null?void 0:Ca.extraValues)==null?void 0:Ga.output)==null?void 0:le.map(oa=>{var Re,we,Ea,ya,Fa,ja,he,Ze,Te,Qe,je,Oe,_e,pa,ra,$a;if(!((we=(Re=Object.values(oa))==null?void 0:Re[0])!=null&&we.includes(".doc"))){let xa=(Qe=(Te=(Ze=(ya=O.cloneDeep((Ea=Object.values(oa))==null?void 0:Ea[0]))==null?void 0:ya.split("["))==null?void 0:Ze[((he=(ja=O.cloneDeep((Fa=Object.values(oa))==null?void 0:Fa[0]))==null?void 0:ja.split("["))==null?void 0:he.length)-1])==null?void 0:Te.split("]"))==null?void 0:Qe[0],Oa=xa==null?void 0:xa.split(":"),Va=(_e=O.cloneDeep((je=Object.values(oa))==null?void 0:je[0]))==null?void 0:_e.substring(0,O.cloneDeep((Oe=Object.values(oa))==null?void 0:Oe[0]).lastIndexOf("["));if(Va=(ra=O.cloneDeep(Va))==null?void 0:ra.slice(0,((pa=O.cloneDeep(Va))==null?void 0:pa.length)-1),Va!=null&&Va.includes("[")){let ue="";if(($a=ua.contentTransArrayToAll(Va,"/"))==null||$a.forEach(Ae=>{var Ue,Xe,_a,Be,il,vl,Jl;if(!(Ae!=null&&Ae.includes("[")))ue=ue===""?ue+Ae.replaceAll("/",""):ue+"/"+Ae.replaceAll("/","");else{let Ya=O.cloneDeep(Ae).slice(1,((Ue=O.cloneDeep(Ae))==null?void 0:Ue.length)-1),ha=(vl=(il=(Be=(_a=(Xe=O.cloneDeep(Ya))==null?void 0:Xe.split("["))==null?void 0:_a[1])==null?void 0:Be.split("]"))==null?void 0:il[0])==null?void 0:vl.split(":"),ma="",ga=(Jl=ea==null?void 0:ea.find(Je=>(Je==null?void 0:Je.name)===(ha==null?void 0:ha[0])))==null?void 0:Jl.compData;ga==null||ga.forEach(Je=>{var Xa;(Je==null?void 0:Je.key)==="formContent"&&((Xa=Je==null?void 0:Je.contents)==null||Xa.forEach(Ee=>{(Ee==null?void 0:Ee.key)===(ha==null?void 0:ha[1])&&(ma=Ee==null?void 0:Ee.value)}))}),ue=ue===""?ue+ma.replaceAll("/",""):ue+"/"+ma.replaceAll("/","")}}),Va=ue,Va[(Va==null?void 0:Va.length)-1]!=="/")return Va}}}))==null?void 0:na.filter(oa=>oa);Z=[...new Set(O.cloneDeep(Z))];let oe=Z==null?void 0:Z.map(async oa=>{let Re=await ua.getItemData(oa,sessionStorage.getItem("systemKey"),"",!1,"","",Ve);if((Re==null?void 0:Re.length)===0)return await ua.getParentContents(oa)});await Promise.all(oe);let te=[],ka=(Fe=(wa=(Pe=O.cloneDeep(ne))==null?void 0:Pe.extraValues)==null?void 0:wa.output)==null?void 0:Fe.map(async oa=>{var Ze,Te,Qe,je,Oe,_e,pa,ra,$a,xa,Oa,Va,ue,Ae,Ue,Xe,_a,Be,il,vl,Jl,Ya,ha,ma,ga,Je,Xa,Ee,Ge,ve,Ia,We,K,la,Ye,De,Cl,tl,bl,Wa,Za,Na,de,Sa,El,Vl,Fl,nr,yr,Nl,tr,Nr,Ll,lr,Qr,Ir,Ar,Sr,zr,Mr,Dr,Vr,Or,sr,gn,Gr,rn,Nn,bn,vn;if((Te=(Ze=Object.values(oa))==null?void 0:Ze[0])!=null&&Te.includes(".doc")){var Re=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"}),we=V.headers["content-disposition"],Ea=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ya=Ea.exec(we),Fa=ya==null?void 0:ya[1],ja=document.createElement("a"),he=window.URL.createObjectURL(Re);m.value=[{name:Fa,blobUrl:he}],c.value=!0}else{let vr=(xa=($a=(ra=(je=O.cloneDeep((Qe=Object.values(oa))==null?void 0:Qe[0]))==null?void 0:je.split("["))==null?void 0:ra[((pa=(_e=O.cloneDeep((Oe=Object.values(oa))==null?void 0:Oe[0]))==null?void 0:_e.split("["))==null?void 0:pa.length)-1])==null?void 0:$a.split("]"))==null?void 0:xa[0],Hl=vr==null?void 0:vr.split(":"),dr=(ue=O.cloneDeep((Oa=Object.values(oa))==null?void 0:Oa[0]))==null?void 0:ue.substring(0,O.cloneDeep((Va=Object.values(oa))==null?void 0:Va[0]).lastIndexOf("["));if(dr!=null&&dr.includes("[")?dr=(Ue=O.cloneDeep(dr))==null?void 0:Ue.slice(0,((Ae=O.cloneDeep(dr))==null?void 0:Ae.length)-1):dr===""&&(dr=D.value),dr=dr.replaceAll("<","[").replaceAll(">","]"),dr!=null&&dr.includes("[")){let Wl="";(Xe=ua.contentTransArrayToAll(dr,"/"))==null||Xe.forEach((Il,mr)=>{var or,jl,$r,Pr,kn,nn,Xn,Tn,Zn,xn,An;if(!(Il!=null&&Il.includes("[")))Wl=Wl===""?Wl+Il.replaceAll("/",""):Wl+"/"+Il.replaceAll("/","");else{let Pn="",en="";(or=O.cloneDeep(Il))!=null&&or.includes("]")?(Pn=O.cloneDeep(Il).slice(1,((jl=O.cloneDeep(Il))==null?void 0:jl.length)-1),en=(Xn=(nn=(kn=(Pr=($r=O.cloneDeep(Pn))==null?void 0:$r.split("["))==null?void 0:Pr[1])==null?void 0:kn.split("]"))==null?void 0:nn[0])==null?void 0:Xn.split(":")):(Pn=O.cloneDeep(Il).slice(1,(Tn=O.cloneDeep(Il))==null?void 0:Tn.length),en=(Zn=O.cloneDeep(Pn))==null?void 0:Zn.split("/"));let zn="",wn=(xn=ea==null?void 0:ea.find(Kr=>(Kr==null?void 0:Kr.name)===(en==null?void 0:en[0])))==null?void 0:xn.compData;wn==null||wn.forEach(Kr=>{var Fn;(Kr==null?void 0:Kr.key)==="formContent"&&((Fn=Kr==null?void 0:Kr.contents)==null||Fn.forEach(mn=>{(mn==null?void 0:mn.key)===(en==null?void 0:en[1])&&(zn=mn==null?void 0:mn.value)}))}),((An=ua.contentTransArrayToAll(dr,"/"))==null?void 0:An.length)-1!==mr?Wl=Wl===""?Wl+zn.replaceAll("/",""):Wl+"/"+zn.replaceAll("/",""):Wl=Wl+o.value+zn.replaceAll("/","")}}),(_a=D.value)!=null&&_a.includes(Wl)?dr=D.value:dr=Wl}let $l=O.cloneDeep((Be=Object.keys(oa))==null?void 0:Be[0]);if(((il=V==null?void 0:V.data)==null?void 0:il.statusCode)===200||((vl=V==null?void 0:V.data)==null?void 0:vl.code)===200){if(((Ya=(Jl=V==null?void 0:V.data)==null?void 0:Jl.data)!=null&&Ya[$l]||(ma=(ha=V==null?void 0:V.data)==null?void 0:ha.result)!=null&&ma[$l])&&(Hl==null?void 0:Hl.length)===1)return await ye(((Je=(ga=V==null?void 0:V.data)==null?void 0:ga.data)==null?void 0:Je[$l])||((Ee=(Xa=V==null?void 0:V.data)==null?void 0:Xa.result)==null?void 0:Ee[$l]),O.cloneDeep(dr),Hl,Ja);if((ve=(Ge=V==null?void 0:V.data)==null?void 0:Ge.data)!=null&&ve[$l]||(We=(Ia=V==null?void 0:V.data)==null?void 0:Ia.result)!=null&&We[$l]){let Wl=await Ne(((la=(K=V==null?void 0:V.data)==null?void 0:K.data)==null?void 0:la[$l])||((De=(Ye=V==null?void 0:V.data)==null?void 0:Ye.result)==null?void 0:De[$l]),O.cloneDeep(dr),Hl);return Wl&&(te=[...te,...Wl]),Wl}else{if(!((Cl=V==null?void 0:V.data)!=null&&Cl.data)){let Wl=await ua.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ve);Wl=Wl==null?void 0:Wl.map(mr=>{var or;return(mr==null?void 0:mr.name)===(Hl==null?void 0:Hl[0])&&(mr.compData=(or=mr.compData)==null?void 0:or.map(jl=>{var $r;return(jl==null?void 0:jl.key)==="formContent"&&(jl.contents=($r=jl.contents)==null?void 0:$r.map(Pr=>{var kn,nn;return(Pr==null?void 0:Pr.key)===(Hl==null?void 0:Hl[1])&&(Pr.value=(nn=(kn=V==null?void 0:V.data)==null?void 0:kn.result)==null?void 0:nn[$l==null?void 0:$l.replaceAll(":","")]),Pr})),jl})),mr});let Il=[];(tl=Wl==null?void 0:Wl.filter(mr=>(mr==null?void 0:mr.comp)==="Form"))==null||tl.forEach(async mr=>{let or={};for(let jl in mr)jl!=="id"&&(or[jl]=mr[jl]);Il.push({id:mr==null?void 0:mr.id,value:{pageData:or}})}),(Il==null?void 0:Il.length)>0&&await _r.batchUpdateInsofDataApi({dataList:Il});return}if((Hl==null?void 0:Hl.length)===1){const Wl=(Za=(Wa=(bl=V==null?void 0:V.data)==null?void 0:bl.data)==null?void 0:Wa.path)==null?void 0:Za.path;let Il="";(Vl=(El=(Sa=(de=(Na=Wl==null?void 0:Wl.split("("))==null?void 0:Na[1])==null?void 0:de.split(")"))==null?void 0:Sa[0])==null?void 0:El.split(":"))==null||Vl.forEach(jl=>{var $r,Pr;Il=Il===""?Il+(($r=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:$r.trim()):Il+"/"+((Pr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Pr.trim())});let mr=[(tr=(Nl=(yr=(nr=(Fl=Wl==null?void 0:Wl.split("<"))==null?void 0:Fl[1])==null?void 0:nr.split(">"))==null?void 0:yr[0])==null?void 0:Nl.replaceAll("'",""))==null?void 0:tr.trim()],or;return(lr=(Ll=(Nr=V==null?void 0:V.data)==null?void 0:Nr.data)==null?void 0:Ll.data)!=null&&lr[Hl==null?void 0:Hl[0]]?or=await ye((Ar=(Ir=(Qr=V==null?void 0:V.data)==null?void 0:Qr.data)==null?void 0:Ir.data)==null?void 0:Ar[Hl==null?void 0:Hl[0]],Il,Hl,Ja):or=await Ce((zr=(Sr=V==null?void 0:V.data)==null?void 0:Sr.data)==null?void 0:zr.data,Il,mr,Ve),or}else{const Wl=(Vr=(Dr=(Mr=V==null?void 0:V.data)==null?void 0:Mr.data)==null?void 0:Dr.path)==null?void 0:Vr.path;let Il="";return(rn=(Gr=(gn=(sr=(Or=Wl==null?void 0:Wl.split("("))==null?void 0:Or[1])==null?void 0:sr.split(")"))==null?void 0:gn[0])==null?void 0:Gr.split(":"))==null||rn.forEach(or=>{var jl,$r;Il=Il===""?Il+((jl=or==null?void 0:or.replaceAll("'",""))==null?void 0:jl.trim()):Il+"/"+(($r=or==null?void 0:or.replaceAll("'",""))==null?void 0:$r.trim())}),await Ne((vn=(bn=(Nn=V==null?void 0:V.data)==null?void 0:Nn.data)==null?void 0:bn.data)==null?void 0:vn[Hl==null?void 0:Hl[0]],Il,Hl)}}}}});if(await Promise.all(ka),(te==null?void 0:te.length)>0){let oa=[];te==null||te.forEach(Ea=>{oa!=null&&oa.find(ya=>{var Fa,ja,he,Ze;return((ja=(Fa=ya==null?void 0:ya.value)==null?void 0:Fa.pageData)==null?void 0:ja.name)===((Ze=(he=Ea==null?void 0:Ea.value)==null?void 0:he.pageData)==null?void 0:Ze.name)})||oa.push(Ea)});let Re=[];oa==null||oa.forEach(Ea=>{var ja,he,Ze,Te;let ya=O.cloneDeep(Ea);ya.value.pageData.compData=(ja=ya.value.pageData.compData)==null?void 0:ja.map(Qe=>{var je;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(je=Qe.contents)==null?void 0:je.map(Oe=>{var pa,ra,$a,xa;let _e=(pa=O.cloneDeep(te))==null?void 0:pa.find(Oa=>(Oa==null?void 0:Oa.keyType)===(Oe==null?void 0:Oe.key));if(_e){let Oa=(xa=($a=(ra=_e.value.pageData.compData)==null?void 0:ra.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:$a.contents)==null?void 0:xa.find(Va=>(Va==null?void 0:Va.key)===(Oe==null?void 0:Oe.key));Oe.value=Oa==null?void 0:Oa.value}return Oe})),Qe}),Re.push({id:ya==null?void 0:ya.id,value:ya==null?void 0:ya.value});let Fa=[];(Te=(Ze=(he=ya==null?void 0:ya.value)==null?void 0:he.pageData)==null?void 0:Ze.compData)==null||Te.forEach(Qe=>{var je;(Qe==null?void 0:Qe.key)==="formContent"&&((je=Qe==null?void 0:Qe.contents)==null||je.forEach(Oe=>{var _e,pa,ra,$a,xa,Oa;if((pa=(_e=Oe==null?void 0:Oe.optionUrl)==null?void 0:_e.menuSelect)!=null&&pa.find(Va=>Va==null?void 0:Va.includes("[")))if(Fa!=null&&Fa.find(Va=>{var ue,Ae,Ue;return((ue=Va==null?void 0:Va.key)==null?void 0:ue.join(","))===((Ue=(Ae=Oe==null?void 0:Oe.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:Ue.join(","))})){let Va=(ra=Fa==null?void 0:Fa.find(ue=>{var Ae,Ue,Xe;return((Ae=ue==null?void 0:ue.key)==null?void 0:Ae.join(","))===((Xe=(Ue=Oe==null?void 0:Oe.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Xe.join(","))}))==null?void 0:ra.value;Va.push({key:Oe==null?void 0:Oe.prop,groups:($a=Oe==null?void 0:Oe.optionUrl)==null?void 0:$a.groupSelect,value:Oe==null?void 0:Oe.value}),Fa=Fa==null?void 0:Fa.map(ue=>{var Ae,Ue,Xe;return((Ae=ue==null?void 0:ue.key)==null?void 0:Ae.join(","))===((Xe=(Ue=Oe==null?void 0:Oe.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Xe.join(","))&&(ue.value=Va),ue})}else Fa.push({key:(xa=Oe==null?void 0:Oe.optionUrl)==null?void 0:xa.menuSelect,value:[{key:Oe==null?void 0:Oe.prop,groups:(Oa=Oe==null?void 0:Oe.optionUrl)==null?void 0:Oa.groupSelect,value:Oe==null?void 0:Oe.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(Qe=>{var Oe;let je="";return(Oe=Qe==null?void 0:Qe.key)==null||Oe.forEach(_e=>{var pa;if(!(_e!=null&&_e.includes("[")))je=je===""?je+_e:je+"/"+_e;else{let ra="",$a=(pa=_e==null?void 0:_e.replaceAll("[","").replaceAll("]",""))==null?void 0:pa.split(":");ea==null||ea.forEach(xa=>{var Oa;(xa==null?void 0:xa.name)===($a==null?void 0:$a[0])&&((Oa=xa==null?void 0:xa.compData)==null||Oa.forEach(Va=>{var ue;(Va==null?void 0:Va.key)==="formContent"&&((ue=Va==null?void 0:Va.contents)==null||ue.forEach(Ae=>{(Ae==null?void 0:Ae.prop)===($a==null?void 0:$a[1])&&(ra=Ae==null?void 0:Ae.value)}))}))}),je=je+o.value+ra}}),Qe.key=je,Qe})),Fa==null||Fa.forEach(Qe=>{var pa,ra,$a;let je=(pa=Ve[Qe.key])==null?void 0:pa.find(xa=>{var Oa,Va,ue,Ae,Ue,Xe,_a;return((Va=(Oa=xa==null?void 0:xa.value)==null?void 0:Oa.pageData)==null?void 0:Va.name)===((Ue=(Ae=(ue=Qe==null?void 0:Qe.value)==null?void 0:ue[0])==null?void 0:Ae.groups)==null?void 0:Ue[0])&&((_a=(Xe=xa==null?void 0:xa.value)==null?void 0:Xe.pageData)==null?void 0:_a.name)!==void 0}),Oe=je==null?void 0:je.id,_e=(ra=je==null?void 0:je.value)==null?void 0:ra.pageData;_e.compData=($a=_e.compData)==null?void 0:$a.map(xa=>{var Oa;return(xa==null?void 0:xa.key)==="formContent"&&(xa.contents=(Oa=xa.contents)==null?void 0:Oa.map(Va=>{var Ae;let ue=(Ae=Qe.value)==null?void 0:Ae.find(Ue=>(Ue==null?void 0:Ue.key)===(Va==null?void 0:Va.prop));return ue&&(Va.value=ue.value),Va})),xa}),Re.push({id:Oe,value:{pageData:_e}})})});let we=(ze=O.cloneDeep(te))==null?void 0:ze[0];(Re==null?void 0:Re.length)>0&&await _r.batchUpdateInsofDataApi({dataList:Re})}g.setFreshContent(!0)}_.setImportLoading(!1)}catch{Qa.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}k.value=!0},se=["createInsofDataApi"],qe=Pa.debounce(async ne=>{X(ne)},100),Da=async ne=>{var va,Ca,Ga;const B=O.cloneDeep(ne);let re,be=new WeakMap;ne!=null&&ne[0].path&&(re=await(B==null?void 0:B.map(async(le,na)=>{var qa,P,V,Z,oe,te,ka,oa,Re,we,Ea,ya,Fa,ja,he,Ze;const wa=(qa=be[le==null?void 0:le.path])==null?void 0:qa.filter(Te=>{var Qe;return((Qe=Te==null?void 0:Te.key)==null?void 0:Qe.type)==="data"});let Fe="";const ze=await ua.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);wa==null||wa.forEach(Te=>{var Qe,je,Oe,_e,pa;((je=(Qe=Te==null?void 0:Te.value)==null?void 0:Qe.tableData)==null?void 0:je.算法名称)===((Oe=B==null?void 0:B[na])==null?void 0:Oe.method)&&(Fe=(pa=(_e=Te==null?void 0:Te.value)==null?void 0:_e.tableData)==null?void 0:pa.算法体)});const Ve=await ua.getItemData(le==null?void 0:le.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);let ea="",Ja=(oe=(Z=(V=(P=Ve==null?void 0:Ve[0])==null?void 0:P.compData)==null?void 0:V.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:Z.contents)==null?void 0:oe.findIndex(Te=>(Te==null?void 0:Te.prop)==="算法体");return(ka=(te=Ve==null?void 0:Ve[0])==null?void 0:te.compData)==null||ka.forEach(Te=>{var Qe;(Te==null?void 0:Te.key)==="tableContents"&&((Qe=Te==null?void 0:Te.contents)==null||Qe.forEach(je=>{je!=null&&je.find(Oe=>Oe===(le==null?void 0:le.method))&&(ea=je[Ja])}))}),{buttonName:((oa=B==null?void 0:B[na])==null?void 0:oa.method)||((Ea=(we=(Re=wa==null?void 0:wa[0])==null?void 0:Re.value)==null?void 0:we.tableData)==null?void 0:Ea.算法名称),api:(Fe===""?(ja=(Fa=(ya=wa==null?void 0:wa[0])==null?void 0:ya.value)==null?void 0:Fa.tableData)==null?void 0:ja.算法体:Fe)||ea,content:ze==null?void 0:ze.filter(Te=>Te.comp!=="methodButton"),extraContent:(he=O.cloneDeep(le.value))==null?void 0:he.slice(1),methodName:(le==null?void 0:le.path)??"",extraValues:(Ze=B==null?void 0:B[na])==null?void 0:Ze.data}})));const ce=B==null?void 0:B.map(async le=>{var Ve,ea,Ja,qa,P,V;const na=(Ve=resAll.data.result)==null?void 0:Ve.filter(Z=>{var oe,te,ka;return((oe=Z==null?void 0:Z.key)==null?void 0:oe.parentTable)===""&&((te=Z==null?void 0:Z.key)==null?void 0:te.type)==="method"&&((ka=Z==null?void 0:Z.key)==null?void 0:ka.methodName)===Z.method}),Pe=na==null?void 0:na[0],wa=(ea=resAll.data.result)==null?void 0:ea.filter(Z=>{var oe,te;return((oe=Z==null?void 0:Z.key)==null?void 0:oe.type)==="methodData"&&((te=Z==null?void 0:Z.key)==null?void 0:te.tableId)===(Pe==null?void 0:Pe.id)}),Fe=await ua.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be),ze=wa==null?void 0:wa[0];return{buttonName:(Ja=Pe==null?void 0:Pe.key)==null?void 0:Ja.methodKey,api:(P=(qa=ze==null?void 0:ze.value)==null?void 0:qa.tableData)==null?void 0:P[0],content:Fe==null?void 0:Fe.filter(Z=>Z.comp!=="methodButton"),extraContent:(V=O.cloneDeep(le.value))==null?void 0:V.slice(1),methodName:(le==null?void 0:le.method)??""}}),Se=(va=ne==null?void 0:ne[0])!=null&&va.path&&((Ca=ne==null?void 0:ne[0])==null?void 0:Ca.path)!==""?await Promise.all(re):await Promise.all(ce);n.value=Se==null?void 0:Se.filter(le=>le==null?void 0:le.extraContent),(Ga=n.value)==null||Ga.forEach(le=>{var na;le.api===""&&((na=le.content)==null||na.forEach(Pe=>{var wa;Pe.comp=="Table"&&g.setExtraContents(ua.methodTableToContent(Pe.compData,(wa=le.extraContent)==null?void 0:wa[0]))}))})};return a.watch(()=>s.itemData,async()=>{C.value=="view"&&!k.value&&await Da(O.cloneDeep(s.itemData)),k.value=!1},{immediate:!0,deep:!0}),(ne,B)=>{var re,be,ce;return a.unref(C)!=="edit"?(a.openBlock(),a.createElementBlock("div",M2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((re=n.value)==null?void 0:re.filter(Se=>(Se==null?void 0:Se.buttonName)!=="保存"),Se=>{var va;return a.openBlock(),a.createElementBlock("div",null,[Se.api!==""?(a.openBlock(),a.createBlock(a.unref(es._sfc_main),{key:0,disabled:a.unref(H)===a.unref(D)&&!((va=Se==null?void 0:Se.buttonName)!=null&&va.includes("预览")),class:"calculator-content",modelValue:Se.buttonName,onClickTrigger:Ca=>a.unref(qe)(Se),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(U)!==""&&((ce=a.unref(D))==null?void 0:ce[((be=a.unref(D))==null?void 0:be.length)-1])!==a.unref(o)?(a.openBlock(),a.createBlock(a.unref(es._sfc_main),{key:0,class:"calculator-content",onClickTrigger:F,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(dl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:$},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},O2=Yl._export_sfc(I2,[["__scopeId","data-v-063aa9af"]]),L2={};function R2(l,n){return" 567 "}const $2=Yl._export_sfc(L2,[["render",R2]]),V2={class:"module content"},P2={class:"module data"},F2={class:"module layout"},j2={class:"form-content"},H2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=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:""}]),g=a.ref({}),u=a.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:u.value},{key:"signConfig",contents:g.value}]}),x=I=>{var H;g.value=O.cloneDeep(I),o("change",(H=_())==null?void 0:H.compData)},L=I=>{var H,G;if((I==null?void 0:I.buttonName)==="确认"){const D=O.cloneDeep(I==null?void 0:I.content);switch(c.value){case"create":u.value.push({...D,index:((H=u.value)==null?void 0:H.length)+1});break}o("change",(G=_())==null?void 0:G.compData),s.visible=!1}else s.visible=!1},C=(I,H)=>{var G,D;switch(I){case"create":(G=v.value)==null||G.forEach(E=>{E.value=""}),c.value="create",s.visible=!0;break;case"update":(D=v.value)==null||D.forEach(E=>{E.value=H[E==null?void 0:E.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(H,1),c.value="delete";break}},U=()=>{s.visible=!1};return a.watch(()=>r==null?void 0:r.itemContents,I=>{var H,G;I&&(g.value=((H=I==null?void 0:I.find(D=>D.key==="signConfig"))==null?void 0:H.contents)??{},u.value=((G=I==null?void 0:I.find(D=>D.key==="signTypeList"))==null?void 0:G.contents)??[])},{immediate:!0}),(I,H)=>{const G=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",V2,[H[2]||(H[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:H[0]||(H[0]=E=>C("create"))},{icon:a.withCtx(()=>[a.createVNode(G,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[1]||(H[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",P2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(E,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(E==null?void 0:E.label),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:y=>C("update",{...E,index:S+1})},{default:a.withCtx(()=>H[3]||(H[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:y=>C("delete",S)},{default:a.withCtx(()=>H[4]||(H[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",F2,[a.createVNode(dl.ssForm,{rowContents:p.value,onChange:x},null,8,["rowContents"])])]),a.createVNode(xr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:U,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",j2,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:L},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),U2=Yl._export_sfc(H2,[["__scopeId","data-v-487e0536"]]),q2=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(0),c=a.computed(()=>{var _,x;return(_=r==null?void 0:r.stepConfig)!=null&&_.allowTrigger?s.value:(x=r==null?void 0:r.stepConfig)==null?void 0:x.active}),m=(_,x)=>{s.value=x-1,o("clickStep",_,x)};a.onMounted(()=>{var _;o("clickStep",(_=r==null?void 0:r.stepList)==null?void 0:_[0],0)});const p=_=>dl.getComponent(_),v=()=>{var x;const _=(x=r==null?void 0:r.stepList)==null?void 0:x.find((L,C)=>C+1===c.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},g=_=>{o("clickTrigger",_)},u=_=>{o("changeTrigger",_)};return(_,x)=>{var U,I,H,G,D;const L=a.resolveComponent("el-step"),C=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(C,{direction:(U=l.stepConfig)==null?void 0:U.direction,active:c.value,"finish-status":"success",simple:(I=l.stepConfig)==null?void 0:I.simple,"align-center":((H=l.stepConfig)==null?void 0:H.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(E,S)=>(a.openBlock(),a.createBlock(L,{key:S,class:"step-item",onClick:y=>m(E,S+1)},{title:a.withCtx(()=>[a.renderSlot(_.$slots,"title",{title:E==null?void 0:E.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(_.$slots,"description",{descriptions:E==null?void 0:E.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(G=l.stepConfig)!=null&&G.allowTrigger&&((D=l.stepConfig)!=null&&D.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(v(),(E,S)=>(a.openBlock(),a.createElementBlock("div",{key:S,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p(E==null?void 0:E.type)),{modelValue:E.value,"onUpdate:modelValue":y=>E.value=y,onClickTrigger:g,onChangeTrigger:u,content:E==null?void 0:E.content},a.createSlots({_:2},[a.renderList(_.$slots,(y,k)=>({name:k,fn:a.withCtx(F=>[a.renderSlot(_.$slots,k,a.mergeProps({ref_for:!0},F||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),W2=Yl._export_sfc(q2,[["__scopeId","data-v-fdbd6832"]]),K2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:n}){const r=l,o=n,s=a.ref({}),c=a.ref([]),m=(p,v)=>{o("clickStep",p,v)};return a.watch(()=>r==null?void 0:r.itemData,p=>{var _,x,L,C;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let v=((_=p==null?void 0:p.find(U=>(U==null?void 0:U.key)==="stepName"))==null?void 0:_.contents)??[],g=[];(L=(x=p==null?void 0:p.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:x.contents)==null||L.forEach(U=>{g.push({label:U==null?void 0:U.label,prop:U==null?void 0:U.prop,name:U==null?void 0:U.prop,type:"text",disabled:!0})});let u=((C=p==null?void 0:p.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:C.contents)??[];v=v==null?void 0:v.map((U,I)=>{let H=g==null?void 0:g.map(G=>{var D;return{...G,value:(D=u==null?void 0:u[I])==null?void 0:D[G==null?void 0:G.prop]}});return{title:U,description:H}}),c.value=v},{immediate:!0,deep:!0}),(p,v)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(W2,{stepConfig:s.value,stepList:c.value,onClickStep:m},{icon:a.withCtx(()=>[a.createVNode(g,{name:"import"})]),title:a.withCtx(({title:u})=>[a.createTextVNode(a.toDisplayString(u),1)]),description:a.withCtx(({descriptions:u})=>[a.createVNode(dl.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),G2=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(n,r)=>{const o=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,(c,m)=>(a.openBlock(),a.createBlock(o,{key:m,timestamp:c.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:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Y2=Yl._export_sfc(G2,[["__scopeId","data-v-4172a886"]]),J2={class:"line-content"},X2={class:"line-time"},Z2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const n=l,r=a.ref({}),o=a.ref([]);return a.watch(()=>n==null?void 0:n.itemData,s=>{var c,m;o.value=(c=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:c.contents,r.value=(m=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:m.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(Y2,{activities:o.value,timeLineConfig:r.value},{content:a.withCtx(({content:m,timestamp:p})=>[a.createElementVNode("span",J2,a.toDisplayString(m),1),a.createElementVNode("span",X2,a.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),Q2=Yl._export_sfc(Z2,[["__scopeId","data-v-b4d9deed"]]),eh={class:"tabs-content"},ah=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,o=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 c=x=>{o("change",x)},m=(x,L)=>{o("contentChange",x,L)},p=x=>{o("pageChange",x)},v=x=>{o("rowClick",x)},g=(x,L)=>{o("routeUrl",x,L)},u=x=>{o("clickTrigger",x)},_=(x,L)=>{o("clickMainKey",x,L)};return(x,L)=>{var C,U;return a.openBlock(),a.createElementBlock("div",eh,[(C=s.value)!=null&&C.length?(a.openBlock(),a.createBlock(dl.ssTab,{tabsContents:s.value,key:(U=s.value)==null?void 0:U.length},{pane:a.withCtx(({tab:I,index:H})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Uo)(I==null?void 0:I.comp)),{related:I==null?void 0:I.relatedTables,compNames:r==null?void 0:r.compNames,compName:I==null?void 0:I.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:l.isDevMode,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:c,index:(I==null?void 0:I.id)??H,config:{showIndex:I==null?void 0:I.showIndex,allowMove:I==null?void 0:I.allowMove,viewport:I==null?void 0:I.viewport},onContentChange:m,onPageChange:p,onRowClick:v,onRouteUrl:g,parentTableId:I==null?void 0:I.tableId,allMapContents:l.allMapContents,children:I==null?void 0:I.children,level:1,onClickTrigger:u,onClickMainKey:_},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),lh=Yl._export_sfc(ah,[["__scopeId","data-v-ded4e0d9"]]),rh={class:"type-select"},nh=["onClick"],oh={class:"list-icon"},ih={__name:"modelSelect",setup(l){const n=Jn(O.pinia),{itemData:r}=O.storeToRefs(n),o=s=>{const c=O.cloneDeep(r.value);c.push({comp:s.comp,name:s.name,compData:[]}),n.setItemData(c)};return(s,c)=>{const m=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",rh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Yc),(p,v)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:v},[a.createElementVNode("div",{class:"list-content",onClick:g=>o(p)},[a.createElementVNode("div",oh,[a.createVNode(m,{name:p.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(p.name),1)],8,nh)]))),128))])}}},th=Yl._export_sfc(ih,[["__scopeId","data-v-91799bf8"]]),sh={class:"fill-content"},ch={class:"operate-content"},uh={class:"collapse-title-content"},dh={class:"collapse-title-item"},ph={key:1},fh=["onClick"],hh={class:"icon-content"},vh={key:0,class:"edit-content"},mh=["onClick"],yh={class:"comp-child"},gh={__name:"modelFill",setup(l){const n=Jn(O.pinia),{itemData:r,originalData:o}=O.storeToRefs(n),s=a.ref([]);a.ref([]);const c=a.ref([]),m=a.ref([]),p=L=>{var U;let C=(U=O.cloneDeep(m.value))==null?void 0:U.map((I,H)=>(L===H&&(I.content=!0),I));m.value=C},v=L=>{var U;let C=(U=O.cloneDeep(m.value))==null?void 0:U.map((I,H)=>(L===H&&(I.content=!1),I));m.value=C,s.value=O.cloneDeep(r.value)},g=(L,C)=>{var G;let U=(G=O.cloneDeep(m.value))==null?void 0:G.map((D,E)=>(L===E&&(D.content=!1),D));m.value=U;const I=O.cloneDeep(r.value),H=I==null?void 0:I.filter((D,E)=>(E===L&&(D.name=C),D));n.setOriginalData(H),n.setItemData(H)};a.watch(()=>r.value,()=>{var L,C,U;!r.value||((L=r.value)==null?void 0:L.length)===0?s.value=[]:s.value=(C=O.cloneDeep(r.value))==null?void 0:C.filter(I=>(I==null?void 0:I.comp)!=="methodButton"),c.value=s.value,m.value=(U=O.cloneDeep(c.value))==null?void 0:U.map((I,H)=>({id:H,content:!1}))},{deep:!0,immediate:!0});const u=L=>No(L),_=(L,C,U)=>{var H,G;if(!L)return;let I=O.cloneDeep(r.value);I=(H=I==null?void 0:I.map((D,E)=>(E===U&&(D.compData=L),D)))==null?void 0:H.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),m.value=(G=O.cloneDeep(I))==null?void 0:G.map((D,E)=>({id:E,content:!1})),n.setOriginalData(I),n.setItemData(I)},x=L=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const C=O.cloneDeep(r.value),U=C==null?void 0:C.filter((I,H)=>H!==L);n.setOriginalData(U),n.setItemData(U),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(L,C)=>{const U=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",sh,[C[1]||(C[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",ch,[a.createVNode(Ks.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:I,index:H})=>{var G,D,E,S,y,k,F,$,Y,pe;return[a.createElementVNode("div",uh,[a.createElementVNode("div",dh,[(D=(G=m.value)==null?void 0:G.find(Ne=>Ne.id===H))!=null&&D.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:I.name&&I.name!==""?"8px":"0px"})},a.toDisplayString(I.name),5)),(S=(E=m.value)==null?void 0:E.find(Ne=>Ne.id===H))!=null&&S.content?(a.openBlock(),a.createElementBlock("div",ph,[a.createVNode(dl.ssInput,{modelValue:I.name,"onUpdate:modelValue":Ne=>I.name=Ne,onClick:C[0]||(C[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(k=(y=m.value)==null?void 0:y.find(Ne=>Ne.id===H))!=null&&k.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(Ne=>p(H),["stop"]),class:"icon-content"},[a.createVNode(U,{name:"Edit",style:{width:"16px",height:"16px"}})],8,fh))]),a.createElementVNode("div",hh,[($=(F=m.value)==null?void 0:F.find(Ne=>Ne.id===H))!=null&&$.content?(a.openBlock(),a.createElementBlock("div",vh,[a.createVNode(U,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(Ne=>v(H),["stop"])},null,8,["onClick"]),a.createVNode(U,{name:"Save",onClick:a.withModifiers(Ne=>g(H,I.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(pe=(Y=m.value)==null?void 0:Y.find(Ne=>Ne.id===H))!=null&&pe.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(Ne=>x(H),["stop"]),class:"icon-content"},[a.createVNode(U,{name:"Delete",style:{width:"16px",height:"16px"}})],8,mh))])])]}),content:a.withCtx(({item:I,index:H})=>{var G,D;return[a.createElementVNode("div",yh,[a.createTextVNode(a.toDisplayString(u(I.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:(D=(G=c.value)==null?void 0:G.find((E,S)=>S===H))==null?void 0:D.compData,onChange:E=>_(E,I,H)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},bh=Yl._export_sfc(gh,[["__scopeId","data-v-a46a44b9"]]),kh={key:0,class:"show-content"},xh={style:{display:"flex"}},wh={__name:"modelShow",setup(l){const n=Jn(O.pinia),{itemData:r}=O.storeToRefs(n),o=a.ref([]);a.watch(()=>r.value,()=>{var c;!r.value||((c=r.value)==null?void 0:c.length)===0?o.value=[]:o.value=O.cloneDeep(r.value)},{deep:!0,immediate:!0});const s=c=>No(c);return(c,m)=>{var p;return((p=o.value)==null?void 0:p.length)>0?(a.openBlock(),a.createElementBlock("div",kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,(v,g)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:g},[a.createElementVNode("div",xh,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:g},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},_h=Yl._export_sfc(wh,[["__scopeId","data-v-3f3e863e"]]),Ch={class:"tabs-header"},Eh={class:"tabs-list"},Sh={class:"tab-name"},Dh={class:"tab-actions"},Bh=["onClick"],Nh=["onClick"],Th=["onClick"],Ah={class:"model-operate"},zh={class:"model-select",style:{display:"unset"}},Mh={class:"existing-components"},Ih={class:"component-list"},Oh=["onClick"],Lh={class:"component-info"},Rh={class:"component-type"},$h={class:"component-name"},Vh={class:"model-fill"},Ph={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.ref([]),c=a.ref(!1),m=a.ref(""),p=a.ref({title:""}),v=a.ref(-1),g=a.ref(!1),u=a.ref(-1),_=a.ref(new WeakMap),x=a.ref(null),L=Jn(O.pinia),{itemData:C}=O.storeToRefs(L),U=()=>{m.value="新增标签页",p.value.title="",v.value=-1,c.value=!0},I=ne=>{m.value="修改标签页",p.value.title=s.value[ne].title,v.value=ne,c.value=!0},H=ne=>{const B=E(ne);_.value.delete(B),s.value.splice(ne,1),Da()},G=()=>{if(p.value.title.trim()){if(v.value===-1){const ne={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:D()};s.value.push(ne)}else s.value[v.value].title=p.value.title,s.value[v.value].value=p.value.title,s.value[v.value].label=p.value.title;c.value=!1,Da()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,E=ne=>{const B=s.value[ne];return B.id||(B.id=D()),B.id},S=ne=>{var be;u.value=ne;const B=E(ne);x.value=O.cloneDeep(C.value);let re=_.value.get(B);!re&&((be=s.value[ne].children)==null?void 0:be.length)>0&&(re=$(s.value[ne].children)),re?L.setItemData(O.cloneDeep(re)):L.setItemData([]),g.value=!0},y=a.computed(()=>{const ne=O.useModelComp(O.pinia),B=O.storeToRefs(ne).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(re=>{var be;if(re.comp==="Tabs"&&u.value>=0){const ce=E(u.value);if((be=re.compData)==null?void 0:be.some(va=>{var Ca;return va.key==="stepList"&&((Ca=va.contents)==null?void 0:Ca.some(Ga=>Ga.id===ce))}))return!1}return!0})}),k=ne=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ne]||ne,F=ne=>{var B;try{const re=O.cloneDeep(ne);re.id=Date.now()+Math.random(),re.comp==="Tabs"&&((B=re.compData)==null||B.forEach(ce=>{ce.key==="stepList"&&ce.contents&&ce.contents.forEach(Se=>{Se.id=D()})}));const be=O.cloneDeep(C.value);be.push(re),L.setItemData(be)}catch(re){console.error("添加组件失败:",re)}},$=ne=>ne.map(B=>{var re;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:Y(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:pe(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((re=B.content)==null?void 0:re.originalData)||[]}}}),Y=ne=>{if(!ne)return[];const B=[];return ne.rowContents&&B.push({key:"formContent",contents:ne.rowContents}),ne.buttonValue&&B.push({key:"formButton",contents:ne.buttonValue}),typeof ne.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ne.isEnableWrap}),B},pe=ne=>[],Ne=()=>{if(u.value>=0&&u.value<s.value.length){const ne=E(u.value);_.value.set(ne,O.cloneDeep(C.value)),s.value[u.value].children=ye(C.value),console.log("保存后的数据",ye(C.value))}g.value=!1,u.value=-1,x.value=null,Da()},Ce=()=>{x.value&&L.setItemData(O.cloneDeep(x.value)),g.value=!1,u.value=-1,x.value=null},Q=()=>{g.value&&Ce()},ye=ne=>{if(!Array.isArray(ne))throw new Error("sourceData must be an array");return ne.map((B,re)=>{if(!B||typeof B!="object")return B;const{comp:be,name:ce,compData:Se}=B;switch(be){case"Form":return{type:"form",content:X(Se||[]),value:"表单"};case"Table":return{type:"table",content:se(Se||[]),value:"表格"};default:return{type:"xxx",content:qe(Se||[]),value:""}}})},X=ne=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},re={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ne.forEach((be,ce)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ce}:`,be);return}const{key:Se,contents:va}=be,Ca=re[Se];if(!Ca){console.warn(`Unknown Form config key: ${Se}`);return}Se==="enableWrap"?B[Ca]=!!va:B[Ca]=Array.isArray(va)?va:[]}),B},se=ne=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},re={header:"columns",tableContents:"tableData"};return ne.forEach((be,ce)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ce}:`,be);return}const{key:Se,contents:va}=be,Ca=re[Se];if(!Ca){console.warn(`Unknown Table config key: ${Se}`);return}B[Ca]=Array.isArray(va)?va:[]}),B},qe=ne=>(console.log("Default conversion logic - to be implemented"),{originalData:ne,processed:!1,componentType:"unknown"}),Da=()=>{const ne=[{key:"stepList",contents:s.value}];o("change",ne)};return a.watch(()=>r.itemContents,ne=>{if(ne&&ne.length>0){const B=ne.find(re=>re.key==="stepList");B&&B.contents&&(s.value=B.contents.map(re=>({title:re.title||"",value:re.value||re.title||"",label:re.label||re.title||"",children:re.children||[],id:re.id||D()})))}},{immediate:!0,deep:!0}),(ne,B)=>{const re=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-input"),ce=a.resolveComponent("el-form-item"),Se=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",Ch,[B[6]||(B[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:U},[a.createVNode(re,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",Eh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(va,Ca)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:Ca},[a.createElementVNode("span",Sh,a.toDisplayString(va.title),1),a.createElementVNode("div",Dh,[a.createElementVNode("button",{onClick:Ga=>I(Ca)},"修改标题",8,Bh),a.createElementVNode("button",{onClick:Ga=>S(Ca)},"布局调整",8,Nh),a.createElementVNode("button",{onClick:Ga=>H(Ca)},"删除",8,Th)])]))),128))]),a.createVNode(xr.ssDialog,{modelValue:c.value,"onUpdate:modelValue":B[2]||(B[2]=va=>c.value=va),title:m.value,onBeforeDestroy:B[3]||(B[3]=va=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:B[1]||(B[1]=va=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:G},"确定")]),default:a.withCtx(()=>[a.createVNode(Se,{model:p.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(ce,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(be,{modelValue:p.value.title,"onUpdate:modelValue":B[0]||(B[0]=va=>p.value.title=va),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(xr.ssDialog,{modelValue:g.value,"onUpdate:modelValue":B[4]||(B[4]=va=>g.value=va),title:"布局调整",fullScreen:"",onBeforeDestroy:Q},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:Ce},"取消"),a.createElementVNode("button",{onClick:Ne},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",Ah,[a.createElementVNode("div",zh,[a.createVNode(th),a.createElementVNode("div",Mh,[B[8]||(B[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",Ih,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,va=>(a.openBlock(),a.createElementBlock("div",{key:va.id,class:"component-item",onClick:Ca=>F(va)},[a.createElementVNode("div",Lh,[a.createElementVNode("span",Rh,a.toDisplayString(k(va.comp)),1),a.createElementVNode("span",$h,a.toDisplayString(va.name),1)]),B[7]||(B[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Oh))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:ne.innerWidth},[a.createVNode(_h)])),a.createElementVNode("div",Vh,[a.createVNode(bh)])])]),_:1},8,["modelValue"])])}}},Fh=Yl._export_sfc(Ph,[["__scopeId","data-v-9096ed0d"]]);function jh(){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 Hh(l){return{type:"line",...l}}function Uh(){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 qh(l){return{type:"bar",barWidth:"60%",...l}}function Wh(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Kh(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const Vn={line:{initBaseoptions:jh,initSeries:Hh},bar:{initBaseoptions:Uh,initSeries:qh},pie:{initBaseoptions:Wh,initSeries:Kh}},bs=O.useMenuState(O.pinia),Bc=(l,n)=>{var u;const r=[],o=[],{group:s,nameCol:c,valueCol:m}=n||{},p=l==null?void 0:l.find(_=>{const{name:x}=_;return x===s});if(!p)return{names:r,values:o};const v=(u=p==null?void 0:p.compData)==null?void 0:u.find(_=>{const{key:x}=_;return x==="tableContents"});return((v==null?void 0:v.contents)||[]).forEach(_=>{const x=_==null?void 0:_[0];let L=!1;Qa.isObject(x)&&(x!=null&&x.id)&&(L=!0);let C=c,U=m;L&&(C=C+1,U=U+1);const I=_==null?void 0:_[C],H=_==null?void 0:_[U];r.push(I),o.push(H)}),{names:r,values:o}},Gh=async l=>{const{menu:n,mainKey:r,detailGroup:o,detailNameCol:s,detailValueCol:c,isSelfDetail:m}=l||{};let p=null;const v=sessionStorage.getItem("systemKey");if(m&&bs.activeMenuPath&&(p=await ua.getItemData(`${bs.activeMenuPath}`,v,"")),!m){const g=n==null?void 0:n.join("/");p=await ua.getItemData(`${g}^${r}`,v,"")}return Bc(p,{group:o,nameCol:s,valueCol:c})},Yh=async l=>{const{menu:n,group:r,nameCol:o,valueCol:s}=l||{},c=n==null?void 0:n.join("/"),m=sessionStorage.getItem("systemKey"),p=await ua.getItemData(c,m,"");return Bc(p,{group:r,nameCol:o,valueCol:s})},Dt=async(l,n)=>{const r={names:[],values:[]},{menu:o,group:s,nameCol:c,valueCol:m}=l||{};if(!o.length||!s)return r;const{mainKey:p,group:v,nameCol:g,valueCol:u,isSelfDetail:_}=n||{};return p&&v&&dl.isNumber(g)&&dl.isNumber(u)?await Gh({menu:o,mainKey:p,detailGroup:v,detailNameCol:g,detailValueCol:u,isSelfDetail:_}):dl.isNumber(c)&&dl.isNumber(m)?await Yh({menu:o,group:s,nameCol:c,valueCol:m}):r},Jh=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:o,title:s}=l||{},c=Vn==null?void 0:Vn[o];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,v=m();v.title.text=s??"";const{names:g,values:u}=await Dt(n,r);if(!g||!u)return v;v.xAxis.data=g;const _=p({data:u});return v.series.push(_),v},Xh=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:o,title:s}=l||{},c=Vn==null?void 0:Vn[o];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,v=m();v.title.text=s??"";const{names:g,values:u}=await Dt(n,r);if(!g||!u)return v;v.xAxis.data=g;const _=p({data:u});return v.series.push(_),v},Zh=async({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})=>{const{type:o,title:s}=l||{},c=Vn==null?void 0:Vn[o];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,v=m();v.title.text=s??"";const{names:g,values:u}=await Dt(n,r);if(!g||!u)return v;const _=[];for(let L=0;L<g.length;L++){const C=g[L],U=u[L];_.push({name:C,value:U})}const x=p({data:_});return v.series.push(x),v},Qh=async(l=[])=>{var m,p,v;const n=((m=l==null?void 0:l.find(g=>g.key==="chartBaseConfig"))==null?void 0:m.contents)??{},r=((p=l==null?void 0:l.find(g=>g.key==="chartDataConfig"))==null?void 0:p.contents)??{},o=((v=l==null?void 0:l.find(g=>g.key==="chartDetailConfig"))==null?void 0:v.contents)??{},{type:s}=n;let c={};return s==="line"&&(c=await Jh({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:o})),s==="bar"&&(c=await Xh({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:o})),s==="pie"&&(c=await Zh({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:o})),c},e4=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 Qh(s)});const o=a.computed(()=>(n==null?void 0:n.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:o.value})},[a.createVNode(_u.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),a4=Yl._export_sfc(e4,[["__scopeId","data-v-d4c081e8"]]),l4={class:"chart-module layout"},r4={class:"chart-module content"},n4={class:"chart-module content"},o4={class:"form-content"},i4={class:"dialog-footer"},t4={class:"form-content"},s4={class:"dialog-footer"},c4={class:"form-content"},u4={class:"dialog-footer"},d4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:n}){const r=l,o=n,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),c=a.ref([]),m=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],p=a.ref({}),v=()=>{var Fe;c.value=m(),(Fe=c.value)==null||Fe.forEach(ze=>{var ea;const Ve=ze==null?void 0:ze.prop;ze.value=(ea=p==null?void 0:p.value)==null?void 0:ea[Ve]}),s.visible=!0},g=Fe=>{p.value=Fe},u=()=>{var Fe;s.visible=!1,o("change",(Fe=Pe())==null?void 0:Fe.compData)},_=a.reactive({visible:!1,width:"840",title:"数据配置"}),x=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:[]}],C=a.ref({}),U=()=>{const Fe=x.value,ze=O.cloneDeep(Fe);return ze==null||ze.forEach(Ve=>{var Ja;const ea=Ve==null?void 0:Ve.prop;Ve.value=(Ja=C.value)==null?void 0:Ja[ea]}),ze},I=Fe=>{var Ve;C.value=Fe;const ze=U();x.value=ze,o("change",(Ve=Pe())==null?void 0:Ve.compData)},H=async()=>{const Fe=await ua.getMenusContent(),ze=U();ze==null||ze.forEach(Ve=>{(Ve==null?void 0:Ve.prop)==="menu"&&(Ve.contents=Fe)}),x.value=ze,_.visible=!0,await va(C.value.menu),await le(C.value.group)},G=a.reactive({visible:!1,width:"840",title:"详情页配置"}),D=a.ref([]),E=()=>[{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:[]}],S=a.ref({}),y=()=>{const Fe=D.value,ze=O.cloneDeep(Fe);return ze==null||ze.forEach(Ve=>{var Ja;const ea=Ve==null?void 0:Ve.prop;Ve.value=(Ja=S.value)==null?void 0:Ja[ea]}),ze},k=Fe=>{var Ve;S.value=Fe;const ze=y();D.value=ze,o("change",(Ve=Pe())==null?void 0:Ve.compData)},F=async()=>{await Q();const Fe=O.cloneDeep($.value),ze=y();ze==null||ze.forEach(Ve=>{var Ja;const ea=Ve==null?void 0:Ve.prop;Ve.value=(Ja=S==null?void 0:S.value)==null?void 0:Ja[ea],ea==="mainKey"&&(Ve.contents=Fe)}),D.value=ze,G.visible=!0},$=a.ref([]),Y=a.ref([]),pe=a.ref({}),Ne=a.ref({}),Ce=()=>{const{compData:Fe}=be.value||{},ze=Fe==null?void 0:Fe.find(Z=>{const{key:oe}=Z;return oe==="header"}),Ve=(ze==null?void 0:ze.contents)||[],ea=Ve==null?void 0:Ve.filter((Z,oe)=>{const{label:te}=Z;return te!=="操作"}),Ja=ea==null?void 0:ea.findIndex((Z,oe)=>{const{isMainKey:te}=Z;return te});if(Ja<0)return[];const qa=Fe==null?void 0:Fe.find(Z=>{const{key:oe}=Z;return oe==="tableContents"}),P=(qa==null?void 0:qa.contents)||[];return P==null?void 0:P.map(Z=>{const oe=Z==null?void 0:Z[0];let te=Ja;Qa.isObject(oe)&&(oe!=null&&oe.id)&&(te=te+1);const ka=Z==null?void 0:Z[te];return{label:ka,value:ka}})},Q=async()=>{const Fe=await Ce();$.value=Fe},ye=async Fe=>{const ze=sessionStorage.getItem("systemKey");return await ua.getItemData(Fe,ze,"")},X=async Fe=>{const ze=Fe;Y.value=ze==null?void 0:ze.map(Ve=>{const{name:ea}=Ve;return pe.value[ea]=Ve,{label:ea,value:ea}})},se=Fe=>{const{comp:ze,compData:Ve}=Ne.value||{};if(ze==="Table"){let ea=y();ea=ea.filter(Ja=>{const{prop:qa}=Ja;return qa!=="formItems"}),Ca(ea,Ve),D.value=ea}},qe=async()=>{var Ve,ea;const Fe=(Ve=S==null?void 0:S.value)==null?void 0:Ve.mainKey,ze=(ea=C==null?void 0:C.value)==null?void 0:ea.menu;if(Fe){const qa=`${ze==null?void 0:ze.join("/")}^${Fe}`,P=await ye(qa);await X(P);const V=y();V==null||V.forEach(Z=>{(Z==null?void 0:Z.prop)==="group"&&(Z.contents=Y.value)}),D.value=V}};a.watch(()=>{var Fe;return(Fe=S==null?void 0:S.value)==null?void 0:Fe.mainKey},async(Fe,ze)=>{Fe!=ze&&Fe&&await qe()});const Da=async Fe=>{const ze=pe.value[Fe];Ne.value=ze,await se()};a.watch(()=>{var Fe;return(Fe=S==null?void 0:S.value)==null?void 0:Fe.group},async(Fe,ze)=>{Fe!=ze&&Fe&&Da(Fe)});const ne=async()=>{var ze;await qe();const Fe=(ze=S.value)==null?void 0:ze.group;await Da(Fe)},B=a.ref([]),re=a.ref({}),be=a.ref({}),ce=async Fe=>{const ze=Fe==null?void 0:Fe.join("/"),Ve=sessionStorage.getItem("systemKey");return await ua.getItemData(ze,Ve,"")},Se=async Fe=>{const ze=await ce(Fe);B.value=ze==null?void 0:ze.map(Ve=>{const{name:ea}=Ve;return re.value[ea]=Ve,{label:ea,value:ea}})},va=async(Fe,ze)=>{await Se(Fe);const Ve=U();Ve==null||Ve.forEach(ea=>{(ea==null?void 0:ea.prop)==="group"&&(ea.contents=B.value)}),x.value=Ve};a.watch(()=>{var Fe;return(Fe=C==null?void 0:C.value)==null?void 0:Fe.menu},async(Fe,ze)=>{const Ve=Fe==null?void 0:Fe.join("/"),ea=ze==null?void 0:ze.join("/");Ve!=ea&&await va(Fe)});const Ca=(Fe,ze)=>{const Ve=ze==null?void 0:ze.find(P=>{const{key:V}=P;return V==="header"}),ea=(Ve==null?void 0:Ve.contents)||[],Ja=ea==null?void 0:ea.filter((P,V)=>{const{label:Z}=P;return Z!=="操作"}),qa=Ja==null?void 0:Ja.map((P,V)=>{const{label:Z}=P;return{label:Z,value:V}});Fe==null||Fe.forEach(P=>{const V=P==null?void 0:P.prop;(V==="nameCol"||V==="valueCol")&&(P.contents=qa)})},Ga=Fe=>{const{comp:ze,compData:Ve}=be.value||{};if(ze==="Table"){C.value.formItems=[];let ea=U();ea=ea.filter(Ja=>{const{prop:qa}=Ja;return qa!=="formItems"}),Ca(ea,Ve),x.value=ea}},le=async Fe=>{const ze=re.value[Fe];be.value=ze,await Ga()};a.watch(()=>{var Fe;return(Fe=C==null?void 0:C.value)==null?void 0:Fe.group},async(Fe,ze)=>{Fe!=ze&&le(Fe)});const na=async()=>{var Ve,ea;const Fe=(Ve=C.value)==null?void 0:Ve.menu;await va(Fe);const ze=(ea=C.value)==null?void 0:ea.group;await le(ze)},Pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:C.value},{key:"chartDetailConfig",contents:S.value}]}),wa=()=>{s.visible=!1,_.visible=!1,G.visible=!1};return a.onMounted(async()=>{var ze,Ve,ea;x.value=L(),D.value=E();const Fe=r==null?void 0:r.itemContents;p.value=((ze=Fe==null?void 0:Fe.find(Ja=>Ja.key==="chartBaseConfig"))==null?void 0:ze.contents)??{},C.value=((Ve=Fe==null?void 0:Fe.find(Ja=>Ja.key==="chartDataConfig"))==null?void 0:Ve.contents)??{},await na(),S.value=((ea=Fe==null?void 0:Fe.find(Ja=>Ja.key==="chartDetailConfig"))==null?void 0:ea.contents)??{},await ne()}),(Fe,ze)=>{const Ve=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",l4,[ze[4]||(ze[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Ve,{id:"themeButton",onClick:ze[0]||(ze[0]=ea=>v())},{default:a.withCtx(()=>ze[3]||(ze[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",r4,[ze[6]||(ze[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Ve,{id:"themeButton",onClick:ze[1]||(ze[1]=ea=>H())},{default:a.withCtx(()=>ze[5]||(ze[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",n4,[ze[8]||(ze[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Ve,{id:"themeButton",onClick:ze[2]||(ze[2]=ea=>F())},{default:a.withCtx(()=>ze[7]||(ze[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(xr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:wa,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",o4,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",i4,[a.createVNode(Ve,{class:"cancel-button button",onClick:wa,id:"themeBorderButton"},{default:a.withCtx(()=>ze[9]||(ze[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Ve,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>ze[10]||(ze[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(xr.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:wa,width:_.width},{default:a.withCtx(()=>[a.createElementVNode("div",t4,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",s4,[a.createVNode(Ve,{class:"cancel-button button",onClick:wa,id:"themeBorderButton"},{default:a.withCtx(()=>ze[11]||(ze[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Ve,{class:"ok-button button",onClick:wa,id:"themeButton"},{default:a.withCtx(()=>ze[12]||(ze[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(xr.ssDialog,{visible:G.visible,title:G.title,onBeforeDestroy:wa,width:G.width},{default:a.withCtx(()=>[a.createElementVNode("div",c4,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",u4,[a.createVNode(Ve,{class:"cancel-button button",onClick:wa,id:"themeBorderButton"},{default:a.withCtx(()=>ze[13]||(ze[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Ve,{class:"ok-button button",onClick:wa,id:"themeButton"},{default:a.withCtx(()=>ze[14]||(ze[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),p4=Yl._export_sfc(d4,[["__scopeId","data-v-fe119645"]]),f4={class:"layout"},h4=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,o=l;a.onMounted(async()=>{});const s=a.computed(()=>O.cloneDeep(o==null?void 0:o.itemData)||[]),c=a.computed(()=>{var u;const g=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:x}=_;return x==="baseConfig"});return g==null?void 0:g.contents}),m=a.computed(()=>{var u;const g=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:x}=_;return x==="children"});return g==null?void 0:g.contents}),p=a.computed(()=>{let g=O.cloneDeep(m.value)||[];const u=g.length;let _=0;const x=[];if(g=g.map(L=>{const C=L.span;return C?(L.span=Number(C),_=_+L.span):x.push(L),L}),_<24){const L=Math.floor((24-_)/u);x.forEach(C=>{C.span=L})}return g}),v=g=>{r("rowClick",g)};return(g,u)=>{var L;const _=a.resolveComponent("el-col"),x=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",f4,[a.createVNode(x,{style:a.normalizeStyle({height:(L=c.value)==null?void 0:L.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(C,U)=>(a.openBlock(),a.createBlock(_,{span:C==null?void 0:C.span},{default:a.withCtx(()=>{var I;return[a.unref(Bo)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Uo)(C.comp)),{key:a.unref(Yn),compName:C.name,index:(C==null?void 0:C.id)??U,height:(I=c.value)==null?void 0:I.height,itemData:C==null?void 0:C.compData,childItemData:C==null?void 0:C.itemChildData,onChange:a.unref(Di),onContentChange:a.unref(Bi),onPageChange:a.unref(Ni),onRowClick:v},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),v4=Yl._export_sfc(h4,[["__scopeId","data-v-ab9a36ed"]]),m4={class:"layout-operate"},y4={class:"layout-module"},g4={class:"collapse-title-item"},b4={class:"collapse-title"},k4={class:"icon-content"},x4=["onClick"],w4={class:"comp-child"},_4=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,o=n;a.onMounted(()=>{U()});const s=a.ref({}),c=a.ref({}),m=a.ref([]),p=S=>[{label:"高度",prop:"height",type:"input",value:S==null?void 0:S.height}],v=S=>{c.value=S,o("change",E(),!0)},g=a.ref([]),u=a.ref([]),_=S=>[{label:"占比",prop:"span",type:"input",value:S==null?void 0:S.span}],x=a.computed(()=>{const S=r==null?void 0:r.itemContents;return O.cloneDeep(S)}),L=a.computed(()=>{const S=x==null?void 0:x.value,y=S==null?void 0:S.find(k=>{const{key:F}=k;return F==="baseConfig"});return y==null?void 0:y.contents}),C=a.computed(()=>{const S=x==null?void 0:x.value,y=S==null?void 0:S.find(k=>{const{key:F}=k;return F==="children"});return y==null?void 0:y.contents}),U=()=>{var S;s.value=x.value||{},g.value=(C==null?void 0:C.value)||[],m.value=p(),m.value=(S=m.value)==null?void 0:S.map(y=>{var F;const{prop:k}=y;return y.value=(F=L.value)==null?void 0:F[k],y})};a.watch(()=>{var S;return(S=C==null?void 0:C.value)==null?void 0:S.length},()=>{var S;g.value=(C==null?void 0:C.value)||[],u.value=(S=C.value)==null?void 0:S.map(y=>_(y))},{immediate:!0});const I=(S,y)=>{const k=O.cloneDeep(C==null?void 0:C.value);k[y].span=S.span,g.value=k,o("change",E(),!0)},H=S=>No(S),G=(S,y,k)=>{if(!S)return;const F=O.cloneDeep(C==null?void 0:C.value);F[k]&&(F[k].compData=S,g.value=F,o("change",E(),!0))},D=S=>{un.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let y=O.cloneDeep(C==null?void 0:C.value);y=y==null?void 0:y.filter((k,F)=>S!==F),g.value=y,o("change",E(),!0),Qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:g==null?void 0:g.value}]});return(S,y)=>{const k=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",m4,[a.createElementVNode("div",y4,[y[1]||(y[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(dl.ssForm,{rowContents:m.value,isEnableWrap:!0,onChange:y[0]||(y[0]=F=>v(F))},null,8,["rowContents"])])]),a.createVNode(Ks.default,{class:"collapse-content",collapseContents:C.value},{title:a.withCtx(({item:F,index:$})=>[a.createElementVNode("div",g4,[a.createElementVNode("div",b4,a.toDisplayString(F.name),1),a.createElementVNode("div",k4,[a.createElementVNode("div",{onClick:a.withModifiers(Y=>D($),["stop"]),class:"icon-content"},[a.createVNode(k,{name:"Delete",style:{width:"16px",height:"16px"}})],8,x4)])])]),content:a.withCtx(({item:F,index:$})=>[a.createElementVNode("div",w4,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(dl.ssForm,{rowContents:u.value[$],key:$,isEnableWrap:!0,onChange:Y=>I(Y,$)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(H(F.comp+"Operate")),{itemContents:F==null?void 0:F.compData,originalItemContents:F.compData,onChange:Y=>G(Y,F,$)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),C4=Yl._export_sfc(_4,[["__scopeId","data-v-ba05456e"]]),E4=typeof window<"u";var ks;E4&&((ks=window==null?void 0:window.navigator)!=null&&ks.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(l){return l==null}function Nc(){}const S4=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(S4)));function D4(){const l=new Map;return{on(n,r){const o=l.get(n);o!=null&&o.add(r)||l.set(n,new Set([r]))},off(n,r){const o=l.get(n);o&&o.delete(r)},clear(n){const r=l.get(n);r&&r.clear()},clearAll(){l.clear()},emit(n,...r){const o=l.get(n);o&&o.forEach(s=>{s(...r)})}}}function xs(l,n=16){if(typeof l!="function")return Nc;const r=(...c)=>{l(...c)};if(n<=0)return Tc(r);let o=0,s;return function(...c){const m=Date.now(),p=m-o;clearTimeout(s),p>=n?(o=m,r(...c)):s=setTimeout(()=>{o=Date.now(),r(...c)},Math.max(0,n-p))}}function B4(l,n=100){if(typeof l!="function")return Nc;const r=(...s)=>{l(...s)};if(n<=0)return Tc(r);let o;return function(...s){clearTimeout(o),o=setTimeout(()=>{r(...s)},n)}}function Tc(l){if(typeof l!="function")return l;let n=!1,r,o;return function(...s){return r=s,n||(n=!0,o=Promise.resolve().then(()=>(n=!1,o=void 0,l(...r)))),o}}const Po=new Set,Ac=new WeakMap;function N4(){Po.forEach(l=>{l(...Ac.get(l))}),Po.clear()}function Jr(l,...n){if(typeof l!="function")return l;Ac.set(l,n),!Po.has(l)&&(Po.add(l),Po.size===1&&Promise.resolve().then(N4))}const zc=Symbol("LAYOUT_KEY"),Mc=Symbol("EMITTER_KEY");function T4(l){let n=0,r;for(let o=0,s=l.length;o<s;o++)r=l[o].y+l[o].h,r>n&&(n=r);return n}function kt(l){const n=Array(l.length);for(let r=0,o=l.length;r<o;r++)n[r]=A4(l[r]);return n}function A4(l){return{...l}}function Ic(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 wo(l,n,r){const o=Lc(l),s=Rc(l),c=Array(l.length);for(let m=0,p=s.length;m<p;m++){let v=s[m];v.static||(v=z4(o,v,n,r),o.push(v)),c[l.findIndex(g=>g.i===v.i)]=v,v.moved=!1}return c}function z4(l,n,r,o){if(r)for(;n.y>0&&!Fo(l,n);)n.y--;else if(o){const c=o[n.i].y;for(;n.y>c&&!Fo(l,n);)n.y--}let s;for(;s=Fo(l,n);)n.y=s.y+s.h;return n}function M4(l,n){const r=Lc(l);for(let o=0,s=l.length;o<s;o++){const c=l[o];if(c.x+c.w>n.cols&&(c.x=n.cols-c.w),c.x<0&&(c.x=0,c.w=n.cols),!c.static)r.push(c);else for(;Fo(r,c);)c.y++}return l}function ws(l,n){for(let r=0,o=l.length;r<o;r++)if(l[r].i===n)return l[r]}function Fo(l,n){for(let r=0,o=l.length;r<o;r++)if(Ic(l[r],n))return l[r]}function Oc(l,n){return l.filter(r=>Ic(r,n))}function Lc(l){return l.filter(n=>n.static)}function xt(l,n,r,o,s=!1,c=!1){if(n.static)return l;const m=n.x,p=n.y,v=o&&n.y>o;typeof r=="number"&&(n.x=r),typeof o=="number"&&(n.y=o),n.moved=!0;let g=Rc(l);v&&(g=g.reverse());const u=Oc(g,n);if(c&&u.length)return n.x=m,n.y=p,n.moved=!1,l;for(let _=0,x=u.length;_<x;_++){const L=u[_];L.moved||n.y>L.y&&n.y-L.y>L.h/4||(L.static?l=_s(l,L,n,s):l=_s(l,n,L,s))}return l}function _s(l,n,r,o){if(o){const s={x:r.x,y:r.y,w:r.w,h:r.h};if(s.y=Math.max(n.y-r.h,0),!Fo(l,s))return xt(l,r,void 0,s.y,!1)}return xt(l,r,void 0,r.y+1,!1)}function I4(l,n,r,o){const s="translate3d("+n+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:o+"px",position:"absolute"}}function O4(l,n,r,o){const s="translate3d("+n*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:r+"px",height:o+"px",position:"absolute"}}function L4(l,n,r,o){return{top:l+"px",left:n+"px",width:r+"px",height:o+"px",position:"absolute"}}function R4(l,n,r,o){return{top:l+"px",right:n+"px",width:r+"px",height:o+"px",position:"absolute"}}function Rc(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 $4(l,n){n=n||"Layout";const r=["x","y","w","h"],o=[];if(!Array.isArray(l))throw new Error(n+" must be an array!");for(let s=0,c=l.length;s<c;s++){const m=l[s];for(let p=0;p<r.length;p++)if(typeof m[r[p]]!="number")throw new Error("VueGridLayout: "+n+"["+s+"]."+r[p]+" must be a number!");if(m.i===void 0||m.i===null)throw new Error("VueGridLayout: "+n+"["+s+"].i cannot be null!");if(typeof m.i!="number"&&typeof m.i!="string")throw new Error("VueGridLayout: "+n+"["+s+"].i must be a string or number!");if(o.indexOf(m.i)>=0)throw new Error("VueGridLayout: "+n+"["+s+"].i must be unique!");if(o.push(m.i),m.static!==void 0&&typeof m.static!="boolean")throw new Error("VueGridLayout: "+n+"["+s+"].static must be a boolean!")}}function V4(l,n="vgl"){const r=()=>`${n}-${l}`;return{b:r,be:o=>`${r()}__${o}`,bm:o=>`${r()}--${o}`,bem:(o,s)=>`${r()}__${o}--${s}`}}function Cs(l){return P4(l)}function P4(l){var n;const r=((n=l.target)==null?void 0:n.offsetParent)||document.body,o=l.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),s=l.clientX+r.scrollLeft-o.left,c=l.clientY+r.scrollTop-o.top;return{x:s,y:c}}function Es(l,n,r,o){return F4(l)?{deltaX:r-l,deltaY:o-n,lastX:l,lastY:n,x:r,y:o}:{deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}}function F4(l){return typeof l=="number"&&!Number.isNaN(l)}function j4(l,n){const r=Vc(l);let o=r[0];for(let s=1,c=r.length;s<c;s++){const m=r[s];n>l[m]&&(o=m)}return o}function $c(l,n){if(!n[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return n[l]}function H4(l,n,r,o,s,c,m){if(n[o])return kt(n[o]);let p=l;const v=Vc(r),g=v.slice(v.indexOf(o));for(let u=0,_=g.length;u<_;u++){const x=g[u];if(n[x]){p=n[x];break}}return p=kt(p||[]),wo(M4(p,{cols:c}),m)}function Vc(l){return Object.keys(l).sort((n,r)=>l[n]-l[r])}let U4="auto";function q4(){return typeof document<"u"}function Ss(){return q4()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):U4}var $o={exports:{}},W4=$o.exports,Ds;function K4(){return Ds||(Ds=1,function(l,n){(function(r,o){l.exports=o()})(W4,function(){function r(t,i){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);i&&(b=b.filter(function(w){return Object.getOwnPropertyDescriptor(t,w).enumerable})),f.push.apply(f,b)}return f}function o(t){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?r(Object(f),!0).forEach(function(b){v(t,b,f[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):r(Object(f)).forEach(function(b){Object.defineProperty(t,b,Object.getOwnPropertyDescriptor(f,b))})}return t}function s(t){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},s(t)}function c(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function m(t,i){for(var f=0;f<i.length;f++){var b=i[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,U(b.key),b)}}function p(t,i,f){return i&&m(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,i,f){return(i=U(i))in t?Object.defineProperty(t,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[i]=f,t}function g(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&_(t,i)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},u(t)}function _(t,i){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,b){return f.__proto__=b,f},_(t,i)}function x(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var f,b=u(t);if(i){var w=u(this).constructor;f=Reflect.construct(b,arguments,w)}else f=b.apply(this,arguments);return function(M,q){if(q&&(typeof q=="object"||typeof q=="function"))return q;if(q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(M)}(this,f)}}function C(){return C=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,f){var b=function(M,q){for(;!Object.prototype.hasOwnProperty.call(M,q)&&(M=u(M))!==null;);return M}(t,i);if(b){var w=Object.getOwnPropertyDescriptor(b,i);return w.get?w.get.call(arguments.length<3?t:f):w.value}},C.apply(this,arguments)}function U(t){var i=function(f,b){if(typeof f!="object"||f===null)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var M=w.call(f,b);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof i=="symbol"?i:i+""}var I=function(t){return!(!t||!t.Window)&&t instanceof t.Window},H=void 0,G=void 0;function D(t){H=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),G=t}function E(t){return I(t)?t:(t.ownerDocument||t).defaultView||G.window}typeof window<"u"&&window&&D(window);var S=function(t){return!!t&&s(t)==="object"},y=function(t){return typeof t=="function"},k={window:function(t){return t===G||I(t)},docFrag:function(t){return S(t)&&t.nodeType===11},object:S,func:y,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||s(t)!=="object")return!1;var i=E(t)||G;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return S(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return S(t)&&t.length!==void 0&&y(t.splice)}};function F(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function $(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var b=f.prepared.axis;if(b==="x"||b==="y"){var w=b==="x"?"y":"x";i.page[w]=f.coords.start.page[w],i.client[w]=f.coords.start.client[w],i.delta[w]=0}}}var Y={id:"actions/drag",install:function(t){var i=t.actions,f=t.Interactable,b=t.defaults;f.prototype.draggable=Y.draggable,i.map.drag=Y,i.methodDict.drag="draggable",b.actions.drag=Y.defaults},listeners:{"interactions:before-action-move":F,"interactions:action-resume":F,"interactions:action-move":$,"auto-start:check":function(t){var i=t.interaction,f=t.interactable,b=t.buttons,w=f.options.drag;if(w&&w.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(b&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:w.lockAxis==="start"?w.startAxis:w.lockAxis},!1}},draggable:function(t){return k.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):k.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:F,move:$,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},pe=Y,Ne={init:function(t){var i=t;Ne.document=i.document,Ne.DocumentFragment=i.DocumentFragment||Ce,Ne.SVGElement=i.SVGElement||Ce,Ne.SVGSVGElement=i.SVGSVGElement||Ce,Ne.SVGElementInstance=i.SVGElementInstance||Ce,Ne.Element=i.Element||Ce,Ne.HTMLElement=i.HTMLElement||Ne.Element,Ne.Event=i.Event,Ne.Touch=i.Touch||Ce,Ne.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ce(){}var Q=Ne,ye={init:function(t){var i=Q.Element,f=t.navigator||{};ye.supportsTouch="ontouchstart"in t||k.func(t.DocumentTouch)&&Q.document instanceof t.DocumentTouch,ye.supportsPointerEvent=f.pointerEnabled!==!1&&!!Q.PointerEvent,ye.isIOS=/iP(hone|od|ad)/.test(f.platform),ye.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ye.isIe9=/MSIE 9/.test(f.userAgent),ye.isOperaMobile=f.appName==="Opera"&&ye.supportsTouch&&/Presto/.test(f.userAgent),ye.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",ye.pEventTypes=ye.supportsPointerEvent?Q.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ye.wheelEvent=Q.document&&"onmousewheel"in Q.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},X=ye;function se(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function qe(t,i){for(;k.element(t);){if(ne(t,i))return t;t=Da(t)}return null}function Da(t){var i=t.parentNode;if(k.docFrag(i)){for(;(i=i.host)&&k.docFrag(i););return i}return i}function ne(t,i){return G!==H&&(i=i.replace(/\/deep\//g," ")),t[X.prefixedMatchesSelector](i)}var B=function(t){return t.parentNode||t.host};function re(t,i){for(var f,b=[],w=t;(f=B(w))&&w!==i&&f!==w.ownerDocument;)b.unshift(w),w=f;return b}function be(t,i,f){for(;k.element(t);){if(ne(t,i))return!0;if((t=Da(t))===f)return ne(t,i)}return!1}function ce(t){return t.correspondingUseElement||t}function Se(t){var i=t instanceof Q.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function va(t){var i,f=Se(t);if(!X.isIOS7&&f){var b={x:(i=(i=E(t))||G).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=b.x,f.right+=b.x,f.top+=b.y,f.bottom+=b.y}return f}function Ca(t){for(var i=[];t;)i.push(t),t=Da(t);return i}function Ga(t){return!!k.string(t)&&(Q.document.querySelector(t),!0)}function le(t,i){for(var f in i)t[f]=i[f];return t}function na(t,i,f){return t==="parent"?Da(f):t==="self"?i.getRect(f):qe(f,t)}function Pe(t,i,f,b){var w=t;return k.string(w)?w=na(w,i,f):k.func(w)&&(w=w.apply(void 0,b)),k.element(w)&&(w=va(w)),w}function wa(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Fe(t){return!t||"x"in t&&"y"in t||((t=le({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function ze(t,i,f){t.left&&(i.left+=f.x),t.right&&(i.right+=f.x),t.top&&(i.top+=f.y),t.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Ve(t,i,f){var b=f&&t.options[f];return wa(Pe(b&&b.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function ea(t,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(fe){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},k.string(t)&&t.search(" ")!==-1&&(t=Ja(t)),k.array(t))return t.forEach(function(fe){return ea(fe,i,f,b)}),b;if(k.object(t)&&(i=t,t=""),k.func(i)&&f(t))b[t]=b[t]||[],b[t].push(i);else if(k.array(i))for(var w=0,M=i;w<M.length;w++){var q=M[w];ea(t,q,f,b)}else if(k.object(i))for(var J in i)ea(Ja(J).map(function(fe){return"".concat(t).concat(fe)}),i[J],f,b);return b}function Ja(t){return t.trim().split(/ +/)}var qa=function(t,i){return Math.sqrt(t*t+i*i)},P=["webkit","moz"];function V(t,i){t.__set||(t.__set={});var f=function(w){if(P.some(function(M){return w.indexOf(M)===0}))return 1;typeof t[w]!="function"&&w!=="__set"&&Object.defineProperty(t,w,{get:function(){return w in t.__set?t.__set[w]:t.__set[w]=i[w]},set:function(M){t.__set[w]=M},configurable:!0})};for(var b in i)f(b);return t}function Z(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function oe(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function te(t){return t instanceof Q.Event||t instanceof Q.Touch}function ka(t,i,f){return t=t||"page",(f=f||{}).x=i[t+"X"],f.y=i[t+"Y"],f}function oa(t,i){return i=i||{x:0,y:0},X.isOperaMobile&&te(t)?(ka("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):ka("page",t,i),i}function Re(t){return k.number(t.pointerId)?t.pointerId:t.identifier}function we(t,i,f){var b=i.length>1?ya(i):i[0];oa(b,t.page),function(w,M){M=M||{},X.isOperaMobile&&te(w)?ka("screen",w,M):ka("client",w,M)}(b,t.client),t.timeStamp=f}function Ea(t){var i=[];return k.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ya(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var b=t[f];for(var w in i)i[w]+=b[w]}for(var M in i)i[M]/=t.length;return i}function Fa(t){if(!t.length)return null;var i=Ea(t),f=Math.min(i[0].pageX,i[1].pageX),b=Math.min(i[0].pageY,i[1].pageY),w=Math.max(i[0].pageX,i[1].pageX),M=Math.max(i[0].pageY,i[1].pageY);return{x:f,y:b,left:f,top:b,right:w,bottom:M,width:w-f,height:M-b}}function ja(t,i){var f=i+"X",b=i+"Y",w=Ea(t),M=w[0][f]-w[1][f],q=w[0][b]-w[1][b];return qa(M,q)}function he(t,i){var f=i+"X",b=i+"Y",w=Ea(t),M=w[1][f]-w[0][f],q=w[1][b]-w[0][b];return 180*Math.atan2(q,M)/Math.PI}function Ze(t){return k.string(t.pointerType)?t.pointerType:k.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Q.Touch?"touch":"mouse"}function Te(t){var i=k.func(t.composedPath)?t.composedPath():t.path;return[ce(i?i[0]:t.target),ce(t.currentTarget)]}var Qe=function(){function t(i){c(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return p(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(Qe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var je=function(t,i){for(var f=0;f<i.length;f++){var b=i[f];t.push(b)}return t},Oe=function(t){return je([],t)},_e=function(t,i){for(var f=0;f<t.length;f++)if(i(t[f],f,t))return f;return-1},pa=function(t,i){return t[_e(t,i)]},ra=function(t){g(f,t);var i=L(f);function f(b,w,M){var q;c(this,f),(q=i.call(this,w._interaction)).dropzone=void 0,q.dragEvent=void 0,q.relatedTarget=void 0,q.draggable=void 0,q.propagationStopped=!1,q.immediatePropagationStopped=!1;var J=M==="dragleave"?b.prev:b.cur,fe=J.element,Le=J.dropzone;return q.type=M,q.target=fe,q.currentTarget=fe,q.dropzone=Le,q.dragEvent=w,q.relatedTarget=w.target,q.draggable=w.interactable,q.timeStamp=w.timeStamp,q}return p(f,[{key:"reject",value:function(){var b=this,w=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&w.cur.dropzone===this.dropzone&&w.cur.element===this.target)if(w.prev.dropzone=this.dropzone,w.prev.element=this.target,w.rejected=!0,w.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var M=w.activeDrops,q=_e(M,function(fe){var Le=fe.dropzone,ke=fe.element;return Le===b.dropzone&&ke===b.target});w.activeDrops.splice(q,1);var J=new f(w,this.dragEvent,"dropdeactivate");J.dropzone=this.dropzone,J.target=this.target,this.dropzone.fire(J)}else this.dropzone.fire(new f(w,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(Qe);function $a(t,i){for(var f=0,b=t.slice();f<b.length;f++){var w=b[f],M=w.dropzone,q=w.element;i.dropzone=M,i.target=q,M.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function xa(t,i){for(var f=function(M,q){for(var J=[],fe=0,Le=M.interactables.list;fe<Le.length;fe++){var ke=Le[fe];if(ke.options.drop.enabled){var aa=ke.options.drop.accept;if(!(k.element(aa)&&aa!==q||k.string(aa)&&!ne(q,aa)||k.func(aa)&&!aa({dropzone:ke,draggableElement:q})))for(var La=0,sl=ke.getAllElements();La<sl.length;La++){var rl=sl[La];rl!==q&&J.push({dropzone:ke,element:rl,rect:ke.getRect(rl)})}}}return J}(t,i),b=0;b<f.length;b++){var w=f[b];w.rect=w.dropzone.getRect(w.element)}return f}function Oa(t,i,f){for(var b=t.dropState,w=t.interactable,M=t.element,q=[],J=0,fe=b.activeDrops;J<fe.length;J++){var Le=fe[J],ke=Le.dropzone,aa=Le.element,La=Le.rect,sl=ke.dropCheck(i,f,w,M,aa,La);q.push(sl?aa:null)}var rl=function(cl){for(var _l,ul,Tl,Ol=[],Xl=0;Xl<cl.length;Xl++){var Bl=cl[Xl],Ul=cl[_l];if(Bl&&Xl!==_l)if(Ul){var jr=B(Bl),wr=B(Ul);if(jr!==Bl.ownerDocument)if(wr!==Bl.ownerDocument)if(jr!==wr){Ol=Ol.length?Ol:re(Ul);var Yr=void 0;if(Ul instanceof Q.HTMLElement&&Bl instanceof Q.SVGElement&&!(Bl instanceof Q.SVGSVGElement)){if(Bl===wr)continue;Yr=Bl.ownerSVGElement}else Yr=Bl;for(var on=re(Yr,Ul.ownerDocument),pn=0;on[pn]&&on[pn]===Ol[pn];)pn++;var fo=[on[pn-1],on[pn],Ol[pn]];if(fo[0])for(var In=fo[0].lastChild;In;){if(In===fo[1]){_l=Xl,Ol=on;break}if(In===fo[2])break;In=In.previousSibling}}else Tl=Ul,(parseInt(E(ul=Bl).getComputedStyle(ul).zIndex,10)||0)>=(parseInt(E(Tl).getComputedStyle(Tl).zIndex,10)||0)&&(_l=Xl);else _l=Xl}else _l=Xl}return _l}(q);return b.activeDrops[rl]||null}function Va(t,i,f){var b=t.dropState,w={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(w.activate=new ra(b,f,"dropactivate"),w.activate.target=null,w.activate.dropzone=null),f.type==="dragend"&&(w.deactivate=new ra(b,f,"dropdeactivate"),w.deactivate.target=null,w.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(w.leave=new ra(b,f,"dragleave"),f.dragLeave=w.leave.target=b.prev.element,f.prevDropzone=w.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(w.enter=new ra(b,f,"dragenter"),f.dragEnter=b.cur.element,f.dropzone=b.cur.dropzone)),f.type==="dragend"&&b.cur.dropzone&&(w.drop=new ra(b,f,"drop"),f.dropzone=b.cur.dropzone,f.relatedTarget=b.cur.element),f.type==="dragmove"&&b.cur.dropzone&&(w.move=new ra(b,f,"dropmove"),f.dropzone=b.cur.dropzone)),w}function ue(t,i){var f=t.dropState,b=f.activeDrops,w=f.cur,M=f.prev;i.leave&&M.dropzone.fire(i.leave),i.enter&&w.dropzone.fire(i.enter),i.move&&w.dropzone.fire(i.move),i.drop&&w.dropzone.fire(i.drop),i.deactivate&&$a(b,i.deactivate),f.prev.dropzone=w.dropzone,f.prev.element=w.element}function Ae(t,i){var f=t.interaction,b=t.iEvent,w=t.event;if(b.type==="dragmove"||b.type==="dragend"){var M=f.dropState;i.dynamicDrop&&(M.activeDrops=xa(i,f.element));var q=b,J=Oa(f,q,w);M.rejected=M.rejected&&!!J&&J.dropzone===M.cur.dropzone&&J.element===M.cur.element,M.cur.dropzone=J&&J.dropzone,M.cur.element=J&&J.element,M.events=Va(f,0,q)}}var Ue={id:"actions/drop",install:function(t){var i=t.actions,f=t.interactStatic,b=t.Interactable,w=t.defaults;t.usePlugin(pe),b.prototype.dropzone=function(M){return function(q,J){if(k.object(J)){if(q.options.drop.enabled=J.enabled!==!1,J.listeners){var fe=ea(J.listeners),Le=Object.keys(fe).reduce(function(aa,La){return aa[/^(enter|leave)/.test(La)?"drag".concat(La):/^(activate|deactivate|move)/.test(La)?"drop".concat(La):La]=fe[La],aa},{}),ke=q.options.drop.listeners;ke&&q.off(ke),q.on(Le),q.options.drop.listeners=Le}return k.func(J.ondrop)&&q.on("drop",J.ondrop),k.func(J.ondropactivate)&&q.on("dropactivate",J.ondropactivate),k.func(J.ondropdeactivate)&&q.on("dropdeactivate",J.ondropdeactivate),k.func(J.ondragenter)&&q.on("dragenter",J.ondragenter),k.func(J.ondragleave)&&q.on("dragleave",J.ondragleave),k.func(J.ondropmove)&&q.on("dropmove",J.ondropmove),/^(pointer|center)$/.test(J.overlap)?q.options.drop.overlap=J.overlap:k.number(J.overlap)&&(q.options.drop.overlap=Math.max(Math.min(1,J.overlap),0)),"accept"in J&&(q.options.drop.accept=J.accept),"checker"in J&&(q.options.drop.checker=J.checker),q}return k.bool(J)?(q.options.drop.enabled=J,q):q.options.drop}(this,M)},b.prototype.dropCheck=function(M,q,J,fe,Le,ke){return function(aa,La,sl,rl,cl,_l,ul){var Tl=!1;if(!(ul=ul||aa.getRect(_l)))return!!aa.options.drop.checker&&aa.options.drop.checker(La,sl,Tl,aa,_l,rl,cl);var Ol=aa.options.drop.overlap;if(Ol==="pointer"){var Xl=Ve(rl,cl,"drag"),Bl=oa(La);Bl.x+=Xl.x,Bl.y+=Xl.y;var Ul=Bl.x>ul.left&&Bl.x<ul.right,jr=Bl.y>ul.top&&Bl.y<ul.bottom;Tl=Ul&&jr}var wr=rl.getRect(cl);if(wr&&Ol==="center"){var Yr=wr.left+wr.width/2,on=wr.top+wr.height/2;Tl=Yr>=ul.left&&Yr<=ul.right&&on>=ul.top&&on<=ul.bottom}return wr&&k.number(Ol)&&(Tl=Math.max(0,Math.min(ul.right,wr.right)-Math.max(ul.left,wr.left))*Math.max(0,Math.min(ul.bottom,wr.bottom)-Math.max(ul.top,wr.top))/(wr.width*wr.height)>=Ol),aa.options.drop.checker&&(Tl=aa.options.drop.checker(La,sl,Tl,aa,_l,rl,cl)),Tl}(this,M,q,J,fe,Le,ke)},f.dynamicDrop=function(M){return k.bool(M)?(t.dynamicDrop=M,f):t.dynamicDrop},le(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,w.actions.drop=Ue.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var f=t.interaction,b=(t.event,t.iEvent);if(f.prepared.name==="drag"){var w=f.dropState;w.activeDrops=[],w.events={},w.activeDrops=xa(i,f.element),w.events=Va(f,0,b),w.events.activate&&($a(w.activeDrops,w.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:b}))}},"interactions:action-move":Ae,"interactions:after-action-move":function(t,i){var f=t.interaction,b=t.iEvent;if(f.prepared.name==="drag"){var w=f.dropState;ue(f,w.events),i.fire("actions/drop:move",{interaction:f,dragEvent:b}),w.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var f=t.interaction,b=t.iEvent;Ae(t,i),ue(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:b})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:xa,getDrop:Oa,getDropEvents:Va,fireDropEvents:ue,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Xe=Ue;function _a(t){var i=t.interaction,f=t.iEvent,b=t.phase;if(i.prepared.name==="gesture"){var w=i.pointers.map(function(Le){return Le.pointer}),M=b==="start",q=b==="end",J=i.interactable.options.deltaSource;if(f.touches=[w[0],w[1]],M)f.distance=ja(w,J),f.box=Fa(w),f.scale=1,f.ds=0,f.angle=he(w,J),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(q||i.pointers.length<2){var fe=i.prevEvent;f.distance=fe.distance,f.box=fe.box,f.scale=fe.scale,f.ds=0,f.angle=fe.angle,f.da=0}else f.distance=ja(w,J),f.box=Fa(w),f.scale=f.distance/i.gesture.startDistance,f.angle=he(w,J),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,k.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var Be={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,f=t.Interactable,b=t.defaults;f.prototype.gesturable=function(w){return k.object(w)?(this.options.gesture.enabled=w.enabled!==!1,this.setPerAction("gesture",w),this.setOnEvents("gesture",w),this):k.bool(w)?(this.options.gesture.enabled=w,this):this.options.gesture},i.map.gesture=Be,i.methodDict.gesture="gesturable",b.actions.gesture=Be.defaults},listeners:{"interactions:action-start":_a,"interactions:action-move":_a,"interactions:action-end":_a,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},il=Be;function vl(t,i,f,b,w,M,q){if(!i)return!1;if(i===!0){var J=k.number(M.width)?M.width:M.right-M.left,fe=k.number(M.height)?M.height:M.bottom-M.top;if(q=Math.min(q,Math.abs((t==="left"||t==="right"?J:fe)/2)),J<0&&(t==="left"?t="right":t==="right"&&(t="left")),fe<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Le=J>=0?M.left:M.right;return f.x<Le+q}if(t==="top"){var ke=fe>=0?M.top:M.bottom;return f.y<ke+q}if(t==="right")return f.x>(J>=0?M.right:M.left)-q;if(t==="bottom")return f.y>(fe>=0?M.bottom:M.top)-q}return!!k.element(b)&&(k.element(i)?i===b:be(b,i,w))}function Jl(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var b=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=f.resizeAxes,f.resizeAxes==="x"?b.delta.y=0:f.resizeAxes==="y"&&(b.delta.x=0))}}var Ya,ha,ma={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,f=t.browser,b=t.Interactable,w=t.defaults;ma.cursors=function(M){return M.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(f),ma.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,b.prototype.resizable=function(M){return function(q,J,fe){return k.object(J)?(q.options.resize.enabled=J.enabled!==!1,q.setPerAction("resize",J),q.setOnEvents("resize",J),k.string(J.axis)&&/^x$|^y$|^xy$/.test(J.axis)?q.options.resize.axis=J.axis:J.axis===null&&(q.options.resize.axis=fe.defaults.actions.resize.axis),k.bool(J.preserveAspectRatio)?q.options.resize.preserveAspectRatio=J.preserveAspectRatio:k.bool(J.square)&&(q.options.resize.square=J.square),q):k.bool(J)?(q.options.resize.enabled=J,q):q.options.resize}(this,M,t)},i.map.resize=ma,i.methodDict.resize="resizable",w.actions.resize=ma.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var f=i.iEvent,b=i.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var w=f,M=b.rect;b._rects={start:le({},M),corrected:le({},M),previous:le({},M),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},w.edges=b.prepared.edges,w.rect=b._rects.corrected,w.deltaRect=b._rects.delta}})(t),Jl(t)},"interactions:action-move":function(t){(function(i){var f=i.iEvent,b=i.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var w=f,M=b.interactable.options.resize.invert,q=M==="reposition"||M==="negate",J=b.rect,fe=b._rects,Le=fe.start,ke=fe.corrected,aa=fe.delta,La=fe.previous;if(le(La,ke),q){if(le(ke,J),M==="reposition"){if(ke.top>ke.bottom){var sl=ke.top;ke.top=ke.bottom,ke.bottom=sl}if(ke.left>ke.right){var rl=ke.left;ke.left=ke.right,ke.right=rl}}}else ke.top=Math.min(J.top,Le.bottom),ke.bottom=Math.max(J.bottom,Le.top),ke.left=Math.min(J.left,Le.right),ke.right=Math.max(J.right,Le.left);for(var cl in ke.width=ke.right-ke.left,ke.height=ke.bottom-ke.top,ke)aa[cl]=ke[cl]-La[cl];w.edges=b.prepared.edges,w.rect=ke,w.deltaRect=aa}})(t),Jl(t)},"interactions:action-end":function(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var b=i;b.edges=f.prepared.edges,b.rect=f._rects.corrected,b.deltaRect=f._rects.delta}},"auto-start:check":function(t){var i=t.interaction,f=t.interactable,b=t.element,w=t.rect,M=t.buttons;if(w){var q=le({},i.coords.cur.page),J=f.options.resize;if(J&&J.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(M&J.mouseButtons)!=0)){if(k.object(J.edges)){var fe={left:!1,right:!1,top:!1,bottom:!1};for(var Le in fe)fe[Le]=vl(Le,J.edges[Le],q,i._latestPointer.eventTarget,b,w,J.margin||ma.defaultMargin);fe.left=fe.left&&!fe.right,fe.top=fe.top&&!fe.bottom,(fe.left||fe.right||fe.top||fe.bottom)&&(t.action={name:"resize",edges:fe})}else{var ke=J.axis!=="y"&&q.x>w.right-ma.defaultMargin,aa=J.axis!=="x"&&q.y>w.bottom-ma.defaultMargin;(ke||aa)&&(t.action={name:"resize",axes:(ke?"x":"")+(aa?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,f=t.axis,b=t.name,w=ma.cursors,M=null;if(f)M=w[b+f];else if(i){for(var q="",J=0,fe=["top","bottom","left","right"];J<fe.length;J++){var Le=fe[J];i[Le]&&(q+=Le)}M=w[q]}return M},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},ga=ma,Je={id:"actions",install:function(t){t.usePlugin(il),t.usePlugin(ga),t.usePlugin(pe),t.usePlugin(Xe)}},Xa=0,Ee={request:function(t){return Ya(t)},cancel:function(t){return ha(t)},init:function(t){if(Ya=t.requestAnimationFrame,ha=t.cancelAnimationFrame,!Ya)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var b=i[f];Ya=t["".concat(b,"RequestAnimationFrame")],ha=t["".concat(b,"CancelAnimationFrame")]||t["".concat(b,"CancelRequestAnimationFrame")]}Ya=Ya&&Ya.bind(t),ha=ha&&ha.bind(t),Ya||(Ya=function(w){var M=Date.now(),q=Math.max(0,16-(M-Xa)),J=t.setTimeout(function(){w(M+q)},q);return Xa=M+q,J},ha=function(w){return clearTimeout(w)})}},Ge={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){Ge.isScrolling=!0,Ee.cancel(Ge.i),t.autoScroll=Ge,Ge.interaction=t,Ge.prevTime=Ge.now(),Ge.i=Ee.request(Ge.scroll)},stop:function(){Ge.isScrolling=!1,Ge.interaction&&(Ge.interaction.autoScroll=null),Ee.cancel(Ge.i)},scroll:function(){var t=Ge.interaction,i=t.interactable,f=t.element,b=t.prepared.name,w=i.options[b].autoScroll,M=ve(w.container,i,f),q=Ge.now(),J=(q-Ge.prevTime)/1e3,fe=w.speed*J;if(fe>=1){var Le={x:Ge.x*fe,y:Ge.y*fe};if(Le.x||Le.y){var ke=Ia(M);k.window(M)?M.scrollBy(Le.x,Le.y):M&&(M.scrollLeft+=Le.x,M.scrollTop+=Le.y);var aa=Ia(M),La={x:aa.x-ke.x,y:aa.y-ke.y};(La.x||La.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:La,interaction:t,container:M})}Ge.prevTime=q}Ge.isScrolling&&(Ee.cancel(Ge.i),Ge.i=Ee.request(Ge.scroll))},check:function(t,i){var f;return(f=t.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var i=t.interaction,f=t.pointer;if(i.interacting()&&Ge.check(i.interactable,i.prepared.name))if(i.simulation)Ge.x=Ge.y=0;else{var b,w,M,q,J=i.interactable,fe=i.element,Le=i.prepared.name,ke=J.options[Le].autoScroll,aa=ve(ke.container,J,fe);if(k.window(aa))q=f.clientX<Ge.margin,b=f.clientY<Ge.margin,w=f.clientX>aa.innerWidth-Ge.margin,M=f.clientY>aa.innerHeight-Ge.margin;else{var La=Se(aa);q=f.clientX<La.left+Ge.margin,b=f.clientY<La.top+Ge.margin,w=f.clientX>La.right-Ge.margin,M=f.clientY>La.bottom-Ge.margin}Ge.x=w?1:q?-1:0,Ge.y=M?1:b?-1:0,Ge.isScrolling||(Ge.margin=ke.margin,Ge.speed=ke.speed,Ge.start(i))}}};function ve(t,i,f){return(k.string(t)?na(t,i,f):t)||E(f)}function Ia(t){return k.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var We={id:"auto-scroll",install:function(t){var i=t.defaults,f=t.actions;t.autoScroll=Ge,Ge.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=Ge.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,Ge.stop(),Ge.interaction&&(Ge.interaction=null)},"interactions:stop":Ge.stop,"interactions:action-move":function(t){return Ge.onInteractionMove(t)}}},K=We;function la(t,i){var f=!1;return function(){return f||(G.console.warn(i),f=!0),t.apply(this,arguments)}}function Ye(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function De(t){return k.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Cl(t){return k.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var tl={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(f,b,w,M){var q=function(J,fe,Le,ke,aa){var La=J.getRect(ke),sl=fe.buttons||{0:1,1:4,3:8,4:16}[fe.button],rl={action:null,interactable:J,interaction:Le,element:ke,rect:La,buttons:sl};return aa.fire("auto-start:check",rl),rl.action}(this,b,w,M,t);return this.options.actionChecker?this.options.actionChecker(f,b,q,this,M,w):q},i.prototype.ignoreFrom=la(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=la(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=Cl,i.prototype.styleCursor=De}};function bl(t,i,f,b,w){return i.testIgnoreAllow(i.options[t.name],f,b)&&i.options[t.name].enabled&&de(i,f,t,w)?t:null}function Wa(t,i,f,b,w,M,q){for(var J=0,fe=b.length;J<fe;J++){var Le=b[J],ke=w[J],aa=Le.getAction(i,f,t,ke);if(aa){var La=bl(aa,Le,ke,M,q);if(La)return{action:La,interactable:Le,element:ke}}}return{action:null,interactable:null,element:null}}function Za(t,i,f,b,w){var M=[],q=[],J=b;function fe(ke){M.push(ke),q.push(J)}for(;k.element(J);){M=[],q=[],w.interactables.forEachMatch(J,fe);var Le=Wa(t,i,f,M,q,b,w);if(Le.action&&!Le.interactable.options[Le.action.name].manualStart)return Le;J=Da(J)}return{action:null,interactable:null,element:null}}function Na(t,i,f){var b=i.action,w=i.interactable,M=i.element;b=b||{name:null},t.interactable=w,t.element=M,Ye(t.prepared,b),t.rect=w&&b.name?w.getRect(M):null,Vl(t,f),f.fire("autoStart:prepared",{interaction:t})}function de(t,i,f,b){var w=t.options,M=w[f.name].max,q=w[f.name].maxPerElement,J=b.autoStart.maxInteractions,fe=0,Le=0,ke=0;if(!(M&&q&&J))return!1;for(var aa=0,La=b.interactions.list;aa<La.length;aa++){var sl=La[aa],rl=sl.prepared.name;if(sl.interacting()&&(++fe>=J||sl.interactable===t&&((Le+=rl===f.name?1:0)>=M||sl.element===i&&(ke++,rl===f.name&&ke>=q))))return!1}return J>0}function Sa(t,i){return k.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function El(t,i,f){var b=f.autoStart.cursorElement;b&&b!==t&&(b.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,f.autoStart.cursorElement=i?t:null}function Vl(t,i){var f=t.interactable,b=t.element,w=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var M="";if(w.name){var q=f.options[w.name].cursorChecker;M=k.func(q)?q(w,f,b,t._interacting):i.actions.map[w.name].getCursor(w)}El(t.element,M||"",i)}else i.autoStart.cursorElement&&El(i.autoStart.cursorElement,"",i)}var Fl={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,f=t.defaults;t.usePlugin(tl),f.base.actionChecker=null,f.base.styleCursor=!0,le(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(b){return Sa(b,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:de,cursorElement:null}},listeners:{"interactions:down":function(t,i){var f=t.interaction,b=t.pointer,w=t.event,M=t.eventTarget;f.interacting()||Na(f,Za(f,b,w,M,i),i)},"interactions:move":function(t,i){(function(f,b){var w=f.interaction,M=f.pointer,q=f.event,J=f.eventTarget;w.pointerType!=="mouse"||w.pointerIsDown||w.interacting()||Na(w,Za(w,M,q,J,b),b)})(t,i),function(f,b){var w=f.interaction;if(w.pointerIsDown&&!w.interacting()&&w.pointerWasMoved&&w.prepared.name){b.fire("autoStart:before-start",f);var M=w.interactable,q=w.prepared.name;q&&M&&(M.options[q].manualStart||!de(M,w.element,w.prepared,b)?w.stop():(w.start(w.prepared,M,w.element),Vl(w,b)))}}(t,i)},"interactions:stop":function(t,i){var f=t.interaction,b=f.interactable;b&&b.options.styleCursor&&El(f.element,"",i)}},maxInteractions:Sa,withinInteractionLimit:de,validateAction:bl},nr=Fl,yr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var f=t.interaction,b=t.eventTarget,w=t.dx,M=t.dy;if(f.prepared.name==="drag"){var q=Math.abs(w),J=Math.abs(M),fe=f.interactable.options.drag,Le=fe.startAxis,ke=q>J?"x":q<J?"y":"xy";if(f.prepared.axis=fe.lockAxis==="start"?ke[0]:fe.lockAxis,ke!=="xy"&&Le!=="xy"&&Le!==ke){f.prepared.name=null;for(var aa=b,La=function(rl){if(rl!==f.interactable){var cl=f.interactable.options.drag;if(!cl.manualStart&&rl.testIgnoreAllow(cl,aa,b)){var _l=rl.getAction(f.downPointer,f.downEvent,f,aa);if(_l&&_l.name==="drag"&&function(ul,Tl){if(!Tl)return!1;var Ol=Tl.options.drag.startAxis;return ul==="xy"||Ol==="xy"||Ol===ul}(ke,rl)&&nr.validateAction(_l,rl,aa,b,i))return rl}}};k.element(aa);){var sl=i.interactables.forEachMatch(aa,La);if(sl){f.prepared.name="drag",f.interactable=sl,f.element=aa;break}aa=Da(aa)}}}}}};function Nl(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var f=t.interactable.options;return f[i].hold||f[i].delay}var tr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(nr),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,f=Nl(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(t){var i=t.interaction,f=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;Nl(i)>0&&(i.prepared.name=null)}},getHoldDuration:Nl},Nr=tr,Ll={id:"auto-start",install:function(t){t.usePlugin(nr),t.usePlugin(Nr),t.usePlugin(yr)}},lr=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):k.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Qr(t){var i=t.interaction,f=t.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var Ir={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=lr,i.prototype.checkAndPreventDefault=function(f){return function(b,w,M){var q=b.options.preventDefault;if(q!=="never")if(q!=="always"){if(w.events.supportsPassive&&/^touch(start|move)$/.test(M.type)){var J=E(M.target).document,fe=w.getDocOptions(J);if(!fe||!fe.events||fe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(M.type)||k.element(M.target)&&ne(M.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||M.preventDefault()}else M.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var b=0,w=t.interactions.list;b<w.length;b++){var M=w[b];if(M.element&&(M.element===f.target||se(M.element,f.target)))return void M.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=Qr,t},{})};function Ar(t,i){if(i.phaselessTypes[t])return!0;for(var f in i.map)if(t.indexOf(f)===0&&t.substr(f.length)in i.phases)return!0;return!1}function Sr(t){var i={};for(var f in t){var b=t[f];k.plainObject(b)?i[f]=Sr(b):k.array(b)?i[f]=Oe(b):i[f]=b}return i}var zr=function(){function t(i){c(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=i,this.result=Mr(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(t,[{key:"start",value:function(i,f){var b,w,M=i.phase,q=this.interaction,J=function(Le){var ke=Le.interactable.options[Le.prepared.name],aa=ke.modifiers;return aa&&aa.length?aa:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(La){var sl=ke[La];return sl&&sl.enabled&&{options:sl,methods:sl._methods}}).filter(function(La){return!!La})}(q);this.prepareStates(J),this.startEdges=le({},q.edges),this.edges=le({},this.startEdges),this.startOffset=(b=q.rect,w=f,b?{left:w.x-b.left,top:w.y-b.top,right:b.right-w.x,bottom:b.bottom-w.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var fe=this.fillArg({phase:M,pageCoords:f,preEnd:!1});return this.result=Mr(),this.startAll(fe),this.result=this.setAll(fe)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,b=this.states;f<b.length;f++){var w=b[f];w.methods.start&&(i.state=w,w.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,b=i.preEnd,w=i.skipModifiers,M=i.rect,q=i.edges;i.coords=le({},i.pageCoords),i.rect=le({},M),i.edges=le({},q);for(var J=w?this.states.slice(w):this.states,fe=Mr(i.coords,i.rect),Le=0;Le<J.length;Le++){var ke,aa=J[Le],La=aa.options,sl=le({},i.coords),rl=null;(ke=aa.methods)!=null&&ke.set&&this.shouldDo(La,b,f)&&(i.state=aa,rl=aa.methods.set(i),ze(i.edges,i.rect,{x:i.coords.x-sl.x,y:i.coords.y-sl.y})),fe.eventProps.push(rl)}le(this.edges,i.edges),fe.delta.x=i.coords.x-i.pageCoords.x,fe.delta.y=i.coords.y-i.pageCoords.y,fe.rectDelta.left=i.rect.left-M.left,fe.rectDelta.right=i.rect.right-M.right,fe.rectDelta.top=i.rect.top-M.top,fe.rectDelta.bottom=i.rect.bottom-M.bottom;var cl=this.result.coords,_l=this.result.rect;if(cl&&_l){var ul=fe.rect.left!==_l.left||fe.rect.right!==_l.right||fe.rect.top!==_l.top||fe.rect.bottom!==_l.bottom;fe.changed=ul||cl.x!==fe.coords.x||cl.y!==fe.coords.y}return fe}},{key:"applyToInteraction",value:function(i){var f=this.interaction,b=i.phase,w=f.coords.cur,M=f.coords.start,q=this.result,J=this.startDelta,fe=q.delta;b==="start"&&le(this.startDelta,q.delta);for(var Le=0,ke=[[M,J],[w,fe]];Le<ke.length;Le++){var aa=ke[Le],La=aa[0],sl=aa[1];La.page.x+=sl.x,La.page.y+=sl.y,La.client.x+=sl.x,La.client.y+=sl.y}var rl=this.result.rectDelta,cl=i.rect||f.rect;cl.left+=rl.left,cl.right+=rl.right,cl.top+=rl.top,cl.bottom+=rl.bottom,cl.width=cl.right-cl.left,cl.height=cl.bottom-cl.top}},{key:"setAndApply",value:function(i){var f=this.interaction,b=i.phase,w=i.preEnd,M=i.skipModifiers,q=this.setAll(this.fillArg({preEnd:w,phase:b,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=q,!q.changed&&(!M||M<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var J=f.coords.cur.page,fe={x:i.modifiedCoords.x-J.x,y:i.modifiedCoords.y-J.y};q.coords.x+=fe.x,q.coords.y+=fe.y,q.delta.x+=fe.x,q.delta.y+=fe.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,b=i.event,w=this.states;if(w&&w.length){for(var M=!1,q=0;q<w.length;q++){var J=w[q];i.state=J;var fe=J.options,Le=J.methods,ke=Le.beforeEnd&&Le.beforeEnd(i);if(ke)return this.endResult=ke,!1;M=M||!M&&this.shouldDo(fe,!0,i.phase,!0)}M&&f.move({event:b,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var b=le({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(b);for(var w=0,M=this.states;w<M.length;w++){var q=M[w];b.state=q,q.methods.stop&&q.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var b=i[f],w=b.options,M=b.methods,q=b.name;this.states.push({options:w,methods:M,index:f,name:q})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,b=f.coords,w=f.rect,M=f.modification;if(M.result){for(var q=M.startDelta,J=M.result,fe=J.delta,Le=J.rectDelta,ke=0,aa=[[b.start,q],[b.cur,fe]];ke<aa.length;ke++){var La=aa[ke],sl=La[0],rl=La[1];sl.page.x-=rl.x,sl.page.y-=rl.y,sl.client.x-=rl.x,sl.client.y-=rl.y}w.left-=Le.left,w.right-=Le.right,w.top-=Le.top,w.bottom-=Le.bottom}}},{key:"shouldDo",value:function(i,f,b,w){return!(!i||i.enabled===!1||w&&!i.endOnly||i.endOnly&&!f||b==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Sr(f)}),this.result=Mr(le({},i.result.coords),le({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Mr(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Dr(t,i){var f=t.defaults,b={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},w=function(M){var q=M||{};for(var J in q.enabled=q.enabled!==!1,f)J in q||(q[J]=f[J]);var fe={options:q,methods:b,name:i,enable:function(){return q.enabled=!0,fe},disable:function(){return q.enabled=!1,fe}};return fe};return i&&typeof i=="string"&&(w._defaults=f,w._methods=b),w}function Vr(t){var i=t.iEvent,f=t.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var Or={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new zr(i)},"interactions:before-action-start":function(t){var i=t.interaction,f=t.interaction.modification;f.start(t,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,f=i.modification,b=f.setAndApply(t);return i.edges=f.edges,b},"interactions:before-action-end":function(t){var i=t.interaction,f=i.modification,b=f.beforeEnd(t);return i.edges=f.startEdges,b},"interactions:action-start":Vr,"interactions:action-move":Vr,"interactions:action-end":Vr,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},sr=Or,gn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Gr=function(t){g(f,t);var i=L(f);function f(b,w,M,q,J,fe,Le){var ke;c(this,f),(ke=i.call(this,b)).relatedTarget=null,ke.screenX=void 0,ke.screenY=void 0,ke.button=void 0,ke.buttons=void 0,ke.ctrlKey=void 0,ke.shiftKey=void 0,ke.altKey=void 0,ke.metaKey=void 0,ke.page=void 0,ke.client=void 0,ke.delta=void 0,ke.rect=void 0,ke.x0=void 0,ke.y0=void 0,ke.t0=void 0,ke.dt=void 0,ke.duration=void 0,ke.clientX0=void 0,ke.clientY0=void 0,ke.velocity=void 0,ke.speed=void 0,ke.swipe=void 0,ke.axes=void 0,ke.preEnd=void 0,J=J||b.element;var aa=b.interactable,La=(aa&&aa.options||gn).deltaSource,sl=Ve(aa,J,M),rl=q==="start",cl=q==="end",_l=rl?x(ke):b.prevEvent,ul=rl?b.coords.start:cl?{page:_l.page,client:_l.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return ke.page=le({},ul.page),ke.client=le({},ul.client),ke.rect=le({},b.rect),ke.timeStamp=ul.timeStamp,cl||(ke.page.x-=sl.x,ke.page.y-=sl.y,ke.client.x-=sl.x,ke.client.y-=sl.y),ke.ctrlKey=w.ctrlKey,ke.altKey=w.altKey,ke.shiftKey=w.shiftKey,ke.metaKey=w.metaKey,ke.button=w.button,ke.buttons=w.buttons,ke.target=J,ke.currentTarget=J,ke.preEnd=fe,ke.type=Le||M+(q||""),ke.interactable=aa,ke.t0=rl?b.pointers[b.pointers.length-1].downTime:_l.t0,ke.x0=b.coords.start.page.x-sl.x,ke.y0=b.coords.start.page.y-sl.y,ke.clientX0=b.coords.start.client.x-sl.x,ke.clientY0=b.coords.start.client.y-sl.y,ke.delta=rl||cl?{x:0,y:0}:{x:ke[La].x-_l[La].x,y:ke[La].y-_l[La].y},ke.dt=b.coords.delta.timeStamp,ke.duration=ke.timeStamp-ke.t0,ke.velocity=le({},b.coords.velocity[La]),ke.speed=qa(ke.velocity.x,ke.velocity.y),ke.swipe=cl||q==="inertiastart"?ke.getSwipe():null,ke}return p(f,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var w=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;w<0&&(w+=360);var M=112.5<=w&&w<247.5,q=202.5<=w&&w<337.5;return{up:q,down:!q&&22.5<=w&&w<157.5,left:M,right:!M&&(292.5<=w||w<67.5),angle:w,speed:b.prevEvent.speed,velocity:{x:b.prevEvent.velocityX,y:b.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(Qe);Object.defineProperties(Gr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var rn=p(function t(i,f,b,w,M){c(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=f,this.event=b,this.downTime=w,this.downTarget=M}),Nn=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),bn=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),vn=0,vr=function(){function t(i){var f=this,b=i.pointerType,w=i.scopeFire;c(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=la(function(ke){this.move(ke)},"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=vn++,this._scopeFire=w,this.pointerType=b;var M=this;this._proxy={};var q=function(ke){Object.defineProperty(f._proxy,ke,{get:function(){return M[ke]}})};for(var J in Nn)q(J);var fe=function(ke){Object.defineProperty(f._proxy,ke,{value:function(){return M[ke].apply(M,arguments)}})};for(var Le in bn)fe(Le);this._scopeFire("interactions:new",{interaction:this})}return p(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,b){var w=this.updatePointer(i,f,b,!0),M=this.pointers[w];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:b,pointerIndex:w,pointerInfo:M,type:"down",interaction:this})}},{key:"start",value:function(i,f,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(Ye(this.prepared,i),this.interactable=f,this.element=b,this.rect=f.getRect(b),this.edges=this.prepared.edges?le({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(i,f,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,b,!1);var w,M,q=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&&(w=this.coords.cur.client.x-this.coords.start.client.x,M=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=qa(w,M)>this.pointerMoveTolerance);var J,fe,Le,ke=this.getPointerIndex(i),aa={pointer:i,pointerIndex:ke,pointerInfo:this.pointers[ke],event:f,type:"move",eventTarget:b,dx:w,dy:M,duplicate:q,interaction:this};q||(J=this.coords.velocity,fe=this.coords.delta,Le=Math.max(fe.timeStamp/1e3,.001),J.page.x=fe.page.x/Le,J.page.y=fe.page.y/Le,J.client.x=fe.client.x/Le,J.client.y=fe.client.y/Le,J.timeStamp=Le),this._scopeFire("interactions:move",aa),q||this.simulation||(this.interacting()&&(aa.type=null,this.move(aa)),this.pointerWasMoved&&Z(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||oe(this.coords.delta),(i=le({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,f,b,w){var M=this.getPointerIndex(i);M===-1&&(M=this.updatePointer(i,f,b,!1));var q=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(q),{pointer:i,pointerIndex:M,pointerInfo:this.pointers[M],event:f,eventTarget:b,type:q,curEventTarget:w,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(i){var f=Re(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:_e(this.pointers,function(b){return b.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,b,w){var M,q,J,fe=Re(i),Le=this.getPointerIndex(i),ke=this.pointers[Le];return w=w!==!1&&(w||/(down|start)$/i.test(f.type)),ke?ke.pointer=i:(ke=new rn(fe,i,f,null,null),Le=this.pointers.length,this.pointers.push(ke)),we(this.coords.cur,this.pointers.map(function(aa){return aa.pointer}),this._now()),M=this.coords.delta,q=this.coords.prev,J=this.coords.cur,M.page.x=J.page.x-q.page.x,M.page.y=J.page.y-q.page.y,M.client.x=J.client.x-q.client.x,M.client.y=J.client.y-q.client.y,M.timeStamp=J.timeStamp-q.timeStamp,w&&(this.pointerIsDown=!0,ke.downTime=this.coords.cur.timeStamp,ke.downTarget=b,V(this.downPointer,i),this.interacting()||(Z(this.coords.start,this.coords.cur),Z(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,b),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:b,down:w,pointerInfo:ke,pointerIndex:Le,interaction:this}),Le}},{key:"removePointer",value:function(i,f){var b=this.getPointerIndex(i);if(b!==-1){var w=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:b,pointerInfo:w,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,b){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,b,w){return new Gr(this,i,this.prepared.name,f,this.element,b,w)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,b=i.phase,w=i.preEnd,M=i.type,q=this.rect;if(q&&b==="move"&&(ze(this.edges,q,this.coords.delta[this.interactable.options.deltaSource]),q.width=q.right-q.left,q.height=q.bottom-q.top),this._scopeFire("interactions:before-action-".concat(b),i)===!1)return!1;var J=i.iEvent=this._createPreparedEvent(f,b,w,M);return this._scopeFire("interactions:action-".concat(b),i),b==="start"&&(this.prevEvent=J),this._fireEvent(J),this._scopeFire("interactions:after-action-".concat(b),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Hl(t){dr(t.interaction)}function dr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var i=t.offset.pending;return Wl(t.coords.cur,i),Wl(t.coords.delta,i),ze(t.edges,t.rect,i),i.x=0,i.y=0,!0}function $l(t){var i=t.x,f=t.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function Wl(t,i){var f=t.page,b=t.client,w=i.x,M=i.y;f.x+=w,f.y+=M,b.x+=w,b.y+=M}bn.offsetBy="";var Il={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=$l},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(Wl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Hl,"interactions:before-action-move":Hl,"interactions:before-action-end":function(t){var i=t.interaction;if(dr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},mr=Il,or=function(){function t(i){c(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=i}return p(t,[{key:"start",value:function(i){var f=this.interaction,b=jl(f);if(!b||!b.enabled)return!1;var w=f.coords.velocity.client,M=qa(w.x,w.y),q=this.modification||(this.modification=new zr(f));if(q.copyFrom(f.modification),this.t0=f._now(),this.allowResume=b.allowResume,this.v0=M,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=q.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&M>b.minSpeed&&M>b.endSpeed)this.startInertia();else{if(q.result=q.setAll(this.modifierArg),!q.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,b=jl(this.interaction),w=b.resistance,M=-Math.log(b.endSpeed/this.v0)/w;this.targetOffset={x:(f.x-M)/w,y:(f.y-M)/w},this.te=M,this.lambda_v0=w/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var q=this.modification,J=this.modifierArg;J.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},q.result=q.setAll(J),q.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+q.result.delta.x,y:this.targetOffset.y+q.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=Ee.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,b,w,M,q,J,fe=this,Le=this.interaction,ke=jl(Le).resistance,aa=(Le._now()-this.t0)/1e3;if(aa<this.te){var La,sl=1-(Math.exp(-ke*aa)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,b=this.targetOffset.x,w=this.targetOffset.y,M=this.modifiedOffset.x,q=this.modifiedOffset.y,La={x:Pr(J=sl,i,b,M),y:Pr(J,f,w,q)}):La={x:this.targetOffset.x*sl,y:this.targetOffset.y*sl};var rl={x:La.x-this.currentOffset.x,y:La.y-this.currentOffset.y};this.currentOffset.x+=rl.x,this.currentOffset.y+=rl.y,Le.offsetBy(rl),Le.move(),this.onNextFrame(function(){return fe.inertiaTick()})}else Le.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,b=f._now()-this.t0,w=jl(f).smoothEndDuration;if(b<w){var M={x:kn(b,0,this.targetOffset.x,w),y:kn(b,0,this.targetOffset.y,w)},q={x:M.x-this.currentOffset.x,y:M.y-this.currentOffset.y};this.currentOffset.x+=q.x,this.currentOffset.y+=q.y,f.offsetBy(q),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,b=i.event,w=i.eventTarget,M=this.interaction;M.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),M.updatePointer(f,b,w,!0),M._doPhase({interaction:M,event:b,phase:"resume"}),Z(M.coords.prev,M.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,Ee.cancel(this.timeout)}}]),t}();function jl(t){var i=t.interactable,f=t.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var $r={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(mr),t.usePlugin(sr),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new or(i)},"interactions:before-action-end":function(t){var i=t.interaction,f=t.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(t){var i=t.interaction,f=t.eventTarget,b=i.inertia;if(b.active)for(var w=f;k.element(w);){if(w===i.element){b.resume(t);break}w=Da(w)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Vr,"interactions:action-inertiastart":Vr,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Pr(t,i,f,b){var w=1-t;return w*w*i+2*w*t*f+t*t*b}function kn(t,i,f,b){return-f*(t/=b)*(t-2)+i}var nn=$r;function Xn(t,i){for(var f=0;f<i.length;f++){var b=i[f];if(t.immediatePropagationStopped)break;b(t)}}var Tn=function(){function t(i){c(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=le({},i||{})}return p(t,[{key:"fire",value:function(i){var f,b=this.global;(f=this.types[i.type])&&Xn(i,f),!i.propagationStopped&&b&&(f=b[i.type])&&Xn(i,f)}},{key:"on",value:function(i,f){var b=ea(i,f);for(i in b)this.types[i]=je(this.types[i]||[],b[i])}},{key:"off",value:function(i,f){var b=ea(i,f);for(i in b){var w=this.types[i];if(w&&w.length)for(var M=0,q=b[i];M<q.length;M++){var J=q[M],fe=w.indexOf(J);fe!==-1&&w.splice(fe,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),Zn=function(){function t(i){c(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,V(this,i)}return p(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function xn(t){return k.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function An(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var Pn={id:"events",install:function(t){var i,f=[],b={},w=[],M={add:q,remove:J,addDelegate:function(ke,aa,La,sl,rl){var cl=xn(rl);if(!b[La]){b[La]=[];for(var _l=0;_l<w.length;_l++){var ul=w[_l];q(ul,La,fe),q(ul,La,Le,!0)}}var Tl=b[La],Ol=pa(Tl,function(Xl){return Xl.selector===ke&&Xl.context===aa});Ol||(Ol={selector:ke,context:aa,listeners:[]},Tl.push(Ol)),Ol.listeners.push({func:sl,options:cl})},removeDelegate:function(ke,aa,La,sl,rl){var cl,_l=xn(rl),ul=b[La],Tl=!1;if(ul)for(cl=ul.length-1;cl>=0;cl--){var Ol=ul[cl];if(Ol.selector===ke&&Ol.context===aa){for(var Xl=Ol.listeners,Bl=Xl.length-1;Bl>=0;Bl--){var Ul=Xl[Bl];if(Ul.func===sl&&An(Ul.options,_l)){Xl.splice(Bl,1),Xl.length||(ul.splice(cl,1),J(aa,La,fe),J(aa,La,Le,!0)),Tl=!0;break}}if(Tl)break}}},delegateListener:fe,delegateUseCapture:Le,delegatedEvents:b,documents:w,targets:f,supportsOptions:!1,supportsPassive:!1};function q(ke,aa,La,sl){if(ke.addEventListener){var rl=xn(sl),cl=pa(f,function(_l){return _l.eventTarget===ke});cl||(cl={eventTarget:ke,events:{}},f.push(cl)),cl.events[aa]||(cl.events[aa]=[]),pa(cl.events[aa],function(_l){return _l.func===La&&An(_l.options,rl)})||(ke.addEventListener(aa,La,M.supportsOptions?rl:rl.capture),cl.events[aa].push({func:La,options:rl}))}}function J(ke,aa,La,sl){if(ke.addEventListener&&ke.removeEventListener){var rl=_e(f,function(jr){return jr.eventTarget===ke}),cl=f[rl];if(cl&&cl.events)if(aa!=="all"){var _l=!1,ul=cl.events[aa];if(ul){if(La==="all"){for(var Tl=ul.length-1;Tl>=0;Tl--){var Ol=ul[Tl];J(ke,aa,Ol.func,Ol.options)}return}for(var Xl=xn(sl),Bl=0;Bl<ul.length;Bl++){var Ul=ul[Bl];if(Ul.func===La&&An(Ul.options,Xl)){ke.removeEventListener(aa,La,M.supportsOptions?Xl:Xl.capture),ul.splice(Bl,1),ul.length===0&&(delete cl.events[aa],_l=!0);break}}}_l&&!Object.keys(cl.events).length&&f.splice(rl,1)}else for(aa in cl.events)cl.events.hasOwnProperty(aa)&&J(ke,aa,"all")}}function fe(ke,aa){for(var La=xn(aa),sl=new Zn(ke),rl=b[ke.type],cl=Te(ke)[0],_l=cl;k.element(_l);){for(var ul=0;ul<rl.length;ul++){var Tl=rl[ul],Ol=Tl.selector,Xl=Tl.context;if(ne(_l,Ol)&&se(Xl,cl)&&se(Xl,_l)){var Bl=Tl.listeners;sl.currentTarget=_l;for(var Ul=0;Ul<Bl.length;Ul++){var jr=Bl[Ul];An(jr.options,La)&&jr.func(sl)}}}_l=Da(_l)}}function Le(ke){return fe(ke,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return M.supportsOptions=!0},get passive(){return M.supportsPassive=!0}}),t.events=M,M}},en={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,f=en.methodOrder;i<f.length;i++){var b=f[i],w=en[b](t);if(w)return w}return null},simulationResume:function(t){var i=t.pointerType,f=t.eventType,b=t.eventTarget,w=t.scope;if(!/down|start/i.test(f))return null;for(var M=0,q=w.interactions.list;M<q.length;M++){var J=q[M],fe=b;if(J.simulation&&J.simulation.allowResume&&J.pointerType===i)for(;fe;){if(fe===J.element)return J;fe=Da(fe)}}return null},mouseOrPen:function(t){var i,f=t.pointerId,b=t.pointerType,w=t.eventType,M=t.scope;if(b!=="mouse"&&b!=="pen")return null;for(var q=0,J=M.interactions.list;q<J.length;q++){var fe=J[q];if(fe.pointerType===b){if(fe.simulation&&!zn(fe,f))continue;if(fe.interacting())return fe;i||(i=fe)}}if(i)return i;for(var Le=0,ke=M.interactions.list;Le<ke.length;Le++){var aa=ke[Le];if(!(aa.pointerType!==b||/down/i.test(w)&&aa.simulation))return aa}return null},hasPointer:function(t){for(var i=t.pointerId,f=0,b=t.scope.interactions.list;f<b.length;f++){var w=b[f];if(zn(w,i))return w}return null},idle:function(t){for(var i=t.pointerType,f=0,b=t.scope.interactions.list;f<b.length;f++){var w=b[f];if(w.pointers.length===1){var M=w.interactable;if(M&&(!M.options.gesture||!M.options.gesture.enabled))continue}else if(w.pointers.length>=2)continue;if(!w.interacting()&&i===w.pointerType)return w}return null}};function zn(t,i){return t.pointers.some(function(f){return f.id===i})}var wn=en,Kr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Fn(t,i){return function(f){var b=i.interactions.list,w=Ze(f),M=Te(f),q=M[0],J=M[1],fe=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var Le=0,ke=f.changedTouches;Le<ke.length;Le++){var aa=ke[Le],La={pointer:aa,pointerId:Re(aa),pointerType:w,eventType:f.type,eventTarget:q,curEventTarget:J,scope:i},sl=mn(La);fe.push([La.pointer,La.eventTarget,La.curEventTarget,sl])}}else{var rl=!1;if(!X.supportsPointerEvent&&/mouse/.test(f.type)){for(var cl=0;cl<b.length&&!rl;cl++)rl=b[cl].pointerType!=="mouse"&&b[cl].pointerIsDown;rl=rl||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!rl){var _l={pointer:f,pointerId:Re(f),pointerType:w,eventType:f.type,curEventTarget:J,eventTarget:q,scope:i},ul=mn(_l);fe.push([_l.pointer,_l.eventTarget,_l.curEventTarget,ul])}}for(var Tl=0;Tl<fe.length;Tl++){var Ol=fe[Tl],Xl=Ol[0],Bl=Ol[1],Ul=Ol[2];Ol[3][t](Xl,f,Bl,Ul)}}}function mn(t){var i=t.pointerType,f=t.scope,b={interaction:wn.search(t),searchDetails:t};return f.fire("interactions:find",b),b.interaction||f.interactions.new({pointerType:i})}function To(t,i){var f=t.doc,b=t.scope,w=t.options,M=b.interactions.docEvents,q=b.events,J=q[i];for(var fe in b.browser.isIOS&&!w.events&&(w.events={passive:!1}),q.delegatedEvents)J(f,fe,q.delegateListener),J(f,fe,q.delegateUseCapture,!0);for(var Le=w&&w.events,ke=0;ke<M.length;ke++){var aa=M[ke];J(f,aa.type,aa.listener,Le)}}var Ii={id:"core/interactions",install:function(t){for(var i={},f=0;f<Kr.length;f++){var b=Kr[f];i[b]=Fn(b,t)}var w,M=X.pEventTypes;function q(){for(var J=0,fe=t.interactions.list;J<fe.length;J++){var Le=fe[J];if(Le.pointerIsDown&&Le.pointerType==="touch"&&!Le._interacting)for(var ke=function(){var sl=La[aa];t.documents.some(function(rl){return se(rl.doc,sl.downTarget)})||Le.removePointer(sl.pointer,sl.event)},aa=0,La=Le.pointers;aa<La.length;aa++)ke()}}(w=Q.PointerEvent?[{type:M.down,listener:q},{type:M.down,listener:i.pointerDown},{type:M.move,listener:i.pointerMove},{type:M.up,listener:i.pointerUp},{type:M.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:q},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(J){for(var fe=0,Le=t.interactions.list;fe<Le.length;fe++)Le[fe].documentBlur(J)}}),t.prevTouchTime=0,t.Interaction=function(J){g(Le,J);var fe=L(Le);function Le(){return c(this,Le),fe.apply(this,arguments)}return p(Le,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(ke){t.interactions.pointerMoveTolerance=ke}},{key:"_now",value:function(){return t.now()}}]),Le}(vr),t.interactions={list:[],new:function(J){J.scopeFire=function(Le,ke){return t.fire(Le,ke)};var fe=new t.Interaction(J);return t.interactions.list.push(fe),fe},listeners:i,docEvents:w,pointerMoveTolerance:1},t.usePlugin(Ir)},listeners:{"scope:add-document":function(t){return To(t,"add")},"scope:remove-document":function(t){return To(t,"remove")},"interactable:unset":function(t,i){for(var f=t.interactable,b=i.interactions.list.length-1;b>=0;b--){var w=i.interactions.list[b];w.interactable===f&&(w.stop(),i.fire("interactions:destroy",{interaction:w}),w.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(b,1))}}},onDocSignal:To,doOnInteractions:Fn,methodNames:Kr},Oi=Ii,_n=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(_n||{}),Li=function(){function t(i,f,b,w){c(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Tn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||b,this._win=E(Ga(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=w,this.set(f)}return p(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return k.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),k.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),k.func(f.onend)&&this.on("".concat(i,"end"),f.onend),k.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,b){var w,M=this,q=(w=this._actions.map[i])==null?void 0:w.filterEventType,J=function(fe){return(q==null||q(fe))&&Ar(fe,M._actions)};(k.array(f)||k.object(f))&&this._onOff(_n.Off,i,f,void 0,J),(k.array(b)||k.object(b))&&this._onOff(_n.On,i,b,void 0,J)}},{key:"setPerAction",value:function(i,f){var b=this._defaults;for(var w in f){var M=w,q=this.options[i],J=f[M];M==="listeners"&&this.updatePerActionListeners(i,q.listeners,J),k.array(J)?q[M]=Oe(J):k.plainObject(J)?(q[M]=le(q[M]||{},Sr(J)),k.object(b.perAction[M])&&"enabled"in b.perAction[M]&&(q[M].enabled=J.enabled!==!1)):k.bool(J)&&k.object(b.perAction[M])?q[M].enabled=J:q[M]=J}}},{key:"getRect",value:function(i){return i=i||(k.element(this.target)?this.target:null),k.string(this.target)&&(i=i||this._context.querySelector(this.target)),va(i)}},{key:"rectChecker",value:function(i){var f=this;return k.func(i)?(this.getRect=function(b){var w=le({},i.apply(f,b));return"width"in w||(w.width=w.right-w.left,w.height=w.bottom-w.top),w},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,f){if(Ga(f)||k.object(f)){for(var b in this.options[i]=f,this._actions.map)this.options[b][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return k.string(i)?Array.from(this._context.querySelectorAll(i)):k.func(i)&&i.getAllElements?i.getAllElements():k.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||se(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,b){return!this.testIgnore(i.ignoreFrom,f,b)&&this.testAllow(i.allowFrom,f,b)}},{key:"testAllow",value:function(i,f,b){return!i||!!k.element(b)&&(k.string(i)?be(b,i,f):!!k.element(i)&&se(i,b))}},{key:"testIgnore",value:function(i,f,b){return!(!i||!k.element(b))&&(k.string(i)?be(b,i,f):!!k.element(i)&&se(i,b))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,b,w,M){k.object(f)&&!k.array(f)&&(w=b,b=null);var q=ea(f,b,M);for(var J in q){J==="wheel"&&(J=X.wheelEvent);for(var fe=0,Le=q[J];fe<Le.length;fe++){var ke=Le[fe];Ar(J,this._actions)?this.events[i===_n.On?"on":"off"](J,ke):k.string(this.target)?this._scopeEvents[i===_n.On?"addDelegate":"removeDelegate"](this.target,this._context,J,ke,w):this._scopeEvents[i===_n.On?"add":"remove"](this.target,J,ke,w)}}return this}},{key:"on",value:function(i,f,b){return this._onOff(_n.On,i,f,b)}},{key:"off",value:function(i,f,b){return this._onOff(_n.Off,i,f,b)}},{key:"set",value:function(i){var f=this._defaults;for(var b in k.object(i)||(i={}),this.options=Sr(f.base),this._actions.methodDict){var w=b,M=this._actions.methodDict[w];this.options[w]={},this.setPerAction(w,le(le({},f.perAction),f.actions[w])),this[M](i[w])}for(var q in i)q!=="getRect"?k.func(this[q])&&this[q](i[q]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(k.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],b=f.length-1;b>=0;b--){var w=f[b],M=w.selector,q=w.context,J=w.listeners;M===this.target&&q===this._context&&f.splice(b,1);for(var fe=J.length-1;fe>=0;fe--)this._scopeEvents.removeDelegate(this.target,this._context,i,J[fe][0],J[fe][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),Ri=function(){function t(i){var f=this;c(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(b){var w=b.interactable,M=w.target,q=k.string(M)?f.selectorMap[M]:M[f.scope.id],J=_e(q,function(fe){return fe===w});q.splice(J,1)}})}return p(t,[{key:"new",value:function(i,f){f=le(f||{},{actions:this.scope.actions});var b=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),k.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(b)):(b.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:i,options:f,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(i,f){var b=f&&f.context||this.scope.document,w=k.string(i),M=w?this.selectorMap[i]:i[this.scope.id];if(M)return pa(M,function(q){return q._context===b&&(w||q.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var b=0,w=this.list;b<w.length;b++){var M=w[b],q=void 0;if((k.string(M.target)?k.element(i)&&ne(i,M.target):i===M.target)&&M.inContext(i)&&(q=f(M)),q!==void 0)return q}}}]),t}(),Wo=function(){function t(){var i=this;c(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=X,this.defaults=Sr(gn),this.Eventable=Tn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var w=function M(q,J){var fe=b.interactables.getExisting(q,J);return fe||((fe=b.interactables.new(q,J)).events.global=M.globalEvents),fe};return w.getPointerAverage=ya,w.getTouchBBox=Fa,w.getTouchDistance=ja,w.getTouchAngle=he,w.getElementRect=va,w.getElementClientRect=Se,w.matchesSelector=ne,w.closest=qe,w.globalEvents={},w.version="1.10.27",w.scope=b,w.use=function(M,q){return this.scope.usePlugin(M,q),this},w.isSet=function(M,q){return!!this.scope.interactables.get(M,q&&q.context)},w.on=la(function(M,q,J){if(k.string(M)&&M.search(" ")!==-1&&(M=M.trim().split(/ +/)),k.array(M)){for(var fe=0,Le=M;fe<Le.length;fe++){var ke=Le[fe];this.on(ke,q,J)}return this}if(k.object(M)){for(var aa in M)this.on(aa,M[aa],q);return this}return Ar(M,this.scope.actions)?this.globalEvents[M]?this.globalEvents[M].push(q):this.globalEvents[M]=[q]:this.scope.events.add(this.scope.document,M,q,{options:J}),this},"The interact.on() method is being deprecated"),w.off=la(function(M,q,J){if(k.string(M)&&M.search(" ")!==-1&&(M=M.trim().split(/ +/)),k.array(M)){for(var fe=0,Le=M;fe<Le.length;fe++){var ke=Le[fe];this.off(ke,q,J)}return this}if(k.object(M)){for(var aa in M)this.off(aa,M[aa],q);return this}var La;return Ar(M,this.scope.actions)?M in this.globalEvents&&(La=this.globalEvents[M].indexOf(q))!==-1&&this.globalEvents[M].splice(La,1):this.scope.events.remove(this.scope.document,M,q,J),this},"The interact.off() method is being deprecated"),w.debug=function(){return this.scope},w.supportsTouch=function(){return X.supportsTouch},w.supportsPointerEvent=function(){return X.supportsPointerEvent},w.stop=function(){for(var M=0,q=this.scope.interactions.list;M<q.length;M++)q[M].stop();return this},w.pointerMoveTolerance=function(M){return k.number(M)?(this.scope.interactions.pointerMoveTolerance=M,this):this.scope.interactions.pointerMoveTolerance},w.addDocument=function(M,q){this.scope.addDocument(M,q)},w.removeDocument=function(M){this.scope.removeDocument(M)},w}(this),this.InteractEvent=Gr,this.Interactable=void 0,this.interactables=new Ri(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return i.removeDocument(b.target)};var f=this;this.Interactable=function(b){g(M,b);var w=L(M);function M(){return c(this,M),w.apply(this,arguments)}return p(M,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(q){return C(u(M.prototype),"set",this).call(this,q),f.fire("interactable:set",{options:q,interactable:this}),this}},{key:"unset",value:function(){C(u(M.prototype),"unset",this).call(this);var q=f.interactables.list.indexOf(this);q<0||(f.interactables.list.splice(q,1),f.fire("interactable:unset",{interactable:this}))}}]),M}(Li)}return p(t,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var b=0,w=this.listenerMaps;b<w.length;b++){var M=w[b].map[i];if(M&&M(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,b){return f.isInitialized=!0,k.window(b)&&D(b),Q.init(b),X.init(b),Ee.init(b),f.window=b,f.document=b.document,f.usePlugin(Oi),f.usePlugin(Pn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var b=0,w=this.listenerMaps.length,M=i.before.reduce(function(J,fe){return J[fe]=!0,J[Ko(fe)]=!0,J},{});b<w;b++){var q=this.listenerMaps[b].id;if(q&&(M[q]||M[Ko(q)]))break}this.listenerMaps.splice(b,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var b=E(i);f=f?le({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:b,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),b=E(i),w=this.documents[f].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:b,scope:this,options:w})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ko(t){return t&&t.replace(/\/.*$/,"")}var Go=new Wo,Fr=Go.interactStatic,$i=typeof globalThis<"u"?globalThis:window;Go.init($i);var Ao=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var w=b[0],M=b[1];return w in t||M in t}),f=function(b,w){for(var M=t.range,q=t.limits,J=q===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:q,fe=t.offset,Le=fe===void 0?{x:0,y:0}:fe,ke={range:M,grid:t,x:null,y:null},aa=0;aa<i.length;aa++){var La=i[aa],sl=La[0],rl=La[1],cl=Math.round((b-Le.x)/t[sl]),_l=Math.round((w-Le.y)/t[rl]);ke[sl]=Math.max(J.left,Math.min(J.right,cl*t[sl]+Le.x)),ke[rl]=Math.max(J.top,Math.min(J.bottom,_l*t[rl]+Le.y))}return ke};return f.grid=t,f.coordFields=i,f}}),Vi={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=le(i.snappers||{},Ao),i.createSnapGrid=i.snappers.grid}},zo=Vi,Yo={start:function(t){var i=t.state,f=t.rect,b=t.edges,w=t.pageCoords,M=i.options,q=M.ratio,J=M.enabled,fe=i.options,Le=fe.equalDelta,ke=fe.modifiers;q==="preserve"&&(q=f.width/f.height),i.startCoords=le({},w),i.startRect=le({},f),i.ratio=q,i.equalDelta=Le;var aa=i.linkedEdges={top:b.top||b.left&&!b.bottom,left:b.left||b.top&&!b.right,bottom:b.bottom||b.right&&!b.top,right:b.right||b.bottom&&!b.left};if(i.xIsPrimaryAxis=!(!b.left&&!b.right),i.equalDelta){var La=(aa.left?1:-1)*(aa.top?1:-1);i.edgeSign={x:La,y:La}}else i.edgeSign={x:aa.left?-1:1,y:aa.top?-1:1};if(J!==!1&&le(b,aa),ke!=null&&ke.length){var sl=new zr(t.interaction);sl.copyFrom(t.interaction.modification),sl.prepareStates(ke),i.subModification=sl,sl.startAll(o({},t))}},set:function(t){var i=t.state,f=t.rect,b=t.coords,w=i.linkedEdges,M=le({},b),q=i.equalDelta?Jo:Pi;if(le(t.edges,w),q(i,i.xIsPrimaryAxis,b,f),!i.subModification)return null;var J=le({},f);ze(w,J,{x:b.x-M.x,y:b.y-M.y});var fe=i.subModification.setAll(o(o({},t),{},{rect:J,edges:w,pageCoords:b,prevCoords:b,prevRect:J})),Le=fe.delta;return fe.changed&&(q(i,Math.abs(Le.x)>Math.abs(Le.y),fe.coords,fe.rect),le(b,fe.coords)),fe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Jo(t,i,f){var b=t.startCoords,w=t.edgeSign;i?f.y=b.y+(f.x-b.x)*w.y:f.x=b.x+(f.y-b.y)*w.x}function Pi(t,i,f,b){var w=t.startRect,M=t.startCoords,q=t.ratio,J=t.edgeSign;if(i){var fe=b.width/q;f.y=M.y+(fe-w.height)*J.y}else{var Le=b.height*q;f.x=M.x+(Le-w.width)*J.x}}var Fi=Dr(Yo,"aspectRatio"),Xo=function(){};Xo._defaults={};var Cn=Xo;function En(t,i,f){return k.func(t)?Pe(t,i.interactable,i.element,[f.x,f.y,i]):Pe(t,i.interactable,i.element)}var jn={start:function(t){var i=t.rect,f=t.startOffset,b=t.state,w=t.interaction,M=t.pageCoords,q=b.options,J=q.elementRect,fe=le({left:0,top:0,right:0,bottom:0},q.offset||{});if(i&&J){var Le=En(q.restriction,w,M);if(Le){var ke=Le.right-Le.left-i.width,aa=Le.bottom-Le.top-i.height;ke<0&&(fe.left+=ke,fe.right+=ke),aa<0&&(fe.top+=aa,fe.bottom+=aa)}fe.left+=f.left-i.width*J.left,fe.top+=f.top-i.height*J.top,fe.right+=f.right-i.width*(1-J.right),fe.bottom+=f.bottom-i.height*(1-J.bottom)}b.offset=fe},set:function(t){var i=t.coords,f=t.interaction,b=t.state,w=b.options,M=b.offset,q=En(w.restriction,f,i);if(q){var J=function(fe){return!fe||"left"in fe&&"top"in fe||((fe=le({},fe)).left=fe.x||0,fe.top=fe.y||0,fe.right=fe.right||fe.left+fe.width,fe.bottom=fe.bottom||fe.top+fe.height),fe}(q);i.x=Math.max(Math.min(J.right-M.right,i.x),J.left+M.left),i.y=Math.max(Math.min(J.bottom-M.bottom,i.y),J.top+M.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ji=Dr(jn,"restrict"),Zo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Qo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ei(t,i){for(var f=0,b=["top","left","bottom","right"];f<b.length;f++){var w=b[f];w in t||(t[w]=i[w])}return t}var Hn={noInner:Zo,noOuter:Qo,start:function(t){var i,f=t.interaction,b=t.startOffset,w=t.state,M=w.options;M&&(i=wa(En(M.offset,f,f.coords.start.page))),i=i||{x:0,y:0},w.offset={top:i.y+b.top,left:i.x+b.left,bottom:i.y-b.bottom,right:i.x-b.right}},set:function(t){var i=t.coords,f=t.edges,b=t.interaction,w=t.state,M=w.offset,q=w.options;if(f){var J=le({},i),fe=En(q.inner,b,J)||{},Le=En(q.outer,b,J)||{};ei(fe,Zo),ei(Le,Qo),f.top?i.y=Math.min(Math.max(Le.top+M.top,J.y),fe.top+M.top):f.bottom&&(i.y=Math.max(Math.min(Le.bottom+M.bottom,J.y),fe.bottom+M.bottom)),f.left?i.x=Math.min(Math.max(Le.left+M.left,J.x),fe.left+M.left):f.right&&(i.x=Math.max(Math.min(Le.right+M.right,J.x),fe.right+M.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Qn=Dr(Hn,"restrictEdges"),ai=le({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},jn.defaults),li=Dr({start:jn.start,set:jn.set,defaults:ai},"restrictRect"),eo={width:-1/0,height:-1/0},Hi={width:1/0,height:1/0},ri=Dr({start:function(t){return Hn.start(t)},set:function(t){var i=t.interaction,f=t.state,b=t.rect,w=t.edges,M=f.options;if(w){var q=Fe(En(M.min,i,t.coords))||eo,J=Fe(En(M.max,i,t.coords))||Hi;f.options={endOnly:M.endOnly,inner:le({},Hn.noInner),outer:le({},Hn.noOuter)},w.top?(f.options.inner.top=b.bottom-q.height,f.options.outer.top=b.bottom-J.height):w.bottom&&(f.options.inner.bottom=b.top+q.height,f.options.outer.bottom=b.top+J.height),w.left?(f.options.inner.left=b.right-q.width,f.options.outer.left=b.right-J.width):w.right&&(f.options.inner.right=b.left+q.width,f.options.outer.right=b.left+J.width),Hn.set(t),f.options=M}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Mn={start:function(t){var i,f=t.interaction,b=t.interactable,w=t.element,M=t.rect,q=t.state,J=t.startOffset,fe=q.options,Le=fe.offsetWithOrigin?function(La){var sl=La.interaction.element,rl=wa(Pe(La.state.options.origin,null,null,[sl])),cl=rl||Ve(La.interactable,sl,La.interaction.prepared.name);return cl}(t):{x:0,y:0};if(fe.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var ke=Pe(fe.offset,b,w,[f]);(i=wa(ke)||{x:0,y:0}).x+=Le.x,i.y+=Le.y}var aa=fe.relativePoints;q.offsets=M&&aa&&aa.length?aa.map(function(La,sl){return{index:sl,relativePoint:La,x:J.left-M.width*La.x+i.x,y:J.top-M.height*La.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,f=t.coords,b=t.state,w=b.options,M=b.offsets,q=Ve(i.interactable,i.element,i.prepared.name),J=le({},f),fe=[];w.offsetWithOrigin||(J.x-=q.x,J.y-=q.y);for(var Le=0,ke=M;Le<ke.length;Le++)for(var aa=ke[Le],La=J.x-aa.x,sl=J.y-aa.y,rl=0,cl=w.targets.length;rl<cl;rl++){var _l=w.targets[rl],ul=void 0;(ul=k.func(_l)?_l(La,sl,i._proxy,aa,rl):_l)&&fe.push({x:(k.number(ul.x)?ul.x:La)+aa.x,y:(k.number(ul.y)?ul.y:sl)+aa.y,range:k.number(ul.range)?ul.range:w.range,source:_l,index:rl,offset:aa})}for(var Tl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ol=0;Ol<fe.length;Ol++){var Xl=fe[Ol],Bl=Xl.range,Ul=Xl.x-J.x,jr=Xl.y-J.y,wr=qa(Ul,jr),Yr=wr<=Bl;Bl===1/0&&Tl.inRange&&Tl.range!==1/0&&(Yr=!1),Tl.target&&!(Yr?Tl.inRange&&Bl!==1/0?wr/Bl<Tl.distance/Tl.range:Bl===1/0&&Tl.range!==1/0||wr<Tl.distance:!Tl.inRange&&wr<Tl.distance)||(Tl.target=Xl,Tl.distance=wr,Tl.range=Bl,Tl.inRange=Yr,Tl.delta.x=Ul,Tl.delta.y=jr)}return Tl.inRange&&(f.x=Tl.target.x,f.y=Tl.target.y),b.closest=Tl,Tl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ui=Dr(Mn,"snap"),co={start:function(t){var i=t.state,f=t.edges,b=i.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],Mn.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,f=t.state,b=t.coords,w=f.options,M=f.offsets,q={x:b.x-M[0].x,y:b.y-M[0].y};f.options=le({},w),f.options.targets=[];for(var J=0,fe=w.targets||[];J<fe.length;J++){var Le=fe[J],ke=void 0;if(ke=k.func(Le)?Le(q.x,q.y,i):Le){for(var aa=0,La=f.targetFields;aa<La.length;aa++){var sl=La[aa],rl=sl[0],cl=sl[1];if(rl in ke||cl in ke){ke.x=ke[rl],ke.y=ke[cl];break}}f.options.targets.push(ke)}}var _l=Mn.set(t);return f.options=w,_l},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},qi=Dr(co,"snapSize"),Mo={aspectRatio:Fi,restrictEdges:Qn,restrict:ji,restrictRect:li,restrictSize:ri,snapEdges:Dr({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],co.start(t)):null},set:co.set,defaults:le(Sr(co.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ui,snapSize:qi,spring:Cn,avoid:Cn,transform:Cn,rubberband:Cn},Wi={id:"modifiers",install:function(t){var i=t.interactStatic;for(var f in t.usePlugin(sr),t.usePlugin(zo),i.modifiers=Mo,Mo){var b=Mo[f],w=b._defaults,M=b._methods;w._methods=M,t.defaults.perAction[f]=w}}},Ki=Wi,ni=function(t){g(f,t);var i=L(f);function f(b,w,M,q,J,fe){var Le;if(c(this,f),V(x(Le=i.call(this,J)),M),M!==w&&V(x(Le),w),Le.timeStamp=fe,Le.originalEvent=M,Le.type=b,Le.pointerId=Re(w),Le.pointerType=Ze(w),Le.target=q,Le.currentTarget=null,b==="tap"){var ke=J.getPointerIndex(w);Le.dt=Le.timeStamp-J.pointers[ke].downTime;var aa=Le.timeStamp-J.tapTime;Le.double=!!J.prevTap&&J.prevTap.type!=="doubletap"&&J.prevTap.target===Le.target&&aa<500}else b==="doubletap"&&(Le.dt=w.timeStamp-J.tapTime,Le.double=!0);return Le}return p(f,[{key:"_subtractOrigin",value:function(b){var w=b.x,M=b.y;return this.pageX-=w,this.pageY-=M,this.clientX-=w,this.clientY-=M,this}},{key:"_addOrigin",value:function(b){var w=b.x,M=b.y;return this.pageX+=w,this.pageY+=M,this.clientX+=w,this.clientY+=M,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(Qe),Un={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Un,t.defaults.actions.pointerEvents=Un.defaults,le(t.actions.phaselessTypes,Un.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,f=t.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var f=t.interaction,b=t.pointer,w=t.event,M=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Io(t),Sn({interaction:f,pointer:b,event:w,eventTarget:M,type:"move"},i))},"interactions:down":function(t,i){(function(f,b){for(var w=f.interaction,M=f.pointer,q=f.event,J=f.eventTarget,fe=f.pointerIndex,Le=w.pointers[fe].hold,ke=Ca(J),aa={interaction:w,pointer:M,event:q,eventTarget:J,type:"hold",targets:[],path:ke,node:null},La=0;La<ke.length;La++){var sl=ke[La];aa.node=sl,b.fire("pointerEvents:collect-targets",aa)}if(aa.targets.length){for(var rl=1/0,cl=0,_l=aa.targets;cl<_l.length;cl++){var ul=_l[cl].eventable.options.holdDuration;ul<rl&&(rl=ul)}Le.duration=rl,Le.timeout=setTimeout(function(){Sn({interaction:w,eventTarget:J,pointer:M,event:q,type:"hold"},b)},rl)}})(t,i),Sn(t,i)},"interactions:up":function(t,i){Io(t),Sn(t,i),function(f,b){var w=f.interaction,M=f.pointer,q=f.event,J=f.eventTarget;w.pointerWasMoved||Sn({interaction:w,eventTarget:J,pointer:M,event:q,type:"tap"},b)}(t,i)},"interactions:cancel":function(t,i){Io(t),Sn(t,i)}},PointerEvent:ni,fire:Sn,collectEventTargets:oi,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 Sn(t,i){var f=t.interaction,b=t.pointer,w=t.event,M=t.eventTarget,q=t.type,J=t.targets,fe=J===void 0?oi(t,i):J,Le=new ni(q,b,w,M,f,i.now());i.fire("pointerEvents:new",{pointerEvent:Le});for(var ke={interaction:f,pointer:b,event:w,eventTarget:M,targets:fe,type:q,pointerEvent:Le},aa=0;aa<fe.length;aa++){var La=fe[aa];for(var sl in La.props||{})Le[sl]=La.props[sl];var rl=Ve(La.eventable,La.node);if(Le._subtractOrigin(rl),Le.eventable=La.eventable,Le.currentTarget=La.node,La.eventable.fire(Le),Le._addOrigin(rl),Le.immediatePropagationStopped||Le.propagationStopped&&aa+1<fe.length&&fe[aa+1].node!==Le.currentTarget)break}if(i.fire("pointerEvents:fired",ke),q==="tap"){var cl=Le.double?Sn({interaction:f,pointer:b,event:w,eventTarget:M,type:"doubletap"},i):Le;f.prevTap=cl,f.tapTime=cl.timeStamp}return Le}function oi(t,i){var f=t.interaction,b=t.pointer,w=t.event,M=t.eventTarget,q=t.type,J=f.getPointerIndex(b),fe=f.pointers[J];if(q==="tap"&&(f.pointerWasMoved||!fe||fe.downTarget!==M))return[];for(var Le=Ca(M),ke={interaction:f,pointer:b,event:w,eventTarget:M,type:q,path:Le,targets:[],node:null},aa=0;aa<Le.length;aa++){var La=Le[aa];ke.node=La,i.fire("pointerEvents:collect-targets",ke)}return q==="hold"&&(ke.targets=ke.targets.filter(function(sl){var rl,cl;return sl.eventable.options.holdDuration===((rl=f.pointers[J])==null||(cl=rl.hold)==null?void 0:cl.duration)})),ke.targets}function Io(t){var i=t.interaction,f=t.pointerIndex,b=i.pointers[f].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var Gi=Object.freeze({__proto__:null,default:Un});function uo(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var Yi={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Un);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=uo,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var f=t.interaction,b=t.pointerEvent,w=t.eventTarget,M=t.targets;if(b.type==="hold"&&M.length){var q=M[0].eventable.options.holdRepeatInterval;q<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:w,type:"hold",pointer:b,event:b},i)},q))}}})},Ji=Yi,Xi={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(b){return le(this.events.options,b),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(b,w){var M=f.call(this,b,w);return M===this&&(this.events.options[b]=w),M}},listeners:{"pointerEvents:collect-targets":function(t,i){var f=t.targets,b=t.node,w=t.type,M=t.eventTarget;i.interactables.forEachMatch(b,function(q){var J=q.events,fe=J.options;J.types[w]&&J.types[w].length&&q.testIgnoreAllow(fe,b,M)&&f.push({node:b,eventable:J,props:{interactable:q}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(t,i){var f=t.interactable,b=t.options;le(f.events.options,i.pointerEvents.defaults),le(f.events.options,b.pointerEvents||{})}}},Zi=Xi,ii={id:"pointer-events",install:function(t){t.usePlugin(Gi),t.usePlugin(Ji),t.usePlugin(Zi)}},po=ii,Qi={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(b,w,M){for(var q=b.getAllElements(),J=M.window.Promise,fe=J?[]:null,Le=function(){var aa=q[ke],La=b.getRect(aa);if(!La)return 1;var sl,rl=pa(M.interactions.list,function(ul){return ul.interacting()&&ul.interactable===b&&ul.element===aa&&ul.prepared.name===w.name});if(rl)rl.move(),fe&&(sl=rl._reflowPromise||new J(function(ul){rl._reflowResolve=ul}));else{var cl=Fe(La),_l=function(ul){return{coords:ul,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:cl.x,y:cl.y},client:{x:cl.x,y:cl.y},timeStamp:M.now()});sl=function(ul,Tl,Ol,Xl,Bl){var Ul=ul.interactions.new({pointerType:"reflow"}),jr={interaction:Ul,event:Bl,pointer:Bl,eventTarget:Ol,phase:"reflow"};Ul.interactable=Tl,Ul.element=Ol,Ul.prevEvent=Bl,Ul.updatePointer(Bl,Bl,Ol,!0),oe(Ul.coords.delta),Ye(Ul.prepared,Xl),Ul._doPhase(jr);var wr=ul.window,Yr=wr.Promise,on=Yr?new Yr(function(pn){Ul._reflowResolve=pn}):void 0;return Ul._reflowPromise=on,Ul.start(Xl,Tl,Ol),Ul._interacting?(Ul.move(jr),Ul.end(Bl)):(Ul.stop(),Ul._reflowResolve()),Ul.removePointer(Bl,Bl),on}(M,b,aa,w,_l)}fe&&fe.push(sl)},ke=0;ke<q.length&&!Le();ke++);return fe&&J.all(fe).then(function(){return b})}(this,f,t)}},listeners:{"interactions:stop":function(t,i){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(b,w){b.splice(b.indexOf(w),1)}(i.interactions.list,f))}}},et=Qi;if(Fr.use(Ir),Fr.use(mr),Fr.use(po),Fr.use(nn),Fr.use(Ki),Fr.use(Ll),Fr.use(Je),Fr.use(K),Fr.use(et),Fr.default=Fr,s(l)==="object"&&l)try{l.exports=Fr}catch{}return Fr.default=Fr,Fr})}($o,$o.exports)),$o.exports}var G4=K4();const Bs=$n.getDefaultExportFromCjs(G4),Ai=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 o=l,s=r,c=a.inject(zc),m=a.inject(Mc);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const p=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 g=!1,u=!1,_=NaN,x=NaN,L=NaN,C=NaN,U=-1,I=-1,H=-1,G=-1,D=o.x,E=o.y,S=o.w,y=o.h;const k=a.ref(),F=a.reactive({i:a.toRef(o,"i"),state:v,wrapper:k,calcXY:Pe});function $(te){ea(te)}function Y(){Ja()}function pe(te){cn(o.isDraggable)&&(v.draggable=te)}function Ne(te){cn(o.isResizable)&&(v.resizable=te)}function Ce(te){cn(o.isBounded)&&(v.bounded=te)}function Q(te){v.transformScale=te}function ye(te){v.rowHeight=te}function X(te){v.maxRows=te}function se(){v.rtl=Ss()==="rtl",Ja()}function qe(te){v.cols=Math.floor(te)}c.increaseItem(F),a.onBeforeMount(()=>{v.rtl=Ss()==="rtl"}),a.onMounted(()=>{c.responsive&&c.lastBreakpoint?v.cols=$c(c.lastBreakpoint,c.cols):v.cols=c.colNum,v.rowHeight=c.rowHeight,v.containerWidth=c.width!==null?c.width:100,v.margin=c.margin!==void 0?c.margin.map(Number):[10,10],v.maxRows=c.maxRows,cn(o.isDraggable)?v.draggable=c.isDraggable:v.draggable=o.isDraggable,cn(o.isResizable)?v.resizable=c.isResizable:v.resizable=o.isResizable,cn(o.isBounded)?v.bounded=c.isBounded:v.bounded=o.isBounded,v.transformScale=c.transformScale,v.useCssTransforms=c.useCssTransforms,v.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{D=o.x,E=o.y,y=o.h,S=o.w,Jr(va)}),m.on("updateWidth",$),m.on("compact",Y),m.on("setDraggable",pe),m.on("setResizable",Ne),m.on("setBounded",Ce),m.on("setTransformScale",Q),m.on("setRowHeight",ye),m.on("setMaxRows",X),m.on("directionchange",se),m.on("setColNum",qe)}),a.onBeforeUnmount(()=>{m.off("updateWidth",$),m.off("compact",Y),m.off("setDraggable",pe),m.off("setResizable",Ne),m.off("setBounded",Ce),m.off("setTransformScale",Q),m.off("setRowHeight",ye),m.off("setMaxRows",X),m.off("directionchange",se),m.off("setColNum",qe),p.value&&(p.value.unset(),p.value=null),c.decreaseItem(F)}),n({state:v,wrapper:k});const Da=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ne=a.computed(()=>v.resizable&&!o.static),B=a.computed(()=>c.isMirrored?!v.rtl:v.rtl),re=a.computed(()=>(v.draggable||v.resizable)&&!o.static),be=V4("item"),ce=a.computed(()=>({[be.b()]:!0,[be.bm("resizable")]:ne.value,[be.bm("static")]:o.static,[be.bm("resizing")]:v.isResizing,[be.bm("dragging")]:v.isDragging,[be.bm("transform")]:v.useCssTransforms,[be.bm("rtl")]:B.value,[be.bm("no-touch")]:Da&&re.value})),Se=a.computed(()=>[be.be("resizer"),B.value&&be.bem("resizer","rtl")].filter(Boolean));a.watch(()=>o.isDraggable,te=>{v.draggable=te}),a.watch(()=>o.static,()=>{Jr(V),Jr(oe)}),a.watch(()=>v.draggable,()=>{Jr(V)}),a.watch(()=>o.isResizable,te=>{v.resizable=te}),a.watch(()=>o.isBounded,te=>{v.bounded=te}),a.watch(()=>v.resizable,()=>{Jr(oe)}),a.watch(()=>v.rowHeight,()=>{Jr(va),Jr(Ca)}),a.watch([()=>v.cols,()=>v.containerWidth],()=>{Jr(oe),Jr(va),Jr(Ca)}),a.watch([()=>o.minH,()=>o.maxH,()=>o.minW,()=>o.maxW],()=>{Jr(oe)}),a.watch(B,()=>{Jr(oe),Jr(va)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const te=c.margin;!te||te[0]===v.margin[0]&&te[1]===v.margin[1]||(v.margin=te.map(Number),Jr(va),Jr(Ca))});function va(){o.x+o.w>v.cols?(D=0,S=o.w>v.cols?v.cols:o.w):(D=o.x,S=o.w);const te=na(D,E,S,y);v.isDragging&&(te.top=v.dragging.top,B.value?te.right=v.dragging.left:te.left=v.dragging.left),v.isResizing&&(te.width=v.resizing.width,te.height=v.resizing.height);let ka;v.useCssTransforms?B.value?ka=O4(te.top,te.right,te.width,te.height):ka=I4(te.top,te.left,te.width,te.height):B.value?ka=R4(te.top,te.right,te.width,te.height):ka=L4(te.top,te.left,te.width,te.height),v.style=ka}function Ca(){const te={};for(const ka of["width","height"]){const oa=v.style[ka].match(/^(\d+)px$/);if(!oa)return;te[ka]=oa[1]}s("container-resized",o.i,o.h,o.w,te.height,te.width)}function Ga(te){if(o.static)return;const ka=te.type;if(ka==="resizestart"&&v.isResizing||ka!=="resizestart"&&!v.isResizing)return;const oa=Cs(te);if(cn(oa))return;const{x:Re,y:we}=oa,Ea={width:0,height:0};let ya;switch(ka){case"resizestart":{oe(),U=S,I=y,ya=na(D,E,S,y),Ea.width=ya.width,Ea.height=ya.height,v.resizing=Ea,v.isResizing=!0;break}case"resizemove":{!te.edges.right&&!te.edges.left&&(L=Re),!te.edges.top&&!te.edges.bottom&&(C=we);const Fa=Es(L,C,Re,we);B.value?Ea.width=v.resizing.width-Fa.deltaX/v.transformScale:Ea.width=v.resizing.width+Fa.deltaX/v.transformScale,Ea.height=v.resizing.height+Fa.deltaY/v.transformScale,v.resizing=Ea;break}case"resizeend":{ya=na(D,E,S,y),Ea.width=ya.width,Ea.height=ya.height,v.resizing={width:-1,height:-1},v.isResizing=!1;break}}ya=Ve(Ea.height,Ea.width),ya.w<o.minW&&(ya.w=o.minW),ya.w>o.maxW&&(ya.w=o.maxW),ya.h<o.minH&&(ya.h=o.minH),ya.h>o.maxH&&(ya.h=o.maxH),ya.h<1&&(ya.h=1),ya.w<1&&(ya.w=1),L=Re,C=we,(S!==ya.w||y!==ya.h)&&s("resize",o.i,ya.h,ya.w,Ea.height,Ea.width),te.type==="resizeend"&&(U!==S||I!==y)&&s("resized",o.i,ya.h,ya.w,Ea.height,Ea.width),m.emit("resizeEvent",te.type,o.i,D,E,ya.h,ya.w)}function le(te){if(o.static||v.isResizing)return;const ka=te.type;if(ka==="dragstart"&&v.isDragging||ka!=="dragstart"&&!v.isDragging)return;const oa=Cs(te);if(cn(oa))return;const{x:Re,y:we}=oa,Ea=te.target;if(!Ea.offsetParent)return;const ya={top:0,left:0};switch(ka){case"dragstart":{H=D,G=E;const ja=Ea.offsetParent.getBoundingClientRect(),he=Ea.getBoundingClientRect(),Ze=he.left/v.transformScale,Te=ja.left/v.transformScale,Qe=he.right/v.transformScale,je=ja.right/v.transformScale,Oe=he.top/v.transformScale,_e=ja.top/v.transformScale;B.value?ya.left=(Qe-je)*-1:ya.left=Ze-Te,ya.top=Oe-_e,v.dragging=ya,v.isDragging=!0;break}case"dragmove":{const ja=Es(_,x,Re,we);if(B.value?ya.left=v.dragging.left-ja.deltaX/v.transformScale:ya.left=v.dragging.left+ja.deltaX/v.transformScale,ya.top=v.dragging.top+ja.deltaY/v.transformScale,v.bounded){const he=Ea.offsetParent.clientHeight-Fe(o.h,v.rowHeight,v.margin[1]);ya.top=ze(ya.top,0,he);const Ze=wa(),Te=v.containerWidth-Fe(o.w,Ze,v.margin[0]);ya.left=ze(ya.left,0,Te)}v.dragging=ya;break}case"dragend":{const ja=Ea.offsetParent.getBoundingClientRect(),he=Ea.getBoundingClientRect(),Ze=he.left/v.transformScale,Te=ja.left/v.transformScale,Qe=he.right/v.transformScale,je=ja.right/v.transformScale,Oe=he.top/v.transformScale,_e=ja.top/v.transformScale;B.value?ya.left=(Qe-je)*-1:ya.left=Ze-Te,ya.top=Oe-_e,v.dragging={top:-1,left:-1},v.isDragging=!1;break}}let Fa;B.value,Fa=Pe(ya.top,ya.left),_=Re,x=we,(D!==Fa.x||E!==Fa.y)&&s("move",o.i,Fa.x,Fa.y),te.type==="dragend"&&(H!==D||G!==E)&&s("moved",o.i,Fa.x,Fa.y),m.emit("dragEvent",te.type,o.i,Fa.x,Fa.y,y,S)}function na(te,ka,oa,Re){const we=wa();let Ea;return B.value?Ea={right:Math.round(we*te+(te+1)*v.margin[0]),top:Math.round(v.rowHeight*ka+(ka+1)*v.margin[1]),width:oa===1/0?oa:Math.round(we*oa+Math.max(0,oa-1)*v.margin[0]),height:Re===1/0?Re:Math.round(v.rowHeight*Re+Math.max(0,Re-1)*v.margin[1])}:Ea={left:Math.round(we*te+(te+1)*v.margin[0]),top:Math.round(v.rowHeight*ka+(ka+1)*v.margin[1]),width:oa===1/0?oa:Math.round(we*oa+Math.max(0,oa-1)*v.margin[0]),height:Re===1/0?Re:Math.round(v.rowHeight*Re+Math.max(0,Re-1)*v.margin[1])},Ea}function Pe(te,ka){const oa=wa();let Re=Math.round((ka-v.margin[0])/(oa+v.margin[0])),we=Math.round((te-v.margin[1])/(v.rowHeight+v.margin[1]));return Re=Math.max(Math.min(Re,v.cols-S),0),we=Math.max(Math.min(we,v.maxRows-y),0),{x:Re,y:we}}function wa(){return(v.containerWidth-v.margin[0]*(v.cols+1))/v.cols}function Fe(te,ka,oa){return Number.isFinite(te)?Math.round(ka*te+Math.max(0,te-1)*oa):te}function ze(te,ka,oa){return Math.max(Math.min(te,oa),ka)}function Ve(te,ka,oa=!1){const Re=wa();let we=Math.round((ka+v.margin[0])/(Re+v.margin[0])),Ea=0;return oa?Ea=Math.ceil((te+v.margin[1])/(v.rowHeight+v.margin[1])):Ea=Math.round((te+v.margin[1])/(v.rowHeight+v.margin[1])),we=Math.max(Math.min(we,v.cols-D),0),Ea=Math.max(Math.min(Ea,v.maxRows-E),0),{w:we,h:Ea}}function ea(te,ka){v.containerWidth=te}function Ja(){va()}function qa(){!p.value&&k.value&&(p.value=Bs(k.value),v.useStyleCursor||p.value.styleCursor(!1))}const P=xs(le);function V(){if(qa(),!!p.value)if(v.draggable&&!o.static){const te={ignoreFrom:o.dragIgnoreFrom,allowFrom:o.dragAllowFrom,...o.dragOption};p.value.draggable(te),g||(g=!0,p.value.on("dragstart dragmove dragend",ka=>{ka.type==="dragmove"?P(ka):le(ka)}))}else p.value.draggable({enabled:!1})}const Z=xs(Ga);function oe(){if(qa(),!!p.value)if(v.resizable&&!o.static){const te=na(0,0,o.maxW,o.maxH),ka=na(0,0,o.minW,o.minH),oa={edges:{left:B.value?`.${Se.value[0]}`:!1,right:B.value?!1:`.${Se.value[0]}`,bottom:`.${Se.value[0]}`,top:!1},ignoreFrom:o.resizeIgnoreFrom,restrictSize:{min:{height:ka.height*v.transformScale,width:ka.width*v.transformScale},max:{height:te.height*v.transformScale,width:te.width*v.transformScale}},...o.resizeOption};o.preserveAspectRatio&&(oa.modifiers=[Bs.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(oa),u||(u=!0,p.value.on("resizestart resizemove resizeend",Re=>{Re.type==="resizemove"?Z(Re):Ga(Re)}))}else p.value.resizable({enabled:!1})}return(te,ka)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:k,class:a.normalizeClass(ce.value),style:a.normalizeStyle(v.style)},[a.renderSlot(te.$slots,"default"),ne.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(Se.value)},null,2)):a.createCommentVNode("",!0)],6))}}),so=typeof window<"u";var Ns;so&&(Ns=window==null?void 0:window.navigator)!=null&&Ns.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ts(l){return l!=null}function As(){}const Y4=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(Y4)));const J4=so&&("ontouchstart"in window||Z4()>0),X4=J4?"pointerdown":"click";function Z4(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Q4(l,n,r=window.Event){const{type:o,bubbles:s=!1,cancelable:c=!1,...m}=n;if(!Ts(o)||o==="")return!1;let p;return Ts(r)?p=new r(o,{bubbles:s,cancelable:c}):(p=document.createEvent("HTMLEvents"),p.initEvent(o,s,c)),Object.assign(p,m),l.dispatchEvent(p)}const e6="clickoutside",a6=new Set;so&&document.addEventListener(X4,l=>{const n=l.target,r=l.composedPath&&l.composedPath();a6.forEach(o=>{o!==n&&(r?!r.includes(o):!o.contains(n))&&(!o.__transferElement||o.__transferElement!==n&&!o.__transferElement.contains(n))&&Q4(o,{type:e6})})},!0);const l6=[["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 ki;if(so){for(const l of l6)if(l[1]in document){ki=l;break}}a.computed(()=>!1);const r6=new Set,n6=new WeakMap;if(so&&ki){const l=ki[2],n=ki[4];document.addEventListener(n,()=>{if(r6.forEach(r=>{r.value=!1}),document[l]){const r=n6.get(document[l]);r&&(r.value=!0)}},!1)}const Pc=new Map;Pc.set("x",0);Pc.set("y",0);var io=[],o6=function(){return io.some(function(l){return l.activeTargets.length>0})},i6=function(){return io.some(function(l){return l.skippedTargets.length>0})},zs="ResizeObserver loop completed with undelivered notifications.",t6=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:zs}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=zs),window.dispatchEvent(l)},qo;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(qo||(qo={}));var to=function(l){return Object.freeze(l)},s6=function(){function l(n,r){this.inlineSize=n,this.blockSize=r,to(this)}return l}(),Fc=function(){function l(n,r,o,s){return this.x=n,this.y=r,this.width=o,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,to(this)}return l.prototype.toJSON=function(){var n=this,r=n.x,o=n.y,s=n.top,c=n.right,m=n.bottom,p=n.left,v=n.width,g=n.height;return{x:r,y:o,top:s,right:c,bottom:m,left:p,width:v,height:g}},l.fromRect=function(n){return new l(n.x,n.y,n.width,n.height)},l}(),Bt=function(l){return l instanceof SVGElement&&"getBBox"in l},jc=function(l){if(Bt(l)){var n=l.getBBox(),r=n.width,o=n.height;return!r&&!o}var s=l,c=s.offsetWidth,m=s.offsetHeight;return!(c||m||l.getClientRects().length)},Ms=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)},c6=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},jo=typeof window<"u"?window:{},mi=new WeakMap,Is=/auto|scroll/,u6=/^tb|vertical/,d6=/msie|trident/i.test(jo.navigator&&jo.navigator.userAgent),Bn=function(l){return parseFloat(l||"0")},So=function(l,n,r){return l===void 0&&(l=0),n===void 0&&(n=0),r===void 0&&(r=!1),new s6((r?n:l)||0,(r?l:n)||0)},Os=to({devicePixelContentBoxSize:So(),borderBoxSize:So(),contentBoxSize:So(),contentRect:new Fc(0,0,0,0)}),Hc=function(l,n){if(n===void 0&&(n=!1),mi.has(l)&&!n)return mi.get(l);if(jc(l))return mi.set(l,Os),Os;var r=getComputedStyle(l),o=Bt(l)&&l.ownerSVGElement&&l.getBBox(),s=!d6&&r.boxSizing==="border-box",c=u6.test(r.writingMode||""),m=!o&&Is.test(r.overflowY||""),p=!o&&Is.test(r.overflowX||""),v=o?0:Bn(r.paddingTop),g=o?0:Bn(r.paddingRight),u=o?0:Bn(r.paddingBottom),_=o?0:Bn(r.paddingLeft),x=o?0:Bn(r.borderTopWidth),L=o?0:Bn(r.borderRightWidth),C=o?0:Bn(r.borderBottomWidth),U=o?0:Bn(r.borderLeftWidth),I=_+g,H=v+u,G=U+L,D=x+C,E=p?l.offsetHeight-D-l.clientHeight:0,S=m?l.offsetWidth-G-l.clientWidth:0,y=s?I+G:0,k=s?H+D:0,F=o?o.width:Bn(r.width)-y-S,$=o?o.height:Bn(r.height)-k-E,Y=F+I+S+G,pe=$+H+E+D,Ne=to({devicePixelContentBoxSize:So(Math.round(F*devicePixelRatio),Math.round($*devicePixelRatio),c),borderBoxSize:So(Y,pe,c),contentBoxSize:So(F,$,c),contentRect:new Fc(_,v,F,$)});return mi.set(l,Ne),Ne},Uc=function(l,n,r){var o=Hc(l,r),s=o.borderBoxSize,c=o.contentBoxSize,m=o.devicePixelContentBoxSize;switch(n){case qo.DEVICE_PIXEL_CONTENT_BOX:return m;case qo.BORDER_BOX:return s;default:return c}},p6=function(){function l(n){var r=Hc(n);this.target=n,this.contentRect=r.contentRect,this.borderBoxSize=to([r.borderBoxSize]),this.contentBoxSize=to([r.contentBoxSize]),this.devicePixelContentBoxSize=to([r.devicePixelContentBoxSize])}return l}(),qc=function(l){if(jc(l))return 1/0;for(var n=0,r=l.parentNode;r;)n+=1,r=r.parentNode;return n},f6=function(){var l=1/0,n=[];io.forEach(function(c){if(c.activeTargets.length!==0){var m=[];c.activeTargets.forEach(function(p){var v=new p6(p.target),g=qc(p.target);m.push(v),p.lastReportedSize=Uc(p.target,p.observedBox),g<l&&(l=g)}),n.push(function(){c.callback.call(c.observer,m,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var r=0,o=n;r<o.length;r++){var s=o[r];s()}return l},Ls=function(l){io.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(qc(r.target)>l?n.activeTargets.push(r):n.skippedTargets.push(r))})})},h6=function(){var l=0;for(Ls(l);o6();)l=f6(),Ls(l);return i6()&&t6(),l>0},tt,Wc=[],v6=function(){return Wc.splice(0).forEach(function(l){return l()})},m6=function(l){if(!tt){var n=0,r=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return v6()}).observe(r,o),tt=function(){r.textContent="".concat(n?n--:n++)}}Wc.push(l),tt()},y6=function(l){m6(function(){requestAnimationFrame(l)})},xi=0,g6=function(){return!!xi},b6=250,k6={attributes:!0,characterData:!0,childList:!0,subtree:!0},Rs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],$s=function(l){return l===void 0&&(l=0),Date.now()+l},st=!1,x6=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=b6),!st){st=!0;var o=$s(n);y6(function(){var s=!1;try{s=h6()}finally{if(st=!1,n=o-$s(),!g6())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,k6)};document.body?r():jo.addEventListener("DOMContentLoaded",r)},l.prototype.start=function(){var n=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Rs.forEach(function(r){return jo.addEventListener(r,n.listener,!0)}))},l.prototype.stop=function(){var n=this;this.stopped||(this.observer&&this.observer.disconnect(),Rs.forEach(function(r){return jo.removeEventListener(r,n.listener,!0)}),this.stopped=!0)},l}(),wt=new x6,Vs=function(l){!xi&&l>0&&wt.start(),xi+=l,!xi&&wt.stop()},w6=function(l){return!Bt(l)&&!c6(l)&&getComputedStyle(l).display==="inline"},_6=function(){function l(n,r){this.target=n,this.observedBox=r||qo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var n=Uc(this.target,this.observedBox,!0);return w6(this.target)&&(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},l}(),C6=function(){function l(n,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=n,this.callback=r}return l}(),yi=new WeakMap,Ps=function(l,n){for(var r=0;r<l.length;r+=1)if(l[r].target===n)return r;return-1},gi=function(){function l(){}return l.connect=function(n,r){var o=new C6(n,r);yi.set(n,o)},l.observe=function(n,r,o){var s=yi.get(n),c=s.observationTargets.length===0;Ps(s.observationTargets,r)<0&&(c&&io.push(s),s.observationTargets.push(new _6(r,o&&o.box)),Vs(1),wt.schedule())},l.unobserve=function(n,r){var o=yi.get(n),s=Ps(o.observationTargets,r),c=o.observationTargets.length===1;s>=0&&(c&&io.splice(io.indexOf(o),1),o.observationTargets.splice(s,1),Vs(-1))},l.disconnect=function(n){var r=this,o=yi.get(n);o.observationTargets.slice().forEach(function(s){return r.unobserve(n,s.target)}),o.activeTargets.splice(0,o.activeTargets.length)},l}(),E6=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.");gi.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(!Ms(n))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");gi.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(!Ms(n))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");gi.unobserve(this,n)},l.prototype.disconnect=function(){gi.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const zi=new WeakMap;function S6(l){var n;for(let r=0,o=l.length;r<o;++r){const s=l[r],c=zi.get(s.target);if(typeof c=="function"){const{inlineSize:m,blockSize:p}=((n=s.borderBoxSize)==null?void 0:n[0])??{},{offsetWidth:v,offsetHeight:g}=s.target;c(Object.assign(s,{offsetWidth:v,offsetHeight:g,width:m??v,height:p??g}))}}}const Kc=new(so&&window.ResizeObserver||E6)(S6);function Fs(l,n){zi.set(l,n),Kc.observe(l)}function js(l){zi.has(l)&&(Kc.unobserve(l),zi.delete(l))}function D6(l={}){let n=As;const r=a.watch(()=>a.unref(l.target),s=>{n(),!(!s||typeof l.onResize!="function")&&(Fs(s,l.onResize),n=()=>{js(s),n=As})},{immediate:!0}),o=()=>{r(),n()};return a.getCurrentScope()&&a.onScopeDispose(o),{observeResize:Fs,unobserveResize:js,unobserve:o}}const B6=a.ref(!1);a.computed(()=>B6.value);const Hs="__theme_style__",ct="__theme_observer__",Us=a.reactive(new Map),qs=new Map;a.watch(Us,()=>{if(!so)return;qs.clear();const l=document.head.querySelector(`#${Hs}`);l&&document.head.removeChild(l);const n=document.createElement("style");let r=`.${ct} { width: 1px }`,o=1;for(const[s,[c,m]]of Us.entries())r+=` html.${c} .${ct}, .${m} .${ct} { width: ${++o}px }`,qs.set(o,s);n.textContent=r,n.id=Hs,document.head.appendChild(n)});const Gc=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 o=l,s=r,c=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),m=new Map,p=a.ref(o.layout),v=a.ref(),{observeResize:g,unobserveResize:u}=D6(),_=D4();_.on("resizeEvent",x),_.on("dragEvent",L),a.onBeforeMount(()=>{s("layout-before-mount",p.value)}),a.onMounted(()=>{s("layout-mounted",p.value),a.nextTick(()=>{$4(p.value),c.originalLayout=p.value,a.nextTick(()=>{$(),v.value&&g(v.value,B4(D,16)),wo(p.value,o.verticalCompact),s("layout-updated",p.value),G(),D()})})}),a.onBeforeUnmount(()=>{_.clearAll(),v.value&&u(v.value)});function x(pe,Ne,Ce,Q,ye,X){k(pe,Ne,Ce,Q,ye,X)}function L(pe,Ne,Ce,Q,ye,X){y(pe,Ne,Ce,Q,ye,X)}a.watch(()=>c.width,(pe,Ne)=>{a.nextTick(()=>{_.emit("updateWidth",pe),Ne===-1&&a.nextTick(()=>{s("layout-ready",p.value)}),G()})}),a.watch(()=>[o.layout,o.layout.length],()=>{p.value=o.layout,H()}),a.watch(()=>o.colNum,pe=>{_.emit("setColNum",pe)}),a.watch(()=>o.rowHeight,pe=>{_.emit("setRowHeight",pe)}),a.watch(()=>o.isDraggable,pe=>{_.emit("setDraggable",pe)}),a.watch(()=>o.isResizable,pe=>{_.emit("setResizable",pe)}),a.watch(()=>o.isBounded,pe=>{_.emit("setBounded",pe)}),a.watch(()=>o.transformScale,pe=>{_.emit("setTransformScale",pe)}),a.watch(()=>o.responsive,pe=>{pe||(s("update:layout",c.originalLayout),_.emit("setColNum",o.colNum)),D()}),a.watch(()=>o.maxRows,pe=>{_.emit("setMaxRows",pe)}),a.watch([()=>o.margin,()=>o.margin[1]],G),a.provide(zc,a.reactive({...a.toRefs(o),...a.toRefs(c),increaseItem:C,decreaseItem:U})),a.provide(Mc,_),n({state:c,getItem:I,resizeEvent:k,dragEvent:y,layoutUpdate:H});function C(pe){m.set(pe.i,pe)}function U(pe){m.delete(pe.i)}function I(pe){return m.get(pe)}function H(){if(!cn(p.value)&&!cn(c.originalLayout)){if(p.value.length!==c.originalLayout.length){const pe=Y(p.value,c.originalLayout);if(pe.length>0)if(p.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(pe);else{const Ne=new Set(pe.map(Ce=>Ce.i));c.originalLayout=c.originalLayout.filter(Ce=>!Ne.has(Ce.i))}c.lastLayoutLength=p.value.length,$()}wo(p.value,o.verticalCompact),_.emit("updateWidth",c.width),G(),s("layout-updated",p.value)}}function G(){c.mergedStyle={height:E()}}function D(){v.value&&(c.width=v.value.offsetWidth),_.emit("resizeEvent")}function E(){if(!o.autoSize)return;const pe=parseFloat(o.margin[1]);return T4(p.value)*(o.rowHeight+pe)+pe+"px"}let S;function y(pe,Ne,Ce,Q,ye,X){let se=ws(p.value,Ne);cn(se)&&(se={h:0,w:0,x:0,y:0,i:""}),pe==="dragstart"&&!o.verticalCompact&&(S=p.value.reduce((qe,{i:Da,x:ne,y:B})=>({...qe,[Da]:{x:ne,y:B}}),{})),pe==="dragmove"||pe==="dragstart"?(c.placeholder.i=Ne,c.placeholder.x=se.x,c.placeholder.y=se.y,c.placeholder.w=X,c.placeholder.h=ye,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),p.value=xt(p.value,se,Ce,Q,!0,o.preventCollision),o.restoreOnDrag?(se.static=!0,wo(p.value,o.verticalCompact,S),se.static=!1):wo(p.value,o.verticalCompact),_.emit("compact"),G(),pe==="dragend"&&(S=void 0,s("layout-updated",p.value))}function k(pe,Ne,Ce,Q,ye,X){let se=ws(p.value,Ne);cn(se)&&(se={h:0,w:0,x:0,y:0,i:""});let qe;if(o.preventCollision){const Da=Oc(p.value,{...se,w:X,h:ye}).filter(ne=>ne.i!==se.i);if(qe=Da.length>0,qe){let ne=1/0,B=1/0;Da.forEach(re=>{re.x>se.x&&(ne=Math.min(ne,re.x)),re.y>se.y&&(B=Math.min(B,re.y))}),Number.isFinite(ne)&&(se.w=ne-se.x),Number.isFinite(B)&&(se.h=B-se.y)}}qe||(se.w=X,se.h=ye),pe==="resizestart"||pe==="resizemove"?(c.placeholder.i=Ne,c.placeholder.x=Ce,c.placeholder.y=Q,c.placeholder.w=se.w,c.placeholder.h=se.h,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):pe&&a.nextTick(()=>{c.isDragging=!1}),o.responsive&&F(),wo(p.value,o.verticalCompact),_.emit("compact"),G(),pe==="resizeend"&&s("layout-updated",p.value)}function F(){const pe=j4(o.breakpoints,c.width);if(pe===c.lastBreakpoint)return;const Ne=$c(pe,o.cols);!cn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=kt(p.value));const Ce=H4(c.originalLayout,c.layouts,o.breakpoints,pe,c.lastBreakpoint,Ne,o.verticalCompact);c.layouts[pe]=Ce,c.lastBreakpoint!==pe&&s("breakpoint-changed",pe,Ce),p.value=Ce,s("update:layout",Ce),c.lastBreakpoint=pe,_.emit("setColNum",Ne)}function $(){c.layouts=Object.assign({},o.responsiveLayouts)}function Y(pe,Ne){const Ce=new Set(Ne.map(se=>se.i)),Q=new Set(pe.map(se=>se.i)),ye=pe.filter(se=>!Ce.has(se.i)),X=Ne.filter(se=>!Q.has(se.i));return ye.concat(X)}return(pe,Ne)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:v,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[pe.$slots.default?a.renderSlot(pe.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,Ce=>(a.openBlock(),a.createBlock(Ai,a.mergeProps({key:Ce.i,ref_for:!0},Ce),{default:a.withCtx(()=>[a.renderSlot(pe.$slots,"item",{item:Ce})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Ai,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,c.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 N6={key:0,class:"item-view-group"},T6={key:0,class:"item-view-group"},A6=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:n}){const r=O.useModelComp(O.pinia),{isEdit:o}=O.storeToRefs(r),s=Jn(O.pinia),c=n,m=l,p=a.ref(""),v=a.computed(()=>m==null?void 0:m.children),g=a.computed(()=>{var G,D,E,S;return((G=m==null?void 0:m.children)==null?void 0:G.length)>0&&((D=m==null?void 0:m.children)!=null&&D.every(y=>y==null?void 0:y.layout))?(S=(E=m==null?void 0:m.children)==null?void 0:E[0])==null?void 0:S.layout:"vertical"}),u=G=>{p.value=G,c("radioChange",G)},_=a.computed(()=>{var G,D;return((D=(G=m==null?void 0:m.children)==null?void 0:G[0])==null?void 0:D.isGridLayout)||!1}),x=a.ref((m==null?void 0:m.level)+1),L=a.computed(()=>{if(!(m!=null&&m.children)||!Array.isArray(m.children)||m.children.length<2)return!1;const G=m.children.some(E=>(E==null?void 0:E.name)==="测量系统配置表"&&(E==null?void 0:E.comp)==="ParentItem"),D=m.children.some(E=>(E==null?void 0:E.name)==="测量系统传递表"&&(E==null?void 0:E.comp)==="ParentItem");return G&&D}),C=a.computed(()=>{var D,E,S,y,k,F;let G=(D=m==null?void 0:m.children)==null?void 0:D.filter($=>$==null?void 0:$.choice);if(s.setSelectTab((E=G==null?void 0:G[0])==null?void 0:E.choiceName),(p==null?void 0:p.value)!=="")return(S=m==null?void 0:m.children)==null?void 0:S.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(p==null?void 0:p.value));{let $=(k=(y=m==null?void 0:m.children)==null?void 0:y.find(Y=>Y==null?void 0:Y.choice))==null?void 0:k.choiceName;return(F=m==null?void 0:m.children)==null?void 0:F.filter(Y=>!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===$)}}),U=G=>{const D=(G==null?void 0:G.menuFilter)||[];return Array.isArray(D)&&(D==null?void 0:D.some(E=>{const S=typeof E=="string"?E:JSON.stringify(E);return S==null?void 0:S.includes("@Prop(Hide=Yes)")}))};a.watch(()=>m==null?void 0:m.children,()=>{L.value},{deep:!0});const I=G=>{c("rowClick",G)},H=(G,D)=>{c("routeUrl",G,D)};return(G,D)=>_.value?(a.openBlock(),a.createBlock(a.unref(Gc),{key:0,layout:v.value,"onUpdate:layout":D[0]||(D[0]=E=>v.value=E),"is-draggable":a.unref(o)==="edit","is-resizable":a.unref(o)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(E,S)=>(a.openBlock(),a.createBlock(a.unref(Ai),{key:E.i,x:E.x,y:E.y,"min-h":E.minH,"max-h":E.maxH,"min-w":E.minW,w:E.w,h:E.h,i:E.i},{default:a.withCtx(()=>{var y,k,F,$,Y,pe,Ne,Ce,Q,ye,X,se,qe,Da;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:S===((y=m==null?void 0:m.children)==null?void 0:y.length)-1?"0px":"24px"})},[((F=(k=E==null?void 0:E.component)==null?void 0:k.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&(($=E==null?void 0:E.component)!=null&&$.name)?(a.openBlock(),a.createElementBlock("div",N6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},a.toDisplayString((Y=E==null?void 0:E.component)==null?void 0:Y.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Uo)((pe=E==null?void 0:E.component)==null?void 0:pe.comp)),{pageLayout:g.value,config:{showIndex:(Ne=a.unref(rr)[S])==null?void 0:Ne.showIndex,allowMove:(Ce=a.unref(rr)[S])==null?void 0:Ce.allowMove,viewport:(Q=a.unref(rr)[S])==null?void 0:Q.viewport,status:(ye=a.unref(rr)[S])==null?void 0:ye.status},related:E==null?void 0:E.relatedTables,compName:E==null?void 0:E.component.name,compNames:a.unref(fc),itemData:(X=E==null?void 0:E.component)==null?void 0:X.compData,childItemData:(se=E==null?void 0:E.component)==null?void 0:se.itemChildData,key:a.unref(Yn),cacheNewData:a.unref(pc),onChange:a.unref(Di),index:(E==null?void 0:E.id)??S,onContentChange:a.unref(Bi),onPageChange:a.unref(Ni),parentTableId:(qe=E==null?void 0:E.component)==null?void 0:qe.tableId,allMapContents:a.unref(yt),children:(Da=E==null?void 0:E.component)==null?void 0:Da.children,level:x.value,onRowClick:I,onRouteUrl:H,onClickTrigger:a.unref(hc),onClickMainKey:a.unref(vc),onRadioChange:u},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(C.value,(E,S)=>{var y,k;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(E==null?void 0:E.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(S)===((y=m==null?void 0:m.children)==null?void 0:y.length)-1?"0px":"24px"})},[((k=E==null?void 0:E.comp)==null?void 0:k.toUpperCase())!=="TABLE"&&E.name?(a.openBlock(),a.createElementBlock("div",T6,[U(E)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},a.toDisplayString(E.name),5))])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Uo)(E.comp)),{compName:E.name,groupNames:E==null?void 0:E.nameContents,config:{showIndex:E==null?void 0:E.showIndex,allowMove:E==null?void 0:E.allowMove,viewport:E==null?void 0:E.viewport,status:E==null?void 0:E.status},itemData:E==null?void 0:E.compData,related:E==null?void 0:E.relatedTables,childItemData:E==null?void 0:E.itemChildData,key:a.unref(Yn),onChange:a.unref(Di),index:(E==null?void 0:E.id)??S,onContentChange:a.unref(Bi),onPageChange:a.unref(Ni),parentTableId:E==null?void 0:E.tableId,allMapContents:a.unref(yt),children:E==null?void 0:E.children,level:x.value,onRowClick:I,onRouteUrl:H,onRadioChange:u},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),z6=Yl._export_sfc(A6,[["__scopeId","data-v-3546a109"]]),M6={class:"radio-group-container"},I6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:n}){const r=l,o=n,s=a.ref(),c=Jn(O.pinia),{selectTab:m}=O.storeToRefs(c);a.watch(()=>r==null?void 0:r.itemData,()=>{s.value=m.value},{immediate:!0,deep:!0});const p=v=>{s.value=v,o("radioChange",s.value)};return(v,g)=>(a.openBlock(),a.createElementBlock("div",M6,[a.createVNode(dl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=u=>s.value=u),content:r==null?void 0:r.itemData,onChange:p},null,8,["modelValue","content"])]))}}),O6=Yl._export_sfc(I6,[["__scopeId","data-v-177d64c3"]]),Yc=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"}]),L6={TABLE:bc,FORM:ys,STATICFORM:kc,TABLEOPERATE:N1,TABLESTYLE:q1,TABLEEXTEND:K1,TABLEINTERACTION:J1,FORMOPERATE:gs,FOLD:S2,CALCULATOR:z2,METHODBUTTON:O2,AVATARUPLOAD:Qt.ssAvatar,SIGNATURE:Qt.ssSignature,FORMTOP:ys,STEP:K2,STEPOPERATE:y2,TIMELINE:Q2,TIMELINEOPERATE:_2,FORMTOPOPERATE:gs,SIGNATUREOPERATE:U2,AVATARUPLOADOPERATE:$2,TABS:lh,TABSOPERATE:Fh,CHART:a4,CHARTOPERATE:p4,LAYOUT:v4,LAYOUTOPERATE:C4,PARENTITEM:z6,RADIO:O6};function No(l){return L6[l==null?void 0:l.toUpperCase()]||null}exports.De=Gc;exports.activeStepInfo=_o;exports.addContents=Ho;exports.addVisibleDialog=St;exports.affixItems=n0;exports.allMapContents=yt;exports.analyzeFilter=Co;exports.analyzeForm=Md;exports.analyzeQuoteForm=zd;exports.analyzeTable=Od;exports.cacheNewData=pc;exports.clickMainKey=vc;exports.clickSavePage=r0;exports.clickStep=yc;exports.clickTrigger=hc;exports.compId=Yn;exports.compNames=fc;exports.compShow=Bo;exports.createRobotContent=oc;exports.existLayouts=p0;exports.fixChangeValue=_t;exports.generateLayouts=F1;exports.getComponent=No;exports.getComponents=Uo;exports.getPageData=Wr;exports.getSliceContLength=g0;exports.gridRowHeight=L1;exports.isStepLayout=gc;exports.onBack=a0;exports.onButtonChange=s0;exports.onChange=Di;exports.onClick=l0;exports.onClickStep=f0;exports.onContentChange=Bi;exports.onExtendTaskEnd=d0;exports.onOk=c0;exports.onPageBack=v0;exports.onPageChange=Ni;exports.onSelectFixContent=e0;exports.renderShowItems=uc;exports.robotFile=Tf;exports.showItems=rr;exports.sliceTableLength=dc;exports.slotContent=Yc;exports.ssTable=bc;exports.st=Ai;exports.stepItems=b0;exports.tabChange=h0;exports.toolBar=u0;exports.useFormComp=Ct;exports.useModelLoader=lf;exports.verifyButton=m0;
|