@utogether/components 3.0.0-beta.49 → 3.0.0-beta.50

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.
@@ -1995,7 +1995,7 @@ const Mn = /* @__PURE__ */ Ae(ds, [["render", ps], ["__scopeId", "data-v-10544e1
1995
1995
  if (k) {
1996
1996
  y();
1997
1997
  const O = s != null && s.dataProcessMethod ? s == null ? void 0 : s.dataProcessMethod(U) : U, [B, L] = await zt(l[E](k, O));
1998
- w(), B ? S() : (ct(), z("confirm", L));
1998
+ w(), B || (ct(), z("confirm", L), S());
1999
1999
  } else
2000
2000
  z("confirm");
2001
2001
  }
@@ -1,4 +1,4 @@
1
- (function(W,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-i18n"),require("xe-utils"),require("@utogether/utils"),require("await-to-js"),require("vxe-pc-ui"),require("compressorjs"),require("big.js"),require("sortablejs"),require("dayjs")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","xe-utils","@utogether/utils","await-to-js","vxe-pc-ui","compressorjs","big.js","sortablejs","dayjs"],e):(W=typeof globalThis<"u"?globalThis:W||self,e(W["@utogether/components"]={},W.vue,W.vueI18n,W.xeUtils,W.utils$2,W.to,W.vxePcUi,W.compressorjs,W.Big,W.Sortable,W.dayjs))})(this,function(W,e,ce,A,O,ze,ie,dt,Jn,Kn,se){"use strict";const Gn={key:1,class:"inline-block ut-popconfirm",style:{"margin-left":"6px"}},Xn=e.defineComponent({name:"UtButton",__name:"button",props:{content:{},type:{default:"primary"},mode:{default:"button"},status:{default:"primary"},icon:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},auth:{},title:{default:""},confirmProps:{default:()=>({})},children:{default:()=>[]}},emits:["tap","confirm","cancel"],setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$hasAuthority,{t:a}=ce.useI18n(),l=e.computed(()=>{const y=c(),w=/.*[\u4e00-\u9fa5]+.*$/.test(o.content);return{icon:y,content:w?o.content:a(`message.btn.${o.content}`)}}),c=()=>{var y,w,k,m;return o.mode==="text"?null:o.icon?o.icon:(y=o.content)!=null&&y.toLowerCase().includes("print")?"ri-printer-line":(w=o.content)!=null&&w.toLowerCase().includes("look")?"ri-eye-line":(k=o.content)!=null&&k.toLowerCase().includes("del")?"ri-delete-bin-line":(m=o.content)!=null&&m.toLowerCase().includes("edit")?"ri-edit-box-line":""},p=A.throttle(()=>{C("confirm")},3e3),u=()=>{C("cancel")},d=A.throttle(y=>{var w;o.disabled||o.auth&&!s(o.auth)||((w=y.$event)==null||w.stopPropagation(),C("tap"))},3e3),i=A.throttle(y=>{y.disabled||y.auth&&!s(y.auth)||C("tap",y.code)},2e3),C=n;return(y,w)=>{const k=e.resolveComponent("vxe-button"),m=e.resolveComponent("el-popconfirm");return y.children.length&&y.visible?(e.openBlock(),e.createBlock(k,{key:0,disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,transfer:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.content),1)]),dropdowns:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.children,_=>(e.openBlock(),e.createBlock(k,{key:_.code,disabled:_.auth&&!e.unref(s)(_.auth)||_.disabled,status:_.status||"primary",content:_.content,icon:`${_.icon||c()} ${_.icon?"ri-1x":""}`,mode:_.mode||"button",onClick:S=>e.unref(i)(_)},null,8,["disabled","status","content","icon","mode","onClick"]))),128))]),_:1},8,["disabled","status"])):y.type==="pop"&&y.visible?(e.openBlock(),e.createElementBlock("div",Gn,[e.createVNode(m,e.mergeProps({"confirm-button-text":y.$t("message.btn.confirm"),"cancel-button-text":y.$t("message.btn.cancel"),"icon-color":"#E6A23C",teleported:!1,title:y.title},y.confirmProps,{onConfirm:e.unref(p),onCancel:u}),{reference:e.withCtx(()=>[e.createVNode(k,{disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,type:y.type,content:l.value.content,icon:`${l.value.icon} ${l.value.icon?"ri-1x":""}`,loading:y.loading},null,8,["disabled","status","type","content","icon","loading"])]),_:1},16,["confirm-button-text","cancel-button-text","title","onConfirm"])])):y.visible?(e.openBlock(),e.createBlock(k,{key:2,disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,mode:y.mode||"button",content:l.value.content,icon:`${l.value.icon} ${l.value.icon?"ri-1x":""}`,loading:y.loading,title:y.title,onClick:e.unref(d)},null,8,["disabled","status","mode","content","icon","loading","title","onClick"])):e.createCommentVNode("",!0)}}}),ut=O.withInstall(Xn),Qn={class:"ut-lov-wrapper"},Zn={style:{height:"360px"}},eo={name:"UtLov"},to=e.defineComponent({...eo,props:{record:{default:()=>({})},defaultParams:{default:()=>({})},code:{},field:{},displayName:{},placeholder:{default:"请选择"},mode:{default:"vxe"},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autoLoad:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0},transfer:{type:Boolean},checkMethod:{}},emits:["clear","change"],setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,a=600,l=e.ref(!1),c=e.ref(a),p=e.ref(""),u=e.ref("vxe-table--ignore-clear"),d=e.reactive({loading:!1,border:!0,pagerConfig:{},formConfig:{titleWidth:90,titleAlign:"right",items:[]},height:"auto",editConfig:{},rowConfig:{keyField:"_X_ROW_KEY"},columnConfig:{resizable:!0,isHover:!0},proxyConfig:{form:!0,autoLoad:!1,response:{result:"list",total:"total"},ajax:{query:({page:b,form:f})=>{const h=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},D={pageNum:b.currentPage,pageSize:b.pageSize};let q=Object.assign(D,h,o.defaultParams,f);if(!o.readonly){const{field:Z,displayName:ee}=o;q[ee||Z]=o.record[ee||Z]}return q=y(q),i.lovType!=="url"?(q.lovCode=o.code,s.get("/upfm/v1/lovViewHeader/listBySql",q)):s.get(i.lovUrl,q)}}},checkboxConfig:{checkMethod:({row:b})=>U(b,o)},radioConfig:{checkMethod:({row:b})=>U(b,o)},columns:[]});let i,C=[];const y=b=>(C.filter(h=>["date","month"].includes(h.fieldType)&&h.isSearch).forEach(h=>{h.fieldType==="date"?b[h.field]=A.toDateString(b[h.field],"yyyy-MM-dd 00:00:00"):h.fieldType==="month"&&(b[h.field]=A.toDateString(b[h.field],"yyyy-MM"))}),b),w=()=>{const b=A.clone(C,!0).filter(D=>D.isSearch==="Y");if(!b.length)return;const f=b.length>2,h=b.sort((D,q)=>D.seqNo-q.seqNo).map((D,q)=>({field:D.colField,title:D.colTitle,span:8,folding:q>1,itemRender:_(D)}));k.collapseNode=f,f?h.splice(2,0,k):h.push(k),d.formConfig.items=h},k={span:8,align:"right",collapseNode:!1,itemRender:{name:"VxeButtonGroup",options:[{type:"submit",submit:"submit",content:"message.btn.search",status:"primary",icon:"ri-search-line"},{type:"reset",name:"reset",content:"message.btn.reset",status:"info",icon:"ri-refresh-line"}]}},m=O.useRender(),_=b=>{if(["date","month"].includes(b.fieldType)){const f=b.fieldType==="date"?"yyyy-MM-dd HH:mm:ss":"yyyy-MM";return m.renderDate({type:b.fieldType,valueFormat:f})}else if(b.fieldType==="dictCode")return m.renderDict(b.dictCode);return{name:"VxeInput"}},S=()=>{const b=A.clone(C,!0).filter(h=>h.isCol==="Y"),f=b.reduce((h,D)=>h+ +D.colWidth,65);c.value=f<a?a:f>900?900:f,d.columns=b.sort((h,D)=>h.seqNo-D.seqNo).map(h=>{const D=h.fieldType,q=["formatDict",h.dictCode];return{field:h.colField,title:h.colTitle,minWidth:h.colWidth,formatter:D==="date"?["formatDate"]:h.fieldType==="dictCode"?q:null}}),o.multiple?d.columns.unshift({type:"checkbox",width:45,align:"center"}):d.columns.unshift({type:"radio",width:45,align:"center"})},B=e.ref(null),T=async()=>{var D;d.loading=!0;const b="/upfm/v1/lovViewHeader/detailByViewCode",[f,h]=await ze(s.get(b,{lovCode:o.code}));d.loading=!1,f&&P(),d.loading=!0,p.value=(h==null?void 0:h.lovTitle)||(h==null?void 0:h.lovName),C=(h==null?void 0:h.lineList)||[],i=h,S(),w(),await O.delay(30),await e.nextTick(),o.autoLoad&&((D=B.value)==null||D.commitProxy("query")),d.loading=!1},U=(b,f)=>A.isFunction(f.checkMethod)?f.checkMethod(b):!0,j=async()=>{o.disabled||(T(),await e.nextTick(),l.value=!0)},M=()=>{R("clear","")},x=({row:b})=>{const f=o.multiple?[b]:b;A.isFunction(o.checkMethod)&&!o.checkMethod(b)||(R("change",f,i.valueField),P())},N=async()=>{var b;await e.nextTick(),(b=B.value)==null||b.commitProxy("query")},V=()=>{const b=B.value,f=o.multiple?b.getCheckboxRecords():b.getRadioRecord();!A.isEmpty(f)&&R("change",f,i.valueField),P()},P=()=>{C.length=0,l.value=!1},$=({type:b})=>{},R=n;return(b,f)=>{const h=e.resolveComponent("vxe-grid"),D=e.resolveComponent("vxe-button"),q=e.resolveComponent("vxe-modal"),Z=e.resolveComponent("el-dialog"),ee=e.resolveComponent("vxe-input");return e.openBlock(),e.createElementBlock("div",Qn,[b.mode==="vxe"?(e.openBlock(),e.createBlock(q,{key:0,modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=X=>l.value=X),width:c.value,"destroy-on-close":!1,title:p.value,transfer:b.transfer,height:"80%",resize:"","esc-closable":"","show-footer":"",className:u.value,"before-hide-method":$},{default:e.withCtx(()=>[e.createVNode(h,e.mergeProps({ref_key:"xgrid",ref:B},d,{onCellDblclick:x}),null,16)]),footer:e.withCtx(()=>[e.createVNode(D,{content:b.$t("message.btn.cancel"),icon:"ri-close-line",status:"warning",onClick:P},null,8,["content"]),e.createVNode(D,{content:b.$t("message.btn.confirm"),icon:"ri-save-3-line",status:"primary",onClick:V},null,8,["content"])]),_:1},8,["modelValue","width","title","transfer","className"])):(e.openBlock(),e.createBlock(Z,{key:1,modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=X=>l.value=X),width:c.value,"show-close":!1,title:p.value,"append-to-body":b.transfer,draggable:"","destroy-on-close":"","close-on-press-escape":""},{default:e.withCtx(()=>[e.createElementVNode("div",Zn,[e.createVNode(h,e.mergeProps({ref_key:"xgrid",ref:B},d,{columnConfig:{resizable:!0},onCellDblclick:x,onColumnsChange:N}),null,16)])]),footer:e.withCtx(()=>[e.createVNode(D,{content:b.$t("message.btn.cancel"),icon:"ri-close-line",status:"warning",onClick:P},null,8,["content"]),e.createVNode(D,{content:b.$t("message.btn.confirm"),icon:"ri-save-3-line",status:"primary",onClick:V},null,8,["content"])]),_:1},8,["modelValue","width","title","append-to-body"])),e.createVNode(ee,{modelValue:b.record[b.displayName||b.field],"onUpdate:modelValue":f[2]||(f[2]=X=>b.record[b.displayName||b.field]=X),clearable:!b.disabled&&b.clearable,disabled:b.disabled,readonly:b.readonly,placeholder:b.placeholder,style:{width:"100%"},type:"search",onSearchClick:j,onClear:M},null,8,["modelValue","clearable","disabled","readonly","placeholder"])])}}}),ft=O.withInstall(to);async function no(t,n){return new Promise(async(o,r)=>{try{const s=await oo(t);let a=document.createElement("canvas");a.width=s.naturalWidth,a.height=s.naturalHeight;const l=a.getContext("2d");l.drawImage(s,0,0,a.width,a.height),a=pt(a,l,n),a.toBlob(c=>o(c))}catch(s){r(s)}})}function oo(t){return new Promise(n=>{const o=new FileReader;o.addEventListener("load",()=>{const r=new Image;r.src=o.result,r.addEventListener("load",()=>n(r))}),o.readAsDataURL(t)})}const pt=(t,n,o)=>{const r=o.content.split(","),{textAlign:s,fontSize:a,color:l,fillOpacity:c,xAxis:p,yAxis:u}=o,d=t.width,i=t.height;n.font=`${a||22}px Microsoft Yahei`,n.lineWidth=1,n.fillStyle=l||"rgba(255, 255, 255, 1)",n.textAlign=s||"left",n.textBaseline="middle",n.globalAlpha=Number(c||1);const C=Number(p),y=Number(u);return r.forEach((w,k)=>{let m=a;o.watermarkType==="1"?m=18:o.watermarkType==="2"&&(m=16);const _=d-w.split("").length*Number(m);n.fillText(w,C||_,y||i-Number(m)-k*25)}),t},ro=async(t,n)=>{let o=await so(t);const r=o.getContext("2d");return o=pt(o,r,n),o.toDataURL("image/png")},so=async t=>{const n=document.createElement("img");n.src=t,n.setAttribute("crossOrigin","anonymous"),await new Promise(r=>n.onload=r);const o=document.createElement("canvas");return o.width=n.naturalWidth||n.width,o.height=n.naturalHeight||n.height,o.getContext("2d").drawImage(n,0,0,o.width,o.height),o},ao={style:{width:"100%"},class:"ut-attachment-wrapper"},lo={key:0,style:{display:"flex","font-weight":"700",color:"#000"}},io={style:{display:"flex","justify-content":"space-evenly"}},co={name:"UtAttachment"},uo=e.defineComponent({...co,props:{url:{default:"/ufil/v1/attachment"},sourceTable:{default:""},sourceId:{default:""},dataStatus:{default:"detail"},title:{},defaultParams:{default:()=>({})},watermarkCode:{default:""},permissionPreFix:{default:"file"},maxHeight:{default:300},compassorSize:{default:2},quality:{default:.8},showTitle:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(null),r=e.getCurrentInstance(),s=r.appContext.config.globalProperties.$serviceApi,a=r.appContext.config.globalProperties.$url,l=r.appContext.config.globalProperties.$mode,c=["png","jpg","jpeg","webp","gif"];let p;const u=[{field:"fileName",title:"message.fileName"},{field:"fileSize",title:"message.fileSize"},{field:"createdBy",title:"message.createdByName",formatter:({row:_})=>_.createdByName||_.creator},{field:"creationDate",title:"message.creationDate"},{field:"operate",title:"message.operate",slots:{default:"operate"},width:180}],d=["xlsx","xls","docx","png","jpg","jpeg","webp","gif","pdf","pptx","txt","zip","rar","svg"],i=e.reactive({border:!0,loading:!1,maxHeight:n.maxHeight,pagerConfig:{},toolbarConfig:{enabled:n.showTitle,slots:{buttons:"toolbar_buttons"},import:n.dataStatus!=="detail",refresh:!0},importConfig:{remote:!0,types:d,modes:["insert"],async importMethod({file:_}){const S=_.name.split(".").pop();let B=_;if(n.watermarkCode&&p.watermarkTrigger==="upload"&&c.includes(S)&&(B=await no(_,p)),c.includes(S)&&_.size>1024*1024*n.compassorSize)new dt(_,{quality:n.quality,mimeType:_.type,success(T){const U=new File([T],T.name,{type:T.type});C(U),console.log({result:T,file:U})}});else return C(B)}},proxyConfig:{ajax:{query:({page:_,form:S})=>{const B=Object.assign({},S,n.defaultParams);return B.pageNum=_.currentPage,B.pageSize=_.pageSize,B.sourceTable=n.sourceTable,B.sourceId=n.sourceId,n.sourceId&&l!=="doc"?s.get(n.url,B):null}}},columns:u}),C=_=>{const S=new FormData;S.append("file",_);const B={"Content-Type":"multipart/form-data"};return s.post("/ufil/file/uploadMultipart",S,{headers:B}).then(async T=>{const U={realpath:T,fileName:_.name,fileSize:_.size,fileExtend:_.name.split(".").pop(),sourceTable:n.sourceTable,sourceId:n.sourceId};await s.post(n.url,[U]),o.value.commitProxy("query")}).catch(()=>{ie.VxeUI.modal.message({content:"附件上传失败,请刷新后重试",status:"error"})})},y=async _=>{try{i.loading=!0,await s.delete(n.url,[_]),o.value.commitProxy("query")}finally{i.loading=!1}},w=async()=>{const S=await s.get("/upms/v1/watermark/selectByCode",{watermarkCode:n.watermarkCode});p=S==null?void 0:S.list[0],p.watermarkType==="1"?p.content=A.toDateString(new Date,"yyyy-MM-dd"):p.watermarkType==="2"?p.content=A.toDateString(new Date,"yyyy-MM-dd HH:mm:ss"):p.watermarkType==="0"&&(p.content="")},k=async()=>{const _=o.value.getData().filter(B=>c.includes(B.fileExtend)),S=[];(p==null?void 0:p.watermarkTrigger)=="preview"?await _.forEachSync(async B=>{const T=`${a}/ufil${B.realpath}}`,U=await ro(T,p);S.push(U)}):_.forEach(B=>{const T=`${a}/ufil${B.realpath}`;S.push(T)}),ie.VxeUI.previewImage({activeIndex:0,urlList:S})},m=_=>{const S=a+"/ufil"+_.realpath,B=document.createElement("a");B.style.display="none";const T=_.fileName.split(".");B.href=S,B.setAttribute("download",T[0]),document.body.appendChild(B),B.click(),document.body.removeChild(B)};return Array.prototype.forEachSync=async function(_){for(const[S,B]of Object.entries(this))await _(B,S,this)},e.onMounted(()=>{n.watermarkCode&&w()}),(_,S)=>{const B=e.resolveComponent("ut-divider"),T=e.resolveComponent("ut-button"),U=e.resolveComponent("vxe-grid");return e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(U,e.mergeProps({ref_key:"xGrid",ref:o},i),{toolbar_buttons:e.withCtx(()=>[_.showTitle?(e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(B,{title:_.title||_.$t("message.attachmentInfo")},null,8,["title"])])):e.createCommentVNode("",!0)]),operate:e.withCtx(({row:j})=>[e.createElementVNode("div",io,[e.createVNode(T,{disabled:_.dataStatus==="detail",auth:_.permissionPreFix+"Del",status:"danger",icon:"ri-delete-bin-5-fill",content:"delete",onTap:M=>y(j)},null,8,["disabled","auth","onTap"]),["png","jpeg","jpg"].includes(j.fileExtend)?(e.openBlock(),e.createBlock(T,{key:0,auth:_.permissionPreFix+"Preview",icon:"ri-search-line",content:"preview",onTap:S[0]||(S[0]=M=>k())},null,8,["auth"])):(e.openBlock(),e.createBlock(T,{key:1,auth:_.permissionPreFix+"Download",icon:"ri-download-2-fill",content:"download",onTap:M=>m(j)},null,8,["auth","onTap"]))])]),_:1},16)])}}}),mt=O.withInstall(uo),fo=["onUpdate:modelValue"],po={key:3},mo={key:4},ho={name:"UtUpload"},go=e.defineComponent({...ho,props:e.mergeModels({defaultParams:{default:()=>({})},options:{default:()=>({filename:"数据模板",errorField:"errorMsg",errListField:"list"})},columns:{default:()=>[]},templateData:{default:()=>[]},serviceCode:{},url:{},sourceList:{default:"list"}},{visible:{type:Boolean},visibleModifiers:{}}),emits:e.mergeModels(["close"],["update:visible"]),setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,a=e.useModel(t,"visible"),{t:l}=ce.useI18n(),c=e.ref(!1),p=O.storageLocal.getItem("kLov");e.watch(()=>a.value,b=>{b&&(m.data=[])});const u=()=>{const b=o.columns.map(h=>(h.slots={default:h.field},h.title=h.field,h)),f={type:"checkbox",width:40,align:"center",fixed:"left"};return b.unshift(f),b},d=e.ref({pageSize:200,currentPage:1,total:0}),i=["Sizes","PrevJump","PrevPage","Number","NextPage","NextJump","FullJump","Total"],C=window.innerHeight-20,y=e.ref();let w=[];const k={mode:"covering",types:["csv","xlsx"],afterImportMethod:B},m=e.reactive({border:!0,height:C,data:[],importConfig:k,showOverflow:!0,loading:!1,toolbarConfig:{buttons:[{code:"import_plus",name:l("message.btn.upload"),icon:"ri-upload-2-line",status:"primary"},{code:"save_plus",name:l("message.btn.save"),icon:"ri-save-3-line",status:"success"},{code:"del_plus",name:l("message.btn.delete"),icon:"ri-delete-bin-line",status:"danger"},{code:"export_plus",name:l("message.btn.downloadTemp"),icon:"ri-download-2-line",status:"warning"}],tools:[{code:"question",name:l("message.btn.FAQ"),status:"primary",icon:"vxe-icon-info-circle-fill"},{code:"replay",name:l("message.btn.back"),status:"info",icon:"vxe-icon-undo"}]},columns:u()}),_={toolbarButtonClick({code:b}){switch(b){case"import_plus":{S();break}case"save_plus":{M();break}case"del_plus":{x();break}case"export_plus":{j();break}}},toolbarToolClick({code:b}){switch(b){case"replay":{R();break}case"question":{P();break}}}},S=()=>{var b;w=[],(b=y.value)==null||b.openImport()};function B(b){w=b.$table.getTableData().fullData,u().filter(h=>!h.type&&h.mapField!==o.options.errorField).forEach(h=>{const D=w.findIndex(q=>q[h.field]===h.field);D!==-1&&w.splice(D,1)}),o.columns.forEach(h=>{(h.dateFormatter||h.valueType==="number")&&w.forEach(D=>{h.dateFormatter?D[h.field]=A.toDateString(D[h.field],h.dateFormatter||"yyyy-MM-dd HH:mm:ss"):D[h.field]=Jn(D[h.field]).toFixed(h.decimal||6)})}),d.value.total=w.length,T()}const T=()=>{const{currentPage:b,pageSize:f}=d.value;m.data=w.filter((h,D)=>D<f*b&&D>=f*(b-1))},U=({currentPage:b,pageSize:f})=>{d.value.currentPage=b,d.value.pageSize=f,T()},j=()=>{var h;const b=[];if(o.templateData.length)b.push(...o.templateData);else{const D={};u().filter(q=>q.type!=="checkbox").forEach(q=>{D[q.field]="案例"}),b.push(D)}const f={filename:o.options.filename,type:"xlsx",columns:u().filter(D=>D.mapField!==o.options.errorField&&D.type!=="checkbox"),data:b};(h=y.value)==null||h.exportData(f)},M=async()=>{if(!w.length)return O.warnMessage(l("message.importEmpty"));if(await ie.VxeUI.modal.confirm(l("message.importRecord"))==="confirm"){m.loading=!0;const{url:f}=o;V("toSave"),s.post(f,w).then(h=>{(h==null?void 0:h.status)==="error"||h!=null&&h.length?(c.value=!0,N(h!=null&&h.length?h:h[o.options.errListField||o.sourceList]),ie.VxeUI.modal.message({content:l("message.importFailed"),status:"error"})):(ie.VxeUI.modal.message({content:l("message.importSuccess"),status:"success"}),R())}).finally(()=>{c.value=!1,m.loading=!1})}},x=()=>{var f;const b=(f=y.value)==null?void 0:f.getCheckboxRecords();if(!(b!=null&&b.length))return ie.VxeUI.modal.message({content:l("message.selectedRecord"),status:"warning"});b.forEach(h=>{const D=w.findIndex(q=>q._X_ROW_KEY===h._X_ROW_KEY);D!==-1&&w.splice(D,1)}),m.data=w},N=b=>{d.value.total=b.length,w=b.map((f,h)=>(f._X_ROW_KEY=h,f)),V("toShow"),T()},V=b=>{m.columns.forEach(f=>{if(b==="toSave"){const h=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{};w.forEach(D=>{D[f.mapField]=D[f.field],Object.assign(D,h,o.defaultParams)})}else w.forEach(h=>{h[f.field]=h[f.mapField]})})},P=()=>{ie.VxeUI.modal.alert(l("message.importTip"),l("message.udp.tip"))},$=n,R=()=>{a.value=!1,$("close")};return(b,f)=>{const h=e.resolveComponent("el-option"),D=e.resolveComponent("el-select"),q=e.resolveComponent("el-date-picker"),Z=e.resolveComponent("vxe-pager"),ee=e.resolveComponent("vxe-grid"),X=e.resolveComponent("vxe-modal");return e.openBlock(),e.createBlock(X,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=H=>a.value=H),"show-header":!1,fullscreen:"",remember:"",onClose:R},{default:e.withCtx(()=>[e.createVNode(ee,e.mergeProps({ref_key:"xgrid",ref:y},m,e.toHandlers(_)),e.createSlots({pager:e.withCtx(()=>[e.createVNode(Z,{"current-page":d.value.currentPage,"onUpdate:currentPage":f[0]||(f[0]=H=>d.value.currentPage=H),"page-size":d.value.pageSize,"onUpdate:pageSize":f[1]||(f[1]=H=>d.value.pageSize=H),layouts:i,"page-sizes":[200,500,1e3,2e3,5e3,1e4],total:d.value.total,onPageChange:U},null,8,["current-page","page-size","total"])]),_:2},[e.renderList(b.columns,H=>({name:H.field,fn:e.withCtx(({row:Q})=>[H.dictCode&&!H.disabled?(e.openBlock(),e.createBlock(D,{key:0,modelValue:Q[H.field],"onUpdate:modelValue":I=>Q[H.field]=I,modelModifiers:{trim:!0},clearable:""},{default:e.withCtx(()=>{var I;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((I=e.unref(p)[H.dictCode])==null?void 0:I.children,F=>(e.openBlock(),e.createBlock(h,{key:F.dictCode,value:F.dictCode,label:F.dictName},null,8,["value","label"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):["date","month","datetime"].includes(H.dataType)&&!H.disabled?(e.openBlock(),e.createBlock(q,{key:1,modelValue:Q[H.field],"onUpdate:modelValue":I=>Q[H.field]=I,modelModifiers:{trim:!0},type:H.dataType,"value-format":"YYYY-MM-DD hh:mm:ss"},null,8,["modelValue","onUpdate:modelValue","type"])):!H.da&&!H.disabled?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":I=>Q[H.field]=I,class:"ut-input"},null,8,fo)),[[e.vModelText,Q[H.field],void 0,{trim:!0}]]):c.value?(e.openBlock(),e.createElementBlock("span",mo,e.toDisplayString(Q[H.field]),1)):(e.openBlock(),e.createElementBlock("span",po,e.toDisplayString(Q[H.field]),1))])}))]),1040)]),_:1},8,["modelValue"])}}}),de=(t,n)=>{const o=t.__vccOpts||t;for(const[r,s]of n)o[r]=s;return o},yo=de(go,[["__scopeId","data-v-2978de7c"]]),ht=O.withInstall(yo),wo={name:"UtStampBadge",props:{color:{type:String,default:"primary",validator:t=>["primary","error","warning","success","info"].includes(t)},size:{type:String,default:"large",validator:t=>["large","middle","small"].includes(t)},rotate:{type:Number,default:45},top:{type:Number,default:60},right:{type:Number,default:100},content:{type:String,default:"Unknown"},code:{type:String,default:""}},computed:{getStampBadgeClass(){const{color:t,size:n}=this.$props;return[{[`stamp-badge-${t}`]:!!t,[`stamp-badge-${n}`]:!!n}]},getBindValue(){return{...this.$attrs,...this.$props}}},methods:{getContent(t){if(!t)return t;if(this.code){const n=O.storageLocal.getItem("kLov")[this.code].children.find(o=>o.dictCode===this.content);return n?n.dictName:t}return t}}},bo={class:""};function Co(t,n,o,r,s,a){return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"first-ring"},a.getBindValue,{class:a.getStampBadgeClass,style:[{position:"absolute"},{transform:`rotate(${o.rotate}deg)`,top:`${o.top}px`,right:`${o.right}px`}]}),[e.createElementVNode("div",{class:e.normalizeClass(["second-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["third-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["forth-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["content-rectangle ellipsis",a.getStampBadgeClass])},[e.createElementVNode("span",bo,e.toDisplayString(a.getContent(o.content)),1)],2)],2)],2)],2)],16)}const gt=de(wo,[["render",Co],["__scopeId","data-v-10544e10"]]),ko={class:"ut-content"},_o={key:0,style:{"font-weight":"900"},class:"font-black"},Eo={class:"ut-right-panel"},xo={class:"ut-content-body"},So=de(e.defineComponent({name:"UtContent",__name:"content",props:{title:{default:""},showTop:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},stampOptions:{default:()=>({color:"success"})}},emits:["close"],setup(t,{emit:n}){const o=e.ref(window.top===window.self),r=n,s=()=>{r("close")};return(a,l)=>{var p,u,d,i,C,y,w;const c=e.resolveComponent("ut-button");return e.openBlock(),e.createElementBlock("div",ko,[(p=a.stampOptions)!=null&&p.content?(e.openBlock(),e.createBlock(gt,{key:0,color:((u=a.stampOptions)==null?void 0:u.color)||"success",content:(d=a.stampOptions)==null?void 0:d.content,code:(i=a.stampOptions)==null?void 0:i.code,right:(C=a.stampOptions)==null?void 0:C.right,top:(y=a.stampOptions)==null?void 0:y.top,rotate:(w=a.stampOptions)==null?void 0:w.rotate},null,8,["color","content","code","right","top","rotate"])):e.createCommentVNode("",!0),a.showTop&&o.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["ut-content-top",a.title?"justify-between":"justify-end"])},[a.title?(e.openBlock(),e.createElementBlock("span",_o,e.toDisplayString(a.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Eo,[e.renderSlot(a.$slots,"header",{},void 0,!0),a.showClose?(e.openBlock(),e.createBlock(c,{key:0,status:"info",icon:a.$attrs.icon||"ri-reply-line",content:a.$attrs.content||"goback",onTap:l[0]||(l[0]=k=>s())},null,8,["icon","content"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",xo,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])}}}),[["__scopeId","data-v-c7bf30a1"]]),yt=O.withInstall(So),No=t=>(e.pushScopeId("data-v-c0562151"),t=t(),e.popScopeId(),t),Bo={class:"ut-divider-wrapper"},Ro={class:"flex items-center"},To=No(()=>e.createElementVNode("span",{class:"ut-color-block"},null,-1)),Vo={class:"ut-divider-title"},Do={class:"mr-2"},Oo={name:"UtDivider"},Io=e.defineComponent({...Oo,props:{title:{default:"分割线"}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("div",Ro,[To,e.createElementVNode("span",Vo,e.toDisplayString(n.title),1)]),e.createElementVNode("div",Do,[e.renderSlot(n.$slots,"operate",{},void 0,!0)])]))}}),Fo=de(Io,[["__scopeId","data-v-c0562151"]]),wt=O.withInstall(Fo),Ao={name:"UtDropdown"},Mo=e.defineComponent({...Ao,props:{trigger:{default:"hover"},status:{default:"warning"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},buttons:{default:()=>[]}},emits:["command"],setup(t,{emit:n}){const o=t,r=e.computed(()=>o.buttons.filter(C=>C.visible!==!1)),{t:s}=ce.useI18n(),a=e.getCurrentInstance(),l=a==null?void 0:a.appContext.config.globalProperties.$hasAuthority,c=C=>{C.auth&&!l(C.auth)||C.disabled||i("command",C.code)},p=["primary","success","u-cyan"],u=C=>{const{content:y,code:w}=C;return/.*[\u4e00-\u9fa5]+.*$/.test(y)?y:s("message.btn."+(y||w||"edit"))},d=C=>{var y,w;return(y=C.code)!=null&&y.toLowerCase().includes("print")?"ri-printer-fill":(w=C.code)!=null&&w.toLowerCase().includes("look")?"ri-eye-fill":"ri-edit-2-fill"},i=n;return(C,y)=>{const w=e.resolveComponent("IconifyIconOffline"),k=e.resolveComponent("el-icon"),m=e.resolveComponent("vxe-button"),_=e.resolveComponent("el-dropdown-item"),S=e.resolveComponent("el-dropdown-menu"),B=e.resolveComponent("el-dropdown");return C.visible?(e.openBlock(),e.createBlock(B,{key:0,trigger:C.trigger,disabled:C.disabled,class:"ut-dropdown"},{dropdown:e.withCtx(()=>[e.createVNode(S,{class:"ut-dropdown-menu"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(T,U)=>(e.openBlock(),e.createBlock(_,{key:T.code},{default:e.withCtx(()=>[e.createVNode(m,{disabled:T.disabled||T.auth&&!e.unref(l)(T.auth),status:T.status||p[U%3],content:u(T),icon:T.icon||d(T),onClick:j=>c(T)},null,8,["disabled","status","content","icon","onClick"])]),_:2},1024))),128))]),_:1})]),default:e.withCtx(()=>[e.createVNode(m,{status:C.status,disabled:C.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("message.btn.more"))+" ",1),e.createVNode(k,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(w,{icon:"ri:arrow-down-s-line"})]),_:1})]),_:1},8,["status","disabled"])]),_:1},8,["trigger","disabled"])):e.createCommentVNode("",!0)}}}),bt=O.withInstall(Mo),Po={class:"width: 100%"},$o={name:"UtForm"},Lo=e.defineComponent({...$o,props:{record:{default:()=>({})},items:{default:()=>[]},loading:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},titleWidth:{default:100},span:{default:6},dataStatus:{default:"detail"}},setup(t,{expose:n}){const o=t,r=e.ref(void 0),{t:s}=ce.useI18n(),a=e.ref(!0),l=e.computed(()=>o.items.length?O.formatRules(o.items,s):{}),c=e.computed(()=>o.items.length?O.formatItems(A.clone(o.items,!0),o.dataStatus,6):o.items),p=()=>{r.value.toggleCollapse()};return n({validateForm:i=>{r.value.validate(i)},validate:i=>{r.value.validate(i),setTimeout(()=>{var C;(C=r.value)==null||C.clearValidate()},1600)}}),(i,C)=>{const y=e.resolveComponent("vxe-checkbox"),w=e.resolveComponent("vxe-form");return e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(w,e.mergeProps({ref_key:"xForm",ref:r,data:i.record,items:c.value,rules:l.value,loading:i.loading,vertical:i.vertical,"title-width":i.titleWidth,"title-overflow":"","title-align":"right","title-bold":""},i.$attrs),{dividerPrefix:e.withCtx(()=>[]),collapseNode:e.withCtx(()=>[e.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":C[0]||(C[0]=k=>a.value=k),content:"查看更多","checked-value":!1,"unchecked-value":!0,class:"pl-10",onChange:p},null,8,["modelValue"])]),_:1},16,["data","items","rules","loading","vertical","title-width"])])}}}),Ct=O.withInstall(Lo),Uo="kSysConfig",kt="kCookies_param",ve=O.storageLocal.getItem(Uo),_t=(t,n)=>(t.forEach(o=>{var r;o.auth=n&&n[o.code]||o.auth,o.name?(ve==null?void 0:ve.i18nEnabled)==="Y"&&!o.name.startsWith("message.")&&(o.name=`message.btn.${o.name}`):o.name=`message.btn.${o.code}`,(r=o.dropdowns)!=null&&r.length&&_t(o.dropdowns,n)}),t),Et=(t,n,o)=>{const r={pageNum:1,pageSize:1e5},s=qe();Object.assign(r,o,s,t.defaultParams||{});let a=Bt(r,t.items);a=Vt(a,t.items);const{url:l}=t;if(!l)return null;const c=A.isString(l)?l:l.fetch||l.restful;if(!c)return null;const p=l.fetch?"post":"get";return new Promise((u,d)=>{n[p](c,a).then(i=>{u(i.list)}).catch(i=>{d(i)})})},xt=(t,n,o,r,s)=>{if(s)return Ho();for(const i in n)n[i]&&A.isString(n[i])&&(n[i]=n[i].trim());const a={pageNum:o.currentPage,pageSize:o.pageSize},l=qe();Object.assign(a,l,t.defaultParams||{},n);let c=Bt(a,t.items);c=Vt(c,t.items);const{url:p}=t;if(!p)return null;const u=A.isString(p)?p:p.fetch||p.restful,d=p.fetch?"post":"get";return u?r[d](u,c):null},St=(t,n,o)=>{const{url:r}=o;if(!r)return null;const s=A.isString(r)?r:r.del||r.restful;if(!s)return null;const a=r.del?"post":"delete";return t[a](s,n)},Nt=(t,n,o)=>{const r=[],{url:s}=o;if(!s)return null;const{insertRecords:a,updateRecords:l}=n;if(!A.isEmpty(a)&&(a!=null&&a.length)){const c=qe();a.forEach(u=>{var d;!A.isEmpty(o==null?void 0:o.defaultValue)&&Object.assign(u,o.defaultValue),(d=Object.keys(c))==null||d.forEach(i=>{u[i]=u[i]||c[i]})});const p=A.isString(s)?s:s.add||s.restful;p&&r.push(t.post(p,a))}if(!A.isEmpty(l)&&(l!=null&&l.length)){const c=A.isString(s)?s:s.save||s.restful,p=s.save?"post":"put";c&&r.push(t[p](c,l))}return r},Bt=(t,n)=>{const o=n.filter(s=>{var a,l;return((l=(a=s.itemRender)==null?void 0:a.props)==null?void 0:l.multiple)||s.multiple});if(A.isEmpty(o))return t;const r=A.clone(t,!0);return o.forEach(s=>{var a;s.itemRender.name==="#select"&&s.itemRender.props.multiple&&(((a=r[`_${s.field}`])==null?void 0:a.length)===0&&(r[`${s.field}`]=null),delete t[`_${s.field}`],delete r[`_${s.field}`])}),r},Rt="yyyy-MM-dd 00:00:00",Tt="yyyy-MM-dd 23:59:59",Vt=(t,n)=>{const o=n.filter(s=>{var a;return["#SuDateRange","VxeDateRangePicker"].includes((a=s.itemRender)==null?void 0:a.name)});if(A.isEmpty(o))return t;const r=A.clone(t,!0);return o.forEach(s=>{const a=r[s.field];a&&s.itemRender.startField?(r[s.itemRender.startField]=A.toDateString(r[s.itemRender.startField],Rt),r[s.itemRender.endField]=A.toDateString(r[s.itemRender.endField],Tt)):a&&(r[`${s.field}From`]=A.toDateString(a[0],Rt),r[`${s.field}To`]=A.toDateString(a[1],Tt)),delete r[s.field]}),r},qe=()=>O.cookies.get(kt)?JSON.parse(O.cookies.get(kt)):{},jo=[{code:"insert_actived",name:"add",status:"u-cyan",icon:"vxe-icon-add",auth:"add",sort:1},{code:"delete",status:"danger",icon:"vxe-icon-delete",auth:"del",sort:2},{code:"save",status:"primary",icon:"vxe-icon-save",auth:"edit",sort:3}],zo=[{code:"add",status:"u-cyan",icon:"vxe-icon-add",auth:"add",sort:1},{code:"del",status:"danger",icon:"vxe-icon-delete",auth:"del",sort:2}],vo=[{field:"createdByName",width:90,visible:!1,formatter:({row:t})=>t.createdByName||t.creator},{field:"creationDate",width:140,visible:!1},{field:"lastUpdatedByName",width:90,visible:!1,formatter:({row:t})=>t.createdByName||t.updater},{field:"lastUpdateDate",width:140,visible:!1}],Dt=t=>A.isObject(t.exportConfig)?t.exportConfig:{filename:t.fileName||"导出明细",type:"xlsx",types:["xlsx","csv"],modes:["current","selected","all"],useStyle:!0,sheetMethod:({worksheet:n})=>t.onSheetMethod?t.onSheetMethod(n):qo(n),columnFilterMethod:({column:n})=>t.columnFilter?!!t.columnFilter(n):!["operate"].includes(n.field)&&n.type!=="checkbox"},Ot=(t,n,o,r)=>{const s={icon:"ri-refresh-line",iconLoading:"vxe-icon-spinner roll vxe-loading--default-icon"};if(!n.editable){t.editConfig.editable=n.editable;const d=n.needExport&&r("export");return d&&(t.exportConfig=Dt(o)),t.toolbarConfig={buttons:[],enabled:d,refreshOptions:s,exportOptions:{icon:"ri-download-2-line",code:"export"},export:d,custom:!!o.gridId,refresh:!0,perfect:!0},t}let a=A.clone(o.buttons||[],!0);a.forEach((d,i)=>{d.sort=d.sort||i+10}),(o.mode!=="form"?A.clone(jo,!0):A.clone(zo,!0)).reverse().forEach(d=>{!a.some(i=>i.code===d.code)&&a.unshift(d),o.authPrefix&&!["printer","export"].includes(d.auth)&&(d.auth=o.authPrefix+d.auth.slice(0,1).toLocaleUpperCase()+d.auth.slice(1).toLocaleLowerCase())}),a=_t(a,n.auth).filter(d=>{var C;const i=d.auth?r(d.auth):!0;return(C=d.dropdowns)!=null&&C.length&&(d.dropdowns=d.dropdowns.filter(y=>!y.auth||y.auth&&r(y.auth))),i});const c={trigger:"dblclick",mode:"row",showStatus:!0};t.editConfig=o.mode!=="form"?c:{enabled:!1};const p=n.needExport&&r("export");let u=null;return p&&(t.exportConfig=Dt(o),u={icon:"ri-download-2-line",code:"export"}),t.toolbarConfig={buttons:A.orderBy(a,"sort"),enabled:!0,refreshOptions:s,customOptions:o.gridId?{}:null,exportOptions:u,custom:!!o.gridId,export:p,refresh:!0,perfect:!0},t},It=({columns:t,data:n},o)=>[t.map((r,s)=>{var a;if(s===(o.index||0))return o.label||"合计";if((a=o.fields)!=null&&a.includes(r.property)){const l=n.reduce((c,p)=>c+Number(p[r.property]||0),0);return l&&A.commafy(Number(l.toFixed(o.decimal||2)))}return""})],Ft=(t,n)=>A.isFunction(n.checkMethod)?n.checkMethod(t):!0,qo=t=>{t.eachRow((n,o)=>{n.font={name:"微软雅黑",size:9},n.border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},o===1&&(n.fill={type:"pattern",pattern:"solid",fgColor:{argb:"4F81BD"}},n.font={name:"微软雅黑",size:10,bold:!0,color:{argb:"FFFFFFFF"}})})},Ho=()=>new Promise(t=>{setTimeout(()=>{t({list:[{id:1,name:"Test1",sex:"Man",age:28,address:"Shenzhen"},{id:2,name:"Test2",sex:"Women",age:22,address:"Guangzhou"},{id:3,name:"Test3",sex:"Man",age:32,address:"Shanghai"},{id:4,name:"Test4",sex:"Women",age:23,address:"test abc"},{id:5,name:"Test5",sex:"Women",age:30,address:"Shanghai"}],total:5})},100)}),He=t=>{const n={};return Object.keys(t).forEach(o=>{const r=o.replace(/-(\w)/g,s=>s.slice(1).toUpperCase());n[r]=t[o]}),n},Be=t=>(e.pushScopeId("data-v-06c590b1"),t=t(),e.popScopeId(),t),Wo={class:"w-full h-full"},Yo=Be(()=>e.createElementVNode("span",null,"查询方案",-1)),Jo={class:"pl-2 mr-5"},Ko=Be(()=>e.createElementVNode("i",{class:"vxe-icon-question-circle-fill"},null,-1)),Go=Be(()=>e.createElementVNode("div",null,[e.createElementVNode("div",{class:"text-sm"},[e.createElementVNode("div",null,"• 单击选中需要的查询方案,点击确定即可"),e.createElementVNode("div",null,"• 专属否: 是否只有自己才能查询"),e.createElementVNode("div",null,"• 仅方案创建人能够删除及更新方案")])],-1)),Xo={class:"flex flex-wrap justify-between x-card"},Qo=["onClick"],Zo={style:{"border-color":"rgb(229 231 235)","border-bottom-width":"1px"},class:"flex items-center justify-between flex-1 w-full h-4 pb-2 pl-2 pr-2 mt-2"},er={style:{"font-weight":"900",color:"rgb(6 95 70)"}},tr={class:"flex"},nr=["onClick"],or=["onClick"],rr={class:"flex items-center w-full",style:{color:"rgb(6 95 70)"}},sr={style:{width:"50%",overflow:"hidden","text-overflow":"ellipsis","text-align":"right","white-space":"nowrap"},class:"inline-block"},ar={style:{width:"50%",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},class:"inline-blocks"},lr={key:1,class:"flex flex-wrap items-center justify-center card-content card2"},ir=[Be(()=>e.createElementVNode("i",{style:{"font-size":"56px",color:"rgb(156 163 175)"},class:"vxe-icon-add"},null,-1))],cr={class:"flex items-center justify-end"},dr={class:"flex items-center justify-end"},We="/upfm/v1/queryConfig",ur=de(e.defineComponent({__name:"SuSearch",props:{view:{default:""},items:{default:()=>[]}},emits:["close","search"],setup(t,{emit:n}){const o=t,r=e.getCurrentInstance(),s=r.appContext.config.globalProperties.$serviceApi,a=r.appContext.config.globalProperties.$hasAuthority,l=O.useRender(),{t:c}=ce.useI18n();console.log("view ======",o.view);const p=e.ref(null),u=e.ref(""),d=e.ref(!1),i=e.ref(!1),C=e.ref(!1),y=e.ref(!1),w=e.ref(!0),k=e.ref({}),m=O.cookies.get("loginer");let _,S,B;const T=e.ref([]),U=e.computed(()=>o.items.length?O.formatRules(M(),c):{}),j=e.computed(()=>o.items.length?O.formatItems(M(),"update"):o.items),M=()=>{const I=[{field:"title",title:"方案名称",required:!0},{field:"isPrivate",title:"专属否",itemRender:l.renderSwitch("Y")}];return I.push(...A.clone(o.items,!0)),I.filter(F=>F.field!=="dataFlat")},x=I=>{S=null;const F=I.select;T.value.forEach(E=>{E.select=!1}),I.select=!F,w.value=F,S=F?S:I,I.id==="add"&&(w.value=!0,N())},N=()=>{k.value={isPrivate:"Y",item:{}},i.value=!0},V=(I,F)=>{k.value={title:I.title,isPrivate:I.isPrivate,item:I,...I.content},_=F,i.value=!0},P=()=>{p.value.validate(async I=>{if(!I){const F=f();y.value=!0;const E=F.id?"put":"post",[L,z]=await ze(s[E](We,[F]));y.value=!1,L||(z[0].select=!1,z[0].content=JSON.parse(z[0].content),E==="post"?T.value.splice(T.value.length-1,0,z[0]):T.value.splice(_,1,z[0]),B=A.clone(T.value,!0),O.successMessage(),i.value=!1)}})},$=()=>{C.value=!0;const I=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},F=Object.assign({pageSize:50,pageNum:1,userName:m,viewCode:o.view},I);s.get(We,F).then(E=>{const L=E.list;h(L),B=A.clone(T.value,!0)}).finally(()=>{C.value=!1})},R=()=>{Q("search",S.content),b()},b=()=>{i.value?(k.value={},i.value=!1):(d.value=!1,Q("close"))},f=()=>{const I=k.value,{title:F,isPrivate:E}=I,L=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},z={...k.value.item,...L,title:F,isPrivate:E,viewCode:o.view,content:"",userName:m};delete I.title,delete I.isPrivate,delete I.item;const Y={};for(const K in I)I[K]&&(Y[K]=I[K]);return z.content=JSON.stringify(Y),z},h=I=>{I.forEach(F=>{F.select=!1,F.content=JSON.parse(F.content)}),I.push({id:"add"}),T.value=I},D=I=>{var E;return(E=j.value.find(L=>L.field===I))==null?void 0:E.title},q=(I,F)=>{var L,z,Y,K,re;const E=(L=o.items)==null?void 0:L.find(J=>J.field===I);return(z=E==null?void 0:E.itemRender)!=null&&z.dictCode&&((re=(K=(Y=E==null?void 0:E.itemRender)==null?void 0:Y.options)==null?void 0:K.find(J=>J.dictCode===F))==null?void 0:re.dictName)||F},Z=async(I,F)=>{if(await ie.VxeUI.modal.confirm(`继续操作将删除查询方案【${I.title}】`)==="confirm"){C.value=!0;const L=A.clone(I,!0);L.content=JSON.stringify(L.content),s.delete(We,[L]).then(()=>{T.value.splice(F,1),B=A.clone(T.value,!0),O.successMessage()}).finally(()=>{C.value=!1})}},ee=()=>{T.value=B.filter(I=>I.id==="add"||I.title.includes(u.value))},X=I=>{["Enter","NumpadEnter"].includes(I.$event.code)&&ee()},H=()=>{u.value="",T.value=A.clone(B,!0)};$();const Q=n;return e.onMounted(()=>{d.value=!0}),(I,F)=>{const E=e.resolveComponent("el-popover"),L=e.resolveComponent("el-scrollbar"),z=e.resolveComponent("vxe-input"),Y=e.resolveComponent("ut-button"),K=e.resolveComponent("vxe-modal"),re=e.resolveComponent("vxe-form");return e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(K,{modelValue:d.value,"onUpdate:modelValue":F[4]||(F[4]=J=>d.value=J),loading:C.value,width:"820",height:"360","show-footer":"",onClose:F[5]||(F[5]=J=>b())},{title:e.withCtx(()=>[e.createElementVNode("div",null,[Yo,e.createElementVNode("span",Jo,[e.createVNode(E,{placement:"right",width:260,trigger:"hover"},{reference:e.withCtx(()=>[Ko]),default:e.withCtx(()=>[Go]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(J,be)=>(e.openBlock(),e.createElementBlock("div",{key:J.id,class:"card",style:e.normalizeStyle({width:T.value.length===1?"100%":""}),onClick:he=>x(J)},[J.id!=="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex flex-col justify-between card-content card2",{selectCard:J.select}])},[e.createElementVNode("div",Zo,[e.createElementVNode("span",er,e.toDisplayString(J.title)+"("+e.toDisplayString(J.userName===e.unref(m)?"自己":J.userName)+")",1),e.createElementVNode("div",tr,[J.userName===e.unref(m)||e.unref(a)("fetch")?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center justify-center",style:{width:"16px",height:"16px","margin-left":"12px",color:"#fff","background-color":"rgb(29 78 216)","border-radius":"8px"},onClick:he=>V(J,be)}," ✔ ",8,nr)):e.createCommentVNode("",!0),J.userName===e.unref(m)||e.unref(a)("fetch")?(e.openBlock(),e.createElementBlock("div",{key:1,class:"flex items-center justify-center",style:{width:"16px",height:"16px","margin-left":"12px",color:"#fff","background-color":"rgb(185 28 28)","border-radius":"8px"},onClick:he=>Z(J,be)}," × ",8,or)):e.createCommentVNode("",!0)])]),e.createVNode(L,{style:{flex:"4"},class:"w-full overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.content,(he,Se)=>(e.openBlock(),e.createElementBlock("span",{key:he,style:{height:"33.333%","line-height":"2rem"},class:"inline-block w-1/2"},[e.createElementVNode("span",rr,[e.createElementVNode("span",sr,e.toDisplayString(I.$t(D(Se)))+":",1),e.createElementVNode("span",ar,e.toDisplayString(q(Se,he)),1)])]))),128))]),_:2},1024)],2)):(e.openBlock(),e.createElementBlock("div",lr,ir))],12,Qo))),128))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cr,[e.createVNode(z,{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=J=>u.value=J),placeholder:"请录入方案标题",type:"search",onSearchClick:ee,onKeydown:X,onClear:H},null,8,["modelValue"]),e.createVNode(Y,{content:"reset",status:"info",icon:"ri-refresh-line",onTap:F[1]||(F[1]=J=>H())}),e.createVNode(Y,{content:"cancel",status:"warning",icon:"ri-close-line",onTap:F[2]||(F[2]=J=>b())}),e.createVNode(Y,{disabled:w.value,content:"confirm",icon:"ri-save-3-line",onTap:F[3]||(F[3]=J=>R())},null,8,["disabled"])])]),_:1},8,["modelValue","loading"]),e.createVNode(K,{modelValue:i.value,"onUpdate:modelValue":F[7]||(F[7]=J=>i.value=J),loading:y.value,width:"360",height:"420",title:"查询方案新增","show-footer":"",onClose:F[8]||(F[8]=J=>b())},{default:e.withCtx(()=>[e.createVNode(re,{ref_key:"xForm",ref:p,data:k.value,items:j.value,rules:U.value,"title-align":"right","title-width":90},null,8,["data","items","rules"])]),footer:e.withCtx(()=>[e.createElementVNode("div",dr,[e.createVNode(Y,{content:"cancel",status:"warning",icon:"ri-close-line",onTap:F[6]||(F[6]=J=>b())}),e.createVNode(Y,{content:"confirm",icon:"ri-save-3-line",onTap:P})])]),_:1},8,["modelValue","loading"])])}}}),[["__scopeId","data-v-06c590b1"]]),fr={style:{width:"100%",height:"100%"}},At="U_TABLE_COLUMNN_SORT",pr=e.defineComponent({name:"UtGrid",__name:"grid",props:{checkMethod:{},serviceCode:{default:()=>({})},defaultValue:{},defaultParams:{},url:{},columns:{default:()=>[]},items:{default:()=>[]},editable:{type:Boolean,default:!0},needExport:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0}},emits:["buttonClick","cellClick","cellDbclick","editEctivated","reset"],setup(t,{expose:n,emit:o}){const r=He(e.useAttrs());let s;const a={},l=e.getCurrentInstance(),c=l.appContext.config.globalProperties.$hasAuthority,p=l.appContext.config.globalProperties.$serviceApi,u=l.parent.type.name,d=l.appContext.config.globalProperties.$mode,i=t,{t:C}=ce.useI18n(),y=e.ref(null),w=e.ref(!1),k={icon:"vxe-icon-setting",name:"favorite",events:{click:(E,L)=>{L.name==="favorite"&&(w.value=!0)}}},m=()=>i.columns.length?O.formatRules(i.columns,C):{},_=()=>{const E=i.columns;if(r.gridId){const z=vo.filter(K=>!E.some(re=>re.field===K.field)).map(K=>(r.format&&["lastUpdateDate","creationDate"].includes(K.field)&&(K.formatter=r.format,K.width=90),K)),Y=E.findIndex(K=>K.field==="operate");Y!==-1?E.splice(Y,0,...z):E.push(...z)}const L=r.gridId?T(E):E;return O.i18nColums(L,r.sortable)};O.dbstorage.getItem(At).then(E=>{s=E,S.columns=_()});const S=e.reactive({border:!0,pagerConfig:{pageSize:r.pageSize||20},editConfig:{},editRules:m(),formConfig:{},columnConfig:{useKey:!0},toolbarConfig:{enabled:!1},sortConfig:{multiple:!0,trigger:"cell"},height:d?void 0:window.innerHeight-92,checkboxConfig:{checkMethod:({row:E})=>Ft(E,i),checkRowKeys:i.checkRowKeys},loading:!1,footerRowClassName:"ut-grid-footer",proxyConfig:{form:!0,autoLoad:i.autoLoad,showResponseMsgvxe:!1,showActionMsgvxe:!1,ajax:{queryAll:({form:E})=>Et(i,p,E),query:({page:E,form:L})=>xt(i,L,E,p,d),delete:({body:{removeRecords:E}})=>St(p,E,i),save:({body:E})=>Promise.all(Nt(p,E,i)),querySuccess:({response:E})=>R("querySuccess",E),queryError:({response:E})=>R("queryError",E),deleteSuccess:({response:E})=>R("deleteSuccess",E),deleteError:({response:E})=>R("deleteError",E),saveSuccess:({response:E})=>R("saveSuccess",E),saveError:({response:E})=>R("saveError",E)}},columns:r.gridId?[]:_(),...r}),B=()=>i.items.length?O.formatGridItems(A.clone(i.items,!0),u&&i.url?k:u):i.items;function T(E){const L=s?s[r.gridId]:{};return L?E.map((z,Y)=>{const K=(Y+1)*10;return z._sort=L[z.field]||K,a[z.field]=z._sort,z}).sort((z,Y)=>z._sort-Y._sort):E}const U=()=>{i.items.length&&(S.formConfig={titleWidth:100,titleAlign:"right",items:B(),rules:O.formatRules(i.items,C),validConfig:{showMessage:!1}});const E=Ot(S,i,r,c);Object.assign(S,E),r.gridId&&(S.id=r.gridId,S.customConfig={storage:!0,mode:"popup",checkMethod({column:L}){return!(L.field==="operate"||["checkbox","radio"].includes(L.type))},modalOptions:{width:750,height:"75%"}}),r.mergeFooter&&(S.showFooter=!0,S.footerMethod=({columns:L,data:z})=>It({columns:L,data:z},r.mergeFooter))},j=()=>{y.value.commitProxy("query")},M=()=>(S.editRules=m(),y.value.refreshColumn()),x=()=>{S.loading=!0},N=()=>{S.loading=!1},V=()=>e.toRaw(y.value),P=()=>y.value.getTableData().fullData,$=(E=!1)=>{const L=i.columns[0].type,z=L==="radio"?y.value.getRadioRecord(E):y.value.getCheckboxRecords(E);return L==="checkbox"&&!z.length?(O.warnMessage(C("message.tip_selectedRecord")),[]):L==="radio"&&!z?(O.warnMessage(C("message.tip_selectedRecord")),null):z},R=(E,L)=>{r!=null&&r.callback&&(r!=null&&r.callback[E])&&(r==null||r.callback[E](L))},b=({data:E})=>{const L=i.items.filter(z=>{var Y,K;return(K=(Y=z.itemRender)==null?void 0:Y.props)==null?void 0:K.multiple});L.forEach(z=>{z.itemRender.props.defaultValue?E[`_${z.field}`]=z.itemRender.props.defaultValue.split(","):E[`_${z.field}`]=[]}),L.length&&setTimeout(()=>{j()},200)};let f;const h=()=>{const E=y.value;f=Kn.create(E.$el.querySelector(".vxe-table--header .vxe-header--row"),{disabled:!r.gridId,handle:".vxe-header--column",onEnd:async L=>{const z=L.item,Y=L.newIndex,K=L.oldIndex,{fullColumn:re,tableColumn:J}=E.getTableColumn(),be=z.parentNode,he=re[Y],Se=re[K];let je=!1,lt="固定列";if(he.fixed?je=!1:Y===0||["checkbox","radio"].includes(Se.type)?(lt="勾选列",je=!0):(Se.field==="operate"||Y===re.length-1)&&(je=!0,lt="操作列"),je){const ue=be.children[K];return Y>K?be.insertBefore(z,ue):be.insertBefore(z,ue&&ue.nextElementSibling),O.errorMessage(lt+"不允许拖动!")}const it=E.getColumnIndex(J[K]),ct=E.getColumnIndex(J[Y]),vn=re.splice(it,1)[0];re.splice(ct,0,vn);const Ne=ct-it>0?1:-1,qn=(ct+1)*10,Hn=(it+1)*10,Wn=qn+1*Ne;for(const ue in a){const Ce=a[ue];(Ne>0&&Ce<Wn&&Ce>Hn||Ne<0&&Ce>Wn&&Ce<Hn)&&(a[ue]=Ce-10*Ne)}a[vn.field]=qn,O.dbstorage.setItem(At,{[r.gridId]:a}),E.loadColumn(re)}})},D=E=>{w.value=!1;const{form:L}=y.value.getProxyInfo();Object.assign(L,E),j()};n({getTableData:P,getSelectRecords:$,refreshData:j,refreshColumn:M,getInstance:V,showLoading:x,hiddenLoading:N,reloadGrid:async()=>{S.editRules=m(),U()}});const Z=({code:E})=>{F("buttonClick",E)},ee=E=>{F("cellClick",E)},X=E=>{F("cellDbclick",E)},H=E=>{F("editEctivated",E)},Q=()=>{window.onresize=()=>(()=>{let E=(r==null?void 0:r.height)||window.innerHeight-90;r.mode!=="inline"&&!(r!=null&&r.height)&&(E=window.innerHeight-180),S.height=E<600?600:E})()};let I;e.nextTick(()=>{I=setTimeout(()=>{h()},500)}),e.onUnmounted(()=>{clearTimeout(I),f&&f.destroy()}),e.onBeforeMount(()=>{U(),Q()});const F=o;return(E,L)=>{const z=e.resolveComponent("vxe-grid");return e.openBlock(),e.createElementBlock("div",fr,[e.createVNode(z,e.mergeProps({ref_key:"xgrid",ref:y},S,{class:"ut-grid-wrapper"},e.toHandlers(e.unref(r).events||{}),{onToolbarButtonClick:Z,onToolbarToolClick:Z,onCellClick:ee,onCellDblclick:X,onEditActivated:H,onFormReset:b}),null,16),w.value&&i.url?(e.openBlock(),e.createBlock(ur,{key:0,items:E.items,view:e.unref(u),onSearch:D,onClose:L[0]||(L[0]=Y=>w.value=!1)},null,8,["items","view"])):e.createCommentVNode("",!0)])}}}),Mt=O.withInstall(pr),mr={name:"UtModalForm"},hr=e.defineComponent({...mr,props:{record:{default:()=>({})},formOptions:{default:()=>({})},modalOptions:{default:()=>({})},items:{default:()=>[]},url:{default:""},method:{default:"post"},title:{default:"数据记录"},dataStatus:{default:"detail"},width:{default:420},height:{default:360}},emits:["close","confirm"],setup(t,{expose:n,emit:o}){const r=t,s=He(e.useAttrs()),a=e.ref(!1),c=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,p=e.computed(()=>r.items.length?O.formatRules(r.items,u):{}),{t:u}=ce.useI18n(),d=e.computed(()=>r.items.length?O.formatItems(A.clone(r.items,!0),r.dataStatus,24):r.items),i=e.ref(!1),C=e.ref(null),y=()=>{C.value.validate(async j=>{if(!j){const{record:M,url:x,method:N}=r;if(x){w();const V=s!=null&&s.dataProcessMethod?s==null?void 0:s.dataProcessMethod(M):M,[P,$]=await ze(c[N](x,V));k(),P?S():(O.successMessage(),U("confirm",$))}else U("confirm")}})},w=()=>{a.value=!0},k=()=>{a.value=!1},m=j=>{C.value.validate(j)},_=j=>{C.value.validate(j)},S=()=>{i.value=!1,U("close")},B=()=>{i.value=!0},T=()=>{S()},U=o;return n({showLoading:w,hiddenLoading:k,openModal:B,closeModal:T,validate:m,validateForm:_}),e.onBeforeMount(()=>{B()}),(j,M)=>{const x=e.resolveComponent("vxe-form"),N=e.resolveComponent("ut-button"),V=e.resolveComponent("vxe-modal");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(V,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=P=>i.value=P),title:j.title,width:j.width,height:j.height,loading:a.value,"show-footer":j.dataStatus!=="detail","min-width":"240","min-height":"300","destroy-on-close":"",resize:""},j.modalOptions,{onClose:S}),e.createSlots({default:e.withCtx(()=>[e.createVNode(x,e.mergeProps({ref_key:"xForm",ref:C,data:j.record,items:d.value,rules:p.value,"title-width":100,"title-align":"right"},j.formOptions),{dividerPrefix:e.withCtx(()=>[]),_:1},16,["data","items","rules"])]),_:2},[a.value?void 0:{name:"footer",fn:e.withCtx(()=>[e.createVNode(N,{status:"warning",content:"cancel",icon:"ri-close-line",onTap:S}),e.createVNode(N,{status:"u-cyan",content:"confirm",icon:"ri-save-3-line",onTap:y})]),key:"0"}]),1040,["modelValue","title","width","height","loading","show-footer"])])}}}),Pt=O.withInstall(hr),gr={name:"UtModalGrid"},yr=e.defineComponent({...gr,props:{checkMethod:{},columns:{default:()=>[]},defaultValue:{},defaultParams:{},gridOptions:{default:()=>({})},auth:{},url:{default:""},submitUrl:{default:""},checkRowKeys:{default:()=>[]},items:{default:()=>[]},title:{default:"数据记录"},width:{default:"520"},height:{default:420},editable:{type:Boolean,default:!0},needExport:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!1},addChild:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0}},emits:["close","confirm","actived","buttonClick"],setup(t,{expose:n,emit:o}){const r=He(e.useAttrs()),s=t,a=e.ref(!1),l=e.ref(null),c=e.getCurrentInstance(),p=c.appContext.config.globalProperties.$hasAuthority,u=c.appContext.config.globalProperties.$serviceApi,d=c.appContext.config.globalProperties.$mode,{t:i}=ce.useI18n(),C=()=>{const f=A.clone(s.columns,!0).map(h=>(s.editable?!h.type&&!h.editRender&&s.editable&&h.editable&&(h.editRender={name:"VxeInput"}):h.editRender={enabled:!1},h));return O.i18nColums(f,r.sortable)},y=()=>s.items.length?O.formatGridItems(A.clone(s.items,!0)):s.items,w=()=>s.columns.length?O.formatRules(s.columns,i):{},k=e.reactive({loading:!1,border:!0,pagerConfig:{},formConfig:{},toolbarConfig:{enabled:!1},height:"auto",editConfig:{},rowConfig:{keyField:"_X_ROW_KEY"},editRules:w(),proxyConfig:{form:!0,autoLoad:s.autoLoad,ajax:{queryAll:({form:f})=>Et(s,u,f),query:({page:f,form:h})=>xt(s,h,f,u,d),delete:({body:{removeRecords:f}})=>St(u,f,s),save:({body:f})=>Promise.all(Nt(u,f,s)),querySuccess:f=>m("querySuccess",f),queryError:f=>m("queryError",f),deleteSuccess:f=>m("deleteSuccess",f),deleteError:f=>m("deleteError",f),saveSuccess:f=>m("saveSuccess",f),saveError:f=>m("saveError",f)}},checkboxConfig:{checkMethod:({row:f})=>Ft(f,s),checkRowKeys:s.checkRowKeys},columns:C(),...s.gridOptions}),m=(f,h)=>{r!=null&&r.callback&&(r!=null&&r.callback[f])&&(r==null||r.callback[f](h))},_=async()=>{let f=null;const h=s.columns[0].type;if(h==="checkbox"?f=l.value.getCheckboxRecords():h==="radio"?f=l.value.getRadioRecord():f=l.value.getTableData().fullData,h==="checkbox"&&!f.length&&!s.addChild)return O.warnMessage(i("message.selectedRecord"));if(h==="radio"&&!f)return O.warnMessage(i("message.selectedRecord"));if(A.isFunction(r.beforeConfirm)&&!r.beforeConfirm(f))return;const{submitUrl:D}=s;if(D){x();let q;try{f.forEach(Z=>Object.assign(Z,s.defaultParams)),q=await u.post(D,f)}finally{q&&P("confirm",q),q&&O.successMessage(i("message.operateSuccess")),$(),N()}}else s.autoClose&&$(),P("confirm",f)},S=()=>{l.value.commitProxy("query")},B=()=>{k.editRules=w(),l.value.refreshColumn()},T=()=>e.toRaw(l.value),U=({row:f})=>{const h=s.columns[0].type;h==="checkbox"?l.value.setCheckboxRow(f,!0):h==="radio"&&l.value.setRadioRow(f)},j=f=>{P("actived",f)},M=({code:f})=>{P("buttonClick",f)},x=()=>{k.loading=!0},N=()=>{k.loading=!1},V=(f=!1)=>{const h=s.columns[0].type,D=h==="radio"?xgrid.value.getRadioRecord(f):xgrid.value.getCheckboxRecords(f);return h==="checkbox"&&!D.length?(O.warnMessage(i("message.tip_selectedRecord")),[]):h==="radio"&&!D?(O.warnMessage(i("message.tip_selectedRecord")),null):D},P=o,$=()=>{A.isFunction(r.beforeClose)&&!r.beforeClose()||(a.value=!1,P("close"))},R=()=>{s.items.length&&(k.formConfig={titleWidth:100,titleAlign:"right",items:y(),rules:O.formatRules(s.items,i),validConfig:{showMessage:!1}});const f=Ot(k,s,r,p);Object.assign(k,f),r.mergeFooter&&(k.showFooter=!0,k.footerMethod=({columns:h,data:D})=>It({columns:h,data:D},r.mergeFooter))};return n({refreshData:S,refreshColumn:B,getInstance:T,showLoading:x,hiddenLoading:N,getSelectRecords:V,reloadGrid:async()=>{R()},close:$}),e.onBeforeMount(()=>{a.value=!0,R()}),(f,h)=>{const D=e.resolveComponent("vxe-grid"),q=e.resolveComponent("ut-button"),Z=e.resolveComponent("vxe-modal"),ee=e.resolveDirective("spinning");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Z,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=X=>a.value=X),title:f.title,width:f.width,height:f.height,"show-footer":f.showFooter,resize:"","destroy-on-close":"",onClose:$},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default"),e.createVNode(D,e.mergeProps({ref_key:"xGrid",ref:l},k,{columnConfig:{resizable:!0}},e.toHandlers(e.unref(r).events||{}),{onEditActivated:j,onToolbarButtonClick:M,onToolbarToolClick:M,onCellClick:U}),null,16)]),footer:e.withCtx(()=>[e.renderSlot(f.$slots,"bottom"),e.createVNode(q,{icon:"ri-close-line",status:"warning",content:"cancel",onTap:$}),e.createVNode(q,{icon:"ri-save-3-line",content:"confirm",onTap:_})]),_:3},8,["modelValue","title","width","height","show-footer"])])),[[ee,k.loading]])}}}),$t=O.withInstall(yr);function Lt(t,n){return function(){return t.apply(n,arguments)}}const{toString:wr}=Object.prototype,{getPrototypeOf:Ye}=Object,{iterator:Re,toStringTag:Ut}=Symbol,Te=(t=>n=>{const o=wr.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ae=t=>(t=t.toLowerCase(),n=>Te(n)===t),Ve=t=>n=>typeof n===t,{isArray:ge}=Array,ke=Ve("undefined");function br(t){return t!==null&&!ke(t)&&t.constructor!==null&&!ke(t.constructor)&&ne(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const jt=ae("ArrayBuffer");function Cr(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&jt(t.buffer),n}const kr=Ve("string"),ne=Ve("function"),zt=Ve("number"),De=t=>t!==null&&typeof t=="object",_r=t=>t===!0||t===!1,Oe=t=>{if(Te(t)!=="object")return!1;const n=Ye(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Ut in t)&&!(Re in t)},Er=ae("Date"),xr=ae("File"),Sr=ae("Blob"),Nr=ae("FileList"),Br=t=>De(t)&&ne(t.pipe),Rr=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||ne(t.append)&&((n=Te(t))==="formdata"||n==="object"&&ne(t.toString)&&t.toString()==="[object FormData]"))},Tr=ae("URLSearchParams"),[Vr,Dr,Or,Ir]=["ReadableStream","Request","Response","Headers"].map(ae),Fr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(t,n,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),ge(t))for(r=0,s=t.length;r<s;r++)n.call(null,t[r],r,t);else{const a=o?Object.getOwnPropertyNames(t):Object.keys(t),l=a.length;let c;for(r=0;r<l;r++)c=a[r],n.call(null,t[c],c,t)}}function vt(t,n){n=n.toLowerCase();const o=Object.keys(t);let r=o.length,s;for(;r-- >0;)if(s=o[r],n===s.toLowerCase())return s;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qt=t=>!ke(t)&&t!==fe;function Je(){const{caseless:t}=qt(this)&&this||{},n={},o=(r,s)=>{const a=t&&vt(n,s)||s;Oe(n[a])&&Oe(r)?n[a]=Je(n[a],r):Oe(r)?n[a]=Je({},r):ge(r)?n[a]=r.slice():n[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&_e(arguments[r],o);return n}const Ar=(t,n,o,{allOwnKeys:r}={})=>(_e(n,(s,a)=>{o&&ne(s)?t[a]=Lt(s,o):t[a]=s},{allOwnKeys:r}),t),Mr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Pr=(t,n,o,r)=>{t.prototype=Object.create(n.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),o&&Object.assign(t.prototype,o)},$r=(t,n,o,r)=>{let s,a,l;const c={};if(n=n||{},t==null)return n;do{for(s=Object.getOwnPropertyNames(t),a=s.length;a-- >0;)l=s[a],(!r||r(l,t,n))&&!c[l]&&(n[l]=t[l],c[l]=!0);t=o!==!1&&Ye(t)}while(t&&(!o||o(t,n))&&t!==Object.prototype);return n},Lr=(t,n,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=n.length;const r=t.indexOf(n,o);return r!==-1&&r===o},Ur=t=>{if(!t)return null;if(ge(t))return t;let n=t.length;if(!zt(n))return null;const o=new Array(n);for(;n-- >0;)o[n]=t[n];return o},jr=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Ye(Uint8Array)),zr=(t,n)=>{const r=(t&&t[Re]).call(t);let s;for(;(s=r.next())&&!s.done;){const a=s.value;n.call(t,a[0],a[1])}},vr=(t,n)=>{let o;const r=[];for(;(o=t.exec(n))!==null;)r.push(o);return r},qr=ae("HTMLFormElement"),Hr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,s){return r.toUpperCase()+s}),Ht=(({hasOwnProperty:t})=>(n,o)=>t.call(n,o))(Object.prototype),Wr=ae("RegExp"),Wt=(t,n)=>{const o=Object.getOwnPropertyDescriptors(t),r={};_e(o,(s,a)=>{let l;(l=n(s,a,t))!==!1&&(r[a]=l||s)}),Object.defineProperties(t,r)},Yr=t=>{Wt(t,(n,o)=>{if(ne(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=t[o];if(ne(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Jr=(t,n)=>{const o={},r=s=>{s.forEach(a=>{o[a]=!0})};return ge(t)?r(t):r(String(t).split(n)),o},Kr=()=>{},Gr=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function Xr(t){return!!(t&&ne(t.append)&&t[Ut]==="FormData"&&t[Re])}const Qr=t=>{const n=new Array(10),o=(r,s)=>{if(De(r)){if(n.indexOf(r)>=0)return;if(!("toJSON"in r)){n[s]=r;const a=ge(r)?[]:{};return _e(r,(l,c)=>{const p=o(l,s+1);!ke(p)&&(a[c]=p)}),n[s]=void 0,a}}return r};return o(t,0)},Zr=ae("AsyncFunction"),es=t=>t&&(De(t)||ne(t))&&ne(t.then)&&ne(t.catch),Yt=((t,n)=>t?setImmediate:n?((o,r)=>(fe.addEventListener("message",({source:s,data:a})=>{s===fe&&a===o&&r.length&&r.shift()()},!1),s=>{r.push(s),fe.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",ne(fe.postMessage)),ts=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||Yt,g={isArray:ge,isArrayBuffer:jt,isBuffer:br,isFormData:Rr,isArrayBufferView:Cr,isString:kr,isNumber:zt,isBoolean:_r,isObject:De,isPlainObject:Oe,isReadableStream:Vr,isRequest:Dr,isResponse:Or,isHeaders:Ir,isUndefined:ke,isDate:Er,isFile:xr,isBlob:Sr,isRegExp:Wr,isFunction:ne,isStream:Br,isURLSearchParams:Tr,isTypedArray:jr,isFileList:Nr,forEach:_e,merge:Je,extend:Ar,trim:Fr,stripBOM:Mr,inherits:Pr,toFlatObject:$r,kindOf:Te,kindOfTest:ae,endsWith:Lr,toArray:Ur,forEachEntry:zr,matchAll:vr,isHTMLForm:qr,hasOwnProperty:Ht,hasOwnProp:Ht,reduceDescriptors:Wt,freezeMethods:Yr,toObjectSet:Jr,toCamelCase:Hr,noop:Kr,toFiniteNumber:Gr,findKey:vt,global:fe,isContextDefined:qt,isSpecCompliantForm:Xr,toJSONObject:Qr,isAsyncFn:Zr,isThenable:es,setImmediate:Yt,asap:ts,isIterable:t=>t!=null&&ne(t[Re])};function v(t,n,o,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}g.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:g.toJSONObject(this.config),code:this.code,status:this.status}}});const Jt=v.prototype,Kt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Kt[t]={value:t}}),Object.defineProperties(v,Kt),Object.defineProperty(Jt,"isAxiosError",{value:!0}),v.from=(t,n,o,r,s,a)=>{const l=Object.create(Jt);return g.toFlatObject(t,l,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),v.call(l,t.message,n,o,r,s),l.cause=t,l.name=t.name,a&&Object.assign(l,a),l};const ns=null;function Ke(t){return g.isPlainObject(t)||g.isArray(t)}function Gt(t){return g.endsWith(t,"[]")?t.slice(0,-2):t}function Xt(t,n,o){return t?t.concat(n).map(function(s,a){return s=Gt(s),!o&&a?"["+s+"]":s}).join(o?".":""):n}function os(t){return g.isArray(t)&&!t.some(Ke)}const rs=g.toFlatObject(g,{},null,function(n){return/^is[A-Z]/.test(n)});function Ie(t,n,o){if(!g.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,o=g.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,m){return!g.isUndefined(m[k])});const r=o.metaTokens,s=o.visitor||d,a=o.dots,l=o.indexes,p=(o.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(n);if(!g.isFunction(s))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(g.isDate(w))return w.toISOString();if(!p&&g.isBlob(w))throw new v("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(w)||g.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function d(w,k,m){let _=w;if(w&&!m&&typeof w=="object"){if(g.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=JSON.stringify(w);else if(g.isArray(w)&&os(w)||(g.isFileList(w)||g.endsWith(k,"[]"))&&(_=g.toArray(w)))return k=Gt(k),_.forEach(function(B,T){!(g.isUndefined(B)||B===null)&&n.append(l===!0?Xt([k],T,a):l===null?k:k+"[]",u(B))}),!1}return Ke(w)?!0:(n.append(Xt(m,k,a),u(w)),!1)}const i=[],C=Object.assign(rs,{defaultVisitor:d,convertValue:u,isVisitable:Ke});function y(w,k){if(!g.isUndefined(w)){if(i.indexOf(w)!==-1)throw Error("Circular reference detected in "+k.join("."));i.push(w),g.forEach(w,function(_,S){(!(g.isUndefined(_)||_===null)&&s.call(n,_,g.isString(S)?S.trim():S,k,C))===!0&&y(_,k?k.concat(S):[S])}),i.pop()}}if(!g.isObject(t))throw new TypeError("data must be an object");return y(t),n}function Qt(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function Ge(t,n){this._pairs=[],t&&Ie(t,this,n)}const Zt=Ge.prototype;Zt.append=function(n,o){this._pairs.push([n,o])},Zt.toString=function(n){const o=n?function(r){return n.call(this,r,Qt)}:Qt;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function ss(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function en(t,n,o){if(!n)return t;const r=o&&o.encode||ss;g.isFunction(o)&&(o={serialize:o});const s=o&&o.serialize;let a;if(s?a=s(n,o):a=g.isURLSearchParams(n)?n.toString():new Ge(n,o).toString(r),a){const l=t.indexOf("#");l!==-1&&(t=t.slice(0,l)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class tn{constructor(){this.handlers=[]}use(n,o,r){return this.handlers.push({fulfilled:n,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){g.forEach(this.handlers,function(r){r!==null&&n(r)})}}const nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},as={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ge,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Xe=typeof window<"u"&&typeof document<"u",Qe=typeof navigator=="object"&&navigator||void 0,ls=Xe&&(!Qe||["ReactNative","NativeScript","NS"].indexOf(Qe.product)<0),is=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cs=Xe&&window.location.href||"http://localhost",te={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:ls,hasStandardBrowserWebWorkerEnv:is,navigator:Qe,origin:cs},Symbol.toStringTag,{value:"Module"})),...as};function ds(t,n){return Ie(t,new te.classes.URLSearchParams,Object.assign({visitor:function(o,r,s,a){return te.isNode&&g.isBuffer(o)?(this.append(r,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))}function us(t){return g.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function fs(t){const n={},o=Object.keys(t);let r;const s=o.length;let a;for(r=0;r<s;r++)a=o[r],n[a]=t[a];return n}function on(t){function n(o,r,s,a){let l=o[a++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),p=a>=o.length;return l=!l&&g.isArray(s)?s.length:l,p?(g.hasOwnProp(s,l)?s[l]=[s[l],r]:s[l]=r,!c):((!s[l]||!g.isObject(s[l]))&&(s[l]=[]),n(o,r,s[l],a)&&g.isArray(s[l])&&(s[l]=fs(s[l])),!c)}if(g.isFormData(t)&&g.isFunction(t.entries)){const o={};return g.forEachEntry(t,(r,s)=>{n(us(r),s,o,0)}),o}return null}function ps(t,n,o){if(g.isString(t))try{return(n||JSON.parse)(t),g.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(t)}const Ee={transitional:nn,adapter:["xhr","http","fetch"],transformRequest:[function(n,o){const r=o.getContentType()||"",s=r.indexOf("application/json")>-1,a=g.isObject(n);if(a&&g.isHTMLForm(n)&&(n=new FormData(n)),g.isFormData(n))return s?JSON.stringify(on(n)):n;if(g.isArrayBuffer(n)||g.isBuffer(n)||g.isStream(n)||g.isFile(n)||g.isBlob(n)||g.isReadableStream(n))return n;if(g.isArrayBufferView(n))return n.buffer;if(g.isURLSearchParams(n))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ds(n,this.formSerializer).toString();if((c=g.isFileList(n))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Ie(c?{"files[]":n}:n,p&&new p,this.formSerializer)}}return a||s?(o.setContentType("application/json",!1),ps(n)):n}],transformResponse:[function(n){const o=this.transitional||Ee.transitional,r=o&&o.forcedJSONParsing,s=this.responseType==="json";if(g.isResponse(n)||g.isReadableStream(n))return n;if(n&&g.isString(n)&&(r&&!this.responseType||s)){const l=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(n)}catch(c){if(l)throw c.name==="SyntaxError"?v.from(c,v.ERR_BAD_RESPONSE,this,null,this.response):c}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:te.classes.FormData,Blob:te.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],t=>{Ee.headers[t]={}});const ms=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hs=t=>{const n={};let o,r,s;return t&&t.split(`
1
+ (function(W,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-i18n"),require("xe-utils"),require("@utogether/utils"),require("await-to-js"),require("vxe-pc-ui"),require("compressorjs"),require("big.js"),require("sortablejs"),require("dayjs")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","xe-utils","@utogether/utils","await-to-js","vxe-pc-ui","compressorjs","big.js","sortablejs","dayjs"],e):(W=typeof globalThis<"u"?globalThis:W||self,e(W["@utogether/components"]={},W.vue,W.vueI18n,W.xeUtils,W.utils$2,W.to,W.vxePcUi,W.compressorjs,W.Big,W.Sortable,W.dayjs))})(this,function(W,e,ce,A,O,ze,ie,dt,Jn,Kn,se){"use strict";const Gn={key:1,class:"inline-block ut-popconfirm",style:{"margin-left":"6px"}},Xn=e.defineComponent({name:"UtButton",__name:"button",props:{content:{},type:{default:"primary"},mode:{default:"button"},status:{default:"primary"},icon:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},auth:{},title:{default:""},confirmProps:{default:()=>({})},children:{default:()=>[]}},emits:["tap","confirm","cancel"],setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$hasAuthority,{t:a}=ce.useI18n(),l=e.computed(()=>{const y=c(),w=/.*[\u4e00-\u9fa5]+.*$/.test(o.content);return{icon:y,content:w?o.content:a(`message.btn.${o.content}`)}}),c=()=>{var y,w,k,m;return o.mode==="text"?null:o.icon?o.icon:(y=o.content)!=null&&y.toLowerCase().includes("print")?"ri-printer-line":(w=o.content)!=null&&w.toLowerCase().includes("look")?"ri-eye-line":(k=o.content)!=null&&k.toLowerCase().includes("del")?"ri-delete-bin-line":(m=o.content)!=null&&m.toLowerCase().includes("edit")?"ri-edit-box-line":""},p=A.throttle(()=>{C("confirm")},3e3),u=()=>{C("cancel")},d=A.throttle(y=>{var w;o.disabled||o.auth&&!s(o.auth)||((w=y.$event)==null||w.stopPropagation(),C("tap"))},3e3),i=A.throttle(y=>{y.disabled||y.auth&&!s(y.auth)||C("tap",y.code)},2e3),C=n;return(y,w)=>{const k=e.resolveComponent("vxe-button"),m=e.resolveComponent("el-popconfirm");return y.children.length&&y.visible?(e.openBlock(),e.createBlock(k,{key:0,disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,transfer:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.content),1)]),dropdowns:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.children,_=>(e.openBlock(),e.createBlock(k,{key:_.code,disabled:_.auth&&!e.unref(s)(_.auth)||_.disabled,status:_.status||"primary",content:_.content,icon:`${_.icon||c()} ${_.icon?"ri-1x":""}`,mode:_.mode||"button",onClick:S=>e.unref(i)(_)},null,8,["disabled","status","content","icon","mode","onClick"]))),128))]),_:1},8,["disabled","status"])):y.type==="pop"&&y.visible?(e.openBlock(),e.createElementBlock("div",Gn,[e.createVNode(m,e.mergeProps({"confirm-button-text":y.$t("message.btn.confirm"),"cancel-button-text":y.$t("message.btn.cancel"),"icon-color":"#E6A23C",teleported:!1,title:y.title},y.confirmProps,{onConfirm:e.unref(p),onCancel:u}),{reference:e.withCtx(()=>[e.createVNode(k,{disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,type:y.type,content:l.value.content,icon:`${l.value.icon} ${l.value.icon?"ri-1x":""}`,loading:y.loading},null,8,["disabled","status","type","content","icon","loading"])]),_:1},16,["confirm-button-text","cancel-button-text","title","onConfirm"])])):y.visible?(e.openBlock(),e.createBlock(k,{key:2,disabled:y.auth&&!e.unref(s)(y.auth)||y.disabled,status:y.status,mode:y.mode||"button",content:l.value.content,icon:`${l.value.icon} ${l.value.icon?"ri-1x":""}`,loading:y.loading,title:y.title,onClick:e.unref(d)},null,8,["disabled","status","mode","content","icon","loading","title","onClick"])):e.createCommentVNode("",!0)}}}),ut=O.withInstall(Xn),Qn={class:"ut-lov-wrapper"},Zn={style:{height:"360px"}},eo={name:"UtLov"},to=e.defineComponent({...eo,props:{record:{default:()=>({})},defaultParams:{default:()=>({})},code:{},field:{},displayName:{},placeholder:{default:"请选择"},mode:{default:"vxe"},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autoLoad:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0},transfer:{type:Boolean},checkMethod:{}},emits:["clear","change"],setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,a=600,l=e.ref(!1),c=e.ref(a),p=e.ref(""),u=e.ref("vxe-table--ignore-clear"),d=e.reactive({loading:!1,border:!0,pagerConfig:{},formConfig:{titleWidth:90,titleAlign:"right",items:[]},height:"auto",editConfig:{},rowConfig:{keyField:"_X_ROW_KEY"},columnConfig:{resizable:!0,isHover:!0},proxyConfig:{form:!0,autoLoad:!1,response:{result:"list",total:"total"},ajax:{query:({page:b,form:f})=>{const h=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},D={pageNum:b.currentPage,pageSize:b.pageSize};let q=Object.assign(D,h,o.defaultParams,f);if(!o.readonly){const{field:Z,displayName:ee}=o;q[ee||Z]=o.record[ee||Z]}return q=y(q),i.lovType!=="url"?(q.lovCode=o.code,s.get("/upfm/v1/lovViewHeader/listBySql",q)):s.get(i.lovUrl,q)}}},checkboxConfig:{checkMethod:({row:b})=>U(b,o)},radioConfig:{checkMethod:({row:b})=>U(b,o)},columns:[]});let i,C=[];const y=b=>(C.filter(h=>["date","month"].includes(h.fieldType)&&h.isSearch).forEach(h=>{h.fieldType==="date"?b[h.field]=A.toDateString(b[h.field],"yyyy-MM-dd 00:00:00"):h.fieldType==="month"&&(b[h.field]=A.toDateString(b[h.field],"yyyy-MM"))}),b),w=()=>{const b=A.clone(C,!0).filter(D=>D.isSearch==="Y");if(!b.length)return;const f=b.length>2,h=b.sort((D,q)=>D.seqNo-q.seqNo).map((D,q)=>({field:D.colField,title:D.colTitle,span:8,folding:q>1,itemRender:_(D)}));k.collapseNode=f,f?h.splice(2,0,k):h.push(k),d.formConfig.items=h},k={span:8,align:"right",collapseNode:!1,itemRender:{name:"VxeButtonGroup",options:[{type:"submit",submit:"submit",content:"message.btn.search",status:"primary",icon:"ri-search-line"},{type:"reset",name:"reset",content:"message.btn.reset",status:"info",icon:"ri-refresh-line"}]}},m=O.useRender(),_=b=>{if(["date","month"].includes(b.fieldType)){const f=b.fieldType==="date"?"yyyy-MM-dd HH:mm:ss":"yyyy-MM";return m.renderDate({type:b.fieldType,valueFormat:f})}else if(b.fieldType==="dictCode")return m.renderDict(b.dictCode);return{name:"VxeInput"}},S=()=>{const b=A.clone(C,!0).filter(h=>h.isCol==="Y"),f=b.reduce((h,D)=>h+ +D.colWidth,65);c.value=f<a?a:f>900?900:f,d.columns=b.sort((h,D)=>h.seqNo-D.seqNo).map(h=>{const D=h.fieldType,q=["formatDict",h.dictCode];return{field:h.colField,title:h.colTitle,minWidth:h.colWidth,formatter:D==="date"?["formatDate"]:h.fieldType==="dictCode"?q:null}}),o.multiple?d.columns.unshift({type:"checkbox",width:45,align:"center"}):d.columns.unshift({type:"radio",width:45,align:"center"})},B=e.ref(null),T=async()=>{var D;d.loading=!0;const b="/upfm/v1/lovViewHeader/detailByViewCode",[f,h]=await ze(s.get(b,{lovCode:o.code}));d.loading=!1,f&&P(),d.loading=!0,p.value=(h==null?void 0:h.lovTitle)||(h==null?void 0:h.lovName),C=(h==null?void 0:h.lineList)||[],i=h,S(),w(),await O.delay(30),await e.nextTick(),o.autoLoad&&((D=B.value)==null||D.commitProxy("query")),d.loading=!1},U=(b,f)=>A.isFunction(f.checkMethod)?f.checkMethod(b):!0,j=async()=>{o.disabled||(T(),await e.nextTick(),l.value=!0)},M=()=>{R("clear","")},x=({row:b})=>{const f=o.multiple?[b]:b;A.isFunction(o.checkMethod)&&!o.checkMethod(b)||(R("change",f,i.valueField),P())},N=async()=>{var b;await e.nextTick(),(b=B.value)==null||b.commitProxy("query")},V=()=>{const b=B.value,f=o.multiple?b.getCheckboxRecords():b.getRadioRecord();!A.isEmpty(f)&&R("change",f,i.valueField),P()},P=()=>{C.length=0,l.value=!1},$=({type:b})=>{},R=n;return(b,f)=>{const h=e.resolveComponent("vxe-grid"),D=e.resolveComponent("vxe-button"),q=e.resolveComponent("vxe-modal"),Z=e.resolveComponent("el-dialog"),ee=e.resolveComponent("vxe-input");return e.openBlock(),e.createElementBlock("div",Qn,[b.mode==="vxe"?(e.openBlock(),e.createBlock(q,{key:0,modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=X=>l.value=X),width:c.value,"destroy-on-close":!1,title:p.value,transfer:b.transfer,height:"80%",resize:"","esc-closable":"","show-footer":"",className:u.value,"before-hide-method":$},{default:e.withCtx(()=>[e.createVNode(h,e.mergeProps({ref_key:"xgrid",ref:B},d,{onCellDblclick:x}),null,16)]),footer:e.withCtx(()=>[e.createVNode(D,{content:b.$t("message.btn.cancel"),icon:"ri-close-line",status:"warning",onClick:P},null,8,["content"]),e.createVNode(D,{content:b.$t("message.btn.confirm"),icon:"ri-save-3-line",status:"primary",onClick:V},null,8,["content"])]),_:1},8,["modelValue","width","title","transfer","className"])):(e.openBlock(),e.createBlock(Z,{key:1,modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=X=>l.value=X),width:c.value,"show-close":!1,title:p.value,"append-to-body":b.transfer,draggable:"","destroy-on-close":"","close-on-press-escape":""},{default:e.withCtx(()=>[e.createElementVNode("div",Zn,[e.createVNode(h,e.mergeProps({ref_key:"xgrid",ref:B},d,{columnConfig:{resizable:!0},onCellDblclick:x,onColumnsChange:N}),null,16)])]),footer:e.withCtx(()=>[e.createVNode(D,{content:b.$t("message.btn.cancel"),icon:"ri-close-line",status:"warning",onClick:P},null,8,["content"]),e.createVNode(D,{content:b.$t("message.btn.confirm"),icon:"ri-save-3-line",status:"primary",onClick:V},null,8,["content"])]),_:1},8,["modelValue","width","title","append-to-body"])),e.createVNode(ee,{modelValue:b.record[b.displayName||b.field],"onUpdate:modelValue":f[2]||(f[2]=X=>b.record[b.displayName||b.field]=X),clearable:!b.disabled&&b.clearable,disabled:b.disabled,readonly:b.readonly,placeholder:b.placeholder,style:{width:"100%"},type:"search",onSearchClick:j,onClear:M},null,8,["modelValue","clearable","disabled","readonly","placeholder"])])}}}),ft=O.withInstall(to);async function no(t,n){return new Promise(async(o,r)=>{try{const s=await oo(t);let a=document.createElement("canvas");a.width=s.naturalWidth,a.height=s.naturalHeight;const l=a.getContext("2d");l.drawImage(s,0,0,a.width,a.height),a=pt(a,l,n),a.toBlob(c=>o(c))}catch(s){r(s)}})}function oo(t){return new Promise(n=>{const o=new FileReader;o.addEventListener("load",()=>{const r=new Image;r.src=o.result,r.addEventListener("load",()=>n(r))}),o.readAsDataURL(t)})}const pt=(t,n,o)=>{const r=o.content.split(","),{textAlign:s,fontSize:a,color:l,fillOpacity:c,xAxis:p,yAxis:u}=o,d=t.width,i=t.height;n.font=`${a||22}px Microsoft Yahei`,n.lineWidth=1,n.fillStyle=l||"rgba(255, 255, 255, 1)",n.textAlign=s||"left",n.textBaseline="middle",n.globalAlpha=Number(c||1);const C=Number(p),y=Number(u);return r.forEach((w,k)=>{let m=a;o.watermarkType==="1"?m=18:o.watermarkType==="2"&&(m=16);const _=d-w.split("").length*Number(m);n.fillText(w,C||_,y||i-Number(m)-k*25)}),t},ro=async(t,n)=>{let o=await so(t);const r=o.getContext("2d");return o=pt(o,r,n),o.toDataURL("image/png")},so=async t=>{const n=document.createElement("img");n.src=t,n.setAttribute("crossOrigin","anonymous"),await new Promise(r=>n.onload=r);const o=document.createElement("canvas");return o.width=n.naturalWidth||n.width,o.height=n.naturalHeight||n.height,o.getContext("2d").drawImage(n,0,0,o.width,o.height),o},ao={style:{width:"100%"},class:"ut-attachment-wrapper"},lo={key:0,style:{display:"flex","font-weight":"700",color:"#000"}},io={style:{display:"flex","justify-content":"space-evenly"}},co={name:"UtAttachment"},uo=e.defineComponent({...co,props:{url:{default:"/ufil/v1/attachment"},sourceTable:{default:""},sourceId:{default:""},dataStatus:{default:"detail"},title:{},defaultParams:{default:()=>({})},watermarkCode:{default:""},permissionPreFix:{default:"file"},maxHeight:{default:300},compassorSize:{default:2},quality:{default:.8},showTitle:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(null),r=e.getCurrentInstance(),s=r.appContext.config.globalProperties.$serviceApi,a=r.appContext.config.globalProperties.$url,l=r.appContext.config.globalProperties.$mode,c=["png","jpg","jpeg","webp","gif"];let p;const u=[{field:"fileName",title:"message.fileName"},{field:"fileSize",title:"message.fileSize"},{field:"createdBy",title:"message.createdByName",formatter:({row:_})=>_.createdByName||_.creator},{field:"creationDate",title:"message.creationDate"},{field:"operate",title:"message.operate",slots:{default:"operate"},width:180}],d=["xlsx","xls","docx","png","jpg","jpeg","webp","gif","pdf","pptx","txt","zip","rar","svg"],i=e.reactive({border:!0,loading:!1,maxHeight:n.maxHeight,pagerConfig:{},toolbarConfig:{enabled:n.showTitle,slots:{buttons:"toolbar_buttons"},import:n.dataStatus!=="detail",refresh:!0},importConfig:{remote:!0,types:d,modes:["insert"],async importMethod({file:_}){const S=_.name.split(".").pop();let B=_;if(n.watermarkCode&&p.watermarkTrigger==="upload"&&c.includes(S)&&(B=await no(_,p)),c.includes(S)&&_.size>1024*1024*n.compassorSize)new dt(_,{quality:n.quality,mimeType:_.type,success(T){const U=new File([T],T.name,{type:T.type});C(U),console.log({result:T,file:U})}});else return C(B)}},proxyConfig:{ajax:{query:({page:_,form:S})=>{const B=Object.assign({},S,n.defaultParams);return B.pageNum=_.currentPage,B.pageSize=_.pageSize,B.sourceTable=n.sourceTable,B.sourceId=n.sourceId,n.sourceId&&l!=="doc"?s.get(n.url,B):null}}},columns:u}),C=_=>{const S=new FormData;S.append("file",_);const B={"Content-Type":"multipart/form-data"};return s.post("/ufil/file/uploadMultipart",S,{headers:B}).then(async T=>{const U={realpath:T,fileName:_.name,fileSize:_.size,fileExtend:_.name.split(".").pop(),sourceTable:n.sourceTable,sourceId:n.sourceId};await s.post(n.url,[U]),o.value.commitProxy("query")}).catch(()=>{ie.VxeUI.modal.message({content:"附件上传失败,请刷新后重试",status:"error"})})},y=async _=>{try{i.loading=!0,await s.delete(n.url,[_]),o.value.commitProxy("query")}finally{i.loading=!1}},w=async()=>{const S=await s.get("/upms/v1/watermark/selectByCode",{watermarkCode:n.watermarkCode});p=S==null?void 0:S.list[0],p.watermarkType==="1"?p.content=A.toDateString(new Date,"yyyy-MM-dd"):p.watermarkType==="2"?p.content=A.toDateString(new Date,"yyyy-MM-dd HH:mm:ss"):p.watermarkType==="0"&&(p.content="")},k=async()=>{const _=o.value.getData().filter(B=>c.includes(B.fileExtend)),S=[];(p==null?void 0:p.watermarkTrigger)=="preview"?await _.forEachSync(async B=>{const T=`${a}/ufil${B.realpath}}`,U=await ro(T,p);S.push(U)}):_.forEach(B=>{const T=`${a}/ufil${B.realpath}`;S.push(T)}),ie.VxeUI.previewImage({activeIndex:0,urlList:S})},m=_=>{const S=a+"/ufil"+_.realpath,B=document.createElement("a");B.style.display="none";const T=_.fileName.split(".");B.href=S,B.setAttribute("download",T[0]),document.body.appendChild(B),B.click(),document.body.removeChild(B)};return Array.prototype.forEachSync=async function(_){for(const[S,B]of Object.entries(this))await _(B,S,this)},e.onMounted(()=>{n.watermarkCode&&w()}),(_,S)=>{const B=e.resolveComponent("ut-divider"),T=e.resolveComponent("ut-button"),U=e.resolveComponent("vxe-grid");return e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(U,e.mergeProps({ref_key:"xGrid",ref:o},i),{toolbar_buttons:e.withCtx(()=>[_.showTitle?(e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(B,{title:_.title||_.$t("message.attachmentInfo")},null,8,["title"])])):e.createCommentVNode("",!0)]),operate:e.withCtx(({row:j})=>[e.createElementVNode("div",io,[e.createVNode(T,{disabled:_.dataStatus==="detail",auth:_.permissionPreFix+"Del",status:"danger",icon:"ri-delete-bin-5-fill",content:"delete",onTap:M=>y(j)},null,8,["disabled","auth","onTap"]),["png","jpeg","jpg"].includes(j.fileExtend)?(e.openBlock(),e.createBlock(T,{key:0,auth:_.permissionPreFix+"Preview",icon:"ri-search-line",content:"preview",onTap:S[0]||(S[0]=M=>k())},null,8,["auth"])):(e.openBlock(),e.createBlock(T,{key:1,auth:_.permissionPreFix+"Download",icon:"ri-download-2-fill",content:"download",onTap:M=>m(j)},null,8,["auth","onTap"]))])]),_:1},16)])}}}),mt=O.withInstall(uo),fo=["onUpdate:modelValue"],po={key:3},mo={key:4},ho={name:"UtUpload"},go=e.defineComponent({...ho,props:e.mergeModels({defaultParams:{default:()=>({})},options:{default:()=>({filename:"数据模板",errorField:"errorMsg",errListField:"list"})},columns:{default:()=>[]},templateData:{default:()=>[]},serviceCode:{},url:{},sourceList:{default:"list"}},{visible:{type:Boolean},visibleModifiers:{}}),emits:e.mergeModels(["close"],["update:visible"]),setup(t,{emit:n}){const o=t,s=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,a=e.useModel(t,"visible"),{t:l}=ce.useI18n(),c=e.ref(!1),p=O.storageLocal.getItem("kLov");e.watch(()=>a.value,b=>{b&&(m.data=[])});const u=()=>{const b=o.columns.map(h=>(h.slots={default:h.field},h.title=h.field,h)),f={type:"checkbox",width:40,align:"center",fixed:"left"};return b.unshift(f),b},d=e.ref({pageSize:200,currentPage:1,total:0}),i=["Sizes","PrevJump","PrevPage","Number","NextPage","NextJump","FullJump","Total"],C=window.innerHeight-20,y=e.ref();let w=[];const k={mode:"covering",types:["csv","xlsx"],afterImportMethod:B},m=e.reactive({border:!0,height:C,data:[],importConfig:k,showOverflow:!0,loading:!1,toolbarConfig:{buttons:[{code:"import_plus",name:l("message.btn.upload"),icon:"ri-upload-2-line",status:"primary"},{code:"save_plus",name:l("message.btn.save"),icon:"ri-save-3-line",status:"success"},{code:"del_plus",name:l("message.btn.delete"),icon:"ri-delete-bin-line",status:"danger"},{code:"export_plus",name:l("message.btn.downloadTemp"),icon:"ri-download-2-line",status:"warning"}],tools:[{code:"question",name:l("message.btn.FAQ"),status:"primary",icon:"vxe-icon-info-circle-fill"},{code:"replay",name:l("message.btn.back"),status:"info",icon:"vxe-icon-undo"}]},columns:u()}),_={toolbarButtonClick({code:b}){switch(b){case"import_plus":{S();break}case"save_plus":{M();break}case"del_plus":{x();break}case"export_plus":{j();break}}},toolbarToolClick({code:b}){switch(b){case"replay":{R();break}case"question":{P();break}}}},S=()=>{var b;w=[],(b=y.value)==null||b.openImport()};function B(b){w=b.$table.getTableData().fullData,u().filter(h=>!h.type&&h.mapField!==o.options.errorField).forEach(h=>{const D=w.findIndex(q=>q[h.field]===h.field);D!==-1&&w.splice(D,1)}),o.columns.forEach(h=>{(h.dateFormatter||h.valueType==="number")&&w.forEach(D=>{h.dateFormatter?D[h.field]=A.toDateString(D[h.field],h.dateFormatter||"yyyy-MM-dd HH:mm:ss"):D[h.field]=Jn(D[h.field]).toFixed(h.decimal||6)})}),d.value.total=w.length,T()}const T=()=>{const{currentPage:b,pageSize:f}=d.value;m.data=w.filter((h,D)=>D<f*b&&D>=f*(b-1))},U=({currentPage:b,pageSize:f})=>{d.value.currentPage=b,d.value.pageSize=f,T()},j=()=>{var h;const b=[];if(o.templateData.length)b.push(...o.templateData);else{const D={};u().filter(q=>q.type!=="checkbox").forEach(q=>{D[q.field]="案例"}),b.push(D)}const f={filename:o.options.filename,type:"xlsx",columns:u().filter(D=>D.mapField!==o.options.errorField&&D.type!=="checkbox"),data:b};(h=y.value)==null||h.exportData(f)},M=async()=>{if(!w.length)return O.warnMessage(l("message.importEmpty"));if(await ie.VxeUI.modal.confirm(l("message.importRecord"))==="confirm"){m.loading=!0;const{url:f}=o;V("toSave"),s.post(f,w).then(h=>{(h==null?void 0:h.status)==="error"||h!=null&&h.length?(c.value=!0,N(h!=null&&h.length?h:h[o.options.errListField||o.sourceList]),ie.VxeUI.modal.message({content:l("message.importFailed"),status:"error"})):(ie.VxeUI.modal.message({content:l("message.importSuccess"),status:"success"}),R())}).finally(()=>{c.value=!1,m.loading=!1})}},x=()=>{var f;const b=(f=y.value)==null?void 0:f.getCheckboxRecords();if(!(b!=null&&b.length))return ie.VxeUI.modal.message({content:l("message.selectedRecord"),status:"warning"});b.forEach(h=>{const D=w.findIndex(q=>q._X_ROW_KEY===h._X_ROW_KEY);D!==-1&&w.splice(D,1)}),m.data=w},N=b=>{d.value.total=b.length,w=b.map((f,h)=>(f._X_ROW_KEY=h,f)),V("toShow"),T()},V=b=>{m.columns.forEach(f=>{if(b==="toSave"){const h=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{};w.forEach(D=>{D[f.mapField]=D[f.field],Object.assign(D,h,o.defaultParams)})}else w.forEach(h=>{h[f.field]=h[f.mapField]})})},P=()=>{ie.VxeUI.modal.alert(l("message.importTip"),l("message.udp.tip"))},$=n,R=()=>{a.value=!1,$("close")};return(b,f)=>{const h=e.resolveComponent("el-option"),D=e.resolveComponent("el-select"),q=e.resolveComponent("el-date-picker"),Z=e.resolveComponent("vxe-pager"),ee=e.resolveComponent("vxe-grid"),X=e.resolveComponent("vxe-modal");return e.openBlock(),e.createBlock(X,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=H=>a.value=H),"show-header":!1,fullscreen:"",remember:"",onClose:R},{default:e.withCtx(()=>[e.createVNode(ee,e.mergeProps({ref_key:"xgrid",ref:y},m,e.toHandlers(_)),e.createSlots({pager:e.withCtx(()=>[e.createVNode(Z,{"current-page":d.value.currentPage,"onUpdate:currentPage":f[0]||(f[0]=H=>d.value.currentPage=H),"page-size":d.value.pageSize,"onUpdate:pageSize":f[1]||(f[1]=H=>d.value.pageSize=H),layouts:i,"page-sizes":[200,500,1e3,2e3,5e3,1e4],total:d.value.total,onPageChange:U},null,8,["current-page","page-size","total"])]),_:2},[e.renderList(b.columns,H=>({name:H.field,fn:e.withCtx(({row:Q})=>[H.dictCode&&!H.disabled?(e.openBlock(),e.createBlock(D,{key:0,modelValue:Q[H.field],"onUpdate:modelValue":I=>Q[H.field]=I,modelModifiers:{trim:!0},clearable:""},{default:e.withCtx(()=>{var I;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((I=e.unref(p)[H.dictCode])==null?void 0:I.children,F=>(e.openBlock(),e.createBlock(h,{key:F.dictCode,value:F.dictCode,label:F.dictName},null,8,["value","label"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):["date","month","datetime"].includes(H.dataType)&&!H.disabled?(e.openBlock(),e.createBlock(q,{key:1,modelValue:Q[H.field],"onUpdate:modelValue":I=>Q[H.field]=I,modelModifiers:{trim:!0},type:H.dataType,"value-format":"YYYY-MM-DD hh:mm:ss"},null,8,["modelValue","onUpdate:modelValue","type"])):!H.da&&!H.disabled?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":I=>Q[H.field]=I,class:"ut-input"},null,8,fo)),[[e.vModelText,Q[H.field],void 0,{trim:!0}]]):c.value?(e.openBlock(),e.createElementBlock("span",mo,e.toDisplayString(Q[H.field]),1)):(e.openBlock(),e.createElementBlock("span",po,e.toDisplayString(Q[H.field]),1))])}))]),1040)]),_:1},8,["modelValue"])}}}),de=(t,n)=>{const o=t.__vccOpts||t;for(const[r,s]of n)o[r]=s;return o},yo=de(go,[["__scopeId","data-v-2978de7c"]]),ht=O.withInstall(yo),wo={name:"UtStampBadge",props:{color:{type:String,default:"primary",validator:t=>["primary","error","warning","success","info"].includes(t)},size:{type:String,default:"large",validator:t=>["large","middle","small"].includes(t)},rotate:{type:Number,default:45},top:{type:Number,default:60},right:{type:Number,default:100},content:{type:String,default:"Unknown"},code:{type:String,default:""}},computed:{getStampBadgeClass(){const{color:t,size:n}=this.$props;return[{[`stamp-badge-${t}`]:!!t,[`stamp-badge-${n}`]:!!n}]},getBindValue(){return{...this.$attrs,...this.$props}}},methods:{getContent(t){if(!t)return t;if(this.code){const n=O.storageLocal.getItem("kLov")[this.code].children.find(o=>o.dictCode===this.content);return n?n.dictName:t}return t}}},bo={class:""};function Co(t,n,o,r,s,a){return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"first-ring"},a.getBindValue,{class:a.getStampBadgeClass,style:[{position:"absolute"},{transform:`rotate(${o.rotate}deg)`,top:`${o.top}px`,right:`${o.right}px`}]}),[e.createElementVNode("div",{class:e.normalizeClass(["second-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["third-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["forth-ring",a.getStampBadgeClass])},[e.createElementVNode("div",{class:e.normalizeClass(["content-rectangle ellipsis",a.getStampBadgeClass])},[e.createElementVNode("span",bo,e.toDisplayString(a.getContent(o.content)),1)],2)],2)],2)],2)],16)}const gt=de(wo,[["render",Co],["__scopeId","data-v-10544e10"]]),ko={class:"ut-content"},_o={key:0,style:{"font-weight":"900"},class:"font-black"},Eo={class:"ut-right-panel"},xo={class:"ut-content-body"},So=de(e.defineComponent({name:"UtContent",__name:"content",props:{title:{default:""},showTop:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},stampOptions:{default:()=>({color:"success"})}},emits:["close"],setup(t,{emit:n}){const o=e.ref(window.top===window.self),r=n,s=()=>{r("close")};return(a,l)=>{var p,u,d,i,C,y,w;const c=e.resolveComponent("ut-button");return e.openBlock(),e.createElementBlock("div",ko,[(p=a.stampOptions)!=null&&p.content?(e.openBlock(),e.createBlock(gt,{key:0,color:((u=a.stampOptions)==null?void 0:u.color)||"success",content:(d=a.stampOptions)==null?void 0:d.content,code:(i=a.stampOptions)==null?void 0:i.code,right:(C=a.stampOptions)==null?void 0:C.right,top:(y=a.stampOptions)==null?void 0:y.top,rotate:(w=a.stampOptions)==null?void 0:w.rotate},null,8,["color","content","code","right","top","rotate"])):e.createCommentVNode("",!0),a.showTop&&o.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["ut-content-top",a.title?"justify-between":"justify-end"])},[a.title?(e.openBlock(),e.createElementBlock("span",_o,e.toDisplayString(a.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Eo,[e.renderSlot(a.$slots,"header",{},void 0,!0),a.showClose?(e.openBlock(),e.createBlock(c,{key:0,status:"info",icon:a.$attrs.icon||"ri-reply-line",content:a.$attrs.content||"goback",onTap:l[0]||(l[0]=k=>s())},null,8,["icon","content"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",xo,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])}}}),[["__scopeId","data-v-c7bf30a1"]]),yt=O.withInstall(So),No=t=>(e.pushScopeId("data-v-c0562151"),t=t(),e.popScopeId(),t),Bo={class:"ut-divider-wrapper"},Ro={class:"flex items-center"},To=No(()=>e.createElementVNode("span",{class:"ut-color-block"},null,-1)),Vo={class:"ut-divider-title"},Do={class:"mr-2"},Oo={name:"UtDivider"},Io=e.defineComponent({...Oo,props:{title:{default:"分割线"}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("div",Ro,[To,e.createElementVNode("span",Vo,e.toDisplayString(n.title),1)]),e.createElementVNode("div",Do,[e.renderSlot(n.$slots,"operate",{},void 0,!0)])]))}}),Fo=de(Io,[["__scopeId","data-v-c0562151"]]),wt=O.withInstall(Fo),Ao={name:"UtDropdown"},Mo=e.defineComponent({...Ao,props:{trigger:{default:"hover"},status:{default:"warning"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},buttons:{default:()=>[]}},emits:["command"],setup(t,{emit:n}){const o=t,r=e.computed(()=>o.buttons.filter(C=>C.visible!==!1)),{t:s}=ce.useI18n(),a=e.getCurrentInstance(),l=a==null?void 0:a.appContext.config.globalProperties.$hasAuthority,c=C=>{C.auth&&!l(C.auth)||C.disabled||i("command",C.code)},p=["primary","success","u-cyan"],u=C=>{const{content:y,code:w}=C;return/.*[\u4e00-\u9fa5]+.*$/.test(y)?y:s("message.btn."+(y||w||"edit"))},d=C=>{var y,w;return(y=C.code)!=null&&y.toLowerCase().includes("print")?"ri-printer-fill":(w=C.code)!=null&&w.toLowerCase().includes("look")?"ri-eye-fill":"ri-edit-2-fill"},i=n;return(C,y)=>{const w=e.resolveComponent("IconifyIconOffline"),k=e.resolveComponent("el-icon"),m=e.resolveComponent("vxe-button"),_=e.resolveComponent("el-dropdown-item"),S=e.resolveComponent("el-dropdown-menu"),B=e.resolveComponent("el-dropdown");return C.visible?(e.openBlock(),e.createBlock(B,{key:0,trigger:C.trigger,disabled:C.disabled,class:"ut-dropdown"},{dropdown:e.withCtx(()=>[e.createVNode(S,{class:"ut-dropdown-menu"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(T,U)=>(e.openBlock(),e.createBlock(_,{key:T.code},{default:e.withCtx(()=>[e.createVNode(m,{disabled:T.disabled||T.auth&&!e.unref(l)(T.auth),status:T.status||p[U%3],content:u(T),icon:T.icon||d(T),onClick:j=>c(T)},null,8,["disabled","status","content","icon","onClick"])]),_:2},1024))),128))]),_:1})]),default:e.withCtx(()=>[e.createVNode(m,{status:C.status,disabled:C.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("message.btn.more"))+" ",1),e.createVNode(k,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(w,{icon:"ri:arrow-down-s-line"})]),_:1})]),_:1},8,["status","disabled"])]),_:1},8,["trigger","disabled"])):e.createCommentVNode("",!0)}}}),bt=O.withInstall(Mo),Po={class:"width: 100%"},$o={name:"UtForm"},Lo=e.defineComponent({...$o,props:{record:{default:()=>({})},items:{default:()=>[]},loading:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},titleWidth:{default:100},span:{default:6},dataStatus:{default:"detail"}},setup(t,{expose:n}){const o=t,r=e.ref(void 0),{t:s}=ce.useI18n(),a=e.ref(!0),l=e.computed(()=>o.items.length?O.formatRules(o.items,s):{}),c=e.computed(()=>o.items.length?O.formatItems(A.clone(o.items,!0),o.dataStatus,6):o.items),p=()=>{r.value.toggleCollapse()};return n({validateForm:i=>{r.value.validate(i)},validate:i=>{r.value.validate(i),setTimeout(()=>{var C;(C=r.value)==null||C.clearValidate()},1600)}}),(i,C)=>{const y=e.resolveComponent("vxe-checkbox"),w=e.resolveComponent("vxe-form");return e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(w,e.mergeProps({ref_key:"xForm",ref:r,data:i.record,items:c.value,rules:l.value,loading:i.loading,vertical:i.vertical,"title-width":i.titleWidth,"title-overflow":"","title-align":"right","title-bold":""},i.$attrs),{dividerPrefix:e.withCtx(()=>[]),collapseNode:e.withCtx(()=>[e.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":C[0]||(C[0]=k=>a.value=k),content:"查看更多","checked-value":!1,"unchecked-value":!0,class:"pl-10",onChange:p},null,8,["modelValue"])]),_:1},16,["data","items","rules","loading","vertical","title-width"])])}}}),Ct=O.withInstall(Lo),Uo="kSysConfig",kt="kCookies_param",ve=O.storageLocal.getItem(Uo),_t=(t,n)=>(t.forEach(o=>{var r;o.auth=n&&n[o.code]||o.auth,o.name?(ve==null?void 0:ve.i18nEnabled)==="Y"&&!o.name.startsWith("message.")&&(o.name=`message.btn.${o.name}`):o.name=`message.btn.${o.code}`,(r=o.dropdowns)!=null&&r.length&&_t(o.dropdowns,n)}),t),Et=(t,n,o)=>{const r={pageNum:1,pageSize:1e5},s=qe();Object.assign(r,o,s,t.defaultParams||{});let a=Bt(r,t.items);a=Vt(a,t.items);const{url:l}=t;if(!l)return null;const c=A.isString(l)?l:l.fetch||l.restful;if(!c)return null;const p=l.fetch?"post":"get";return new Promise((u,d)=>{n[p](c,a).then(i=>{u(i.list)}).catch(i=>{d(i)})})},xt=(t,n,o,r,s)=>{if(s)return Ho();for(const i in n)n[i]&&A.isString(n[i])&&(n[i]=n[i].trim());const a={pageNum:o.currentPage,pageSize:o.pageSize},l=qe();Object.assign(a,l,t.defaultParams||{},n);let c=Bt(a,t.items);c=Vt(c,t.items);const{url:p}=t;if(!p)return null;const u=A.isString(p)?p:p.fetch||p.restful,d=p.fetch?"post":"get";return u?r[d](u,c):null},St=(t,n,o)=>{const{url:r}=o;if(!r)return null;const s=A.isString(r)?r:r.del||r.restful;if(!s)return null;const a=r.del?"post":"delete";return t[a](s,n)},Nt=(t,n,o)=>{const r=[],{url:s}=o;if(!s)return null;const{insertRecords:a,updateRecords:l}=n;if(!A.isEmpty(a)&&(a!=null&&a.length)){const c=qe();a.forEach(u=>{var d;!A.isEmpty(o==null?void 0:o.defaultValue)&&Object.assign(u,o.defaultValue),(d=Object.keys(c))==null||d.forEach(i=>{u[i]=u[i]||c[i]})});const p=A.isString(s)?s:s.add||s.restful;p&&r.push(t.post(p,a))}if(!A.isEmpty(l)&&(l!=null&&l.length)){const c=A.isString(s)?s:s.save||s.restful,p=s.save?"post":"put";c&&r.push(t[p](c,l))}return r},Bt=(t,n)=>{const o=n.filter(s=>{var a,l;return((l=(a=s.itemRender)==null?void 0:a.props)==null?void 0:l.multiple)||s.multiple});if(A.isEmpty(o))return t;const r=A.clone(t,!0);return o.forEach(s=>{var a;s.itemRender.name==="#select"&&s.itemRender.props.multiple&&(((a=r[`_${s.field}`])==null?void 0:a.length)===0&&(r[`${s.field}`]=null),delete t[`_${s.field}`],delete r[`_${s.field}`])}),r},Rt="yyyy-MM-dd 00:00:00",Tt="yyyy-MM-dd 23:59:59",Vt=(t,n)=>{const o=n.filter(s=>{var a;return["#SuDateRange","VxeDateRangePicker"].includes((a=s.itemRender)==null?void 0:a.name)});if(A.isEmpty(o))return t;const r=A.clone(t,!0);return o.forEach(s=>{const a=r[s.field];a&&s.itemRender.startField?(r[s.itemRender.startField]=A.toDateString(r[s.itemRender.startField],Rt),r[s.itemRender.endField]=A.toDateString(r[s.itemRender.endField],Tt)):a&&(r[`${s.field}From`]=A.toDateString(a[0],Rt),r[`${s.field}To`]=A.toDateString(a[1],Tt)),delete r[s.field]}),r},qe=()=>O.cookies.get(kt)?JSON.parse(O.cookies.get(kt)):{},jo=[{code:"insert_actived",name:"add",status:"u-cyan",icon:"vxe-icon-add",auth:"add",sort:1},{code:"delete",status:"danger",icon:"vxe-icon-delete",auth:"del",sort:2},{code:"save",status:"primary",icon:"vxe-icon-save",auth:"edit",sort:3}],zo=[{code:"add",status:"u-cyan",icon:"vxe-icon-add",auth:"add",sort:1},{code:"del",status:"danger",icon:"vxe-icon-delete",auth:"del",sort:2}],vo=[{field:"createdByName",width:90,visible:!1,formatter:({row:t})=>t.createdByName||t.creator},{field:"creationDate",width:140,visible:!1},{field:"lastUpdatedByName",width:90,visible:!1,formatter:({row:t})=>t.createdByName||t.updater},{field:"lastUpdateDate",width:140,visible:!1}],Dt=t=>A.isObject(t.exportConfig)?t.exportConfig:{filename:t.fileName||"导出明细",type:"xlsx",types:["xlsx","csv"],modes:["current","selected","all"],useStyle:!0,sheetMethod:({worksheet:n})=>t.onSheetMethod?t.onSheetMethod(n):qo(n),columnFilterMethod:({column:n})=>t.columnFilter?!!t.columnFilter(n):!["operate"].includes(n.field)&&n.type!=="checkbox"},Ot=(t,n,o,r)=>{const s={icon:"ri-refresh-line",iconLoading:"vxe-icon-spinner roll vxe-loading--default-icon"};if(!n.editable){t.editConfig.editable=n.editable;const d=n.needExport&&r("export");return d&&(t.exportConfig=Dt(o)),t.toolbarConfig={buttons:[],enabled:d,refreshOptions:s,exportOptions:{icon:"ri-download-2-line",code:"export"},export:d,custom:!!o.gridId,refresh:!0,perfect:!0},t}let a=A.clone(o.buttons||[],!0);a.forEach((d,i)=>{d.sort=d.sort||i+10}),(o.mode!=="form"?A.clone(jo,!0):A.clone(zo,!0)).reverse().forEach(d=>{!a.some(i=>i.code===d.code)&&a.unshift(d),o.authPrefix&&!["printer","export"].includes(d.auth)&&(d.auth=o.authPrefix+d.auth.slice(0,1).toLocaleUpperCase()+d.auth.slice(1).toLocaleLowerCase())}),a=_t(a,n.auth).filter(d=>{var C;const i=d.auth?r(d.auth):!0;return(C=d.dropdowns)!=null&&C.length&&(d.dropdowns=d.dropdowns.filter(y=>!y.auth||y.auth&&r(y.auth))),i});const c={trigger:"dblclick",mode:"row",showStatus:!0};t.editConfig=o.mode!=="form"?c:{enabled:!1};const p=n.needExport&&r("export");let u=null;return p&&(t.exportConfig=Dt(o),u={icon:"ri-download-2-line",code:"export"}),t.toolbarConfig={buttons:A.orderBy(a,"sort"),enabled:!0,refreshOptions:s,customOptions:o.gridId?{}:null,exportOptions:u,custom:!!o.gridId,export:p,refresh:!0,perfect:!0},t},It=({columns:t,data:n},o)=>[t.map((r,s)=>{var a;if(s===(o.index||0))return o.label||"合计";if((a=o.fields)!=null&&a.includes(r.property)){const l=n.reduce((c,p)=>c+Number(p[r.property]||0),0);return l&&A.commafy(Number(l.toFixed(o.decimal||2)))}return""})],Ft=(t,n)=>A.isFunction(n.checkMethod)?n.checkMethod(t):!0,qo=t=>{t.eachRow((n,o)=>{n.font={name:"微软雅黑",size:9},n.border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},o===1&&(n.fill={type:"pattern",pattern:"solid",fgColor:{argb:"4F81BD"}},n.font={name:"微软雅黑",size:10,bold:!0,color:{argb:"FFFFFFFF"}})})},Ho=()=>new Promise(t=>{setTimeout(()=>{t({list:[{id:1,name:"Test1",sex:"Man",age:28,address:"Shenzhen"},{id:2,name:"Test2",sex:"Women",age:22,address:"Guangzhou"},{id:3,name:"Test3",sex:"Man",age:32,address:"Shanghai"},{id:4,name:"Test4",sex:"Women",age:23,address:"test abc"},{id:5,name:"Test5",sex:"Women",age:30,address:"Shanghai"}],total:5})},100)}),He=t=>{const n={};return Object.keys(t).forEach(o=>{const r=o.replace(/-(\w)/g,s=>s.slice(1).toUpperCase());n[r]=t[o]}),n},Be=t=>(e.pushScopeId("data-v-06c590b1"),t=t(),e.popScopeId(),t),Wo={class:"w-full h-full"},Yo=Be(()=>e.createElementVNode("span",null,"查询方案",-1)),Jo={class:"pl-2 mr-5"},Ko=Be(()=>e.createElementVNode("i",{class:"vxe-icon-question-circle-fill"},null,-1)),Go=Be(()=>e.createElementVNode("div",null,[e.createElementVNode("div",{class:"text-sm"},[e.createElementVNode("div",null,"• 单击选中需要的查询方案,点击确定即可"),e.createElementVNode("div",null,"• 专属否: 是否只有自己才能查询"),e.createElementVNode("div",null,"• 仅方案创建人能够删除及更新方案")])],-1)),Xo={class:"flex flex-wrap justify-between x-card"},Qo=["onClick"],Zo={style:{"border-color":"rgb(229 231 235)","border-bottom-width":"1px"},class:"flex items-center justify-between flex-1 w-full h-4 pb-2 pl-2 pr-2 mt-2"},er={style:{"font-weight":"900",color:"rgb(6 95 70)"}},tr={class:"flex"},nr=["onClick"],or=["onClick"],rr={class:"flex items-center w-full",style:{color:"rgb(6 95 70)"}},sr={style:{width:"50%",overflow:"hidden","text-overflow":"ellipsis","text-align":"right","white-space":"nowrap"},class:"inline-block"},ar={style:{width:"50%",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},class:"inline-blocks"},lr={key:1,class:"flex flex-wrap items-center justify-center card-content card2"},ir=[Be(()=>e.createElementVNode("i",{style:{"font-size":"56px",color:"rgb(156 163 175)"},class:"vxe-icon-add"},null,-1))],cr={class:"flex items-center justify-end"},dr={class:"flex items-center justify-end"},We="/upfm/v1/queryConfig",ur=de(e.defineComponent({__name:"SuSearch",props:{view:{default:""},items:{default:()=>[]}},emits:["close","search"],setup(t,{emit:n}){const o=t,r=e.getCurrentInstance(),s=r.appContext.config.globalProperties.$serviceApi,a=r.appContext.config.globalProperties.$hasAuthority,l=O.useRender(),{t:c}=ce.useI18n();console.log("view ======",o.view);const p=e.ref(null),u=e.ref(""),d=e.ref(!1),i=e.ref(!1),C=e.ref(!1),y=e.ref(!1),w=e.ref(!0),k=e.ref({}),m=O.cookies.get("loginer");let _,S,B;const T=e.ref([]),U=e.computed(()=>o.items.length?O.formatRules(M(),c):{}),j=e.computed(()=>o.items.length?O.formatItems(M(),"update"):o.items),M=()=>{const I=[{field:"title",title:"方案名称",required:!0},{field:"isPrivate",title:"专属否",itemRender:l.renderSwitch("Y")}];return I.push(...A.clone(o.items,!0)),I.filter(F=>F.field!=="dataFlat")},x=I=>{S=null;const F=I.select;T.value.forEach(E=>{E.select=!1}),I.select=!F,w.value=F,S=F?S:I,I.id==="add"&&(w.value=!0,N())},N=()=>{k.value={isPrivate:"Y",item:{}},i.value=!0},V=(I,F)=>{k.value={title:I.title,isPrivate:I.isPrivate,item:I,...I.content},_=F,i.value=!0},P=()=>{p.value.validate(async I=>{if(!I){const F=f();y.value=!0;const E=F.id?"put":"post",[L,z]=await ze(s[E](We,[F]));y.value=!1,L||(z[0].select=!1,z[0].content=JSON.parse(z[0].content),E==="post"?T.value.splice(T.value.length-1,0,z[0]):T.value.splice(_,1,z[0]),B=A.clone(T.value,!0),O.successMessage(),i.value=!1)}})},$=()=>{C.value=!0;const I=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},F=Object.assign({pageSize:50,pageNum:1,userName:m,viewCode:o.view},I);s.get(We,F).then(E=>{const L=E.list;h(L),B=A.clone(T.value,!0)}).finally(()=>{C.value=!1})},R=()=>{Q("search",S.content),b()},b=()=>{i.value?(k.value={},i.value=!1):(d.value=!1,Q("close"))},f=()=>{const I=k.value,{title:F,isPrivate:E}=I,L=O.cookies.get("kCookies_param")?JSON.parse(O.cookies.get("kCookies_param")):{},z={...k.value.item,...L,title:F,isPrivate:E,viewCode:o.view,content:"",userName:m};delete I.title,delete I.isPrivate,delete I.item;const Y={};for(const K in I)I[K]&&(Y[K]=I[K]);return z.content=JSON.stringify(Y),z},h=I=>{I.forEach(F=>{F.select=!1,F.content=JSON.parse(F.content)}),I.push({id:"add"}),T.value=I},D=I=>{var E;return(E=j.value.find(L=>L.field===I))==null?void 0:E.title},q=(I,F)=>{var L,z,Y,K,re;const E=(L=o.items)==null?void 0:L.find(J=>J.field===I);return(z=E==null?void 0:E.itemRender)!=null&&z.dictCode&&((re=(K=(Y=E==null?void 0:E.itemRender)==null?void 0:Y.options)==null?void 0:K.find(J=>J.dictCode===F))==null?void 0:re.dictName)||F},Z=async(I,F)=>{if(await ie.VxeUI.modal.confirm(`继续操作将删除查询方案【${I.title}】`)==="confirm"){C.value=!0;const L=A.clone(I,!0);L.content=JSON.stringify(L.content),s.delete(We,[L]).then(()=>{T.value.splice(F,1),B=A.clone(T.value,!0),O.successMessage()}).finally(()=>{C.value=!1})}},ee=()=>{T.value=B.filter(I=>I.id==="add"||I.title.includes(u.value))},X=I=>{["Enter","NumpadEnter"].includes(I.$event.code)&&ee()},H=()=>{u.value="",T.value=A.clone(B,!0)};$();const Q=n;return e.onMounted(()=>{d.value=!0}),(I,F)=>{const E=e.resolveComponent("el-popover"),L=e.resolveComponent("el-scrollbar"),z=e.resolveComponent("vxe-input"),Y=e.resolveComponent("ut-button"),K=e.resolveComponent("vxe-modal"),re=e.resolveComponent("vxe-form");return e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(K,{modelValue:d.value,"onUpdate:modelValue":F[4]||(F[4]=J=>d.value=J),loading:C.value,width:"820",height:"360","show-footer":"",onClose:F[5]||(F[5]=J=>b())},{title:e.withCtx(()=>[e.createElementVNode("div",null,[Yo,e.createElementVNode("span",Jo,[e.createVNode(E,{placement:"right",width:260,trigger:"hover"},{reference:e.withCtx(()=>[Ko]),default:e.withCtx(()=>[Go]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(J,be)=>(e.openBlock(),e.createElementBlock("div",{key:J.id,class:"card",style:e.normalizeStyle({width:T.value.length===1?"100%":""}),onClick:he=>x(J)},[J.id!=="add"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex flex-col justify-between card-content card2",{selectCard:J.select}])},[e.createElementVNode("div",Zo,[e.createElementVNode("span",er,e.toDisplayString(J.title)+"("+e.toDisplayString(J.userName===e.unref(m)?"自己":J.userName)+")",1),e.createElementVNode("div",tr,[J.userName===e.unref(m)||e.unref(a)("fetch")?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center justify-center",style:{width:"16px",height:"16px","margin-left":"12px",color:"#fff","background-color":"rgb(29 78 216)","border-radius":"8px"},onClick:he=>V(J,be)}," ✔ ",8,nr)):e.createCommentVNode("",!0),J.userName===e.unref(m)||e.unref(a)("fetch")?(e.openBlock(),e.createElementBlock("div",{key:1,class:"flex items-center justify-center",style:{width:"16px",height:"16px","margin-left":"12px",color:"#fff","background-color":"rgb(185 28 28)","border-radius":"8px"},onClick:he=>Z(J,be)}," × ",8,or)):e.createCommentVNode("",!0)])]),e.createVNode(L,{style:{flex:"4"},class:"w-full overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.content,(he,Se)=>(e.openBlock(),e.createElementBlock("span",{key:he,style:{height:"33.333%","line-height":"2rem"},class:"inline-block w-1/2"},[e.createElementVNode("span",rr,[e.createElementVNode("span",sr,e.toDisplayString(I.$t(D(Se)))+":",1),e.createElementVNode("span",ar,e.toDisplayString(q(Se,he)),1)])]))),128))]),_:2},1024)],2)):(e.openBlock(),e.createElementBlock("div",lr,ir))],12,Qo))),128))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cr,[e.createVNode(z,{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=J=>u.value=J),placeholder:"请录入方案标题",type:"search",onSearchClick:ee,onKeydown:X,onClear:H},null,8,["modelValue"]),e.createVNode(Y,{content:"reset",status:"info",icon:"ri-refresh-line",onTap:F[1]||(F[1]=J=>H())}),e.createVNode(Y,{content:"cancel",status:"warning",icon:"ri-close-line",onTap:F[2]||(F[2]=J=>b())}),e.createVNode(Y,{disabled:w.value,content:"confirm",icon:"ri-save-3-line",onTap:F[3]||(F[3]=J=>R())},null,8,["disabled"])])]),_:1},8,["modelValue","loading"]),e.createVNode(K,{modelValue:i.value,"onUpdate:modelValue":F[7]||(F[7]=J=>i.value=J),loading:y.value,width:"360",height:"420",title:"查询方案新增","show-footer":"",onClose:F[8]||(F[8]=J=>b())},{default:e.withCtx(()=>[e.createVNode(re,{ref_key:"xForm",ref:p,data:k.value,items:j.value,rules:U.value,"title-align":"right","title-width":90},null,8,["data","items","rules"])]),footer:e.withCtx(()=>[e.createElementVNode("div",dr,[e.createVNode(Y,{content:"cancel",status:"warning",icon:"ri-close-line",onTap:F[6]||(F[6]=J=>b())}),e.createVNode(Y,{content:"confirm",icon:"ri-save-3-line",onTap:P})])]),_:1},8,["modelValue","loading"])])}}}),[["__scopeId","data-v-06c590b1"]]),fr={style:{width:"100%",height:"100%"}},At="U_TABLE_COLUMNN_SORT",pr=e.defineComponent({name:"UtGrid",__name:"grid",props:{checkMethod:{},serviceCode:{default:()=>({})},defaultValue:{},defaultParams:{},url:{},columns:{default:()=>[]},items:{default:()=>[]},editable:{type:Boolean,default:!0},needExport:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0}},emits:["buttonClick","cellClick","cellDbclick","editEctivated","reset"],setup(t,{expose:n,emit:o}){const r=He(e.useAttrs());let s;const a={},l=e.getCurrentInstance(),c=l.appContext.config.globalProperties.$hasAuthority,p=l.appContext.config.globalProperties.$serviceApi,u=l.parent.type.name,d=l.appContext.config.globalProperties.$mode,i=t,{t:C}=ce.useI18n(),y=e.ref(null),w=e.ref(!1),k={icon:"vxe-icon-setting",name:"favorite",events:{click:(E,L)=>{L.name==="favorite"&&(w.value=!0)}}},m=()=>i.columns.length?O.formatRules(i.columns,C):{},_=()=>{const E=i.columns;if(r.gridId){const z=vo.filter(K=>!E.some(re=>re.field===K.field)).map(K=>(r.format&&["lastUpdateDate","creationDate"].includes(K.field)&&(K.formatter=r.format,K.width=90),K)),Y=E.findIndex(K=>K.field==="operate");Y!==-1?E.splice(Y,0,...z):E.push(...z)}const L=r.gridId?T(E):E;return O.i18nColums(L,r.sortable)};O.dbstorage.getItem(At).then(E=>{s=E,S.columns=_()});const S=e.reactive({border:!0,pagerConfig:{pageSize:r.pageSize||20},editConfig:{},editRules:m(),formConfig:{},columnConfig:{useKey:!0},toolbarConfig:{enabled:!1},sortConfig:{multiple:!0,trigger:"cell"},height:d?void 0:window.innerHeight-92,checkboxConfig:{checkMethod:({row:E})=>Ft(E,i),checkRowKeys:i.checkRowKeys},loading:!1,footerRowClassName:"ut-grid-footer",proxyConfig:{form:!0,autoLoad:i.autoLoad,showResponseMsgvxe:!1,showActionMsgvxe:!1,ajax:{queryAll:({form:E})=>Et(i,p,E),query:({page:E,form:L})=>xt(i,L,E,p,d),delete:({body:{removeRecords:E}})=>St(p,E,i),save:({body:E})=>Promise.all(Nt(p,E,i)),querySuccess:({response:E})=>R("querySuccess",E),queryError:({response:E})=>R("queryError",E),deleteSuccess:({response:E})=>R("deleteSuccess",E),deleteError:({response:E})=>R("deleteError",E),saveSuccess:({response:E})=>R("saveSuccess",E),saveError:({response:E})=>R("saveError",E)}},columns:r.gridId?[]:_(),...r}),B=()=>i.items.length?O.formatGridItems(A.clone(i.items,!0),u&&i.url?k:u):i.items;function T(E){const L=s?s[r.gridId]:{};return L?E.map((z,Y)=>{const K=(Y+1)*10;return z._sort=L[z.field]||K,a[z.field]=z._sort,z}).sort((z,Y)=>z._sort-Y._sort):E}const U=()=>{i.items.length&&(S.formConfig={titleWidth:100,titleAlign:"right",items:B(),rules:O.formatRules(i.items,C),validConfig:{showMessage:!1}});const E=Ot(S,i,r,c);Object.assign(S,E),r.gridId&&(S.id=r.gridId,S.customConfig={storage:!0,mode:"popup",checkMethod({column:L}){return!(L.field==="operate"||["checkbox","radio"].includes(L.type))},modalOptions:{width:750,height:"75%"}}),r.mergeFooter&&(S.showFooter=!0,S.footerMethod=({columns:L,data:z})=>It({columns:L,data:z},r.mergeFooter))},j=()=>{y.value.commitProxy("query")},M=()=>(S.editRules=m(),y.value.refreshColumn()),x=()=>{S.loading=!0},N=()=>{S.loading=!1},V=()=>e.toRaw(y.value),P=()=>y.value.getTableData().fullData,$=(E=!1)=>{const L=i.columns[0].type,z=L==="radio"?y.value.getRadioRecord(E):y.value.getCheckboxRecords(E);return L==="checkbox"&&!z.length?(O.warnMessage(C("message.tip_selectedRecord")),[]):L==="radio"&&!z?(O.warnMessage(C("message.tip_selectedRecord")),null):z},R=(E,L)=>{r!=null&&r.callback&&(r!=null&&r.callback[E])&&(r==null||r.callback[E](L))},b=({data:E})=>{const L=i.items.filter(z=>{var Y,K;return(K=(Y=z.itemRender)==null?void 0:Y.props)==null?void 0:K.multiple});L.forEach(z=>{z.itemRender.props.defaultValue?E[`_${z.field}`]=z.itemRender.props.defaultValue.split(","):E[`_${z.field}`]=[]}),L.length&&setTimeout(()=>{j()},200)};let f;const h=()=>{const E=y.value;f=Kn.create(E.$el.querySelector(".vxe-table--header .vxe-header--row"),{disabled:!r.gridId,handle:".vxe-header--column",onEnd:async L=>{const z=L.item,Y=L.newIndex,K=L.oldIndex,{fullColumn:re,tableColumn:J}=E.getTableColumn(),be=z.parentNode,he=re[Y],Se=re[K];let je=!1,lt="固定列";if(he.fixed?je=!1:Y===0||["checkbox","radio"].includes(Se.type)?(lt="勾选列",je=!0):(Se.field==="operate"||Y===re.length-1)&&(je=!0,lt="操作列"),je){const ue=be.children[K];return Y>K?be.insertBefore(z,ue):be.insertBefore(z,ue&&ue.nextElementSibling),O.errorMessage(lt+"不允许拖动!")}const it=E.getColumnIndex(J[K]),ct=E.getColumnIndex(J[Y]),vn=re.splice(it,1)[0];re.splice(ct,0,vn);const Ne=ct-it>0?1:-1,qn=(ct+1)*10,Hn=(it+1)*10,Wn=qn+1*Ne;for(const ue in a){const Ce=a[ue];(Ne>0&&Ce<Wn&&Ce>Hn||Ne<0&&Ce>Wn&&Ce<Hn)&&(a[ue]=Ce-10*Ne)}a[vn.field]=qn,O.dbstorage.setItem(At,{[r.gridId]:a}),E.loadColumn(re)}})},D=E=>{w.value=!1;const{form:L}=y.value.getProxyInfo();Object.assign(L,E),j()};n({getTableData:P,getSelectRecords:$,refreshData:j,refreshColumn:M,getInstance:V,showLoading:x,hiddenLoading:N,reloadGrid:async()=>{S.editRules=m(),U()}});const Z=({code:E})=>{F("buttonClick",E)},ee=E=>{F("cellClick",E)},X=E=>{F("cellDbclick",E)},H=E=>{F("editEctivated",E)},Q=()=>{window.onresize=()=>(()=>{let E=(r==null?void 0:r.height)||window.innerHeight-90;r.mode!=="inline"&&!(r!=null&&r.height)&&(E=window.innerHeight-180),S.height=E<600?600:E})()};let I;e.nextTick(()=>{I=setTimeout(()=>{h()},500)}),e.onUnmounted(()=>{clearTimeout(I),f&&f.destroy()}),e.onBeforeMount(()=>{U(),Q()});const F=o;return(E,L)=>{const z=e.resolveComponent("vxe-grid");return e.openBlock(),e.createElementBlock("div",fr,[e.createVNode(z,e.mergeProps({ref_key:"xgrid",ref:y},S,{class:"ut-grid-wrapper"},e.toHandlers(e.unref(r).events||{}),{onToolbarButtonClick:Z,onToolbarToolClick:Z,onCellClick:ee,onCellDblclick:X,onEditActivated:H,onFormReset:b}),null,16),w.value&&i.url?(e.openBlock(),e.createBlock(ur,{key:0,items:E.items,view:e.unref(u),onSearch:D,onClose:L[0]||(L[0]=Y=>w.value=!1)},null,8,["items","view"])):e.createCommentVNode("",!0)])}}}),Mt=O.withInstall(pr),mr={name:"UtModalForm"},hr=e.defineComponent({...mr,props:{record:{default:()=>({})},formOptions:{default:()=>({})},modalOptions:{default:()=>({})},items:{default:()=>[]},url:{default:""},method:{default:"post"},title:{default:"数据记录"},dataStatus:{default:"detail"},width:{default:420},height:{default:360}},emits:["close","confirm"],setup(t,{expose:n,emit:o}){const r=t,s=He(e.useAttrs()),a=e.ref(!1),c=e.getCurrentInstance().appContext.config.globalProperties.$serviceApi,p=e.computed(()=>r.items.length?O.formatRules(r.items,u):{}),{t:u}=ce.useI18n(),d=e.computed(()=>r.items.length?O.formatItems(A.clone(r.items,!0),r.dataStatus,24):r.items),i=e.ref(!1),C=e.ref(null),y=()=>{C.value.validate(async j=>{if(!j){const{record:M,url:x,method:N}=r;if(x){w();const V=s!=null&&s.dataProcessMethod?s==null?void 0:s.dataProcessMethod(M):M,[P,$]=await ze(c[N](x,V));k(),P||(O.successMessage(),U("confirm",$),S())}else U("confirm")}})},w=()=>{a.value=!0},k=()=>{a.value=!1},m=j=>{C.value.validate(j)},_=j=>{C.value.validate(j)},S=()=>{i.value=!1,U("close")},B=()=>{i.value=!0},T=()=>{S()},U=o;return n({showLoading:w,hiddenLoading:k,openModal:B,closeModal:T,validate:m,validateForm:_}),e.onBeforeMount(()=>{B()}),(j,M)=>{const x=e.resolveComponent("vxe-form"),N=e.resolveComponent("ut-button"),V=e.resolveComponent("vxe-modal");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(V,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=P=>i.value=P),title:j.title,width:j.width,height:j.height,loading:a.value,"show-footer":j.dataStatus!=="detail","min-width":"240","min-height":"300","destroy-on-close":"",resize:""},j.modalOptions,{onClose:S}),e.createSlots({default:e.withCtx(()=>[e.createVNode(x,e.mergeProps({ref_key:"xForm",ref:C,data:j.record,items:d.value,rules:p.value,"title-width":100,"title-align":"right"},j.formOptions),{dividerPrefix:e.withCtx(()=>[]),_:1},16,["data","items","rules"])]),_:2},[a.value?void 0:{name:"footer",fn:e.withCtx(()=>[e.createVNode(N,{status:"warning",content:"cancel",icon:"ri-close-line",onTap:S}),e.createVNode(N,{status:"u-cyan",content:"confirm",icon:"ri-save-3-line",onTap:y})]),key:"0"}]),1040,["modelValue","title","width","height","loading","show-footer"])])}}}),Pt=O.withInstall(hr),gr={name:"UtModalGrid"},yr=e.defineComponent({...gr,props:{checkMethod:{},columns:{default:()=>[]},defaultValue:{},defaultParams:{},gridOptions:{default:()=>({})},auth:{},url:{default:""},submitUrl:{default:""},checkRowKeys:{default:()=>[]},items:{default:()=>[]},title:{default:"数据记录"},width:{default:"520"},height:{default:420},editable:{type:Boolean,default:!0},needExport:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!1},addChild:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0}},emits:["close","confirm","actived","buttonClick"],setup(t,{expose:n,emit:o}){const r=He(e.useAttrs()),s=t,a=e.ref(!1),l=e.ref(null),c=e.getCurrentInstance(),p=c.appContext.config.globalProperties.$hasAuthority,u=c.appContext.config.globalProperties.$serviceApi,d=c.appContext.config.globalProperties.$mode,{t:i}=ce.useI18n(),C=()=>{const f=A.clone(s.columns,!0).map(h=>(s.editable?!h.type&&!h.editRender&&s.editable&&h.editable&&(h.editRender={name:"VxeInput"}):h.editRender={enabled:!1},h));return O.i18nColums(f,r.sortable)},y=()=>s.items.length?O.formatGridItems(A.clone(s.items,!0)):s.items,w=()=>s.columns.length?O.formatRules(s.columns,i):{},k=e.reactive({loading:!1,border:!0,pagerConfig:{},formConfig:{},toolbarConfig:{enabled:!1},height:"auto",editConfig:{},rowConfig:{keyField:"_X_ROW_KEY"},editRules:w(),proxyConfig:{form:!0,autoLoad:s.autoLoad,ajax:{queryAll:({form:f})=>Et(s,u,f),query:({page:f,form:h})=>xt(s,h,f,u,d),delete:({body:{removeRecords:f}})=>St(u,f,s),save:({body:f})=>Promise.all(Nt(u,f,s)),querySuccess:f=>m("querySuccess",f),queryError:f=>m("queryError",f),deleteSuccess:f=>m("deleteSuccess",f),deleteError:f=>m("deleteError",f),saveSuccess:f=>m("saveSuccess",f),saveError:f=>m("saveError",f)}},checkboxConfig:{checkMethod:({row:f})=>Ft(f,s),checkRowKeys:s.checkRowKeys},columns:C(),...s.gridOptions}),m=(f,h)=>{r!=null&&r.callback&&(r!=null&&r.callback[f])&&(r==null||r.callback[f](h))},_=async()=>{let f=null;const h=s.columns[0].type;if(h==="checkbox"?f=l.value.getCheckboxRecords():h==="radio"?f=l.value.getRadioRecord():f=l.value.getTableData().fullData,h==="checkbox"&&!f.length&&!s.addChild)return O.warnMessage(i("message.selectedRecord"));if(h==="radio"&&!f)return O.warnMessage(i("message.selectedRecord"));if(A.isFunction(r.beforeConfirm)&&!r.beforeConfirm(f))return;const{submitUrl:D}=s;if(D){x();let q;try{f.forEach(Z=>Object.assign(Z,s.defaultParams)),q=await u.post(D,f)}finally{q&&P("confirm",q),q&&O.successMessage(i("message.operateSuccess")),$(),N()}}else s.autoClose&&$(),P("confirm",f)},S=()=>{l.value.commitProxy("query")},B=()=>{k.editRules=w(),l.value.refreshColumn()},T=()=>e.toRaw(l.value),U=({row:f})=>{const h=s.columns[0].type;h==="checkbox"?l.value.setCheckboxRow(f,!0):h==="radio"&&l.value.setRadioRow(f)},j=f=>{P("actived",f)},M=({code:f})=>{P("buttonClick",f)},x=()=>{k.loading=!0},N=()=>{k.loading=!1},V=(f=!1)=>{const h=s.columns[0].type,D=h==="radio"?xgrid.value.getRadioRecord(f):xgrid.value.getCheckboxRecords(f);return h==="checkbox"&&!D.length?(O.warnMessage(i("message.tip_selectedRecord")),[]):h==="radio"&&!D?(O.warnMessage(i("message.tip_selectedRecord")),null):D},P=o,$=()=>{A.isFunction(r.beforeClose)&&!r.beforeClose()||(a.value=!1,P("close"))},R=()=>{s.items.length&&(k.formConfig={titleWidth:100,titleAlign:"right",items:y(),rules:O.formatRules(s.items,i),validConfig:{showMessage:!1}});const f=Ot(k,s,r,p);Object.assign(k,f),r.mergeFooter&&(k.showFooter=!0,k.footerMethod=({columns:h,data:D})=>It({columns:h,data:D},r.mergeFooter))};return n({refreshData:S,refreshColumn:B,getInstance:T,showLoading:x,hiddenLoading:N,getSelectRecords:V,reloadGrid:async()=>{R()},close:$}),e.onBeforeMount(()=>{a.value=!0,R()}),(f,h)=>{const D=e.resolveComponent("vxe-grid"),q=e.resolveComponent("ut-button"),Z=e.resolveComponent("vxe-modal"),ee=e.resolveDirective("spinning");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Z,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=X=>a.value=X),title:f.title,width:f.width,height:f.height,"show-footer":f.showFooter,resize:"","destroy-on-close":"",onClose:$},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default"),e.createVNode(D,e.mergeProps({ref_key:"xGrid",ref:l},k,{columnConfig:{resizable:!0}},e.toHandlers(e.unref(r).events||{}),{onEditActivated:j,onToolbarButtonClick:M,onToolbarToolClick:M,onCellClick:U}),null,16)]),footer:e.withCtx(()=>[e.renderSlot(f.$slots,"bottom"),e.createVNode(q,{icon:"ri-close-line",status:"warning",content:"cancel",onTap:$}),e.createVNode(q,{icon:"ri-save-3-line",content:"confirm",onTap:_})]),_:3},8,["modelValue","title","width","height","show-footer"])])),[[ee,k.loading]])}}}),$t=O.withInstall(yr);function Lt(t,n){return function(){return t.apply(n,arguments)}}const{toString:wr}=Object.prototype,{getPrototypeOf:Ye}=Object,{iterator:Re,toStringTag:Ut}=Symbol,Te=(t=>n=>{const o=wr.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ae=t=>(t=t.toLowerCase(),n=>Te(n)===t),Ve=t=>n=>typeof n===t,{isArray:ge}=Array,ke=Ve("undefined");function br(t){return t!==null&&!ke(t)&&t.constructor!==null&&!ke(t.constructor)&&ne(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const jt=ae("ArrayBuffer");function Cr(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&jt(t.buffer),n}const kr=Ve("string"),ne=Ve("function"),zt=Ve("number"),De=t=>t!==null&&typeof t=="object",_r=t=>t===!0||t===!1,Oe=t=>{if(Te(t)!=="object")return!1;const n=Ye(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Ut in t)&&!(Re in t)},Er=ae("Date"),xr=ae("File"),Sr=ae("Blob"),Nr=ae("FileList"),Br=t=>De(t)&&ne(t.pipe),Rr=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||ne(t.append)&&((n=Te(t))==="formdata"||n==="object"&&ne(t.toString)&&t.toString()==="[object FormData]"))},Tr=ae("URLSearchParams"),[Vr,Dr,Or,Ir]=["ReadableStream","Request","Response","Headers"].map(ae),Fr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(t,n,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),ge(t))for(r=0,s=t.length;r<s;r++)n.call(null,t[r],r,t);else{const a=o?Object.getOwnPropertyNames(t):Object.keys(t),l=a.length;let c;for(r=0;r<l;r++)c=a[r],n.call(null,t[c],c,t)}}function vt(t,n){n=n.toLowerCase();const o=Object.keys(t);let r=o.length,s;for(;r-- >0;)if(s=o[r],n===s.toLowerCase())return s;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qt=t=>!ke(t)&&t!==fe;function Je(){const{caseless:t}=qt(this)&&this||{},n={},o=(r,s)=>{const a=t&&vt(n,s)||s;Oe(n[a])&&Oe(r)?n[a]=Je(n[a],r):Oe(r)?n[a]=Je({},r):ge(r)?n[a]=r.slice():n[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&_e(arguments[r],o);return n}const Ar=(t,n,o,{allOwnKeys:r}={})=>(_e(n,(s,a)=>{o&&ne(s)?t[a]=Lt(s,o):t[a]=s},{allOwnKeys:r}),t),Mr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Pr=(t,n,o,r)=>{t.prototype=Object.create(n.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),o&&Object.assign(t.prototype,o)},$r=(t,n,o,r)=>{let s,a,l;const c={};if(n=n||{},t==null)return n;do{for(s=Object.getOwnPropertyNames(t),a=s.length;a-- >0;)l=s[a],(!r||r(l,t,n))&&!c[l]&&(n[l]=t[l],c[l]=!0);t=o!==!1&&Ye(t)}while(t&&(!o||o(t,n))&&t!==Object.prototype);return n},Lr=(t,n,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=n.length;const r=t.indexOf(n,o);return r!==-1&&r===o},Ur=t=>{if(!t)return null;if(ge(t))return t;let n=t.length;if(!zt(n))return null;const o=new Array(n);for(;n-- >0;)o[n]=t[n];return o},jr=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Ye(Uint8Array)),zr=(t,n)=>{const r=(t&&t[Re]).call(t);let s;for(;(s=r.next())&&!s.done;){const a=s.value;n.call(t,a[0],a[1])}},vr=(t,n)=>{let o;const r=[];for(;(o=t.exec(n))!==null;)r.push(o);return r},qr=ae("HTMLFormElement"),Hr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,s){return r.toUpperCase()+s}),Ht=(({hasOwnProperty:t})=>(n,o)=>t.call(n,o))(Object.prototype),Wr=ae("RegExp"),Wt=(t,n)=>{const o=Object.getOwnPropertyDescriptors(t),r={};_e(o,(s,a)=>{let l;(l=n(s,a,t))!==!1&&(r[a]=l||s)}),Object.defineProperties(t,r)},Yr=t=>{Wt(t,(n,o)=>{if(ne(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=t[o];if(ne(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Jr=(t,n)=>{const o={},r=s=>{s.forEach(a=>{o[a]=!0})};return ge(t)?r(t):r(String(t).split(n)),o},Kr=()=>{},Gr=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function Xr(t){return!!(t&&ne(t.append)&&t[Ut]==="FormData"&&t[Re])}const Qr=t=>{const n=new Array(10),o=(r,s)=>{if(De(r)){if(n.indexOf(r)>=0)return;if(!("toJSON"in r)){n[s]=r;const a=ge(r)?[]:{};return _e(r,(l,c)=>{const p=o(l,s+1);!ke(p)&&(a[c]=p)}),n[s]=void 0,a}}return r};return o(t,0)},Zr=ae("AsyncFunction"),es=t=>t&&(De(t)||ne(t))&&ne(t.then)&&ne(t.catch),Yt=((t,n)=>t?setImmediate:n?((o,r)=>(fe.addEventListener("message",({source:s,data:a})=>{s===fe&&a===o&&r.length&&r.shift()()},!1),s=>{r.push(s),fe.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",ne(fe.postMessage)),ts=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||Yt,g={isArray:ge,isArrayBuffer:jt,isBuffer:br,isFormData:Rr,isArrayBufferView:Cr,isString:kr,isNumber:zt,isBoolean:_r,isObject:De,isPlainObject:Oe,isReadableStream:Vr,isRequest:Dr,isResponse:Or,isHeaders:Ir,isUndefined:ke,isDate:Er,isFile:xr,isBlob:Sr,isRegExp:Wr,isFunction:ne,isStream:Br,isURLSearchParams:Tr,isTypedArray:jr,isFileList:Nr,forEach:_e,merge:Je,extend:Ar,trim:Fr,stripBOM:Mr,inherits:Pr,toFlatObject:$r,kindOf:Te,kindOfTest:ae,endsWith:Lr,toArray:Ur,forEachEntry:zr,matchAll:vr,isHTMLForm:qr,hasOwnProperty:Ht,hasOwnProp:Ht,reduceDescriptors:Wt,freezeMethods:Yr,toObjectSet:Jr,toCamelCase:Hr,noop:Kr,toFiniteNumber:Gr,findKey:vt,global:fe,isContextDefined:qt,isSpecCompliantForm:Xr,toJSONObject:Qr,isAsyncFn:Zr,isThenable:es,setImmediate:Yt,asap:ts,isIterable:t=>t!=null&&ne(t[Re])};function v(t,n,o,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}g.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:g.toJSONObject(this.config),code:this.code,status:this.status}}});const Jt=v.prototype,Kt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Kt[t]={value:t}}),Object.defineProperties(v,Kt),Object.defineProperty(Jt,"isAxiosError",{value:!0}),v.from=(t,n,o,r,s,a)=>{const l=Object.create(Jt);return g.toFlatObject(t,l,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),v.call(l,t.message,n,o,r,s),l.cause=t,l.name=t.name,a&&Object.assign(l,a),l};const ns=null;function Ke(t){return g.isPlainObject(t)||g.isArray(t)}function Gt(t){return g.endsWith(t,"[]")?t.slice(0,-2):t}function Xt(t,n,o){return t?t.concat(n).map(function(s,a){return s=Gt(s),!o&&a?"["+s+"]":s}).join(o?".":""):n}function os(t){return g.isArray(t)&&!t.some(Ke)}const rs=g.toFlatObject(g,{},null,function(n){return/^is[A-Z]/.test(n)});function Ie(t,n,o){if(!g.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,o=g.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,m){return!g.isUndefined(m[k])});const r=o.metaTokens,s=o.visitor||d,a=o.dots,l=o.indexes,p=(o.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(n);if(!g.isFunction(s))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(g.isDate(w))return w.toISOString();if(!p&&g.isBlob(w))throw new v("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(w)||g.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function d(w,k,m){let _=w;if(w&&!m&&typeof w=="object"){if(g.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=JSON.stringify(w);else if(g.isArray(w)&&os(w)||(g.isFileList(w)||g.endsWith(k,"[]"))&&(_=g.toArray(w)))return k=Gt(k),_.forEach(function(B,T){!(g.isUndefined(B)||B===null)&&n.append(l===!0?Xt([k],T,a):l===null?k:k+"[]",u(B))}),!1}return Ke(w)?!0:(n.append(Xt(m,k,a),u(w)),!1)}const i=[],C=Object.assign(rs,{defaultVisitor:d,convertValue:u,isVisitable:Ke});function y(w,k){if(!g.isUndefined(w)){if(i.indexOf(w)!==-1)throw Error("Circular reference detected in "+k.join("."));i.push(w),g.forEach(w,function(_,S){(!(g.isUndefined(_)||_===null)&&s.call(n,_,g.isString(S)?S.trim():S,k,C))===!0&&y(_,k?k.concat(S):[S])}),i.pop()}}if(!g.isObject(t))throw new TypeError("data must be an object");return y(t),n}function Qt(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function Ge(t,n){this._pairs=[],t&&Ie(t,this,n)}const Zt=Ge.prototype;Zt.append=function(n,o){this._pairs.push([n,o])},Zt.toString=function(n){const o=n?function(r){return n.call(this,r,Qt)}:Qt;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function ss(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function en(t,n,o){if(!n)return t;const r=o&&o.encode||ss;g.isFunction(o)&&(o={serialize:o});const s=o&&o.serialize;let a;if(s?a=s(n,o):a=g.isURLSearchParams(n)?n.toString():new Ge(n,o).toString(r),a){const l=t.indexOf("#");l!==-1&&(t=t.slice(0,l)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class tn{constructor(){this.handlers=[]}use(n,o,r){return this.handlers.push({fulfilled:n,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){g.forEach(this.handlers,function(r){r!==null&&n(r)})}}const nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},as={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ge,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Xe=typeof window<"u"&&typeof document<"u",Qe=typeof navigator=="object"&&navigator||void 0,ls=Xe&&(!Qe||["ReactNative","NativeScript","NS"].indexOf(Qe.product)<0),is=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cs=Xe&&window.location.href||"http://localhost",te={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:ls,hasStandardBrowserWebWorkerEnv:is,navigator:Qe,origin:cs},Symbol.toStringTag,{value:"Module"})),...as};function ds(t,n){return Ie(t,new te.classes.URLSearchParams,Object.assign({visitor:function(o,r,s,a){return te.isNode&&g.isBuffer(o)?(this.append(r,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))}function us(t){return g.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function fs(t){const n={},o=Object.keys(t);let r;const s=o.length;let a;for(r=0;r<s;r++)a=o[r],n[a]=t[a];return n}function on(t){function n(o,r,s,a){let l=o[a++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),p=a>=o.length;return l=!l&&g.isArray(s)?s.length:l,p?(g.hasOwnProp(s,l)?s[l]=[s[l],r]:s[l]=r,!c):((!s[l]||!g.isObject(s[l]))&&(s[l]=[]),n(o,r,s[l],a)&&g.isArray(s[l])&&(s[l]=fs(s[l])),!c)}if(g.isFormData(t)&&g.isFunction(t.entries)){const o={};return g.forEachEntry(t,(r,s)=>{n(us(r),s,o,0)}),o}return null}function ps(t,n,o){if(g.isString(t))try{return(n||JSON.parse)(t),g.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(t)}const Ee={transitional:nn,adapter:["xhr","http","fetch"],transformRequest:[function(n,o){const r=o.getContentType()||"",s=r.indexOf("application/json")>-1,a=g.isObject(n);if(a&&g.isHTMLForm(n)&&(n=new FormData(n)),g.isFormData(n))return s?JSON.stringify(on(n)):n;if(g.isArrayBuffer(n)||g.isBuffer(n)||g.isStream(n)||g.isFile(n)||g.isBlob(n)||g.isReadableStream(n))return n;if(g.isArrayBufferView(n))return n.buffer;if(g.isURLSearchParams(n))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ds(n,this.formSerializer).toString();if((c=g.isFileList(n))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Ie(c?{"files[]":n}:n,p&&new p,this.formSerializer)}}return a||s?(o.setContentType("application/json",!1),ps(n)):n}],transformResponse:[function(n){const o=this.transitional||Ee.transitional,r=o&&o.forcedJSONParsing,s=this.responseType==="json";if(g.isResponse(n)||g.isReadableStream(n))return n;if(n&&g.isString(n)&&(r&&!this.responseType||s)){const l=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(n)}catch(c){if(l)throw c.name==="SyntaxError"?v.from(c,v.ERR_BAD_RESPONSE,this,null,this.response):c}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:te.classes.FormData,Blob:te.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],t=>{Ee.headers[t]={}});const ms=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hs=t=>{const n={};let o,r,s;return t&&t.split(`
2
2
  `).forEach(function(l){s=l.indexOf(":"),o=l.substring(0,s).trim().toLowerCase(),r=l.substring(s+1).trim(),!(!o||n[o]&&ms[o])&&(o==="set-cookie"?n[o]?n[o].push(r):n[o]=[r]:n[o]=n[o]?n[o]+", "+r:r)}),n},rn=Symbol("internals");function xe(t){return t&&String(t).trim().toLowerCase()}function Fe(t){return t===!1||t==null?t:g.isArray(t)?t.map(Fe):String(t)}function gs(t){const n=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(t);)n[r[1]]=r[2];return n}const ys=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ze(t,n,o,r,s){if(g.isFunction(r))return r.call(this,n,o);if(s&&(n=o),!!g.isString(n)){if(g.isString(r))return n.indexOf(r)!==-1;if(g.isRegExp(r))return r.test(n)}}function ws(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,o,r)=>o.toUpperCase()+r)}function bs(t,n){const o=g.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+o,{value:function(s,a,l){return this[r].call(this,n,s,a,l)},configurable:!0})})}let oe=class{constructor(n){n&&this.set(n)}set(n,o,r){const s=this;function a(c,p,u){const d=xe(p);if(!d)throw new Error("header name must be a non-empty string");const i=g.findKey(s,d);(!i||s[i]===void 0||u===!0||u===void 0&&s[i]!==!1)&&(s[i||p]=Fe(c))}const l=(c,p)=>g.forEach(c,(u,d)=>a(u,d,p));if(g.isPlainObject(n)||n instanceof this.constructor)l(n,o);else if(g.isString(n)&&(n=n.trim())&&!ys(n))l(hs(n),o);else if(g.isObject(n)&&g.isIterable(n)){let c={},p,u;for(const d of n){if(!g.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[u=d[0]]=(p=c[u])?g.isArray(p)?[...p,d[1]]:[p,d[1]]:d[1]}l(c,o)}else n!=null&&a(o,n,r);return this}get(n,o){if(n=xe(n),n){const r=g.findKey(this,n);if(r){const s=this[r];if(!o)return s;if(o===!0)return gs(s);if(g.isFunction(o))return o.call(this,s,r);if(g.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,o){if(n=xe(n),n){const r=g.findKey(this,n);return!!(r&&this[r]!==void 0&&(!o||Ze(this,this[r],r,o)))}return!1}delete(n,o){const r=this;let s=!1;function a(l){if(l=xe(l),l){const c=g.findKey(r,l);c&&(!o||Ze(r,r[c],c,o))&&(delete r[c],s=!0)}}return g.isArray(n)?n.forEach(a):a(n),s}clear(n){const o=Object.keys(this);let r=o.length,s=!1;for(;r--;){const a=o[r];(!n||Ze(this,this[a],a,n,!0))&&(delete this[a],s=!0)}return s}normalize(n){const o=this,r={};return g.forEach(this,(s,a)=>{const l=g.findKey(r,a);if(l){o[l]=Fe(s),delete o[a];return}const c=n?ws(a):String(a).trim();c!==a&&delete o[a],o[c]=Fe(s),r[c]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const o=Object.create(null);return g.forEach(this,(r,s)=>{r!=null&&r!==!1&&(o[s]=n&&g.isArray(r)?r.join(", "):r)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,o])=>n+": "+o).join(`
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...o){const r=new this(n);return o.forEach(s=>r.set(s)),r}static accessor(n){const r=(this[rn]=this[rn]={accessors:{}}).accessors,s=this.prototype;function a(l){const c=xe(l);r[c]||(bs(s,l),r[c]=!0)}return g.isArray(n)?n.forEach(a):a(n),this}};oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),g.reduceDescriptors(oe.prototype,({value:t},n)=>{let o=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[o]=r}}}),g.freezeMethods(oe);function et(t,n){const o=this||Ee,r=n||o,s=oe.from(r.headers);let a=r.data;return g.forEach(t,function(c){a=c.call(o,a,s.normalize(),n?n.status:void 0)}),s.normalize(),a}function sn(t){return!!(t&&t.__CANCEL__)}function ye(t,n,o){v.call(this,t??"canceled",v.ERR_CANCELED,n,o),this.name="CanceledError"}g.inherits(ye,v,{__CANCEL__:!0});function an(t,n,o){const r=o.config.validateStatus;!o.status||!r||r(o.status)?t(o):n(new v("Request failed with status code "+o.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function Cs(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function ks(t,n){t=t||10;const o=new Array(t),r=new Array(t);let s=0,a=0,l;return n=n!==void 0?n:1e3,function(p){const u=Date.now(),d=r[a];l||(l=u),o[s]=p,r[s]=u;let i=a,C=0;for(;i!==s;)C+=o[i++],i=i%t;if(s=(s+1)%t,s===a&&(a=(a+1)%t),u-l<n)return;const y=d&&u-d;return y?Math.round(C*1e3/y):void 0}}function _s(t,n){let o=0,r=1e3/n,s,a;const l=(u,d=Date.now())=>{o=d,s=null,a&&(clearTimeout(a),a=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),i=d-o;i>=r?l(u,d):(s=u,a||(a=setTimeout(()=>{a=null,l(s)},r-i)))},()=>s&&l(s)]}const Ae=(t,n,o=3)=>{let r=0;const s=ks(50,250);return _s(a=>{const l=a.loaded,c=a.lengthComputable?a.total:void 0,p=l-r,u=s(p),d=l<=c;r=l;const i={loaded:l,total:c,progress:c?l/c:void 0,bytes:p,rate:u||void 0,estimated:u&&c&&d?(c-l)/u:void 0,event:a,lengthComputable:c!=null,[n?"download":"upload"]:!0};t(i)},o)},ln=(t,n)=>{const o=t!=null;return[r=>n[0]({lengthComputable:o,total:t,loaded:r}),n[1]]},cn=t=>(...n)=>g.asap(()=>t(...n)),Es=te.hasStandardBrowserEnv?((t,n)=>o=>(o=new URL(o,te.origin),t.protocol===o.protocol&&t.host===o.host&&(n||t.port===o.port)))(new URL(te.origin),te.navigator&&/(msie|trident)/i.test(te.navigator.userAgent)):()=>!0,xs=te.hasStandardBrowserEnv?{write(t,n,o,r,s,a){const l=[t+"="+encodeURIComponent(n)];g.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),g.isString(r)&&l.push("path="+r),g.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ss(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ns(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function dn(t,n,o){let r=!Ss(n);return t&&(r||o==!1)?Ns(t,n):n}const un=t=>t instanceof oe?{...t}:t;function pe(t,n){n=n||{};const o={};function r(u,d,i,C){return g.isPlainObject(u)&&g.isPlainObject(d)?g.merge.call({caseless:C},u,d):g.isPlainObject(d)?g.merge({},d):g.isArray(d)?d.slice():d}function s(u,d,i,C){if(g.isUndefined(d)){if(!g.isUndefined(u))return r(void 0,u,i,C)}else return r(u,d,i,C)}function a(u,d){if(!g.isUndefined(d))return r(void 0,d)}function l(u,d){if(g.isUndefined(d)){if(!g.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function c(u,d,i){if(i in n)return r(u,d);if(i in t)return r(void 0,u)}const p={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(u,d,i)=>s(un(u),un(d),i,!0)};return g.forEach(Object.keys(Object.assign({},t,n)),function(d){const i=p[d]||s,C=i(t[d],n[d],d);g.isUndefined(C)&&i!==c||(o[d]=C)}),o}const fn=t=>{const n=pe({},t);let{data:o,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:l,auth:c}=n;n.headers=l=oe.from(l),n.url=en(dn(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let p;if(g.isFormData(o)){if(te.hasStandardBrowserEnv||te.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((p=l.getContentType())!==!1){const[u,...d]=p?p.split(";").map(i=>i.trim()).filter(Boolean):[];l.setContentType([u||"multipart/form-data",...d].join("; "))}}if(te.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(n)),r||r!==!1&&Es(n.url))){const u=s&&a&&xs.read(a);u&&l.set(s,u)}return n},Bs=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(o,r){const s=fn(t);let a=s.data;const l=oe.from(s.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:u}=s,d,i,C,y,w;function k(){y&&y(),w&&w(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function _(){if(!m)return;const B=oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),U={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:B,config:t,request:m};an(function(M){o(M),k()},function(M){r(M),k()},U),m=null}"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(_)},m.onabort=function(){m&&(r(new v("Request aborted",v.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const U=s.transitional||nn;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new v(T,U.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,t,m)),m=null},a===void 0&&l.setContentType(null),"setRequestHeader"in m&&g.forEach(l.toJSON(),function(T,U){m.setRequestHeader(U,T)}),g.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),u&&([C,w]=Ae(u,!0),m.addEventListener("progress",C)),p&&m.upload&&([i,y]=Ae(p),m.upload.addEventListener("progress",i),m.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(d=B=>{m&&(r(!B||B.type?new ye(null,t,m):B),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const S=Cs(s.url);if(S&&te.protocols.indexOf(S)===-1){r(new v("Unsupported protocol "+S+":",v.ERR_BAD_REQUEST,t));return}m.send(a||null)})},Rs=(t,n)=>{const{length:o}=t=t?t.filter(Boolean):[];if(n||o){let r=new AbortController,s;const a=function(u){if(!s){s=!0,c();const d=u instanceof Error?u:this.reason;r.abort(d instanceof v?d:new ye(d instanceof Error?d.message:d))}};let l=n&&setTimeout(()=>{l=null,a(new v(`timeout ${n} of ms exceeded`,v.ETIMEDOUT))},n);const c=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),t=null)};t.forEach(u=>u.addEventListener("abort",a));const{signal:p}=r;return p.unsubscribe=()=>g.asap(c),p}},Ts=function*(t,n){let o=t.byteLength;if(o<n){yield t;return}let r=0,s;for(;r<o;)s=r+n,yield t.slice(r,s),r=s},Vs=async function*(t,n){for await(const o of Ds(t))yield*Ts(o,n)},Ds=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:o,value:r}=await n.read();if(o)break;yield r}}finally{await n.cancel()}},pn=(t,n,o,r)=>{const s=Vs(t,n);let a=0,l,c=p=>{l||(l=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:u,value:d}=await s.next();if(u){c(),p.close();return}let i=d.byteLength;if(o){let C=a+=i;o(C)}p.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(p){return c(p),s.return()}},{highWaterMark:2})},Me=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mn=Me&&typeof ReadableStream=="function",Os=Me&&(typeof TextEncoder=="function"?(t=>n=>t.encode(n))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),hn=(t,...n)=>{try{return!!t(...n)}catch{return!1}},Is=mn&&hn(()=>{let t=!1;const n=new Request(te.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!n}),gn=64*1024,tt=mn&&hn(()=>g.isReadableStream(new Response("").body)),Pe={stream:tt&&(t=>t.body)};Me&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!Pe[n]&&(Pe[n]=g.isFunction(t[n])?o=>o[n]():(o,r)=>{throw new v(`Response type '${n}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const Fs=async t=>{if(t==null)return 0;if(g.isBlob(t))return t.size;if(g.isSpecCompliantForm(t))return(await new Request(te.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(g.isArrayBufferView(t)||g.isArrayBuffer(t))return t.byteLength;if(g.isURLSearchParams(t)&&(t=t+""),g.isString(t))return(await Os(t)).byteLength},As=async(t,n)=>{const o=g.toFiniteNumber(t.getContentLength());return o??Fs(n)},nt={http:ns,xhr:Bs,fetch:Me&&(async t=>{let{url:n,method:o,data:r,signal:s,cancelToken:a,timeout:l,onDownloadProgress:c,onUploadProgress:p,responseType:u,headers:d,withCredentials:i="same-origin",fetchOptions:C}=fn(t);u=u?(u+"").toLowerCase():"text";let y=Rs([s,a&&a.toAbortSignal()],l),w;const k=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let m;try{if(p&&Is&&o!=="get"&&o!=="head"&&(m=await As(d,r))!==0){let U=new Request(n,{method:"POST",body:r,duplex:"half"}),j;if(g.isFormData(r)&&(j=U.headers.get("content-type"))&&d.setContentType(j),U.body){const[M,x]=ln(m,Ae(cn(p)));r=pn(U.body,gn,M,x)}}g.isString(i)||(i=i?"include":"omit");const _="credentials"in Request.prototype;w=new Request(n,{...C,signal:y,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:_?i:void 0});let S=await fetch(w);const B=tt&&(u==="stream"||u==="response");if(tt&&(c||B&&k)){const U={};["status","statusText","headers"].forEach(N=>{U[N]=S[N]});const j=g.toFiniteNumber(S.headers.get("content-length")),[M,x]=c&&ln(j,Ae(cn(c),!0))||[];S=new Response(pn(S.body,gn,M,()=>{x&&x(),k&&k()}),U)}u=u||"text";let T=await Pe[g.findKey(Pe,u)||"text"](S,t);return!B&&k&&k(),await new Promise((U,j)=>{an(U,j,{data:T,headers:oe.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:w})})}catch(_){throw k&&k(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,t,w),{cause:_.cause||_}):v.from(_,_&&_.code,t,w)}})};g.forEach(nt,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const yn=t=>`- ${t}`,Ms=t=>g.isFunction(t)||t===null||t===!1,wn={getAdapter:t=>{t=g.isArray(t)?t:[t];const{length:n}=t;let o,r;const s={};for(let a=0;a<n;a++){o=t[a];let l;if(r=o,!Ms(o)&&(r=nt[(l=String(o)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${l}'`);if(r)break;s[l||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let l=n?a.length>1?`since :
4
4
  `+a.map(yn).join(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@utogether/components",
3
3
  "private": false,
4
- "version": "3.0.0-beta.49",
4
+ "version": "3.0.0-beta.50",
5
5
  "description": "",
6
6
  "main": "dist/components.umd.js",
7
7
  "module": "dist/components.es.js",