@ecan-bi/indicator-library 1.0.67 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/editor.worker-02df2e61.js +1 -1
- package/dist/assets/json.worker-867823a6.js +1 -1
- package/dist/assets/ts.worker-7254b425.js +1 -1
- package/dist/index.es.js +4210 -3926
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/indicator/indicator-library/data-config/DataConfig.vue.d.ts +1 -0
- package/types/indicator/indicator-library/data-config/variable-group/VariableItem.vue.d.ts +3 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(Ce,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(Ce=typeof globalThis<"u"?globalThis:Ce||self,e(Ce["@ecan-bi/indicator-library"]={},Ce.Vue,Ce.LodashEs,Ce.AntDesignVue,Ce.Draggable,null,null,Ce.Dayjs,null,Ce.MonacoEditor,null,Ce.Echarts))})(this,function(Ce,e,Z,v,Tt,Cf,wf,se,kf,er,_f,tr){var Za;"use strict";function nr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const or=nr(tr),co=(t,n)=>{if(t.install=o=>{for(const a of[t,...Object.values(n??{})])o.component(a.name,a)},n)for(const[o,a]of Object.entries(n))t[o]=a;return t},ve="$request",Be=((Za=window==null?void 0:window.config)==null?void 0:Za.indicatorURL)||"",Me="INDICATOR_TOKEN",po="DATA_LIST",Ye="SELECTED_COMPONENT",fe="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",uo="SHOW_STYLE_CONFIG",fo="REFRESH_DATA",Ut="CHARTS_OPTIONS",mo="TABLE_OPTIONS",ar=18,hn="UPDATE_CHARTS_OPTIONS",yn="UPDATE_TABLE_OPTIONS",gn="SOURCE_TYPE",ho="CHANGE_CONDITION",yo="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",Gt="UPDATE_USED_COMPONENT",go="MAP_ATTRIBUTE_PROPS",bo="PAGE_CONFIG",Co={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},rr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},lr=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:Tt},setup(){var N;const t=e.inject(ve),n=e.unref(e.inject(Me)),o=e.inject(fe),a=e.inject(Se),r=e.computed(()=>{var h;return((h=e.unref(o))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),c=e.ref([]),d=(N=window==null?void 0:window.config)==null?void 0:N.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),s=async()=>{var A,x;const h=r.value;i.value=!0;try{const{data:L}=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});i.value=!1,L.success&&((A=c.value)==null||A.push(l),c.value=(x=c.value)==null?void 0:x.concat(p([L.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],A)=>{const x=[];return h.forEach(L=>{x.push({id:L.id,pId:A??L.parentId,value:L.id,title:L.name,isLeaf:L.leaf||!1,nature:L.nature,selectable:L.leaf||!1})}),x},u=async(h,A)=>{var D;let x=0;if(h){const{value:V}=h.dataRef;x=V}const{data:L}=await t.post(`${Be}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:x},{headers:{Authentication:n,operateContext:"ygt"}});L.success&&(c.value=(D=e.unref(c))==null?void 0:D.concat(p(L.data)),A&&e.unref(r)&&await s())},m=h=>{C(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(po,{setDataList:h=>h}),_=e.ref(!1),f=e.ref([]),C=async h=>{if(h){f.value=[],_.value=!0;try{const A=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:x,data:L={}}=A.data;if(_.value=!1,x){const{rows:D=[]}=L;D==null||D.forEach(V=>{var I;const B=((I=V==null?void 0:V.dataViewColumns)==null?void 0:I.map(H=>({...H,show:!0})))||[];f.value=[...e.unref(f),...B]}),g(e.unref(f))}}catch{_.value=!1}}},w=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,A)=>{const x=A[h.oldIndex];if(x){const L={...x,label:x.name,name:x.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(L))}};return e.onMounted(async()=>{await u(void 0,!0),C(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:c,treeSelectLoading:i,dataViewList:f,dataViewLoading:_,onDataViewIdChange:m,mapGenericType:w,onDragStart:k}}}),Ef="",oe=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},ir={class:"data-view-list"},sr={class:"columns"},cr={class:"column-item"},dr={class:"column-item-name"};function pr(t,n,o,a,r,i){const c=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(c,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",sr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:t.dataViewList,"onUpdate:modelValue":n[0]||(n[0]=s=>t.dataViewList=s),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:n[1]||(n[1]=s=>t.onDragStart(s,t.dataViewList))},{item:e.withCtx(({element:s})=>[e.createElementVNode("div",cr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(s.genericType))+"】 ",1),e.createElementVNode("span",dr,e.toDisplayString(s.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ur=oe(lr,[["render",pr],["__scopeId","data-v-4a66f7d2"]]);function Ve(t,n){fr(t)&&(t="100%");var o=mr(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function fr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function mr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function zt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bn(t){return t.length===1?"0"+t:String(t)}function yr(t,n,o){return{r:Ve(t,255)*255,g:Ve(n,255)*255,b:Ve(o,255)*255}}function Cn(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function gr(t,n,o){var a,r,i;if(t=Ve(t,360),n=Ve(n,100),o=Ve(o,100),n===0)r=o,i=o,a=o;else{var c=o<.5?o*(1+n):o+n-o*n,d=2*o-c;a=Cn(d,c,t+1/3),r=Cn(d,c,t),i=Cn(d,c,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function br(t,n,o){t=Ve(t,255),n=Ve(n,255),o=Ve(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),i=0,c=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(n-o)/d+(n<o?6:0);break;case n:i=(o-t)/d+2;break;case o:i=(t-n)/d+4;break}i/=6}return{h:i,s:l,v:c}}function Cr(t,n,o){t=Ve(t,360)*6,n=Ve(n,100),o=Ve(o,100);var a=Math.floor(t),r=t-a,i=o*(1-n),c=o*(1-r*n),d=o*(1-(1-r)*n),l=a%6,s=[o,c,i,i,d,o][l],p=[d,o,o,c,i,i][l],u=[i,i,d,o,o,c][l];return{r:s*255,g:p*255,b:u*255}}function wr(t,n,o,a){var r=[bn(Math.round(t).toString(16)),bn(Math.round(n).toString(16)),bn(Math.round(o).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function wo(t){return Ne(t)/255}function Ne(t){return parseInt(t,16)}var ko={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Et(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,i=null,c=!1,d=!1;return typeof t=="string"&&(t=xr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(n=yr(t.r,t.g,t.b),c=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=zt(t.s),r=zt(t.v),n=Cr(t.h,a,r),c=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=zt(t.s),i=zt(t.l),n=gr(t.h,a,i),c=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=hr(o),{ok:c,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var kr="[-\\+]?\\d+%?",_r="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(_r,")|(?:").concat(kr,")"),wn="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),kn="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wn),rgba:new RegExp("rgba"+kn),hsl:new RegExp("hsl"+wn),hsla:new RegExp("hsla"+kn),hsv:new RegExp("hsv"+wn),hsva:new RegExp("hsva"+kn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function xr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(ko[t])t=ko[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=je.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=je.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=je.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=je.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=je.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=je.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=je.hex8.exec(t),o?{r:Ne(o[1]),g:Ne(o[2]),b:Ne(o[3]),a:wo(o[4]),format:n?"name":"hex8"}:(o=je.hex6.exec(t),o?{r:Ne(o[1]),g:Ne(o[2]),b:Ne(o[3]),format:n?"name":"hex"}:(o=je.hex4.exec(t),o?{r:Ne(o[1]+o[1]),g:Ne(o[2]+o[2]),b:Ne(o[3]+o[3]),a:wo(o[4]+o[4]),format:n?"name":"hex8"}:(o=je.hex3.exec(t),o?{r:Ne(o[1]+o[1]),g:Ne(o[2]+o[2]),b:Ne(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Ht=2,_o=.16,Sr=.05,Nr=.05,Ar=.15,xo=5,So=4,Tr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function No(t){var n=t.r,o=t.g,a=t.b,r=br(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function Yt(t){var n=t.r,o=t.g,a=t.b;return"#".concat(wr(n,o,a,!1))}function Er(t,n,o){var a=o/100,r={r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b};return r}function Ao(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-Ht*n:Math.round(t.h)+Ht*n:a=o?Math.round(t.h)+Ht*n:Math.round(t.h)-Ht*n,a<0?a+=360:a>=360&&(a-=360),a}function To(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-_o*n:n===So?a=t.s+_o:a=t.s+Sr*n,a>1&&(a=1),o&&n===xo&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Eo(t,n,o){var a;return o?a=t.v+Nr*n:a=t.v-Ar*n,a>1&&(a=1),Number(a.toFixed(2))}function _n(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=Et(t),r=xo;r>0;r-=1){var i=No(a),c=Yt(Et({h:Ao(i,r,!0),s:To(i,r,!0),v:Eo(i,r,!0)}));o.push(c)}o.push(Yt(a));for(var d=1;d<=So;d+=1){var l=No(a),s=Yt(Et({h:Ao(l,d),s:To(l,d),v:Eo(l,d)}));o.push(s)}return n.theme==="dark"?Tr.map(function(p){var u=p.index,m=p.opacity,g=Yt(Er(Et(n.backgroundColor||"#141414"),Et(o[u]),m*100));return g}):o}var xn={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Sn={},Nn={};Object.keys(xn).forEach(function(t){Sn[t]=_n(xn[t]),Sn[t].primary=Sn[t][5],Nn[t]=_n(xn[t],{theme:"dark",backgroundColor:"#141414"}),Nn[t].primary=Nn[t][5]});var Lo=[],Lt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Br(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Vr(t,n){if(n=n||{},t===void 0)throw new Error(Lr);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=Lo.indexOf(a);r===-1&&(r=Lo.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][o]!==void 0?i=Lt[r][o]:(i=Lt[r][o]=Br(),o==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}function Bo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Or(t,r,o[r])})}return t}function Or(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Ir(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function Fr(t,n){Ir(t,"[@ant-design/icons-vue] ".concat(n))}function Vo(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function An(t,n,o){return o?e.h(t.tag,Bo({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return An(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bo({key:n},t.attrs),(t.children||[]).map(function(a,r){return An(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function Oo(t){return _n(t)[0]}function Io(t){return t?Array.isArray(t)?t:[t]:[]}var Dr=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.69 */
|
|
2
|
+
(function(we,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(we=typeof globalThis<"u"?globalThis:we||self,e(we["@ecan-bi/indicator-library"]={},we.Vue,we.LodashEs,we.AntDesignVue,we.Draggable,null,null,we.Dayjs,null,we.MonacoEditor,null,we.Echarts))})(this,function(we,e,Z,$,Tt,kf,_f,se,xf,er,Sf,tr){var Za;"use strict";function or(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const nr=or(tr),pn=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Me="$request",Ve=((Za=window==null?void 0:window.config)==null?void 0:Za.indicatorURL)||"",ve="INDICATOR_TOKEN",un="DATA_LIST",Ye="SELECTED_COMPONENT",fe="GRAPHIC_CONFIG",xe="UPDATE_GRAPHIC_CONFIG",fn="SHOW_STYLE_CONFIG",mn="REFRESH_DATA",Gt="CHARTS_OPTIONS",hn="TABLE_OPTIONS",ar=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",yn="CHANGE_CONDITION",gn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",zt="UPDATE_USED_COMPONENT",bn="MAP_ATTRIBUTE_PROPS",Cn="PAGE_CONFIG",wn={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},rr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},lr=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:Tt},setup(){var x;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(fe),a=e.inject(xe),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(x=window==null?void 0:window.config)==null?void 0:x.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var A,L;const h=r.value;i.value=!0;try{const{data:O}=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,O.success&&((A=s.value)==null||A.push(l),s.value=(L=s.value)==null?void 0:L.concat(p([O.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],A)=>{const L=[];return h.forEach(O=>{L.push({id:O.id,pId:A??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),L},u=async(h,A)=>{var N;let L=0;if(h){const{value:V}=h.dataRef;L=V}const{data:O}=await t.post(`${Ve}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:L},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(s.value=(N=e.unref(s))==null?void 0:N.concat(p(O.data)),A&&e.unref(r)&&await c())},m=h=>{C(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(un,{setDataList:h=>h}),w=e.ref(!1),f=e.ref([]),C=async h=>{if(h){f.value=[],w.value=!0;try{const A=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:L,data:O={}}=A.data;if(w.value=!1,L){const{rows:N=[]}=O;N==null||N.forEach(V=>{var F;const B=((F=V==null?void 0:V.dataViewColumns)==null?void 0:F.map(H=>({...H,show:!0})))||[];f.value=[...e.unref(f),...B]}),g(e.unref(f))}}catch{w.value=!1}}},_=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,A)=>{const L=A[h.oldIndex];if(L){const O={...L,label:L.name,name:L.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await u(void 0,!0),C(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:w,onDataViewIdChange:m,mapGenericType:_,onDragStart:k}}}),Vf="",oe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ir={class:"data-view-list"},sr={class:"columns"},cr={class:"column-item"},dr={class:"column-item-name"};function pr(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",sr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",cr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",dr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ur=oe(lr,[["render",pr],["__scopeId","data-v-4a66f7d2"]]);function Be(t,o){fr(t)&&(t="100%");var n=mr(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function fr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function mr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ht(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function yr(t,o,n){return{r:Be(t,255)*255,g:Be(o,255)*255,b:Be(n,255)*255}}function Co(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function gr(t,o,n){var a,r,i;if(t=Be(t,360),o=Be(o,100),n=Be(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function br(t,o,n){t=Be(t,255),o=Be(o,255),n=Be(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function Cr(t,o,n){t=Be(t,360)*6,o=Be(o,100),n=Be(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function wr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function kn(t){return Ae(t)/255}function Ae(t){return parseInt(t,16)}var _n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=xr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=yr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=Ht(t.s),r=Ht(t.v),o=Cr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=Ht(t.s),i=Ht(t.l),o=gr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=hr(n),{ok:s,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var kr="[-\\+]?\\d+%?",_r="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(_r,")|(?:").concat(kr,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function xr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(_n[t])t=_n[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),a:kn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),a:kn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Yt=2,xn=.16,Sr=.05,Nr=.05,Ar=.15,Sn=5,Nn=4,Tr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function An(t){var o=t.r,n=t.g,a=t.b,r=br(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Wt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(wr(o,n,a,!1))}function Er(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function Tn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Yt*o:Math.round(t.h)+Yt*o:a=n?Math.round(t.h)+Yt*o:Math.round(t.h)-Yt*o,a<0?a+=360:a>=360&&(a-=360),a}function En(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-xn*o:o===Nn?a=t.s+xn:a=t.s+Sr*o,a>1&&(a=1),n&&o===Sn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Ln(t,o,n){var a;return n?a=t.v+Nr*o:a=t.v-Ar*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=Sn;r>0;r-=1){var i=An(a),s=Wt(Et({h:Tn(i,r,!0),s:En(i,r,!0),v:Ln(i,r,!0)}));n.push(s)}n.push(Wt(a));for(var d=1;d<=Nn;d+=1){var l=An(a),c=Wt(Et({h:Tn(l,d),s:En(l,d),v:Ln(l,d)}));n.push(c)}return o.theme==="dark"?Tr.map(function(p){var u=p.index,m=p.opacity,g=Wt(Er(Et(o.backgroundColor||"#141414"),Et(n[u]),m*100));return g}):n}var xo={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Vn=[],Lt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Vr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Br(t,o){if(o=o||{},t===void 0)throw new Error(Lr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Vn.indexOf(a);r===-1&&(r=Vn.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][n]!==void 0?i=Lt[r][n]:(i=Lt[r][n]=Vr(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}function Bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Or(t,r,n[r])})}return t}function Or(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Ir(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Fr(t,o){Ir(t,"[@ant-design/icons-vue] ".concat(o))}function On(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return _o(t)[0]}function Fn(t){return t?Array.isArray(t)?t:[t]:[]}var Dr=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
5
5
|
color: inherit;
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
transform: rotate(360deg);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hr(t,
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jr(t,n){if(t){if(typeof t=="string")return vo(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return vo(t,n)}}function vo(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function Zr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,i=!1,c,d;try{for(o=o.call(t);!(r=(c=o.next()).done)&&(a.push(c.value),!(n&&a.length===n));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw d}}return a}}function el(t){if(Array.isArray(t))return t}function Mo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){En(t,r,o[r])})}return t}function En(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function tl(t,n){if(t==null)return{};var o=nl(t,n),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function nl(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}$o("#1890ff");var ht=function(n,o){var a,r=Mo({},n,o.attrs),i=r.class,c=r.icon,d=r.spin,l=r.rotate,s=r.tabindex,p=r.twoToneColor,u=r.onClick,m=tl(r,Kr),g=(a={anticon:!0},En(a,"anticon-".concat(c.name),!!c.name),En(a,i,i),a),_=d===""||d||c.name==="loading"?"anticon-spin":"",f=s;f===void 0&&u&&(f=-1,m.tabindex=f);var C=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,w=Io(p),k=Qr(w,2),N=k[0],h=k[1];return e.createVNode("span",Mo({role:"img","aria-label":c.name},m,{onClick:u,class:g}),[e.createVNode(Tn,{class:_,icon:c,primaryColor:N,secondaryColor:h,style:C},null)])};ht.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},ht.displayName="AntdIcon",ht.inheritAttrs=!1,ht.getTwoToneColor=qr,ht.setTwoToneColor=$o;const ye=ht;var ol={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const al=ol;function Po(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){rl(t,r,o[r])})}return t}function rl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ln=function(n,o){var a=Po({},n,o.attrs);return e.createVNode(ye,Po({},a,{icon:al}),null)};Ln.displayName="AppstoreAddOutlined",Ln.inheritAttrs=!1;const jo=Ln;var ll={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const il=ll;function Ro(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){sl(t,r,o[r])})}return t}function sl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Bn=function(n,o){var a=Ro({},n,o.attrs);return e.createVNode(ye,Ro({},a,{icon:il}),null)};Bn.displayName="CaretDownOutlined",Bn.inheritAttrs=!1;const cl=Bn;var dl={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const pl=dl;function Uo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ul(t,r,o[r])})}return t}function ul(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Vn=function(n,o){var a=Uo({},n,o.attrs);return e.createVNode(ye,Uo({},a,{icon:pl}),null)};Vn.displayName="CaretRightOutlined",Vn.inheritAttrs=!1;const fl=Vn;var ml={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const hl=ml;function Go(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){yl(t,r,o[r])})}return t}function yl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var On=function(n,o){var a=Go({},n,o.attrs);return e.createVNode(ye,Go({},a,{icon:hl}),null)};On.displayName="CloseOutlined",On.inheritAttrs=!1;const qt=On;var gl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const bl=gl;function zo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Cl(t,r,o[r])})}return t}function Cl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var In=function(n,o){var a=zo({},n,o.attrs);return e.createVNode(ye,zo({},a,{icon:bl}),null)};In.displayName="CopyOutlined",In.inheritAttrs=!1;const wl=In;var kl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const _l=kl;function Ho(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){xl(t,r,o[r])})}return t}function xl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Fn=function(n,o){var a=Ho({},n,o.attrs);return e.createVNode(ye,Ho({},a,{icon:_l}),null)};Fn.displayName="DeleteOutlined",Fn.inheritAttrs=!1;const Sl=Fn;var Nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const Al=Nl;function Yo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Tl(t,r,o[r])})}return t}function Tl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Dn=function(n,o){var a=Yo({},n,o.attrs);return e.createVNode(ye,Yo({},a,{icon:Al}),null)};Dn.displayName="DoubleRightOutlined",Dn.inheritAttrs=!1;const El=Dn;var Ll={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const Bl=Ll;function Wo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Vl(t,r,o[r])})}return t}function Vl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var $n=function(n,o){var a=Wo({},n,o.attrs);return e.createVNode(ye,Wo({},a,{icon:Bl}),null)};$n.displayName="DownOutlined",$n.inheritAttrs=!1;const Ol=$n;var Il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const Fl=Il;function qo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Dl(t,r,o[r])})}return t}function Dl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var vn=function(n,o){var a=qo({},n,o.attrs);return e.createVNode(ye,qo({},a,{icon:Fl}),null)};vn.displayName="InfoCircleOutlined",vn.inheritAttrs=!1;const $l=vn;var vl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const Ml=vl;function Ko(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Pl(t,r,o[r])})}return t}function Pl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Mn=function(n,o){var a=Ko({},n,o.attrs);return e.createVNode(ye,Ko({},a,{icon:Ml}),null)};Mn.displayName="MenuOutlined",Mn.inheritAttrs=!1;const Qo=Mn;var jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Rl=jl;function Xo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ul(t,r,o[r])})}return t}function Ul(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Pn=function(n,o){var a=Xo({},n,o.attrs);return e.createVNode(ye,Xo({},a,{icon:Rl}),null)};Pn.displayName="MinusCircleOutlined",Pn.inheritAttrs=!1;const Gl=Pn;var zl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const Hl=zl;function Jo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Yl(t,r,o[r])})}return t}function Yl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var jn=function(n,o){var a=Jo({},n,o.attrs);return e.createVNode(ye,Jo({},a,{icon:Hl}),null)};jn.displayName="PlusCircleOutlined",jn.inheritAttrs=!1;const Wl=jn;var ql={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Kl=ql;function Zo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ql(t,r,o[r])})}return t}function Ql(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Rn=function(n,o){var a=Zo({},n,o.attrs);return e.createVNode(ye,Zo({},a,{icon:Kl}),null)};Rn.displayName="PlusOutlined",Rn.inheritAttrs=!1;const Xl=Rn;var Jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ea(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ei(t,r,o[r])})}return t}function ei(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Un=function(n,o){var a=ea({},n,o.attrs);return e.createVNode(ye,ea({},a,{icon:Zl}),null)};Un.displayName="QuestionCircleOutlined",Un.inheritAttrs=!1;const ti=Un;var ni={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const oi=ni;function ta(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ai(t,r,o[r])})}return t}function ai(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Gn=function(n,o){var a=ta({},n,o.attrs);return e.createVNode(ye,ta({},a,{icon:oi}),null)};Gn.displayName="ReloadOutlined",Gn.inheritAttrs=!1;const ri=Gn;var li={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const ii=li;function na(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){si(t,r,o[r])})}return t}function si(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var zn=function(n,o){var a=na({},n,o.attrs);return e.createVNode(ye,na({},a,{icon:ii}),null)};zn.displayName="SettingOutlined",zn.inheritAttrs=!1;const ci=zn,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:fl,CaretDownOutlined:cl,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:Tt},setup(){var A;const t=(A=window==null?void 0:window.config)==null?void 0:A.pageId,n=e.inject(ve),o=e.unref(e.inject(Me)),a=e.inject(Ye),r=e.computed(()=>{var x;return(x=e.unref(a))==null?void 0:x.graphicConfig}),i=e.computed(()=>{var x;return(x=e.unref(r))==null?void 0:x.dataSourceId}),c=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),s=e.ref(""),p=async()=>{d.value=!0;const x={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(s),pageId:t,dataSourceId:e.unref(i)};try{const L=await n.post(`${Be}/diagram/sourceList`,x,{headers:{Authentication:o,operateContext:"ygt"}});d.value=!1;const{success:D,data:V={}}=L.data;if(D){const{rows:B=[],total:I=0}=V;B==null||B.forEach(H=>{var P;H.show=!1,(P=H.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),c.value=B,l.totalResult=+I}}catch{d.value=!1}},u=x=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[x],m=x=>{c.value[x].show=!c.value[x].show},g=()=>{l.currentPage=1,p()},_=Z.debounce(()=>{l.currentPage=1,p()},200),f=(x,L)=>{l.pageSize=L,l.currentPage=x,p()};e.onMounted(()=>{p()});const C=e.inject(fe),w=e.computed(()=>{const x=["classificationList","rowHeaderList","dimensionList"];let L=[];for(const D in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),D)&&x.includes(D)){const V=e.unref(C)[D];Array.isArray(V)&&(L=L.concat(V))}return L});return{dataSourceList:c,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:_,onPaginationChange:f,searchText:s,setItemDisabled:(x=[])=>{let L=!1;for(const D of e.unref(w))if(!x.find(B=>B.typeGuid===D.typeGuid)){L=!0;break}return L},onDragStart:(x,L)=>{const D=L.dataViewColumns[x.oldIndex];D&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...D,dataTo:L.dataTo})),L!=null&&L.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(L.hrpIndexVariates)))},getSourceType:x=>x==="0"?"【指标库】":x==="1"?"【视图】":"【其他】"}}}),Lf="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,n,o,a,r,i){const c=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=e.resolveComponent("caret-right-outlined"),s=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(c,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:_=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(s,{modelValue:m.dataViewColumns,"onUpdate:modelValue":_=>m.dataViewColumns=_,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:_=>t.onDragStart(_,m)},{item:e.withCtx(({element:_})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(_.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(_.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":n[1]||(n[1]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Ci=oe(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:ur},setup(){return{source:e.inject(gn)}}});function ki(t,n,o,a,r,i){const c=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(c,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),oa={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Tt,AModal:v.Modal,AButton:v.Button},setup(t,{expose:n}){var N;const o=(N=window==null?void 0:window.config)==null?void 0:N.pageId,a=e.inject(ve),r=e.unref(e.inject(Me)),i=e.inject(fe),c=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),s=e.ref([]),p=async()=>{try{const h=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:A,data:x=[]}=h.data;A&&(s.value=x==null?void 0:x.slice(0,200))}catch(h){console.error(h)}},u=()=>{var D;const h=((D=e.unref(i)[t.type])==null?void 0:D.slice())||[],A=h[t.index],{label:x,name:L}=t.item;A.sort={label:x,columnName:L,type:"CUSTOM",customOrderColumns:e.unref(s)},c({[t.type]:h})};let m=!1;const g=()=>{m=!0},_=e.ref(!1),f=()=>{_.value=!0},C=()=>{_.value=!1},w=()=>{m&&u(),m=!1,C()};return n({showModal:f}),e.watch(_,h=>{var A,x;if(h){const L=(x=(A=t.item)==null?void 0:A.sort)==null?void 0:x.customOrderColumns;L==null?p():s.value=L}else s.value=[];window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),{visible:_,onCancel:w,customSortList:s,onChange:g,onDeleteConfig:()=>{var D;const h=((D=e.unref(i)[t.type])==null?void 0:D.slice())||[],A=h[t.index],{label:x,name:L}=t.item;A.sort={label:x,columnName:L},c({[t.type]:h}),C()}}}}),Bf="",Si={class:"button-wrapper"},Ni={class:"sort-item"};function Ai(t,n,o,a,r,i){const c=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),l=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(l,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createVNode(c,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[0]=s=>t.customSortList=s),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:s})=>[e.createElementVNode("div",Ni,e.toDisplayString(s),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Ti=oe(xi,[["render",Ai],["__scopeId","data-v-8e16d201"]]),Ei=e.defineComponent({name:"CustomGroupModal",directives:{focus:oa},components:{CloseOutlined:qt,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){var U;const o=e.inject(ve),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(Me));let i=!1;const c=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),s=e.ref([]),p=e.computed(()=>{const y=e.unref(s).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(s).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(s).forEach(b=>{var E;(E=b.data)==null||E.forEach(F=>{F.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){v.message.error("创建分组名不能空");return}e.unref(p).has(y)?v.message.error("分组名已存在,请重新命名"):(e.unref(s).push({title:y,data:[]}),i=!0)},_=y=>{e.unref(s).splice(y,1),i=!0},f=e.ref(null),C=()=>{if(e.unref(m)===0){v.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){v.message.error("请选择移入分组");return}if(!e.unref(s)[y]){v.message.error("移入分组不存在,请重新选择");return}const b=[],E=e.unref(s).length;for(let F=0;F<E;F++){const $=e.unref(s)[F];e.unref(s)[F].data=$.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(s)[y].data=[...b,...e.unref(s)[y].data],i=!0},w=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},N=(y,b)=>{const E=y.target.value;e.unref(p).has(E)&&v.message.error("组名不能相同,请修改"),e.unref(s)[b].title=E,i=!0},h=e.inject(fe),A=e.inject(Se),x=e.computed(()=>e.unref(h).source),L=e.computed(()=>e.unref(h).dataViewId),D=e.ref(!1),V=()=>{var K,Q;const y=e.unref(s);let b="";e.unref(D)&&(b=(K=y[0])==null?void 0:K.title);const E=y==null?void 0:y.length,F={};for(let ee=1;ee<E;ee++){const re=y[ee]||{},{title:he,data:me}=re;F[he]=(me==null?void 0:me.map(Te=>Te.label))||[]}const $=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],G=$[t.index];G.customGroup={groupInfoMap:F,otherGroupName:b},A({[t.type]:$})},B=e.ref(!1),I=()=>{B.value=!0},H=()=>{B.value=!1},P=()=>{H(),i&&V(),i=!1},S=()=>{i=!0},O=new Set,T=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,E=y.groupInfoMap;(b===""||b==null)&&(D.value=!1),e.unref(s)[0]={title:b||"未分组",data:[]};let F=1;for(const $ in E)if(Object.prototype.hasOwnProperty.call(E,$)){const K=E[$].map(Q=>(O.add(Q),{label:Q,checked:!1}));e.unref(s)[F]={title:$,data:K},F++}await M()},M=async()=>{var y;try{const b=await o.post(`${Be}/diagram/groupvalue`,{source:e.unref(x),dataViewId:e.unref(L),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:F=[]}=b.data;if(E){const $=[];(y=F==null?void 0:F.slice(0,200))==null||y.forEach(G=>{O.has(G)||$.push({label:G,checked:!1})}),e.unref(s)[0].data=$}}catch(b){console.error(b)}};return e.watch(B,y=>{y&&T(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),n({showModal:I}),{visible:B,title:c,activeKey:l,customGroupList:s,onCancel:P,useOtherGroup:D,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:_,onMoveInGroup:C,selectGroupIndex:f,onEditTitle:w,onTitleChange:N,onFinishEditTitle:k,onUseOtherGroup:S,customGroupEditTitleList:u}}}),Vf="",Of="",Li={class:"custom-group-header"},Bi={class:"move-and-create"},Vi={class:"select-tip"},Oi={class:"select-count"},Ii={class:"create-group"},Fi={class:"custom-group-content"},Di=["onClick"],$i={class:"extra"},vi={class:"custom-group-list"},Mi={class:"text"};function Pi(t,n,o,a,r,i){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),s=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),_=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),C=e.resolveComponent("a-modal"),w=e.resolveDirective("focus");return e.openBlock(),e.createBlock(C,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Li,[e.createElementVNode("div",Bi,[e.createElementVNode("div",null,[e.createElementVNode("span",Vi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Oi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,N)=>(e.openBlock(),e.createBlock(c,{key:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ii,[e.createTextVNode(" 创建分组: "),e.createVNode(s,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":n[2]||(n[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Fi,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,N)=>(e.openBlock(),e.createBlock(_,{key:N},{header:e.withCtx(()=>[t.customGroupEditTitleList[N]?e.withDirectives((e.openBlock(),e.createBlock(s,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,N),onBlur:h=>t.onFinishEditTitle(N),onPressEnter:h=>t.onFinishEditTitle(N)},null,8,["value","onChange","onBlur","onPressEnter"])),[[w]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(N),["prevent","stop"])},e.toDisplayString(k.title),9,Di))]),extra:e.withCtx(()=>[e.createElementVNode("div",$i,[N===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),N!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(N),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,A)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":x=>h.checked=x,class:"custom-group",key:A},{default:e.withCtx(()=>[e.createElementVNode("span",Mi,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ji=oe(Ei,[["render",Pi],["__scopeId","data-v-7e3049d2"]]);let we=(t=21)=>{let n="",o=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=o[t]&63;a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a<63?n+="_":n+="-"}return n};var Ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Hn={},Ui={get exports(){return Hn},set exports(t){Hn=t}};(function(t,n){(function(o,a){t.exports=a()})(Ri,function(){var o="month",a="quarter";return function(r,i){var c=i.prototype;c.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var d=c.add;c.add=function(s,p){return s=Number(s),this.$utils().p(p)===a?this.add(3*s,o):d.bind(this)(s,p)};var l=c.startOf;c.startOf=function(s,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(s)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(o).startOf("day"):this.month(3*g+2).endOf(o).endOf("day")}return l.bind(this)(s,p)}}})})(Ui);const Gi=Hn;se.extend(Gi);const zi=e.defineComponent({name:"Condition",components:{CloseOutlined:qt,DownOutlined:Ol,AppstoreAddOutlined:jo,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption,MenuOutlined:Qo},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var it,st,Nt,ct,Ee,Qe,tt,nt,ze,dt,pt,ut,ot;const n=(it=window==null?void 0:window.config)==null?void 0:it.pageId,o=e.inject(fe),a=e.inject(ve),r=e.unref(e.inject(Me)),i=e.inject(yo),c=e.inject(Pe),d=e.ref(!1),l=se(),s=e.computed(()=>{var Y;const z=[];return(Y=e.unref(c))==null||Y.forEach(X=>{const{keyName:J="",id:te="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${te}-startTime`,label:`${J||te}-开始时间值`,keyName:`${J||te}-startTime`,id:te},{value:`${te}-endTime`,label:`${J||te}-结束时间值`,keyName:`${J||te}-endTime`,id:te}):z.push({value:te,label:`${J||te}`,keyName:`${J||te}`,id:te})}),z}),p=e.computed(()=>{var z;return(z=e.unref(o))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(o))==null?void 0:z.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},_=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],f=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),C=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),w=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],N=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(st=t.data)==null?void 0:st.fieldName,fieldType:(Nt=t.data)==null?void 0:Nt.fieldType,rule:(ct=t.data)==null?void 0:ct.rule,id:(Ee=t.data)==null?void 0:Ee.id,fieldValue:A(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(nt=t.data)==null?void 0:nt.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((dt=t.data)==null?void 0:dt.dataType)||"",componentId:((pt=t.data)==null?void 0:pt.componentId)||"",useCurrentTime:!!((ut=t.data)!=null&&ut.useCurrentTime),keyValue:(ot=t.data)==null?void 0:ot.keyValue});function A(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const J=e.unref(s).find(te=>te.keyName===X);return J?J.value:X}else return X}const x=e.ref(!1),L=e.computed(()=>h.value.fieldType==="DATE"),D=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","dimensionList"];if(X.includes(z)){let J=[];for(const te in e.unref(o))if(Object.prototype.hasOwnProperty.call(e.unref(o),te)&&!["controlList","sqlConditions"].includes(te)){const ce=e.unref(o)[te];Array.isArray(ce)&&(X.includes(te)?J=J.concat(ce.filter(Le=>Le.show)):J=J.concat(ce))}Y=J}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:V,deleteCondition:B,addCondition:I}=e.inject(ho,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),H=()=>{B(t.index,t.path)};e.watch(h,z=>{const Y=Z.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{h.value.fieldValue="",h.value.useCurrentTime=z});const P=z=>{var R;const Y=e.unref(D).find(W=>W.value===z)||{},{name:X,genericType:J,id:te,label:ce,typeGuid:Le,indexCode:At,indexCodeNum:j}=Y;h.value={id:te,fieldName:X,fieldType:J,label:ce,rule:"",fieldValue:J==="DATE"?null:void 0,targetSource:"",typeGuid:Le,indexCode:At,indexCodeNum:j,dataType:"",useCurrentTime:!1,keyValue:((R=e.unref(h))==null?void 0:R.keyValue)||we()}},S=z=>{const Y=e.unref(s).find(X=>X.value===z)||{};e.unref(h).componentId=Y.id||""},O=e.computed(()=>{const z=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),z==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),T=e.computed(()=>{let z="";const Y=e.unref(O).find(X=>X.value===e.unref(h).rule);return Y&&(z=Y.label),z}),M=e.computed(()=>{let z={fontSize:"12px"};return e.unref(T)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),U=e.ref([]),y=async()=>{var z;if(!(e.unref(U).length>0))try{const Y=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:J=[]}=Y.data;X&&(U.value=(z=J==null?void 0:J.slice(0,200))==null?void 0:z.map(te=>({label:te,value:te})))}catch(Y){console.error(Y)}},b=z=>{e.unref(h).rule=z,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&y()},E=z=>{e.unref(h).dataType=z,e.unref(h).fieldValue=""},F=e.ref(),$=z=>{F.value=z,e.unref(h).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var J,te,ce,Le,At,j,R,W;if(h.value.dataType=((J=t.data)==null?void 0:J.dataType)||"",h.value.componentId=((te=t.data)==null?void 0:te.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(Le=t.data)==null?void 0:Le.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((At=t.data)==null?void 0:At.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const ae=e.unref(h).calcWays[0];if(ae){const ne=ae.split("-");e.unref(f).expression=ne[0],e.unref(f).around=ne[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((j=t.data)==null?void 0:j.radioValue)||"";const ae=e.unref(C).find(ne=>{var le;return ne.key===((le=t.data)==null?void 0:le.activeKey)});ae&&Te(ae,t.data)}}else F.value=((W=(R=t.data)==null?void 0:R.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=h.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=z=>{if(e.unref(h).activeKey===z){e.unref(C)[z].radioValue=e.unref(h).radioValue,e.unref(C)[e.unref(h).activeKey]&&(e.unref(C)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(C)[z].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(C)[z].afterNum=e.unref(h).calcWays[0]));return}e.unref(C).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{m.value=!0;const X=z.target.value,J=Y.type,te=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),Le=Y.afterNum;Y.value=de(X,J,te,ce,Le)},ee=z=>{const Y=e.unref(h).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const J=e.unref(h).dateFormat,te=e.unref(h).radioValue;let ce=0,Le=0;return te==="1"?ce=Math.abs(e.unref(h).calcWays[0]):te==="2"&&(Le=e.unref(h).calcWays[0]),de(te,X,J,ce,Le)},re=(z,Y,X,J)=>{if(m.value=!0,Y.radioValue===J){const te=z.target.value;X==="+"?Y.value=se().add(te,Y.type).format(e.unref(h).dateFormat):Y.value=se().subtract(te,Y.type).format(e.unref(h).dateFormat)}},he=(z,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=z.radioValue,z.radioValue==="1"?e.unref(h).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(h).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),x.value=!1},me=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,x.value=!1};function Te(z,Y){const{radioValue:X="",calcWays:J=[]}=Y;z.radioValue=X,J!=null&&J.length&&(X==="1"?z.beforeNum=Math.abs(J[0]):X==="2"&&(z.afterNum=J[0]))}function de(z,Y,X,J,te){if(z==="1")return se().subtract(J,Y).format(X);if(z==="2")return se().add(te,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:D,ruleOptions:O,onFieldChange:P,condition:h,valueOptions:U,onRuleChange:b,onDataTypeChange:E,onFieldValueSelectChange:$,fieldValues:F,onDelete:H,isDateType:L,formatList:_,tabDateList:C,compareList:w,menuRule:k,dateBtnLabel:T,downIconStyle:M,popoverVisible:x,dateRadioStyle:g,showTime:m,controlList:s,dataTypeList:N,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:re,okDatePickConfig:he,onChangeComponent:S,filterOption:$e,okCustomConfig:me,clickConditionMenu:({key:z})=>{I(t.path,t.index,z==="2"?"||":"&&")}}}}),If="",Ff="",Hi={class:"condition"},Yi=["title"],Wi={class:"rule"},qi={class:"data-type"},Ki={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Qi={class:"popover-content-wrap"},Xi={key:0,class:"use-current-time"},Ji={class:"tabFilterRadio"},Zi={key:0},es={key:1},ts={style:{"margin-left":"10px"}},ns={style:{"margin-left":"10px"}},os={style:{position:"absolute",bottom:"10px"}},as={style:{display:"flex"}},rs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ls(t,n,o,a,r,i){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),s=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),_=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),C=e.resolveComponent("a-input-number"),w=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),N=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),A=e.resolveComponent("appstore-add-outlined"),x=e.resolveComponent("a-popover"),L=e.resolveComponent("a-input"),D=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(B,I)=>(e.openBlock(),e.createBlock(c,{key:I,value:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:B.label},e.toDisplayString(B.label),9,Yi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Wi,[t.isDateType?(e.openBlock(),e.createBlock(g,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,B=>(e.openBlock(),e.createBlock(s,{key:B.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,I=>{var H;return e.openBlock(),e.createBlock(s,{key:I.value,disabled:I.value==="component"&&!((H=t.controlList)!=null&&H.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===I.value?"color: #1890FF;":"")},e.toDisplayString(I.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===I.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",qi,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(B,I)=>(e.openBlock(),e.createBlock(c,{key:I,value:B.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ki,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(_,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(_,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[0]||(n[0]=B=>t.condition.fieldValue=B),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[1]||(n[1]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(x,{visible:t.popoverVisible,"onUpdate:visible":n[9]||(n[9]=B=>t.popoverVisible=B),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Qi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":n[2]||(n[2]=B=>t.isUseCurrentTime=B)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(B,I)=>(e.openBlock(),e.createBlock(N,{key:I,tab:B.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(k,{value:B.radioValue,"onUpdate:value":H=>B.radioValue=H,onChange:H=>t.changeRadioValue(H,B)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Zi,"相对当前时间:"+e.toDisplayString(B.value),1)):(e.openBlock(),e.createElementBlock("div",es,"相对当前时间:"+e.toDisplayString(t.getFieldValue(I)),1)),e.createVNode(w,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.beforeNum,"onUpdate:value":H=>B.beforeNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ts,e.toDisplayString(B.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(w,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.afterNum,"onUpdate:value":H=>B.afterNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ns,e.toDisplayString(B.afterLabel),1)]),_:2},1032,["style"]),B.beforeText?(e.openBlock(),e.createBlock(w,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),B.afterText?(e.openBlock(),e.createBlock(w,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",os,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:n[3]||(n[3]=H=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:H=>t.okDatePickConfig(B,I)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(N,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":n[4]||(n[4]=B=>t.customTabData.expression=B),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(c,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":n[5]||(n[5]=B=>t.customTabData.unit=B),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(c,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(c,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(c,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(c,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(c,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":n[6]||(n[6]=B=>t.customTabData.around=B)},{default:e.withCtx(()=>[e.createVNode(c,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(c,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:n[7]||(n[7]=B=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:n[8]||(n[8]=B=>{t.popoverVisible=!0})},[e.createVNode(A)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":n[10]||(n[10]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(L,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[11]||(n[11]=B=>t.condition.fieldValue=B)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(D,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const is=oe(zi,[["render",ls],["__scopeId","data-v-393c8075"]]),ss=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:is}}),Df="",cs={key:0,class:"condition-list"},ds={key:0,class:"condition-container"},ps={key:0,class:"condition-text"},us={key:1,class:"condition-text"},fs={class:"conditions"};function ms(t,n,o,a,r,i){const c=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",ds,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",ps,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",us,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",fs,[l.conditions.length>0?(e.openBlock(),e.createBlock(c,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${s}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${s}`,data:l,level:t.level,index:s,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const hs=oe(ss,[["render",ms],["__scopeId","data-v-553c1496"]]),ys=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:n}){const o=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&n("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=Z.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:o,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),$f="",aa=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),gs={class:"truncations"},bs={class:"rule"},Cs={class:"field-value"},ws={class:"field-value"},ks=aa(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),_s=aa(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),xs=["onClick"];function Ss(t,n,o,a,r,i){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(s,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",bs,[e.createVNode(c,{style:{width:"100%"},value:s.rule,"onUpdate:value":u=>s.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Cs,[e.createTextVNode(" N= "),e.createVNode(d,{value:s.num,"onUpdate:value":u=>s.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",ws,[ks,e.createVNode(l,{value:s.name,"onUpdate:value":u=>s.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),_s]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(s)},"清空",8,xs)]))),128))])}const Ns=oe(ys,[["render",Ss],["__scopeId","data-v-f543c690"]]),ke=(t,n)=>{if(typeof t=="string"&&typeof n=="string")return t.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(n)){const o=n.length;for(let a=0;a<o;a++){const r=n[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},As=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),yt=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),Je=t=>{const n=[];if(t!=null&&t.length)for(const o of t)o.conditions?n.push(...Je(o.conditions)):(o==null?void 0:o.dataType)==="component"&&n.push(o);return n},ra=(t,n)=>{var f;const o=Z.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:c=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:s=[],indicators:p=[]}=t;ia(o,n);const u=o,m=[...a,...r,...i,...c,...d,...l,...s,...p],g=[];for(const C of m){const w=Je((C==null?void 0:C.conditions)||[]);if(w!=null&&w.length){const k=w.filter(N=>sa(N,n)?(N==null?void 0:N.dataType)==="component":!1).map(N=>{const h=sa(N,n),A={};return N!=null&&N.dateFormat&&(A.format=N.dateFormat),{conditionKey:N.fieldName,conditionLabel:N.fieldName,conditionName:N.fieldName,conditionValueType:N.fieldType,id:h.id,keyName:N.fieldValue,rule:N.rule,notGlobal:!0,indexCode:N.indexCode,typeGuid:N.typeGuid,indexCodeNum:N.indexCodeNum,...A}});if(k!=null&&k.length)for(const N of k)g.find(h=>h.keyName===N.keyName)||g.push(N)}}const _=g.length;for(let C=0;C<_;C++){const w=g[C];if(w&&!((f=Object.keys(w))!=null&&f.length)||(w==null?void 0:w.conditionKey)==="parentCode")continue;const{id:k,keyName:N,prop:h,format:A,dataType:x="component",customValue:L}=w,D=la(w);Yn({sqlCondition:D,renderUsedComponents:n,id:k,dateFormat:A,prop:h,keyName:N,dataType:x,customValue:L}),u.push(D)}for(let C=u.length-1;C>=0;C--){const w=u[C];w.globalCondition||Je(u).find(N=>N.alias===w.alias&&N.globalCondition)&&u.splice(C,1)}return u},Kt=(t,n)=>{const o=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Yn({sqlCondition:r,renderUsedComponents:n,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),o.push(r)}}return o};function la(t){const{id:n,keyName:o,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:c,rule:d="NONE",notGlobal:l=!1,indexCode:s,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=o||n;return g&&c&&(g+=`-${c}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:s,indexCodeNum:p,typeGuid:u,dataType:m}}const Ts=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function ia(t,n){if(t!=null&&t.length)for(const o of t)if(o!=null&&o.conditions)ia(o.conditions,n);else{const{id:a,keyName:r,prop:i,format:c,dataType:d="component",customValue:l}=o,s=la(o);Yn({sqlCondition:s,renderUsedComponents:n,id:a,dateFormat:c,prop:i,keyName:r,dataType:d,customValue:l});for(const p in s)o[p]=s[p];for(const p of Ts)delete o[p]}}function Yn({sqlCondition:t,renderUsedComponents:n,id:o,dateFormat:a,prop:r,keyName:i,dataType:c,customValue:d}){const l=n.find(f=>f.id===o),{value:s,format:p="YYYY-MM-DD",operate:u,type:m="",useCurrentTime:g}=l||{},_=a||p;if(ke(m,"date")){let f;if(g?f=se():f=se(s),u&&s){const{mode:C,type:w,value:k}=u;if(k)switch(w){case"add":f=f.add(k,C);break;case"minus":f=f.subtract(k,C);break}}t.fieldValue=(f==null?void 0:f.format(_))||"",t.dateFormat=_}else if(m==="ecanRangePicker"){const{interval:f,intervalUnit:C,startTime:w,endTime:k}=l||{};let N=r;if(!r){const A=i==null?void 0:i.split("-");A!=null&&A.length&&(N=A[A.length-1])}if(!N)return;let h=null;if(g&&(N==="startTime"?h=se().subtract(f,C):N==="endTime"&&(h=se())),l[N]&&(h=se(l[N])),u){const{type:A,value:x,mode:L}=u;switch(A){case"add":h=h&&h.add(x,L);break;case"minus":h=h&&h.subtract(x,L)}}if(h&&(t.fieldValue=h==null?void 0:h.format(_)),N==="rangeValue"&&w&&k){const A=Es(_);A&&(t.fieldValue=se(k).diff(se(w),A)+1)}t.dateFormat=_}else{const f=s&&s.match(/\{(.+?)\}/g);f!=null&&f.length?t.fieldValue="":t.fieldValue=s}c===""&&(t.fieldValue=d||"")}const Qt=t=>{let n="";switch(t){case"ecanDatePicker":case"ecanRangePicker":n="dateChange";break;case"ecanTimeDisplay":n="timeChange";break;case"ecanSelect":case"ecanTreeSelect":n="selectChange";break;case"ecanTabs":n="tabChange";break;case"ecanInput":n="inputChange";break;case"ecanCheckbox":case"ecanRadio":n="checkboxChange";break;case"ecanText":n="valueChange";break;case"ecanImage":n="click";break}return n};function sa(t,n){var o;if(t.componentId)return n.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(o=t.fieldValue)==null?void 0:o.split("-");return a!=null&&a.length?a[0]:null}else return n.find(a=>a.keyName===t.fieldValue);else return null}function Es(t){const n=t.split("-");let o="";if(n!=null&&n.length)switch(n[n.length-1]){case"YYYY":o="year";break;case"MM":o="month";break;case"DD":o="day";break}return o}const Ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:hs,TruncationList:Ns,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:n}){var P;const o=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(fe),i=e.inject(Se),c=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),s=e.inject(Gt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=S=>{var O;for(const T of S)(O=T.conditions)!=null&&O.length?g(T.conditions):T.keyValue=we()};e.watch(m,S=>{var O,T,M,U;if(S){if(Array.isArray((O=t.item)==null?void 0:O.conditions)){const y=Z.cloneDeep(((T=t.item)==null?void 0:T.conditions)||[]);g(y),p.value=y}Array.isArray((M=t.item)==null?void 0:M.truncations)?u.value=Z.cloneDeep((U=t.item)==null?void 0:U.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let _=!1;const f=S=>{var O;_=!0,e.unref(p)==null||((O=e.unref(p))==null?void 0:O.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:we()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:we()}))};e.provide(ho,{updateCondition(S,O,T){var y;_=!0;let M=e.unref(p);const U=T.split("-");if(U!=null&&U.length)for(const b of U)if(M[b])M=(y=M[b])==null?void 0:y.conditions;else break;Array.isArray(M)&&M[O]&&(M[O]=S)},deleteCondition(S,O){var U,y,b;_=!0;let T=e.unref(p);const M=O.split("-");if(M!=null&&M.length){for(const E of M)if(T[E])T=(U=T[E])==null?void 0:U.conditions;else break;if(Array.isArray(T)&&T[S])if(T.splice(S,1),T.length===1){if(M.length>0){const E=M.length-1,F=M[E],$=M.slice(0,E);let G=e.unref(p),K="";for(const Q of $)if(G[Q])K=(y=G[Q])==null?void 0:y.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===T[0].join){if(Array.isArray(T[0].conditions)){const Q=Z.cloneDeep(T[0].conditions);G.splice(+F,1),G.splice(+F,0,...Q)}}else G[F]=T[0]}}else T.length===0&&(p.value=[])}},addCondition(S,O,T){var b,E;_=!0;let M=e.unref(p),U="";const y=S.split("-");if(y!=null&&y.length){for(const F of y)if(M[F])U=(b=M[F])==null?void 0:b.join,M=(E=M[F])==null?void 0:E.conditions;else break;if(U===T)M.splice(O+1,0,{keyValue:we()});else{const F=Z.cloneDeep(M[O]);M[O]={join:T,conditions:[F,{keyValue:we()}]}}}}});const C=S=>{_=!0,u.value=S},w=e.computed(()=>{var O;const S=[];return(O=e.unref(c))==null||O.forEach(T=>{const{keyName:M="",id:U="",type:y}=T;y==="ecanRangePicker"?S.push({value:`${U}-startTime`,label:`${M||U}-开始时间值`,keyName:`${M||U}-startTime`},{value:`${U}-endTime`,label:`${M||U}-结束时间值`,keyName:`${M||U}-endTime`}):S.push({value:U,label:`${M||U}`,keyName:`${M||U}`})}),S}),k=()=>{var b,E,F;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),O=((E=e.unref(r)[t.type])==null?void 0:E.slice())||[],T=Je(Z.cloneDeep(O[t.index].conditions));O[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((F=e.unref(u))!=null&&F.length)&&(O[t.index].truncations=e.unref(u));const M=Je(e.unref(p));for(const $ of M)if($.dataType==="component"&&$.fieldValue){const G=e.unref(w).find(K=>K.value===$.fieldValue);G&&($.fieldValue=G.keyName)}const U=T.filter($=>!M.find(G=>G.componentId===$.componentId)).filter($=>!S.find(G=>G.id===$.componentId)),y=M.filter($=>!T.find(G=>G.componentId===$.componentId));N(U,y),i({[t.type]:O,sqlConditions:ra({...e.unref(r),[t.type]:O},e.unref(c))})};function N(S,O){var M;const T=S.map(U=>({...U,delete:!0})).concat(O.map(U=>({...U,add:!0})));for(const U of T){const y=e.unref(c).find(b=>b.id===U.componentId);if(y){const{type:b,id:E,events:F=[]}=y,$=Qt(b);if(U.add)F.find(G=>{var K;return G.on===$&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||s({id:E,events:[...F,{on:$,target:(M=e.unref(l))==null?void 0:M.id,emit:"refreshData"}].reverse()});else if(U.delete){const G=F.findIndex(K=>{var Q;return K.on===$&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(F.splice(G,1),s({id:E,events:F}))}}}}const h=()=>{m.value=!0},A=()=>{p.value=[],m.value=!1},x=()=>{_&&k(),_=!1,A()},L=()=>{A()},D=e.inject(ve),V=e.unref(e.inject(Me)),B=(P=window==null?void 0:window.config)==null?void 0:P.pageId,I=e.ref([]);e.provide(yo,I);const H=async S=>{var O;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:T,indexCode:M}=S,U=await D.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:B,dataSourceId:e.unref(d),indexGuid:T,indexCode:M},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=U.data;y&&((O=b==null?void 0:b.dataViewColumns)!=null&&O.length)&&(I.value=b.dataViewColumns.map(E=>({...E,label:E.title||E.label})))}catch(T){console.error(T)}};return e.watch(()=>t.item,S=>{S&&m.value&&H(S)}),n({showModal:h}),{visible:m,onOk:x,onCancel:L,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:C,activeKey:o}}}),vf="",Bs={class:"header"},Vs={class:"header"};function Os(t,n,o,a,r,i){const c=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Bs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{class:"add-and-condition",onClick:n[0]||(n[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(c,{class:"add-or-condition",onClick:n[1]||(n[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(c,{key:1,onClick:n[2]||(n[2]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(l,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(s,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Vs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{class:"add-and-condition",onClick:n[4]||(n[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(c,{class:"add-or-condition",onClick:n[5]||(n[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(c,{key:1,onClick:n[6]||(n[6]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const Is=oe(Ls,[["render",Os],["__scopeId","data-v-498bb1e7"]]),Fs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:n}){const o=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.ref(),c=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",o.value=!0},d=()=>{o.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},s=()=>{d()};return n({showModal:c}),{visible:o,onOk:l,onCancel:s,fieldName:i}}}),Mf="",Ds=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),$s={class:"config-name"},vs=Ds(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function Ms(t,n,o,a,r,i){const c=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[vs,e.createVNode(c,{value:t.fieldName,"onUpdate:value":n[0]||(n[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ps=oe(Fs,[["render",Ms],["__scopeId","data-v-de6a1755"]]),js=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:n}){const o=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.inject(Pe),c=e.inject(Ye),d=e.inject(Gt),l=e.ref(),s=e.computed(()=>{var w;return(w=e.unref(i))==null?void 0:w.filter(k=>k.keyName!=="")});let p=[];const u=w=>{const{sortCpnts:k=[]}=w;p=Z.cloneDeep(k),l.value=Z.cloneDeep(k),o.value=!0},m=()=>{o.value=!1},g=()=>{var A,x;const w=Je(((A=e.unref(a))==null?void 0:A.controlList)||[]),k=p.filter(L=>!e.unref(l).includes(L)).filter(L=>!w.find(D=>D.id===L)),N=e.unref(l).filter(L=>!p.includes(L)).filter(L=>!w.find(D=>D.id===L)),h=k.map(L=>({componentId:L,delete:!0})).concat(N.map(L=>({componentId:L,add:!0})));for(const L of h){const D=e.unref(i).find(V=>V.id===L.componentId);if(D){const{type:V,id:B,events:I=[]}=D,H=Qt(V);if(L.add)I.find(P=>{var S;return P.on===H&&P.target===((S=e.unref(c))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:B,events:[...I,{on:H,target:(x=e.unref(c))==null?void 0:x.id,emit:"refreshData"}].reverse()});else if(L.delete){const P=I.findIndex(S=>{var O;return S.on===H&&S.target===((O=e.unref(c))==null?void 0:O.id)&&S.emit==="refreshData"});P!==-1&&(I.splice(P,1),d({id:B,events:I}))}}}},_=()=>{var k;g();const w=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];w[t.index].sortCpnts=l.value,r({[t.type]:w}),m()},f=()=>{m()},C=(w,k)=>{var N;return(N=k==null?void 0:k.keyName)==null?void 0:N.toLowerCase().includes(w==null?void 0:w.toLowerCase())};return n({showModal:u}),{visible:o,onOk:_,onCancel:f,idFilterOption:C,fieldName:l,usedComponentList:s}}}),Pf="",Rs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Us={class:"sort-by-cpnt"},Gs=Rs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function zs(t,n,o,a,r,i){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[Gs,e.createVNode(c,{class:"field-name",value:t.fieldName,"onUpdate:value":n[0]||(n[0]=l=>t.fieldName=l),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Hs=oe(js,[["render",zs],["__scopeId","data-v-08af1ef8"]]),Ys=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:n}){const o=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.ref(),c=e.ref([]),d=(m,g)=>{const{dimByCount:_=""}=m;i.value=_,c.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),o.value=!0},l=()=>{o.value=!1},s=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var _;return(_=g==null?void 0:g.label)==null?void 0:_.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return n({showModal:d}),{visible:o,onOk:s,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:c}}}),jf="",Ws=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),qs={class:"dim-by-count"},Ks=Ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Qs(t,n,o,a,r,i){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[Ks,e.createVNode(c,{class:"field-name",value:t.fieldName,"onUpdate:value":n[0]||(n[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Xs=oe(Ys,[["render",Qs],["__scopeId","data-v-e8608437"]]),Wn=(t,n)=>{let o;for(let a=0;a<n.length;a++){const r=n[a];r.children&&(r.children.some(i=>i.key===t)?o=r.key:Wn(t,r.children)&&(o=Wn(t,r.children)))}return o},Js=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(ve),a=e.unref(e.inject(Me)),r=e.inject(fe),i=e.computed(()=>e.unref(r).leftAxisList||[]),c=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(s));return t.mode==="edit"?(V==null?void 0:V.filter(B=>{var I;return B.id!==((I=t.item)==null?void 0:I.id)}))||[]:V||[]}),u=e.computed(()=>c.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{n("update:value",V),n("change",V)}}),g=e.ref("1"),_=e.ref(""),f=V=>{const B=document.getElementById("calTextArea");let I=m.value;if(document.selection){const H=document.selection.createRange();H.text=V}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const H=B.selectionStart,P=B.selectionEnd;let S=H;I=I.substring(0,H)+V+I.substring(P,I.length),S+=V.length,B.selectionStart=B.selectionEnd=S}else I+=V;m.value=I},C=["+","-","*","/","(",")"],w=(V,B)=>{let I="";switch(B){case"name":{I="${"+V+"}";break}case"function":{I=V+"()";break}default:I=V}f(I)},k=[],N=e.ref([]),h=e.ref(!0),A=e.ref([]),x=V=>{var B;for(const I of V)(B=I==null?void 0:I.children)!=null&&B.length?x(I.children):k.push({key:I.key,title:I.title})},L=async()=>{try{const V=await o.get(`${Be}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:I=[]}=V.data;B&&(I!=null&&I.length)&&(x(I),A.value=I)}catch(V){console.error(V)}},D=V=>{N.value=V,h.value=!1};return e.watch(_,V=>{const B=k.map(I=>I.title.indexOf(V)>-1?Wn(I.key,A.value):null).filter((I,H,P)=>I&&P.indexOf(I)===H);N.value=B,_.value=V,h.value=!0}),e.onMounted(()=>{L()}),{fieldList:p,varList:u,myValue:m,calculMethods:C,funcDescsData:A,searchFuncValue:_,expandedKeys:N,autoExpandParent:h,activeKey:g,selectedElem:w,onExpand:D}}}),Rf="",Uf="",Zs={class:"formula-calculation"},ec={class:"field-area"},tc={style:{"text-align":"center",padding:"10px 0"}},nc=["onClick"],oc=["onClick"],ac={class:"cal_right_bottom"},rc={class:"cal_fu"},lc=["onClick"],ic={class:"function-wrap"},sc={class:"wrap-search"},cc={class:"tree-box"},dc={key:0},pc={style:{color:"#f50"}},uc={key:1},fc=["onClick"],mc={class:"cal_a"};function hc(t,n,o,a,r,i){const c=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),s=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),_=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Zs,[e.createVNode(_,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":n[0]||(n[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(c,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(c,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:w=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,nc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:w=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,oc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(s,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":n[1]||(n[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ac,[e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,C)=>(e.openBlock(),e.createElementBlock("li",{onClick:w=>t.selectedElem(f,"symbol"),key:C},e.toDisplayString(f),9,lc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":n[2]||(n[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",cc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:C})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",dc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",pc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",uc,e.toDisplayString(f),1)),C?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:w=>t.selectedElem(f,"function")},"插入",8,fc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const yc=oe(Js,[["render",hc],["__scopeId","data-v-ba051d9b"]]),gc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:yc,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea,AInputNumber:v.InputNumber,ATooltip:v.Tooltip,QuestionCircleOutlined:ti},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:n}){const o=e.inject(Pe),a=e.inject(fe),r=e.inject(Se),i=e.computed(()=>e.unref(o)),c=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const O of P)Object.prototype.hasOwnProperty.call(e.unref(a),O)&&(S=S.concat(e.unref(a)[O]));return S}),l={span:4},s={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},m=e.ref({}),g=e.ref(),_=e.ref(!1),f=e.ref();e.watch(_,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:O,formula:T,builtInValueSource:M,builtInFormula:U,builtInCalcWay:y}=t.item;if(f.value={label:S,calcType:O,formula:T,builtInValueSource:M,builtInFormula:U,builtInCalcWay:y},U==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u));else f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let C=!1;const w=()=>{C=!0},k=P=>{const S=e.unref(i).find(O=>O.id===P);S&&(f.value.builtInCalcWay=S.keyName),C=!0},N=()=>{var M;const P=((M=e.unref(a)[t.type])==null?void 0:M.slice())||[],{label:S,builtInFormula:O}=e.unref(f)||{},T={};if(O==="DATE_OFFSET"&&(T.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const U=we();P.push({...e.unref(f),...T,id:U,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...T,name:S});r({[t.type]:P})},h=()=>{_.value=!0},A=()=>{_.value=!1},x=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const O=e.unref(d).find(T=>T.label===S);return O?O.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},L=e.computed(()=>{let P={label:[{required:!0,validator:x,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),D=()=>{g.value.validate().then(()=>{C&&N(),C=!1,A()})},V=()=>{g.value.clearValidate(),A()},B=()=>{C=!0,e.unref(f).builtInCalcWay=""},I=e.computed(()=>{let P="";const S=e.unref(f).builtInCalcWay,O=e.unref(f).builtInValueSource;if(!O||!S)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+O+"】由小到大在所有值中的排名":P="【"+O+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
|
|
60
|
-
`,S==="ASC"?P=P+"【"+
|
|
61
|
-
`,S){case"SUM":{T="求和";break}case"AVG":{T="求平均值";break}case"MIN":{T="求最小值";break}case"MAX":{T="求最大值";break}}P=P+"将所有【"+O+"】"+T;break}}return P}),H=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return n({showModal:h}),{visible:_,onCancel:V,labelCol:l,wrapperCol:s,formState:f,builtInValueSourceList:c,onOK:D,onChange:w,formRules:L,accessLogic:I,formRef:g,onChangeBuiltInFormula:B,componentList:i,onChangeComponent:k,filterOption:H,offsetConfig:m}}}),Gf="",zf="",bc={key:0,class:"accesstip"},Cc={style:{display:"flex","align-items":"center"}};function wc(t,n,o,a,r,i){const c=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),s=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),_=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),C=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(C,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(f,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.label,"onUpdate:value":n[0]||(n[0]=w=>t.formState.label=w),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":n[2]||(n[2]=w=>t.formState.formula=w),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.builtInFormula,"onUpdate:value":n[3]||(n[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.builtInValueSource,"onUpdate:value":n[4]||(n[4]=w=>t.formState.builtInValueSource=w),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(w,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:w.label,disabled:t.mode==="edit"&&t.item.label===w.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.builtInCalcWay,"onUpdate:value":n[5]||(n[5]=w=>t.formState.builtInCalcWay=w),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",bc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(s,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":n[6]||(n[6]=w=>t.formState.builtInValueSource=w),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",Cc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":n[7]||(n[7]=w=>t.offsetConfig.value=w),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(s,{value:t.offsetConfig.unit,"onUpdate:value":n[8]||(n[8]=w=>t.offsetConfig.unit=w),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(s,{value:t.offsetConfig.around,"onUpdate:value":n[9]||(n[9]=w=>t.offsetConfig.around=w),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(_,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const kc=oe(gc,[["render",wc],["__scopeId","data-v-33575cd9"]]),_c=e.defineComponent({name:"DataConfigCard",directives:{focus:oa},components:{CalculationModal:kc,FilterModal:Is,CustomGroupModal:ji,SettingOutlined:ci,DeleteOutlined:Sl,CopyOutlined:wl,InfoCircleOutlined:$l,CustomSortModal:Ti,PlusOutlined:Xl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:Tt,ConfigName:Ps,SortByCpnt:Hs,DimByCount:Xs},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const n=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],o=e.inject(fe),a=e.inject(Se),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],c=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(gn),l=e.ref(),s=(j={})=>{var q;const{type:R}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(j.scope)?i.includes(R)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(j.scope)&&c.includes(R)&&(W=!0),R==="dimensionList"){const ie=((q=e.unref(o)[R])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(j="{}")=>{var R,W;try{const q=JSON.parse(j);if(!s(q))return;const ie=((R=e.unref(o)[t.type])==null?void 0:R.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ke(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(ne=>{ne.show=!1}),g(ie,q),q.randomKey=we(),ie.push(q);let ae=[];if(["IDX","BUILT_IN_IDX"].includes(q.scope)){const ne=sessionStorage.getItem("indicator-variates");if(ne){const le=JSON.parse(ne);if(le!=null&&le.length){ae=((W=e.unref(o))==null?void 0:W.variableList)||[];for(const pe of le)ae.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:we()})}}}a({[t.type]:ie,variableList:ae,variableConditions:Kt(ae,r)}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(j="{}")=>{var R;try{const{cardItem:W,type:q,index:ie}=JSON.parse(j);if(!s(W)||q===t.type)return;const ae=((R=e.unref(o)[t.type])==null?void 0:R.slice())||[];g(ae,W),ae.push(W);const ne=e.unref(o)[q].slice()||[];ne.splice(ie,1),a({[t.type]:ae,[q]:ne})}catch(W){console.error(W)}};function g(j,R){const W=[];if(j.forEach(q=>{q.label.includes(R.label)&&W.push(q.label.split(R.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){R.label=R.label+q;break}}}const _=(j,R)=>{var ie,ae;const W=(ie=j.target)==null?void 0:ie.checked,q=((ae=e.unref(o)[t.type])==null?void 0:ae.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ke(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(ne=>{ne.show=!1}),q[R].show=W,a({[t.type]:q})},f=j=>{var W;const R=((W=e.unref(o)[t.type])==null?void 0:W.slice())||[];R.splice(j,1),a({[t.type]:R})},C=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const j=sessionStorage.getItem("indicator-list-item"),R=sessionStorage.getItem("indicator-card-item");j?u(j):R&&m(R)},k=j=>{var le,pe;const{newIndex:R,oldIndex:W,from:q,to:ie}=j,ae=q.id,ne=ie.id;if(R>=0&&W>=0){if(ae===ne){const ge=((le=e.unref(o)[t.type])==null?void 0:le.slice())||[],He=ge.splice(W,1)[0];He&&(ge.splice(R,0,He),a({[t.type]:ge}))}else if(t.type===ne){const ge=((pe=e.unref(o)[ne])==null?void 0:pe.slice())||[];if(ge!=null&&ge.length){const He=ge.splice(ge.length-1,1)[0];He&&(ge.splice(R,0,He),a({[t.type]:ge}))}}}},N=(j,R)=>{const W=j.oldIndex,q=R[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(o)[t.type]||[]),A=e.ref([]);let x=!1;e.watch(()=>e.unref(h).length,j=>{A.value=new Array(j).fill(!1)},{flush:"post",immediate:!0});const L=j=>{var W,q,ie;const R=((W=e.unref(o)[t.type])==null?void 0:W.slice())||[];if((q=R[j])!=null&&q.randomKey){const ae=((ie=e.unref(o))==null?void 0:ie.variableList)||[];for(let ne=ae.length-1;ne>=0;ne--)ae[ne].randomKey===R[j].randomKey&&ae.splice(ne,1);a({variableConditions:Kt(ae,r),variableList:ae})}R.splice(j,1),a({[t.type]:R})},D=j=>{A.value[j]=!0},V=()=>{x=!0},B=(j,R,W)=>{var q,ie,ae,ne;if(A.value[R]=!1,x){const le=(q=j.target)==null?void 0:q.value,pe=((ie=e.unref(o)[t.type])==null?void 0:ie.slice())||[],ge=pe.filter(ue=>{var be;return(be=ue==null?void 0:ue.formula)==null?void 0:be.includes(W)}).map(ue=>ue.id),He=pe.filter(ue=>{var be;return(be=ue==null?void 0:ue.builtInValueSource)==null?void 0:be.includes(W)}).map(ue=>ue.id);if(ge!=null&&ge.length)for(const ue of ge){const be=pe.find(ft=>ft.id===ue);be.formula=be.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const ue of He){const be=pe.find(ft=>ft.id===ue);be.builtInValueSource=be.builtInValueSource.replaceAll(W,le)}if(pe[R].label=le,(ae=pe[R])!=null&&ae.randomKey){const ue=((ne=e.unref(o))==null?void 0:ne.variableList)||[],be=ue.filter(ft=>ft.randomKey===pe[R].randomKey);be!=null&&be.length&&be.forEach(ft=>{ft.label=le}),a({variableConditions:Kt(ue,r),variableList:ue})}a({[t.type]:pe})}x=!1},I="DEFAULT",H=e.computed(()=>{const j=[],{scope:R,label:W}=e.unref(l);let q=e.unref(o)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(R)&&(q=q.filter(le=>le.label===W)),R==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=Z.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,j.push(le)}const{leftAxisList:ie=[],rightAxisList:ae=[],indicators:ne=[]}=e.unref(o)||{};return[{id:I,label:"默认",name:"默认"},...q,...j,...ie,...ae,...ne]}),P=(j={},R,W="ASC")=>{var pe;const{label:q,name:ie,id:ae,defaultCode:ne}=j,le=((pe=e.unref(o)[t.type])==null?void 0:pe.slice())||[];ae===I?delete le[R].sort:le[R].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:ne},a({[t.type]:le})},S=(j={},R="ASC")=>{const q={ASC:"升序",DESC:"降序"}[R],{sort:ie}=j,{label:ae,order:ne}=ie||{};return ae&&ne===R?`${q}(${ae})`:q},O=e.ref(),T=e.ref(),M=e.ref(),U=e.ref(),y=(j={},R)=>{var W;O.value=j,T.value=R,(W=e.unref(M))==null||W.showModal()},b=j=>{var R;return"自定义排序"+(((R=j==null?void 0:j.sort)==null?void 0:R.type)==="CUSTOM"?"(已配置)":"")},E=(j={},R)=>{var W;O.value=j,T.value=R,(W=e.unref(U))==null||W.showModal()},F=j=>"自定义分组"+((j==null?void 0:j.customGroup)!=null?"(已配置)":""),$=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(j,R)=>{var q;const W=((q=e.unref(o)[t.type])==null?void 0:q.slice())||[];W[R].aggregate=j,a({[t.type]:W})},Q=(j,R)=>{var q;const W=((q=e.unref(o)[t.type])==null?void 0:q.slice())||[];W[R].distinct=j,a({[t.type]:W})},ee=(j,R)=>{var q;const W=((q=e.unref(o)[t.type])==null?void 0:q.slice())||[];W[R].dateFormat=j,a({[t.type]:W})},re=(j="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[j]})`,he=j=>`是否去重(${{0:"否",1:"是"}[j]||"否"})`,me=(j={})=>{var R;return"过滤"+(j!=null&&j.conditions&&((R=j==null?void 0:j.conditions)==null?void 0:R.length)>0?"(已配置)":"")},Te=e.ref(),de=e.ref(),$e=e.ref(),et=e.ref(),mn=(j={},R)=>{O.value=j,T.value=R,e.unref(Te).showModal()},it=(j={},R)=>{O.value=j,T.value=R,e.unref(de).showModal(j)},st=(j={},R)=>{O.value=j,T.value=R,e.unref($e).showModal(j)},Nt=(j={},R)=>{O.value=j,T.value=R,e.unref(et).showModal(j,e.unref(Y))},ct=e.ref(),Ee=e.ref("add"),Qe=(j,R,W)=>{var q;Ee.value=j,j==="edit"&&(O.value=R,T.value=W),(q=e.unref(ct))==null||q.showModal()},tt=e.inject(ve),nt=e.unref(e.inject(Me)),ze=e.ref([]),dt=e.computed(()=>e.unref(o)[t.type]||{}),pt=async()=>{try{const j=await tt.post(`${Be}/diagram/dimFields`,{},{headers:{Authentication:nt,operateContext:"ygt"}}),{success:R,data:W=[]}=j.data;R&&(ze.value=W)}catch(j){console.error(j)}},ut=(j,R)=>{const W=e.unref(o)[t.type]||{};W[R]=j,a({[t.type]:W})},ot=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(j,R)=>{var q;const{name:W}=R;if(!ot.includes(t.type)&&j&&yt(R,"indexCode")){const ie=await tt.post(`${Be}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:R.id,indexCode:R.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:nt,operateContext:"ygt"}}),{success:ae,data:ne}=ie.data;ae&&ne&&(Y.value=(ne==null?void 0:ne.dataViewColumns)||[],z.value[W]={name:ne.name,code:ne.indexCode})}},J=j=>{l.value=j},te=j=>{const R=document.createElement("input");document.body.appendChild(R),R.setAttribute("value",j),R.select(),document.execCommand("copy"),document.body.removeChild(R),v.message.success("复制成功")},ce=e.inject(Ye),Le=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),At=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:pt())}),{onCheckboxChange:_,onDropEnd:f,onDragItemEnd:C,onDragItemAdd:w,onDragItemSort:k,onDragItemStart:N,cardItemList:h,onDelete:L,onEdit:D,onCommitLabelChange:B,sortList:H,onSort:P,handleSortTitle:S,showCustomSortModal:y,customSortModalRef:M,currentItem:O,currentIndex:T,handleCustomSortTitle:b,handleCustomGroupTitle:F,customGroupModalRef:U,showCustomGroupModal:E,editLabelList:A,onLabelChange:V,aggregateList:$,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:re,handleDistinctTitle:he,onShowCalculationModal:Qe,handleFilterTitle:me,filterModalRef:Te,configNameRef:de,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mn,calculationModalRef:ct,calculationModalMode:Ee,formatList:n,fieldOptions:ze,fieldData:dt,onFieldChange:ut,onVisibleChange:X,onClickSetting:J,copyDataViewName:te,dataViewMap:z,isShowConfigName:Le,showConfigNameModal:it,dimensionType:ot,isShowSortByCpnt:At,showSortByCpntModal:st,dataSelectIndicators:p,showDimByCountModal:Nt}}}),Hf="",Yf="",gt=t=>(e.pushScopeId("data-v-c2ca0016"),t=t(),e.popScopeId(),t),xc={class:"title"},Sc={class:"title-text"},Nc={class:"field-wrap"},Ac={class:"field-item"},Tc=gt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ec={class:"field-item"},Lc=gt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Bc={class:"title"},Vc={class:"title-text"},Oc=gt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Ic=gt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Fc={class:"card-item-wrap"},Dc={class:"card-item-inner"},$c=["onClick"],vc=["onClick"],Mc=["onClick"],Pc={style:{display:"flex","align-items":"center"}},jc=["title"],Rc=gt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Uc={style:{display:"flex","align-items":"center"}},Gc=["title"],zc=gt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hc(t,n,o,a,r,i){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),s=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),_=e.resolveComponent("a-sub-menu"),f=e.resolveComponent("a-menu-divider"),C=e.resolveComponent("copy-outlined"),w=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),N=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),A=e.resolveComponent("draggable"),x=e.resolveComponent("custom-sort-modal"),L=e.resolveComponent("custom-group-modal"),D=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),B=e.resolveComponent("sort-by-cpnt"),I=e.resolveComponent("dim-by-count"),H=e.resolveComponent("calculation-modal"),P=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",xc,[e.createElementVNode("div",Sc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[e.createElementVNode("div",Ac,[Tc,e.createVNode(c,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:n[0]||(n[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ec,[Lc,e.createVNode(c,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:n[1]||(n[1]=S=>t.onFieldChange(S,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Bc,[e.createElementVNode("div",Vc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(s,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Oc]),default:e.withCtx(()=>[e.createVNode(l,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[2]||(n[2]=e.withModifiers(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Ic])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(A,{modelValue:t.cardItemList,"onUpdate:modelValue":n[3]||(n[3]=S=>t.cardItemList=S),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:n[4]||(n[4]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:O})=>[e.createElementVNode("div",Fc,[e.createVNode(h,{class:"card-item",checked:S.show,onChange:T=>t.onCheckboxChange(T,O)},{default:e.withCtx(()=>[e.createElementVNode("div",Dc,[!t.editLabelList[O]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(T=>t.onEdit(O),["prevent","stop"])},e.toDisplayString(S.label),9,$c)):e.createCommentVNode("",!0),!t.editLabelList[O]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(T=>t.onEdit(O),["prevent","stop"])}," 请点击填入名字 ",8,vc)):e.createCommentVNode("",!0),t.editLabelList[O]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:T=>t.onCommitLabelChange(T,O,S.label),onPressEnter:T=>t.onCommitLabelChange(T,O,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(T=>t.onShowCalculationModal("edit",S,O),["prevent","stop"])}," fx ",8,Mc)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:T=>t.onVisibleChange(T,S)},{overlay:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,T=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:T.id,onClick:M=>t.onSort(T,O,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(_,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,T=>(e.openBlock(),e.createBlock(g,{class:"menu-item",style:{"white-space":"nowrap"},key:T.id,onClick:M=>t.onSort(T,O,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g,{onClick:T=>t.showCustomSortModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{onClick:T=>t.showCustomGroupModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,T=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:T.value,onClick:M=>t.onDateFormatChange(T.value,O)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===T.value||!S.dateFormat&&T.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:T=>t.showFilterModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(_,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,T=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:T.value,onClick:M=>t.onAggregateChange(T.value,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:T=>t.showConfigNameModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:T=>t.showSortByCpntModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:T=>t.showDimByCountModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(_,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,T=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:T.value,onClick:M=>t.onDistinctChange(T.value,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:T=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Rc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,jc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:T=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[zc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Gc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon",onClick:T=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(N,{class:"delete-icon",onClick:e.withModifiers(T=>t.onDelete(O),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(x,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(D,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(B,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(I,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(H,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Yc=oe(_c,[["render",Hc],["__scopeId","data-v-c2ca0016"]]),Wc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yc},setup(){const t=e.inject(Ye),n=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),o=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(Se),c=(l,s)=>Object.prototype.hasOwnProperty.call(l,s);return(()=>{var C,w;const l=Z.cloneDeep((C=e.unref(t))==null?void 0:C.graphicConfig),s=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:o.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"]},u="ecan";let m=e.unref(n);if(m.startsWith(u)){const k=u.length;m=((w=m.slice(k,k+1))==null?void 0:w.toLowerCase())+m.slice(k+1)}const g=p[m],_=Wc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const N=g[k];if(!N)break;r.push({..._[N],type:N})}for(const k of s)c(l,k)&&!g.find(N=>N===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Wf="",qf="",Kc={class:"data-group"};function Qc(t,n,o,a,r,i){const c=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(c,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Xc=oe(qc,[["render",Qc],["__scopeId","data-v-64cc2643"]]),Jc=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Zc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},ed=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:n}){return{onInputChange:a=>{n("change",a.target.value)}}}});function td(t,n,o,a,r,i){const c=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(c,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const nd=oe(ed,[["render",td]]),od=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:n}){const o=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),i=e.ref(a("suffix"));return{inputValue:o,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?n("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?n("change",u):n("change",`${u}${m}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&n("change",null,!1)},prefixValue:r,suffixValue:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ad(t,n,o,a,r,i){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":n[0]||(n[0]=s=>t.prefixValue=s),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:s,value:p},u)=>(e.openBlock(),e.createBlock(c,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":n[1]||(n[1]=s=>t.suffixValue=s),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:s,value:p},u)=>(e.openBlock(),e.createBlock(c,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const ca=oe(od,[["render",ad]]),rd=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:n}){return{onRadioChange:a=>{n("change",a.target.value)}}}});function ld(t,n,o,a,r,i){const c=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(c,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const id=oe(rd,[["render",ld]]),sd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:n}){return{onSelectChange:a=>{n("change",a)}}}});function cd(t,n,o,a,r,i){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(c,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dd=oe(sd,[["render",cd]]),pd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:n}){return{onSwitchChange:a=>{n("change",a)}}}});function ud(t,n,o,a,r,i){const c=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(c,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const fd=oe(pd,[["render",ud]]);var _e="top",Oe="bottom",Ie="right",xe="left",qn="auto",Vt=[_e,Oe,Ie,xe],bt="start",Ot="end",md="clippingParents",da="viewport",It="popper",hd="reference",pa=Vt.reduce(function(t,n){return t.concat([n+"-"+bt,n+"-"+Ot])},[]),ua=[].concat(Vt,[qn]).reduce(function(t,n){return t.concat([n,n+"-"+bt,n+"-"+Ot])},[]),yd="beforeRead",gd="read",bd="afterRead",Cd="beforeMain",wd="main",kd="afterMain",_d="beforeWrite",xd="write",Sd="afterWrite",Nd=[yd,gd,bd,Cd,wd,kd,_d,xd,Sd];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Ae(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function at(t){var n=Ae(t).Element;return t instanceof n||t instanceof Element}function Fe(t){var n=Ae(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function Kn(t){if(typeof ShadowRoot>"u")return!1;var n=Ae(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function Ad(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},i=n.elements[o];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(c){var d=r[c];d===!1?i.removeAttribute(c):i.setAttribute(c,d===!0?"":d)}))})}function Td(t){var n=t.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(a){var r=n.elements[a],i=n.attributes[a]||{},c=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),d=c.reduce(function(l,s){return l[s]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Ed={name:"applyStyles",enabled:!0,phase:"write",fn:Ad,effect:Td,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var rt=Math.max,Xt=Math.min,Ct=Math.round;function Qn(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function fa(){return!/^((?!chrome|android).)*safari/i.test(Qn())}function wt(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,i=1;n&&Fe(t)&&(r=t.offsetWidth>0&&Ct(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Ct(a.height)/t.offsetHeight||1);var c=at(t)?Ae(t):window,d=c.visualViewport,l=!fa()&&o,s=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:s+u,bottom:p+m,left:s,x:s,y:p}}function Xn(t){var n=wt(t),o=t.offsetWidth,a=t.offsetHeight;return Math.abs(n.width-o)<=1&&(o=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:a}}function ma(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&Kn(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Ae(t).getComputedStyle(t)}function Ld(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((at(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Kn(t)?t.host:null)||Ze(t)}function ha(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Bd(t){var n=/firefox/i.test(Qn()),o=/Trident/i.test(Qn());if(o&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Kn(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||n&&i.willChange==="filter"||n&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Ft(t){for(var n=Ae(t),o=ha(t);o&&Ld(o)&&qe(o).position==="static";)o=ha(o);return o&&(Re(o)==="html"||Re(o)==="body"&&qe(o).position==="static")?n:o||Bd(t)||n}function Jn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Dt(t,n,o){return rt(t,Xt(n,o))}function Vd(t,n,o){var a=Dt(t,n,o);return a>o?o:a}function ya(){return{top:0,right:0,bottom:0,left:0}}function ga(t){return Object.assign({},ya(),t)}function ba(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var Od=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,ga(typeof n!="number"?n:ba(n,Vt))};function Id(t){var n,o=t.state,a=t.name,r=t.options,i=o.elements.arrow,c=o.modifiersData.popperOffsets,d=Ue(o.placement),l=Jn(d),s=[xe,Ie].indexOf(d)>=0,p=s?"height":"width";if(!(!i||!c)){var u=Od(r.padding,o),m=Xn(i),g=l==="y"?_e:xe,_=l==="y"?Oe:Ie,f=o.rects.reference[p]+o.rects.reference[l]-c[l]-o.rects.popper[p],C=c[l]-o.rects.reference[l],w=Ft(i),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,N=f/2-C/2,h=u[g],A=k-m[p]-u[_],x=k/2-m[p]/2+N,L=Dt(h,x,A),D=l;o.modifiersData[a]=(n={},n[D]=L,n.centerOffset=L-x,n)}}function Fd(t){var n=t.state,o=t.options,a=o.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||ma(n.elements.popper,r)&&(n.elements.arrow=r))}const Dd={name:"arrow",enabled:!0,phase:"main",fn:Id,effect:Fd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kt(t){return t.split("-")[1]}var $d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vd(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:Ct(o*r)/r||0,y:Ct(a*r)/r||0}}function Ca(t){var n,o=t.popper,a=t.popperRect,r=t.placement,i=t.variation,c=t.offsets,d=t.position,l=t.gpuAcceleration,s=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=c.x,g=m===void 0?0:m,_=c.y,f=_===void 0?0:_,C=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=C.x,f=C.y;var w=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),N=xe,h=_e,A=window;if(s){var x=Ft(o),L="clientHeight",D="clientWidth";if(x===Ae(o)&&(x=Ze(o),qe(x).position!=="static"&&d==="absolute"&&(L="scrollHeight",D="scrollWidth")),x=x,r===_e||(r===xe||r===Ie)&&i===Ot){h=Oe;var V=u&&x===A&&A.visualViewport?A.visualViewport.height:x[L];f-=V-a.height,f*=l?1:-1}if(r===xe||(r===_e||r===Oe)&&i===Ot){N=Ie;var B=u&&x===A&&A.visualViewport?A.visualViewport.width:x[D];g-=B-a.width,g*=l?1:-1}}var I=Object.assign({position:d},s&&$d),H=p===!0?vd({x:g,y:f},Ae(o)):{x:g,y:f};if(g=H.x,f=H.y,l){var P;return Object.assign({},I,(P={},P[h]=k?"0":"",P[N]=w?"0":"",P.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},I,(n={},n[h]=k?f+"px":"",n[N]=w?g+"px":"",n.transform="",n))}function Md(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,i=o.adaptive,c=i===void 0?!0:i,d=o.roundOffsets,l=d===void 0?!0:d,s={placement:Ue(n.placement),variation:kt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Ca(Object.assign({},s,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:c,roundOffsets:l})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ca(Object.assign({},s,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const Pd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Md,data:{}};var Zt={passive:!0};function jd(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,c=a.resize,d=c===void 0?!0:c,l=Ae(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&s.forEach(function(p){p.addEventListener("scroll",o.update,Zt)}),d&&l.addEventListener("resize",o.update,Zt),function(){i&&s.forEach(function(p){p.removeEventListener("scroll",o.update,Zt)}),d&&l.removeEventListener("resize",o.update,Zt)}}const Rd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jd,data:{}};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function en(t){return t.replace(/left|right|bottom|top/g,function(n){return Ud[n]})}var Gd={start:"end",end:"start"};function wa(t){return t.replace(/start|end/g,function(n){return Gd[n]})}function Zn(t){var n=Ae(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function eo(t){return wt(Ze(t)).left+Zn(t).scrollLeft}function zd(t,n){var o=Ae(t),a=Ze(t),r=o.visualViewport,i=a.clientWidth,c=a.clientHeight,d=0,l=0;if(r){i=r.width,c=r.height;var s=fa();(s||!s&&n==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:c,x:d+eo(t),y:l}}function Hd(t){var n,o=Ze(t),a=Zn(t),r=(n=t.ownerDocument)==null?void 0:n.body,i=rt(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=rt(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+eo(t),l=-a.scrollTop;return qe(r||o).direction==="rtl"&&(d+=rt(o.clientWidth,r?r.clientWidth:0)-i),{width:i,height:c,x:d,y:l}}function to(t){var n=qe(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function ka(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&to(t)?t:ka(Jt(t))}function $t(t,n){var o;n===void 0&&(n=[]);var a=ka(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),i=Ae(a),c=r?[i].concat(i.visualViewport||[],to(a)?a:[]):a,d=n.concat(c);return r?d:d.concat($t(Jt(c)))}function no(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yd(t,n){var o=wt(t,!1,n==="fixed");return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}function _a(t,n,o){return n===da?no(zd(t,o)):at(n)?Yd(n,o):no(Hd(Ze(t)))}function Wd(t){var n=$t(Jt(t)),o=["absolute","fixed"].indexOf(qe(t).position)>=0,a=o&&Fe(t)?Ft(t):t;return at(a)?n.filter(function(r){return at(r)&&ma(r,a)&&Re(r)!=="body"}):[]}function qd(t,n,o,a){var r=n==="clippingParents"?Wd(t):[].concat(n),i=[].concat(r,[o]),c=i[0],d=i.reduce(function(l,s){var p=_a(t,s,a);return l.top=rt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=rt(p.left,l.left),l},_a(t,c,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function xa(t){var n=t.reference,o=t.element,a=t.placement,r=a?Ue(a):null,i=a?kt(a):null,c=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,l;switch(r){case _e:l={x:c,y:n.y-o.height};break;case Oe:l={x:c,y:n.y+n.height};break;case Ie:l={x:n.x+n.width,y:d};break;case xe:l={x:n.x-o.width,y:d};break;default:l={x:n.x,y:n.y}}var s=r?Jn(r):null;if(s!=null){var p=s==="y"?"height":"width";switch(i){case bt:l[s]=l[s]-(n[p]/2-o[p]/2);break;case Ot:l[s]=l[s]+(n[p]/2-o[p]/2);break}}return l}function vt(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,i=o.strategy,c=i===void 0?t.strategy:i,d=o.boundary,l=d===void 0?md:d,s=o.rootBoundary,p=s===void 0?da:s,u=o.elementContext,m=u===void 0?It:u,g=o.altBoundary,_=g===void 0?!1:g,f=o.padding,C=f===void 0?0:f,w=ga(typeof C!="number"?C:ba(C,Vt)),k=m===It?hd:It,N=t.rects.popper,h=t.elements[_?k:m],A=qd(at(h)?h:h.contextElement||Ze(t.elements.popper),l,p,c),x=wt(t.elements.reference),L=xa({reference:x,element:N,strategy:"absolute",placement:r}),D=no(Object.assign({},N,L)),V=m===It?D:x,B={top:A.top-V.top+w.top,bottom:V.bottom-A.bottom+w.bottom,left:A.left-V.left+w.left,right:V.right-A.right+w.right},I=t.modifiersData.offset;if(m===It&&I){var H=I[r];Object.keys(B).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,O=[_e,Oe].indexOf(P)>=0?"y":"x";B[P]+=H[O]*S})}return B}function Kd(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,i=o.rootBoundary,c=o.padding,d=o.flipVariations,l=o.allowedAutoPlacements,s=l===void 0?ua:l,p=kt(a),u=p?d?pa:pa.filter(function(_){return kt(_)===p}):Vt,m=u.filter(function(_){return s.indexOf(_)>=0});m.length===0&&(m=u);var g=m.reduce(function(_,f){return _[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:c})[Ue(f)],_},{});return Object.keys(g).sort(function(_,f){return g[_]-g[f]})}function Qd(t){if(Ue(t)===qn)return[];var n=en(t);return[wa(t),n,wa(n)]}function Xd(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,i=r===void 0?!0:r,c=o.altAxis,d=c===void 0?!0:c,l=o.fallbackPlacements,s=o.padding,p=o.boundary,u=o.rootBoundary,m=o.altBoundary,g=o.flipVariations,_=g===void 0?!0:g,f=o.allowedAutoPlacements,C=n.options.placement,w=Ue(C),k=w===C,N=l||(k||!_?[en(C)]:Qd(C)),h=[C].concat(N).reduce(function(G,K){return G.concat(Ue(K)===qn?Kd(n,{placement:K,boundary:p,rootBoundary:u,padding:s,flipVariations:_,allowedAutoPlacements:f}):K)},[]),A=n.rects.reference,x=n.rects.popper,L=new Map,D=!0,V=h[0],B=0;B<h.length;B++){var I=h[B],H=Ue(I),P=kt(I)===bt,S=[_e,Oe].indexOf(H)>=0,O=S?"width":"height",T=vt(n,{placement:I,boundary:p,rootBoundary:u,altBoundary:m,padding:s}),M=S?P?Ie:xe:P?Oe:_e;A[O]>x[O]&&(M=en(M));var U=en(M),y=[];if(i&&y.push(T[H]<=0),d&&y.push(T[M]<=0,T[U]<=0),y.every(function(G){return G})){V=I,D=!1;break}L.set(I,y)}if(D)for(var b=_?3:1,E=function(K){var Q=h.find(function(ee){var re=L.get(ee);if(re)return re.slice(0,K).every(function(he){return he})});if(Q)return V=Q,"break"},F=b;F>0;F--){var $=E(F);if($==="break")break}n.placement!==V&&(n.modifiersData[a]._skip=!0,n.placement=V,n.reset=!0)}}const Jd={name:"flip",enabled:!0,phase:"main",fn:Xd,requiresIfExists:["offset"],data:{_skip:!1}};function Sa(t,n,o){return o===void 0&&(o={x:0,y:0}),{top:t.top-n.height-o.y,right:t.right-n.width+o.x,bottom:t.bottom-n.height+o.y,left:t.left-n.width-o.x}}function Na(t){return[_e,Ie,Oe,xe].some(function(n){return t[n]>=0})}function Zd(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,i=n.modifiersData.preventOverflow,c=vt(n,{elementContext:"reference"}),d=vt(n,{altBoundary:!0}),l=Sa(c,a),s=Sa(d,r,i),p=Na(l),u=Na(s);n.modifiersData[o]={referenceClippingOffsets:l,popperEscapeOffsets:s,isReferenceHidden:p,hasPopperEscaped:u},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ep={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zd};function tp(t,n,o){var a=Ue(t),r=[xe,_e].indexOf(a)>=0?-1:1,i=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,c=i[0],d=i[1];return c=c||0,d=(d||0)*r,[xe,Ie].indexOf(a)>=0?{x:d,y:c}:{x:c,y:d}}function np(t){var n=t.state,o=t.options,a=t.name,r=o.offset,i=r===void 0?[0,0]:r,c=ua.reduce(function(p,u){return p[u]=tp(u,n.rects,i),p},{}),d=c[n.placement],l=d.x,s=d.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=s),n.modifiersData[a]=c}const op={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:np};function ap(t){var n=t.state,o=t.name;n.modifiersData[o]=xa({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const rp={name:"popperOffsets",enabled:!0,phase:"read",fn:ap,data:{}};function lp(t){return t==="x"?"y":"x"}function ip(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,i=r===void 0?!0:r,c=o.altAxis,d=c===void 0?!1:c,l=o.boundary,s=o.rootBoundary,p=o.altBoundary,u=o.padding,m=o.tether,g=m===void 0?!0:m,_=o.tetherOffset,f=_===void 0?0:_,C=vt(n,{boundary:l,rootBoundary:s,padding:u,altBoundary:p}),w=Ue(n.placement),k=kt(n.placement),N=!k,h=Jn(w),A=lp(h),x=n.modifiersData.popperOffsets,L=n.rects.reference,D=n.rects.popper,V=typeof f=="function"?f(Object.assign({},n.rects,{placement:n.placement})):f,B=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),I=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,H={x:0,y:0};if(x){if(i){var P,S=h==="y"?_e:xe,O=h==="y"?Oe:Ie,T=h==="y"?"height":"width",M=x[h],U=M+C[S],y=M-C[O],b=g?-D[T]/2:0,E=k===bt?L[T]:D[T],F=k===bt?-D[T]:-L[T],$=n.elements.arrow,G=g&&$?Xn($):{width:0,height:0},K=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:ya(),Q=K[S],ee=K[O],re=Dt(0,L[T],G[T]),he=N?L[T]/2-b-re-Q-B.mainAxis:E-re-Q-B.mainAxis,me=N?-L[T]/2+b+re+ee+B.mainAxis:F+re+ee+B.mainAxis,Te=n.elements.arrow&&Ft(n.elements.arrow),de=Te?h==="y"?Te.clientTop||0:Te.clientLeft||0:0,$e=(P=I==null?void 0:I[h])!=null?P:0,et=M+he-$e-de,mn=M+me-$e,it=Dt(g?Xt(U,et):U,M,g?rt(y,mn):y);x[h]=it,H[h]=it-M}if(d){var st,Nt=h==="x"?_e:xe,ct=h==="x"?Oe:Ie,Ee=x[A],Qe=A==="y"?"height":"width",tt=Ee+C[Nt],nt=Ee-C[ct],ze=[_e,xe].indexOf(w)!==-1,dt=(st=I==null?void 0:I[A])!=null?st:0,pt=ze?tt:Ee-L[Qe]-D[Qe]-dt+B.altAxis,ut=ze?Ee+L[Qe]+D[Qe]-dt-B.altAxis:nt,ot=g&&ze?Vd(pt,Ee,ut):Dt(g?pt:tt,Ee,g?ut:nt);x[A]=ot,H[A]=ot-Ee}n.modifiersData[a]=H}}const sp={name:"preventOverflow",enabled:!0,phase:"main",fn:ip,requiresIfExists:["offset"]};function cp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dp(t){return t===Ae(t)||!Fe(t)?Zn(t):cp(t)}function pp(t){var n=t.getBoundingClientRect(),o=Ct(n.width)/t.offsetWidth||1,a=Ct(n.height)/t.offsetHeight||1;return o!==1||a!==1}function up(t,n,o){o===void 0&&(o=!1);var a=Fe(n),r=Fe(n)&&pp(n),i=Ze(n),c=wt(t,r,o),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!o)&&((Re(n)!=="body"||to(i))&&(d=dp(n)),Fe(n)?(l=wt(n,!0),l.x+=n.clientLeft,l.y+=n.clientTop):i&&(l.x=eo(i))),{x:c.left+d.scrollLeft-l.x,y:c.top+d.scrollTop-l.y,width:c.width,height:c.height}}function fp(t){var n=new Map,o=new Set,a=[];t.forEach(function(i){n.set(i.name,i)});function r(i){o.add(i.name);var c=[].concat(i.requires||[],i.requiresIfExists||[]);c.forEach(function(d){if(!o.has(d)){var l=n.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){o.has(i.name)||r(i)}),a}function mp(t){var n=fp(t);return Nd.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function hp(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function yp(t){var n=t.reduce(function(o,a){var r=o[a.name];return o[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,o},{});return Object.keys(n).map(function(o){return n[o]})}var Aa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ta(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function gp(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,i=r===void 0?Aa:r;return function(d,l,s){s===void 0&&(s=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Aa,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(w){var k=typeof w=="function"?w(p.options):w;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:at(d)?$t(d):d.contextElement?$t(d.contextElement):[],popper:$t(l)};var N=mp(yp([].concat(a,p.options.modifiers)));return p.orderedModifiers=N.filter(function(h){return h.enabled}),_(),g.update()},forceUpdate:function(){if(!m){var w=p.elements,k=w.reference,N=w.popper;if(Ta(k,N)){p.rects={reference:up(k,Ft(N),p.options.strategy==="fixed"),popper:Xn(N)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(B){return p.modifiersData[B.name]=Object.assign({},B.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var A=p.orderedModifiers[h],x=A.fn,L=A.options,D=L===void 0?{}:L,V=A.name;typeof x=="function"&&(p=x({state:p,options:D,name:V,instance:g})||p)}}}},update:hp(function(){return new Promise(function(C){g.forceUpdate(),C(p)})}),destroy:function(){f(),m=!0}};if(!Ta(d,l))return g;g.setOptions(s).then(function(C){!m&&s.onFirstUpdate&&s.onFirstUpdate(C)});function _(){p.orderedModifiers.forEach(function(C){var w=C.name,k=C.options,N=k===void 0?{}:k,h=C.effect;if(typeof h=="function"){var A=h({state:p,name:w,instance:g,options:N}),x=function(){};u.push(A||x)}})}function f(){u.forEach(function(C){return C()}),u=[]}return g}}var bp=[Rd,rp,Pd,Ed,op,Jd,sp,Dd,ep],Cp=gp({defaultModifiers:bp});function oo(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function Ea(t,n){if(t){if(typeof t=="string")return oo(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?oo(t,n):void 0}}function wp(t){return function(n){if(Array.isArray(n))return oo(n)}(t)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(t)||Ea(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _t(t){return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_t(t)}function La(t,n,o,a,r,i,c){try{var d=t[i](c),l=d.value}catch(s){return void o(s)}d.done?n(l):Promise.resolve(l).then(a,r)}function Ba(t){return function(){var n=this,o=arguments;return new Promise(function(a,r){var i=t.apply(n,o);function c(l){La(i,a,r,c,d,"next",l)}function d(l){La(i,a,r,c,d,"throw",l)}c(void 0)})}}var Va={exports:{}},Oa={exports:{}};(function(t){function n(o){return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(Oa),function(t){var n=Oa.exports.default;function o(){t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,c=i.hasOwnProperty,d=Object.defineProperty||function(y,b,E){y[b]=E.value},l=typeof Symbol=="function"?Symbol:{},s=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,E){return Object.defineProperty(y,b,{value:E,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,E,F){return b[E]=F}}function g(y,b,E,F){var $=b&&b.prototype instanceof h?b:h,G=Object.create($.prototype),K=new M(F||[]);return d(G,"_invoke",{value:P(y,E,K)}),G}function _(y,b,E){try{return{type:"normal",arg:y.call(b,E)}}catch(F){return{type:"throw",arg:F}}}r.wrap=g;var f="suspendedStart",C="suspendedYield",w="executing",k="completed",N={};function h(){}function A(){}function x(){}var L={};m(L,s,function(){return this});var D=Object.getPrototypeOf,V=D&&D(D(U([])));V&&V!==i&&c.call(V,s)&&(L=V);var B=x.prototype=h.prototype=Object.create(L);function I(y){["next","throw","return"].forEach(function(b){m(y,b,function(E){return this._invoke(b,E)})})}function H(y,b){function E($,G,K,Q){var ee=_(y[$],y,G);if(ee.type!=="throw"){var re=ee.arg,he=re.value;return he&&n(he)=="object"&&c.call(he,"__await")?b.resolve(he.__await).then(function(me){E("next",me,K,Q)},function(me){E("throw",me,K,Q)}):b.resolve(he).then(function(me){re.value=me,K(re)},function(me){return E("throw",me,K,Q)})}Q(ee.arg)}var F;d(this,"_invoke",{value:function($,G){function K(){return new b(function(Q,ee){E($,G,Q,ee)})}return F=F?F.then(K,K):K()}})}function P(y,b,E){var F=f;return function($,G){if(F===w)throw new Error("Generator is already running");if(F===k){if($==="throw")throw G;return{value:a,done:!0}}for(E.method=$,E.arg=G;;){var K=E.delegate;if(K){var Q=S(K,E);if(Q){if(Q===N)continue;return Q}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(F===f)throw F=k,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);F=w;var ee=_(y,b,E);if(ee.type==="normal"){if(F=E.done?k:C,ee.arg===N)continue;return{value:ee.arg,done:E.done}}ee.type==="throw"&&(F=k,E.method="throw",E.arg=ee.arg)}}}function S(y,b){var E=b.method,F=y.iterator[E];if(F===a)return b.delegate=null,E==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,S(y,b),b.method==="throw")||E!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+E+"' method")),N;var $=_(F,y.iterator,b.arg);if($.type==="throw")return b.method="throw",b.arg=$.arg,b.delegate=null,N;var G=$.arg;return G?G.done?(b[y.resultName]=G.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,N):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,N)}function O(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function T(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function M(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(O,this),this.reset(!0)}function U(y){if(y||y===""){var b=y[s];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var E=-1,F=function $(){for(;++E<y.length;)if(c.call(y,E))return $.value=y[E],$.done=!1,$;return $.value=a,$.done=!0,$};return F.next=F}}throw new TypeError(n(y)+" is not iterable")}return A.prototype=x,d(B,"constructor",{value:x,configurable:!0}),d(x,"constructor",{value:A,configurable:!0}),A.displayName=m(x,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===A||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,x):(y.__proto__=x,m(y,u,"GeneratorFunction")),y.prototype=Object.create(B),y},r.awrap=function(y){return{__await:y}},I(H.prototype),m(H.prototype,p,function(){return this}),r.AsyncIterator=H,r.async=function(y,b,E,F,$){$===void 0&&($=Promise);var G=new H(g(y,b,E,F),$);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},I(B),m(B,u,"Generator"),m(B,s,function(){return this}),m(B,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),E=[];for(var F in b)E.push(F);return E.reverse(),function $(){for(;E.length;){var G=E.pop();if(G in b)return $.value=G,$.done=!1,$}return $.done=!0,$}},r.values=U,M.prototype={constructor:M,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(T),!y)for(var b in this)b.charAt(0)==="t"&&c.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function E(ee,re){return G.type="throw",G.arg=y,b.next=ee,re&&(b.method="next",b.arg=a),!!re}for(var F=this.tryEntries.length-1;F>=0;--F){var $=this.tryEntries[F],G=$.completion;if($.tryLoc==="root")return E("end");if($.tryLoc<=this.prev){var K=c.call($,"catchLoc"),Q=c.call($,"finallyLoc");if(K&&Q){if(this.prev<$.catchLoc)return E($.catchLoc,!0);if(this.prev<$.finallyLoc)return E($.finallyLoc)}else if(K){if(this.prev<$.catchLoc)return E($.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return E($.finallyLoc)}}}},abrupt:function(y,b){for(var E=this.tryEntries.length-1;E>=0;--E){var F=this.tryEntries[E];if(F.tryLoc<=this.prev&&c.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var $=F;break}}$&&(y==="break"||y==="continue")&&$.tryLoc<=b&&b<=$.finallyLoc&&($=null);var G=$?$.completion:{};return G.type=y,G.arg=b,$?(this.method="next",this.next=$.finallyLoc,N):this.complete(G)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),N},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var E=this.tryEntries[b];if(E.finallyLoc===y)return this.complete(E.completion,E.afterLoc),T(E),N}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var E=this.tryEntries[b];if(E.tryLoc===y){var F=E.completion;if(F.type==="throw"){var $=F.arg;T(E)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,E){return this.delegate={iterator:U(y),resultName:b,nextLoc:E},this.method==="next"&&(this.arg=a),N}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}(Va);var tn=Va.exports(),nn=tn;try{regeneratorRuntime=tn}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=tn:Function("r","regeneratorRuntime = r")(tn)}function kp(t){var n=function(o,a){if(_t(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var i=r.call(o,a||"default");if(_t(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}(t,"string");return _t(n)==="symbol"?n:String(n)}function ao(t,n,o){return(n=kp(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var on=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var i=r.target.getBoundingClientRect(),c=i.left,d=i.top,l=function(s){var p=s.clientX,u=s.clientY,m=p-c,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var _=m/t.size*100,f=100-g/t.size*100;o("change",_,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)})}}}}),Ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},_p=Ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),xp=Ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(t,n){n===void 0&&(n={});var o=n.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",o==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Ke(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),on.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[_p,xp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},on.__scopeId="data-v-24517fec",on.__file="src/picker/Saturation.vue";var an=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var i=r.value.getContext("2d"),c=i.createLinearGradient(0,0,0,t.height);c.addColorStop(0,"#FF0000"),c.addColorStop(.17,"#FF00FF"),c.addColorStop(.34,"#0000FF"),c.addColorStop(.51,"#00FFFF"),c.addColorStop(.68,"#00FF00"),c.addColorStop(.17*5,"#FFFF00"),c.addColorStop(1,"#FF0000"),i.fillStyle=c,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var c=i.target.getBoundingClientRect().top,d=function(l){var s=l.clientY-c;s<0&&(s=0),s>t.height&&(s=t.height);var p=-100*s/t.height+100;o("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Sp={ref:"canvas"};Ke(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),an.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},an.__scopeId="data-v-78b9f4f0",an.__file="src/picker/Hue.vue";var rn=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),i=function(){var c=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(s){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*s;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,s,s),u.fillRect(s,s,s,s),p}(5);c.fillStyle=c.createPattern(d,"repeat"),c.fillRect(0,0,t.width,t.height);var l=c.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),c.fillStyle=l,c.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(c){var d=c.target.getBoundingClientRect().top,l=function(s){var p=s.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));o("change",u)};l(c),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)})}}}}),Np={ref:"canvas"};Ke(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),rn.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Np,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},rn.__scopeId="data-v-24dc9656",rn.__file="src/picker/Alpha.vue";var ln=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,n){var o=n.emit;return{onInput:function(a){var r;o("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){o("focus")},onBlur:function(){o("blur")},onEnter:function(){o("enter")}}}}),Ap={class:"input"},Tp={class:"label"},Ep=[".value"];function Mt(t,n){return function(o){if(Array.isArray(o))return o}(t)||function(o,a){var r=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var i,c,d,l,s=[],p=!0,u=!1;try{if(d=(r=r.call(o)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(i=d.call(r)).done)&&(s.push(i.value),s.length!==a);p=!0);}catch(m){u=!0,c=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw c}}return s}}(t,n)||Ea(t,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fa(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function De(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?Fa(Object(o),!0).forEach(function(a){ao(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Fa(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ke(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),ln.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("span",Tp,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:n[0]||(n[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:n[1]||(n[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:n[2]||(n[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:n[3]||(n[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,Ep)])},ln.__scopeId="data-v-d52a4d02",ln.__file="src/picker/InputValue.vue";var Da=function(t,n,o){return[t,n*o/((t=(2-n)*o)<1?t:2-t)||0,t/2]},$a={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},sn=function(t){t=Math.min(Math.round(t),255);var n=Math.floor(t/16),o=t%16;return"".concat($a[n]||n).concat($a[o]||o)},va=function(t){var n=t.r,o=t.g,a=t.b;return isNaN(n)||isNaN(o)||isNaN(a)?"":"#".concat(sn(n)).concat(sn(o)).concat(sn(a))},xt=function(t,n){var o;typeof(o=t)=="string"&&o.indexOf(".")!==-1&&parseFloat(o)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(n,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*n),10)/100),Math.abs(t-n)<1e-6?1:t%n/parseFloat(n)},Pt=function(t,n,o){t=6*xt(t,360),n=xt(n,100),o=xt(o,100);var a=Math.floor(t),r=t-a,i=o*(1-n),c=o*(1-r*n),d=o*(1-(1-r)*n),l=a%6,s=[o,c,i,i,d,o][l],p=[d,o,o,c,i,i][l],u=[i,i,d,o,o,c][l];return{r:Math.round(255*s),g:Math.round(255*p),b:Math.round(255*u)}},Ma=function(t,n,o){var a=t.h,r=t.s,i=t.v,c=t.a;if(o)switch(n){case"hsl":var d=Da(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(c,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(c,")");case"rgb":var l=Pt(a,r,i),s=l.r,p=l.g,u=l.b;return"rgba(".concat(s,", ").concat(p,", ").concat(u,", ").concat(c,")");default:return"".concat(va(Pt(a,r,i))).concat(sn(255*c))}else switch(n){case"hsl":var m=Da(a,r/100,i/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%)");case"rgb":var g=Pt(a,r,i),_=g.r,f=g.g,C=g.b;return"rgb(".concat(_,", ").concat(f,", ").concat(C,")");default:return va(Pt(a,r,i))}},cn=function(t){var n=t.r,o=t.g,a=t.b;n=xt(n,255),o=xt(o,255),a=xt(a,255);var r,i=Math.max(n,o,a),c=Math.min(n,o,a),d=i,l=i-c,s=i===0?0:l/i;if(i===c)r=0;else{switch(i){case n:r=(o-a)/l+(o<a?6:0);break;case o:r=(a-n)/l+2;break;case a:r=(n-o)/l+4}r/=6}return{h:360*r,s:100*s,v:100*d}},Pa=function(t){var n=t.h,o=t.s,a=t.l;a/=100;var r=o/=100,i=Math.max(a,.01);return o*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+n,s:100*(a===0?2*r/(i+r):2*o/(a+o)),v:100*((a+o)/2)}},ja=function(t){var n=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var o=1;o<t.length;o++)n.push(parseInt("0x"+t[o].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)n.push(parseInt("0x"+t.slice(a,a+2)));return{r:n[0],g:n[1],b:n[2],a:n[3]}},ro=function(t,n,o){if(typeof t=="string"&&t!==""){var a=lo(t,io(t),o),r=za(a);return Ma(r,n,o)}return""},Ra=function(t){var n=Mt(t.match(/(\d(\.\d+)?)+/g),4);return{r:n[0],g:n[1],b:n[2],a:n[3]}},Ua=function(t){var n=Mt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],i=n[3];return{h:o,s:parseFloat(a),l:parseFloat(r),a:i}},Ga=function(t){var n=Mt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],i=n[3];return{h:parseFloat(o),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},lo=function(t,n){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(n){case"rgb":var o=Ra(t),a=o.r,r=o.g,i=o.b,c=o.a;return De(De({},cn({r:a,g:r,b:i})),{},{a:+c});case"hsv":var d=Ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ua(t),s=l.h,p=l.s,u=l.l,m=l.a;return De(De({},Pa({h:s,s:p,l:u})),{},{a:+m});default:var g=ja(t),_=g.r,f=g.g,C=g.b,w=g.a;return De(De({},cn({r:_,g:f,b:C})),{},{a:w/255})}else switch(n){case"rgb":return De(De({},cn(Ra(t))),{},{a:1});case"hsv":var k=Ga(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return De(De({},Pa(Ua(t))),{},{a:1});default:return De(De({},cn(ja(t))),{},{a:1})}},io=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},za=function(t){var n=t.h,o=t.s,a=t.v,r=t.a;return isNaN(n)&&(n=0),isNaN(o)&&(o=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:n,s:o,v:a,a:r}},jt=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var n=e.ref(),o=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),i=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(o)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}}),c=function(){var d=n.value.getContext("2d");n.value.width=e.unref(a),n.value.height=e.unref(r);var l=function(s){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*s;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,s,s),u.fillRect(s,s,s,s),p}(5);d.fillStyle=d.createPattern(l,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){c()}),e.onMounted(function(){c()}),{canvas:n,colorItemStyle:i}}}),Lp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),jt.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Lp)},jt.__scopeId="data-v-02da71fd",jt.__file="src/color-item/ColorItem.vue";var dn=e.defineComponent({name:"Colors",components:{ColorItem:jt},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,n){var o=n.emit;return{onSelectColor:function(a,r){o("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return ro(a,"hex",!0)})})}}}),Bp={class:"colors"};function Ha(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Ge(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?Ha(Object(o),!0).forEach(function(a){ao(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ha(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),dn.render=function(t,n,o,a,r,i){var c=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(c,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(s){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},dn.__scopeId="data-v-0f8b52a8",dn.__file="src/picker/Colors.vue";var pn=e.defineComponent({name:"Picker",components:{Colors:dn,Saturation:on,Hue:an,Alpha:rn,InputValue:ln},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),c=e.ref(),d=e.ref(),l=function(){var k,N=(k=t.value)===null||k===void 0?void 0:k.trim();if(N!=null&&N!==""){var h=io(N);return za(lo(N,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,N){var h="";k!=null?(h=Ma(Ge({},k),t.format,t.showAlpha),c.value=Ge({},k)):c.value=null,d.value=h;var A=l();JSON.stringify(k)!==JSON.stringify(A)&&JSON.stringify(k)!==JSON.stringify(N)&&o("change",h)},{immediate:!0});var s=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,N;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(N=e.unref(i))===null||N===void 0?void 0:N.a:1}),g=e.computed(function(){return Pt(e.unref(s),e.unref(p),e.unref(u))}),_=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),C=e.ref(-1),w=function(k,N,h){if(k.length!==0){var A=lo(k,N,h),x=A.h,L=A.s,D=A.v;if(!(isNaN(x)||isNaN(L)||isNaN(D))){var V=1,B=A.a;isNaN(B)||(V=B),i.value={h:x,s:L,v:D,a:V}}}};return{h:s,s:p,v:u,a:m,rgbStr:_,onSelectSaturation:function(k,N){C.value=-1,e.unref(i)==null?i.value={h:e.unref(s),s:k,v:N,a:e.unref(m)}:i.value=Ge(Ge({},e.unref(i)),{},{s:k,v:N})},onSelectHue:function(k){C.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=Ge(Ge({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){C.value=-1,e.unref(i)==null?i.value={h:e.unref(s),s:e.unref(p),v:e.unref(u),a:k}:i.value=Ge(Ge({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){C.value=-1,d.value=k},handleChange:function(){var k,N=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(N!==""){var h=t.showAlpha,A=t.format,x=function(L,D,V){if(V)switch(D){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(L);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(L);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(L);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(L)}else switch(D){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(L);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(L);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(L);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(L)}}(N,A,h);x?w(N,A,h):e.unref(c)!=null?i.value=e.unref(c):d.value=""}else i.value=null},selectColorIndex:C,onSelectColor:function(k,N){if(C.value=N,(k=k.trim())==="")i.value=null;else{var h=io(k);h?w(k,h,!0):i.value=null}}}}}),Vp={class:"picker-inner"},Op={class:"picker-header"};Ke(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),pn.render=function(t,n,o,a,r,i){var c=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=e.resolveComponent("alpha"),s=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Vp,[e.createElementVNode("div",Op,[e.createVNode(c,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(l,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(s,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},pn.__scopeId="data-v-6ceadec6",pn.__file="src/picker/Picker.vue";var un=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var n=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}})}}}),Ip=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function Ya(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function so(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?Ya(Object(o),!0).forEach(function(a){ao(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ya(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ke(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),un.render=function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(Ip),4)},un.__scopeId="data-v-ceb1719c",un.__file="src/add-color-item/AddColorItem.vue";var lt=null,St=e.defineComponent({name:"ColorPicker",components:{ColorItem:jt,Picker:pn,AddColorItem:un},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,n){var o=n.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(S){return ro(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",O=Array.isArray(S)?S:[S];a.value=O.map(function(T){return ro(T,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),c=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,s,p,u,m,g,_,f=e.ref(null),C=e.ref(null),w=(l=f,s=C,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){lt.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(S){var O=S.state,T=O.styles,M=O.placement,U=T.popper;u.value=so(so(so({},U),p),{},{transformOrigin:M==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(s)]},function(S,O){var T,M=Mt(S,2),U=M[0],y=M[1],b=Mt(O,2),E=b[0],F=b[1];if(U&&y&&(E!==U||F!==E)){(T=lt)===null||T===void 0||T.destroy();var $=U.$el||U,G=y.$el||y;e.nextTick(function(){lt=Cp($,G,m)})}}),e.onBeforeUnmount(function(){var S;lt&&((S=lt)===null||S===void 0||S.destroy(),lt=null)}),{instance:lt,style:u}),k=w.style,N=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:o("update:showPicker",!0)},h=function(){i.value=void 0,t.showPicker===void 0?d.value=!1:o("update:showPicker",!1),o("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},A=e.ref(),x=function(){var S=Ba(nn.mark(function O(T){var M,U,y,b;return nn.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(U=T.target,(y=(M=U.dataset)===null||M===void 0?void 0:M.index)!=null&&y!==""){E.next=4;break}return E.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){E.next=7;break}return E.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){N(),clearTimeout(g)},100)):N(),i.value=b,f.value=U;case 10:case"end":return E.stop()}},O)}));return function(O){return S.apply(this,arguments)}}(),L=function(){var S=Ba(nn.mark(function O(T){var M,U,y,b,E;return nn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(b=T.target,!(!((M=e.unref(A))!==null&&M!==void 0&&M.isEqualNode(b))&&(!((U=e.unref(A))===null||U===void 0)&&U.contains(b)))){F.next=4;break}return F.abrupt("return");case 4:if(E=(y=e.unref(C))===null||y===void 0?void 0:y.$el,!(E!=null&&E.contains(b))){F.next=8;break}return F.abrupt("return");case 8:_&&clearTimeout(_),_=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return F.stop()}},O)}));return function(O){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(N(),clearTimeout(_))});var D,V=e.ref(t.max>e.unref(a).length),B=e.computed(function(){return typeof t.popupContainer=="string"||_t(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),I=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),H=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(C)]},function(){e.nextTick(function(){var S,O;(S=e.unref(A))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(H)),(O=e.unref(C))===null||O===void 0||(O=O.$el)===null||O===void 0||O.setAttribute("pick-colors-theme",e.unref(H))})},{immediate:!0}),e.provide("theme",{theme:H});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",L,!1),t.showPicker&&N()}),e.onUnmounted(function(){document.removeEventListener("mouseup",L,!1),g&&(clearTimeout(g),g=null),_&&(clearTimeout(_),_=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:c,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(S){var O=e.unref(i),T=e.unref(a).slice(),M=e.unref(a).length;if(O!=null){O>=0?T[O]=S:(i.value=M,T.push(S));var U="";U=Array.isArray(t.value)||t.addColor?T:S,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(o("update:value",U),o("change",U,S,O)),t.addColor&&M>=t.max&&(V.value=!1,o("overflowMax"))}},colorPicker:A,onColorClick:x,pickerRef:C,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var O=S.target;D=+O.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var O=+S.target.dataset.index,T=wp(e.unref(a)),M=T[D];T.splice(D,1);var U=T.slice(0,O),y=T.splice(O),b=U.concat([M]).concat(y);o("update:value",b),o("change",b,b[D],D)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:I,toPopupContainer:B}}});Ke(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),St.render=function(t,n,o,a,r,i){var c=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:n[0]||(n[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:n[1]||(n[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:n[2]||(n[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:n[3]||(n[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(s,p){return e.openBlock(),e.createBlock(c,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:s,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(l,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},St.__scopeId="data-v-3c43ade8",St.__file="src/ColorPicker.vue";const Fp=e.defineComponent({name:"ColorPick",components:{PickColors:St,AInput:v.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,n){const o=e.computed({get:()=>t.value,set:r=>{n.emit("change",r)}});return{colorValue:o,onChangColor:r=>{o.value=r.hex}}}}),Kf="",Dp={class:"color-pick"};function $p(t,n,o,a,r,i){const c=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Dp,[e.createVNode(c,{class:"input",value:t.colorValue,"onUpdate:value":n[0]||(n[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":n[1]||(n[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const vp=oe(Fp,[["render",$p],["__scopeId","data-v-e2113f43"]]),Mp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:St},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:n}){const o=i=>{n("change",i)},a=e.ref(13);return{onColorsChange:o,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Qf="",Pp={class:"color-group-pick"};function jp(t,n,o,a,r,i){const c=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(c,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rp=oe(Mp,[["render",jp],["__scopeId","data-v-b2be8322"]]),Up=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:jo,MinusCircleOutlined:Gl,PickColors:St,InputNumber:ca,PlusCircleOutlined:Wl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:n}){const o=e.computed({get:()=>t.value,set:s=>{n("change",s)}});return{myValue:o,onAdd:()=>{var u;const s=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(s))return;const p=s.length;if(t.max===-1||t.max>p){const m=s[0];if(Object.prototype.toString.call(m)==="[object Object]"){const g=Object.keys(m),_={};g.forEach(f=>{_[f]=""}),s.push(_)}else typeof m=="string"&&s.push(m);o.value=s}else v.message.warn("已达到最大上限")},useComponentType:s=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[s],onValueChange:(s,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const _=s==null?void 0:s.target,f=(_==null?void 0:_.value)!=null?_==null?void 0:_.value:s;u?m[p][u]=f:m[p]=f,o.value=m}},onDelete:s=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(s,1),o.value=p}},theme:"light",formatTypeValue:s=>s||"value"}}}),Xf="",Gp={class:"form-group"},zp={class:"form-row"},Hp={key:0,class:"label"},Yp={key:1,class:"label"},Wp={class:"icon-group"};function qp(t,n,o,a,r,i){const c=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(c,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":n[0]||(n[0]=s=>t.myValue=s),"item-key":"id"},{item:e.withCtx(({element:s,index:p})=>[e.createElementVNode("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Hp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Yp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof s=="string"?s:s[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(s,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kp=oe(Up,[["render",qp],["__scopeId","data-v-f0c0ab4d"]]),Qp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:n}){return{onTextareaChange:a=>{n("change",a.target.value)}}}});function Xp(t,n,o,a,r,i){const c=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(c,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jp=oe(Qp,[["render",Xp]]),Zp=e.defineComponent({name:"PropsToForm",components:{Input:nd,InputNumber:ca,RadioGroup:id,Select:dd,Switch:fd,ColorPick:vp,ColorGroupPick:Rp,FormGroup:Kp,Textarea:Jp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const n=e.inject(Ut),o=e.inject(hn),a=e.inject(yn),r=e.computed(()=>{var l;return(l=e.unref(n))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):o(l)},c=l=>{const{result:s,mapAttributeProp:p,key:u,value:m}=l;if(s==null||typeof s!="object")return;const{valueProp:g="value",changeValueEventName:_="change",events:f}=p;s[u]={...p,valueProp:g,value:m,events:{[_]:(C,w=!0)=>{i(w?{[u]:C}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:Z.reduce(l,(s,p,u)=>{const m=Zc[u];if(Array.isArray(m)){const g=m.find(_=>{const{onlyType:f,excludeType:C}=_;return f==null&&C==null?!0:f?ke(e.unref(r),f):C?!ke(e.unref(r),C):!1});g&&c({result:s,value:p,key:u,mapAttributeProp:g})}else c({result:s,value:p,key:u,mapAttributeProp:m});return s},{})}),lowerCaseIncludes:ke}}}),Jf="",eu={class:"props-to-form"},tu={class:"label"},nu={class:"component-wrapper"};function ou(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tu,e.toDisplayString(c.label),1),e.createElementVNode("div",nu,[Array.isArray(c)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c,(l,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:s,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),e.mergeProps({key:0,class:"component",[c.valueProp||""]:c.value,style:c.style,disabled:t.disabled},c.props,e.toHandlers(c.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const au=oe(Zp,[["render",ou],["__scopeId","data-v-c6fb2484"]]);function ru(){return new Worker("/assets/editor.worker-02df2e61.js")}function lu(){return new Worker("/assets/json.worker-867823a6.js")}function iu(){return new Worker("/assets/ts.worker-7254b425.js")}const su=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:n}){window.MonacoEnvironment={getWorker(i,c){return c==="json"?new lu:c==="typescript"||c==="javascript"?new iu:new ru}};const o=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=er.editor.create(o.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(Z.debounce(()=>{const i=a==null?void 0:a.getValue();n("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();n("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const c=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),c!=null&&a.setPosition(c)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:o}}}),Zf="",cu={class:"editor",ref:"dom"};function du(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",cu,null,512)}const Wa=oe(su,[["render",du],["__scopeId","data-v-71e88372"]]),pu=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],uu=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:Wa},setup(){const t=e.inject(Ye),n=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),o=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,c="";const d=e.ref(""),l=e.ref(""),s=e.ref(!1);e.watch(o,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var C,w,k;let f=[];if(r.value=[],!n.value)f=((C=e.unref(o))==null?void 0:C.queryColumnList)||[];else{const N=((w=e.unref(o))==null?void 0:w.rowHeaderList)||[],h=((k=e.unref(o))==null?void 0:k.indicators)||[];f=[...N,...h]}f.forEach(N=>{var A;let h=(A=e.unref(a))==null?void 0:A.find(x=>x.prop===N.name);h||(h={label:N.label,prop:N.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pu,configData:r,editorTitle:l,editorVisible:s,optionCode:d,handleOk:()=>{i&&c&&(i[c]=d.value),d.value="",s.value=!1},renderSave:(f,C,w)=>{f&&C&&(i=f,c=C,d.value=f[C]||"",s.value=!0,l.value=w)},onEditorChange:f=>{try{d.value=f}catch(C){console.error(C)}},changeRenderBool:(f,C)=>{f.style=C.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),em="",fu={class:"table-column-config"};function mu(t,n,o,a,r,i){const c=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),s=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",fu,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:_,text:f,record:C})=>[_.dataIndex==="style"?(e.openBlock(),e.createBlock(c,{key:0,onChange:w=>t.changeRenderBool(C,w),checked:C.style},null,8,["onChange","checked"])):_.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:C.width,"onUpdate:value":w=>C.width=w,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):_.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.renderText,"onUpdate:value":w=>C.renderText=w,readOnly:!0,onClick:w=>t.renderSave(C,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):_.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.headerTemplate,"onUpdate:value":w=>C.headerTemplate=w,readOnly:!0,onClick:w=>t.renderSave(C,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):_.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(s,{key:4,style:{width:"100%"},size:"small",value:C.headerAlign,"onUpdate:value":w=>C.headerAlign=w},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="align"?(e.openBlock(),e.createBlock(s,{key:5,style:{width:"100%"},size:"small",value:C.align,"onUpdate:value":w=>C.align=w},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="fixed"?(e.openBlock(),e.createBlock(s,{key:6,style:{width:"100%"},size:"small",value:C.fixed,"onUpdate:value":w=>C.fixed=w},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(s,{key:7,value:C.dataFormat,"onUpdate:value":w=>C.dataFormat=w,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[C.dataFormat&&C.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:C.retentiondigit,"onUpdate:value":w=>C.retentiondigit=w,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":n[0]||(n[0]=_=>t.editorVisible=_),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const hu=oe(uu,[["render",mu],["__scopeId","data-v-afebddc0"]]),yu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:au,TableColumnConfig:hu,Editor:Wa,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const n=e.ref([]),o=e.ref(["表格"]),a=e.inject(Ut),r=e.inject(mo),i=e.inject(hn),c=e.inject(yn),d=e.inject(fo),l=A=>{i({...Co[A]},!1),d()},s=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Jc.map(A=>{const{props:x,title:L,enableProps:D,onlyType:V,excludeType:B}=A,I=[];x.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&I.push(S):I.push(S))});let H,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(H=typeof D=="string"&&r.value?r.value[D]:void 0,P=Z.pick(e.unref(r),I)):(H=typeof D=="string"&&a.value?a.value[D]:void 0,P=Z.pick(e.unref(a),I)),{title:L,enableProps:H,enablePropsName:D,onlyType:V,excludeType:B,props:P}}).filter(({props:A})=>Object.keys(A).length>0)),m=(A,x)=>{const{onlyType:L,excludeType:D}=A;return L==null&&D==null?!0:L?ke(x,L):D?!ke(x,D):!1},g=(A,x)=>(x==null||x.stopPropagation(),A),_=(A,x)=>{x!=null&&i({[x]:A})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),C=A=>{try{const x=JSON.parse(A||"{}");i(x,!1)}catch(x){console.error(x)}},w=e.ref(""),k=A=>{try{w.value=A}catch(x){console.error(x)}},N=(A,x)=>{try{c({[x]:A})}catch(L){console.error(L)}},h=e.computed(()=>{var A;return["customGraph"].includes((A=e.unref(a))==null?void 0:A.type)});return{type:s,handleChangeType:l,activePanel:n,tablePanel:o,ComponentString:f,updateComponentOptions:C,tableOptions:r,optionCode:w,onEditorChange:k,tableEditorChange:N,onSwitchClick:g,onSwitchChange:_,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),tm="",nm="",gu={class:"style-group"};function bu(t,n,o,a,r,i){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),_=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":n[0]||(n[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(c,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(c,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(c,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(c,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(c,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":n[1]||(n[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(s,{key:0,checked:f.enableProps,onChange:C=>t.onSwitchChange(C,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":n[4]||(n[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var C;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((C=f.onlyType)!=null&&C.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(_)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:n[2]||(n[2]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:n[3]||(n[3]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Cu=oe(yu,[["render",bu],["__scopeId","data-v-2fb3e2ad"]]),wu=e.defineComponent({name:"Card",components:{CloseOutlined:qt,MenuOutlined:Qo,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const n=e.inject(Pe),o=e.inject(Gt),a=e.inject(go),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:c}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,E)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(n))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var E,F;const y=[],b=(E=e.unref(d))==null?void 0:E.find($=>{var G;return $.id===((G=t.control)==null?void 0:G.id)});if(b){const $=b.type,G=Z.pick(b,["value","startTime","endTime"]);(F=Object.keys(G))!=null&&F.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(re=>ke($,re.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),s=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{c(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(E=>E.id===y);if(b){const{type:E,id:F,events:$=[]}=b,G=Qt(E),K=$.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&($.splice(K,1),o({id:F,events:$}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const E=e.unref(d).find(F=>F.id===y);E&&(b.keyName=E.keyName,L(E,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),_=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},C=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},w=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},N=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),A=e.inject(fe),x=e.computed(()=>{var Te;const{classificationList:y=[],seriesList:b=[],leftAxisList:E=[],rightAxisList:F=[],indicators:$=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(A),Q=Z.cloneDeep([...y,...b,...E,...F,...$,...G,...K]);if(Q!=null&&Q.length)for(const de of Q)de.id=de.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(de=>({...de,id:de.name,label:de.title||de.label})),...Q];((Te=e.unref(h))==null?void 0:Te.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const re=new Map,he=ee.length;for(let de=0;de<he;de++){const $e=ee[de],{id:et}=$e||{};re.set(et,$e)}return[...re].map(([de,$e])=>$e)});function L(y,b){var K,Q;const{type:E,id:F,events:$=[]}=y,G=Qt(E);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(A))==null?void 0:K.controlList)||[]).find(re=>re.id===e.unref(g))||u(e.unref(g))),$.find(ee=>{var re;return ee.on===G&&ee.target===((re=e.unref(h))==null?void 0:re.id)&&ee.emit==="refreshData"})||o({id:F,events:[...$,{on:G,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const D=(y,b)=>{if(y){const{label:E,name:F,id:$,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},re={...t.control,conditionKey:$,conditionLabel:E,conditionName:F,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};yt(re,"rule")||(re.rule="EQUAL"),yt(re,"dataType")||(re.dataType="component"),r({control:re,index:t.index,path:t.path})}else{const E={...t.control};delete E.conditionLabel,delete E.conditionName,delete E.conditionKey,delete E.conditionValueType,r({control:E,index:t.index,path:t.path})}},V=(y,b)=>{var E;return(E=b==null?void 0:b.keyName)==null?void 0:E.toLowerCase().includes(y==null?void 0:y.toLowerCase())},B=(y,b)=>{var E;return(E=b==null?void 0:b.label)==null?void 0:E.toLowerCase().includes(y==null?void 0:y.toLowerCase())},I=e.computed(()=>{const y=e.unref(x).find(E=>E.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),H=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:E="component"}=t.control;if(b&&E==="component"){const F=e.unref(d).find(G=>G.id===b),$=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ke(F==null?void 0:F.type,$)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:b="",dataType:E="component"}=t.control;if(b&&E==="component"){const F=e.unref(d).find($=>$.id===b);(F==null?void 0:F.type)==="ecanRangePicker"&&(y=!0)}return y}),O=e.computed(()=>{let y=!1;const{id:b="",dataType:E="component"}=t.control;if(b&&E==="component"){const F=e.unref(d).find($=>$.id===b);["ecanDatePicker","ecanRangePicker"].includes(F==null?void 0:F.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:s,onIdChange:m,onIdFocus:_,onPropChange:f,onModeChange:N,onRuleChange:C,onDataTypeChange:w,onCustomValueChange:k,conditionKeyOptions:x,onConditionKeyChange:D,idFilterOption:V,filterOption:B,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:I,dataTypeOption:H,isShowProp:S,isShowFormat:O,isShowModelProp:P,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),om="",am="",ku={class:"control-card"};function _u(t,n,o,a,r,i){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),s=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(c,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(c,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(c,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(c,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(c,{key:3,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(c,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(s,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-d25f813a"]]),Su=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:xu}}),rm="",Nu={key:0,class:"condition-list"},Au={key:0,class:"condition-container"},Tu={key:0,class:"condition-text"},Eu={key:1,class:"condition-text"},Lu={class:"conditions"};function Bu(t,n,o,a,r,i){const c=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Au,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Tu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Eu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Lu,[l.conditions.length>0?(e.openBlock(),e.createBlock(c,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${s}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${s}`,control:l,index:s,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Vu=oe(Su,[["render",Bu],["__scopeId","data-v-916ff9bd"]]),Ou=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Vu,AButton:v.Button},setup(){const t=e.inject(Pe),n=e.inject(fe),o=e.inject(Se),a=e.computed(()=>{var u,m;const p=((u=e.unref(n))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(yt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),yt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(n),...p,sqlConditions:ra({...e.unref(n),...p},e.unref(t))};o(u)},c=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:we()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:we()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:we()}),i({controlList:u})))},d=p=>{var C,w,k,N;const{index:u,path:m}=p;let g=Z.cloneDeep((C=e.unref(a))==null?void 0:C.slice()),_=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(_[h])_=(w=_[h])==null?void 0:w.conditions;else break;if(Array.isArray(_)&&_[u])if(_.splice(u,1),_.length===1){if(f.length>0){const h=f.length-1,A=f[h],x=f.slice(0,h);let L=g,D="";for(const V of x)if(L[V])D=(k=L[V])==null?void 0:k.join,L=(N=L[V])==null?void 0:N.conditions;else break;if(D===_[0].join){if(Array.isArray(_[0].conditions)){const V=Z.cloneDeep(_[0].conditions);L.splice(+A,1),L.splice(+A,0,...V)}}else L[A]=_[0]}}else _.length===0&&(g=[]);i({controlList:g})}},l=p=>{var w,k;const{control:u,index:m,path:g}=p,_=Z.cloneDeep((w=e.unref(a))==null?void 0:w.slice());let f=_;const C=g.split("-");if(C!=null&&C.length)for(const N of C)if(f[N])f=(k=f[N])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:_})},s=(p,u,m)=>{var w,k,N;const g=Z.cloneDeep((w=e.unref(a))==null?void 0:w.slice());let _=g,f="";const C=p.split("-");if(C!=null&&C.length){for(const h of C)if(_[h])f=(k=_[h])==null?void 0:k.join,_=(N=_[h])==null?void 0:N.conditions;else break;if(f===m)_.splice(u+1,0,{keyValue:we()});else{const h=Z.cloneDeep(_[u]);_[u]={join:m,conditions:[h,{keyValue:we()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:s}),{controlList:a,bindComponentId:r,onAddControl:c}}}),lm="",Iu={class:"control-group"},Fu={class:"control-group-header"},Du={class:"control-group-content"};function $u(t,n,o,a,r,i){const c=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Iu,[e.createElementVNode("div",Fu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{onClick:n[0]||(n[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{onClick:n[1]||(n[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(c,{key:1,onClick:n[2]||(n[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Du,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const vu=oe(Ou,[["render",$u],["__scopeId","data-v-1e37d2d3"]]),Mu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:qt},setup(t,{emit:n}){const o=e.inject(Pe),a=e.computed(()=>{var w;return(w=e.unref(o))==null?void 0:w.filter(k=>k.keyName!=="")}),r=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],i=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],c=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],d=e.ref(Z.cloneDeep(t.item));e.watch(d,w=>{n("update",{...w,label:t.label},t.index)},{deep:!0});const l=e.computed(()=>{var k;let w=null;if(((k=e.unref(d))==null?void 0:k.dataType)==="component"){const N=e.unref(a).find(h=>{var A;return h.id===((A=e.unref(d))==null?void 0:A.id)});N&&(w=N)}return w}),s=e.computed(()=>{var k;let w=!1;return((k=e.unref(d))==null?void 0:k.variableType)==="DATE"&&(w=!0),w}),p=e.computed(()=>{let w=!1;return e.unref(l)&&(w=ke(e.unref(l).type,"range")),w}),u=(w,k)=>{w&&(e.unref(d).keyName=k.keyName)},m=()=>{n("delete",t.index)},g=e.computed(()=>e.unref(s)?[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]:[]);return{variableData:d,typeOption:r,dataTypeOption:i,usedComponentList:a,formatOptions:g,rangeTypeOptions:c,isShowFormat:s,isDateRangeComponent:p,idFilterOption:(w,k)=>{var N;return(N=k==null?void 0:k.keyName)==null?void 0:N.toLowerCase().includes(w==null?void 0:w.toLowerCase())},onChangeComponent:u,onDelete:m,onChangeDataType:()=>{e.unref(d).id=null,e.unref(d).keyName="",e.unref(d).dateTypeValue=null,e.unref(d).variableValue=""},onChangeVariableType:()=>{e.unref(d).format=null}}}}),im="",Pu={class:"variable-item"},ju=["title"];function Ru(t,n,o,a,r,i){const c=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Pu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,ju)):e.createCommentVNode("",!0),e.createVNode(c,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":n[0]||(n[0]=s=>t.variableData.variableName=s),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":n[1]||(n[1]=s=>t.variableData.variableType=s),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":n[2]||(n[2]=s=>t.variableData.dataType=s),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":n[3]||(n[3]=s=>t.variableData.id=s),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"230px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(c,{key:2,class:"field-name",style:{"max-width":"230px"},value:t.variableData.variableValue,"onUpdate:value":n[4]||(n[4]=s=>t.variableData.variableValue=s),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":n[5]||(n[5]=s=>t.variableData.dateTypeValue=s),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":n[6]||(n[6]=s=>t.variableData.format=s),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:4,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const Uu=oe(Mu,[["render",Ru],["__scopeId","data-v-e5e47c61"]]),Gu=e.defineComponent({name:"VariableGroup",components:{VariableItem:Uu},setup(){const t=e.inject(fe),n=e.inject(Se),o=e.inject(Pe),a=e.computed(()=>{var s;return((s=e.unref(t))==null?void 0:s.variableList)||[]}),r=l=>{n({...e.unref(t),variableConditions:Kt(l,o),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=Z.cloneDeep(e.unref(a));l.push({keyValue:we(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null}),r(l)},onUpdateItem:(l,s)=>{if(s>=0){const p=Z.cloneDeep(e.unref(a));p[s]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const s=Z.cloneDeep(e.unref(a));s.splice(l,1),r(s)}}}}}),sm="",zu={class:"variable-group"},Hu={class:"variable-group-header"},Yu={class:"variable-group-content"};function Wu(t,n,o,a,r,i){const c=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",zu,[e.createElementVNode("div",Hu,[e.createVNode(c,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",Yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,s)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:s,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const qu=oe(Gu,[["render",Wu],["__scopeId","data-v-d17e9077"]]),Ku=(t={})=>{const n=(c={})=>{const{label:d,name:l,location:s,show:p,indexCode:u}=c;return{label:d,columnName:l,location:s,show:p,calcType:"COLUMN",hrpIndexCode:u}},o=(c,d)=>Object.prototype.hasOwnProperty.call(c,d),a=c=>{o(c,"dataType")&&(c.fieldType==="DATE"&&(c.label=c.fieldName,c.dataType==="component"&&(c.fieldValue="${"+c.fieldValue+"}")),delete c.dataType),o(c,"activeKey")&&delete c.activeKey,o(c,"radioValue")&&delete c.radioValue},r=c=>{const d=[];return c!=null&&c.length&&c.forEach(l=>{if(l.join&&l.conditions){const s=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),s?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(c={})=>{const{label:d,name:l,location:s,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:_,builtInCalcWay:f,formula:C,conditions:w,aggregate:k}=c;let N;return w&&(N=r(w)),{label:d.trim(),columnName:l,location:s,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:_,builtInCalcWay:f,formula:C,conditions:N}};return async()=>{const{graphicConfig:c,type:d,request:l}=t;let{source:s,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:_=[],seriesList:f=[],leftAxisList:C=[],rightAxisList:w=[],queryColumnList:k=[],indicators:N=[],dataSourceId:h,idxLibMode:A,preview:x=!1}=c||{};m==null&&(ke(d,"table")?m="1":m="2");let L;if(Array.isArray(_)&&_.length>0){const I=_.length;for(let H=0;H<I;H++){const P=_[H]||{},{label:S="",name:O="",show:T=!1,sort:M,customGroup:U,conditions:y}=P;if(T||I===1){L={label:S.trim(),columnName:O,show:T,sort:M,customGroup:U,conditions:r(y)};break}}}let D;if(Array.isArray(f)&&f.length>0){const I=f.length;for(let H=0;H<I;H++){const P=f[H]||{},{label:S="",name:O="",show:T=!1,sort:M,customGroup:U,conditions:y}=P;if(T||I===1){D={label:S.trim(),columnName:O,show:T,sort:M,customGroup:U,conditions:r(y)};break}}}const V=[];k==null||k.forEach(I=>{V.push(n(I))});const B=[];if(C==null||C.forEach(I=>{I.location="LEFT",B.push(i(I))}),w==null||w.forEach(I=>{I.location="RIGHT",B.push(i(I))}),N==null||N.forEach(I=>{I.location="LEFT",B.push(i(I))}),!(m==="1"&&V.length===0)&&!(m==="2"&&B.length===0))try{return await l.post("/diagram",{source:s,dataViewId:p,plugin:u,layer:m,chartType:g,classification:L,series:D,indicatorList:B,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:A,preview:x})}catch(I){console.error(I)}}},qa=(t,n)=>{const o={dayjs:se,...n};let a="";const r=[];for(const d in o)a+=`${d},`,r.push(o[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let c;try{c=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return c},fn=(t="",{textData:n,codeData:o}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...n},c=t.match(/\{(.+?)\}/g);if(c==null||c.length===0)return t;for(let d=0;d<c.length;d++){const l=c[d];let s=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=s.match(p);for(let m=0;m<u.length;m++){const g=u[m],_=i[g];_!=null&&(s=s.replace(g,_))}(/\(.*\)/g.test(s)||/[+/\\*]/g.test(s))&&(s=qa(s,o)),t=t.replace(l,s)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Rt=(t,n)=>{var r;if(t==null)return n;const o=t.match(/\{.*\}/g);if(o==null||o.length===0)return n;const a=o.length;for(let i=0;i<a;i++){const c=o[i];if(c==null||c==="")break;let d=(r=c.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,n);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=qa(d)),t=t.replace(c,l)}catch{t=t.replace(c,d)}}return t},Qu=(t,n,o)=>{switch(t.type){case"bar":return Xu(t,n,o);case"line":return Ju(t,n,o);case"pie":return Zu(t,n,o);case"comboGraph":return ef(t,n,o);default:return{}}},Xu=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:c=[]}=n,d=e.computed(()=>{const s=c,p=s.length,u=[];for(let m=0;m<p;m++){const g={...s[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.map(s=>{let p={};return s&&typeof s=="object"?p={...s,textStyle:{fontSize:o}}:p={value:s,textStyle:{fontSize:o}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const p=s.length;let u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:_,seriesName:f,name:C,value:w,data:k}=s[g]||{};g===0&&(u+=`${C}<br/>`),u+=fn(m,{textData:{marker:_,name:C,value:w,a:f,b:C,c:w,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(l),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(s){return Rt(r,s)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(s){return Rt(a,s)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},Ju=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:c=[]}=n,d=e.computed(()=>i.map(s=>{let p={};return s&&typeof s=="object"?p={...s,textStyle:{fontSize:o}}:p={value:s,textStyle:{fontSize:o}},p})),l=e.computed(()=>{const s=[],p=c.length;for(let u=0;u<p;u++)s.push({type:"line",...c[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return s});return{tooltip:{trigger:"axis",textStyle:{fontSize:o},show:t.tooltipShow,formatter:s=>{const p=s.length;let u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:_,seriesName:f,name:C,value:w,data:k}=s[g]||{};g===0&&(u+=`${C}<br/>`),u+=fn(m,{textData:{marker:_,name:C,value:w,a:f,b:C,c:w,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(s){return Rt(r,s)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(s){return Rt(a,s)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:o}},series:e.unref(l)}},Zu=(t,n,o)=>{const{dataset:a=[]}=n;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,c=t.colors;r=r.map((d,l)=>({label:i?{color:c[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:c,seriesName:d,name:l,value:s,percent:p,data:u}=i||{};return fn(t.tooltipFormatter,{textData:{marker:c,name:l,value:s,percent:p,a:d,b:l,c:s,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o===18?o:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:o===18?o:t.labelFontSize,position:t.labelPosition,formatter:As(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},ef=(t,n,o)=>{const{dimensions:a=[],dataset:r=[]}=n,i=e.computed(()=>a.map(l=>{let s={};return l&&typeof l=="object"?s={...l,textStyle:{fontSize:o}}:s={value:l,textStyle:{fontSize:o}},s})),c=e.computed(()=>{const l=[],s=r.length,p=t.seriesTypes;for(let u=0;u<s;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(s=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(p){return Rt(s.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:l=>{const s=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<s;g++){const _=m[g],{tooltipFormatter:f}=_||{},{marker:C,seriesName:w,name:k,value:N,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fn(f||u,{textData:{marker:C,name:k,value:N,seriesName:w,a:w,b:k,c:N,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(c)}},tf=(t=[],n)=>{let{name:o="name",types:a=[]}=n||{};o=(o==null?void 0:o.trim())||o;const r=new Set,i=new Map,c=t.length,d=a.length;if(c===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:_,value:f}=g,C={...t[0],value:t[0][f]};r.add(_),p.push(C)}const u=t[0][o]||"";i.set(u,p)}else for(let p=0;p<c;p++){const u=t[p],m=u[o];r.add(m);for(let g=0;g<d;g++){const _=a[g],{label:f,value:C}=_,w={...u,value:u[C]};if(i.has(f)){const k=i.get(f);k.push(w),i.set(f,k)}else i.set(f,[w])}}const l=Array.from(r),s=[];for(const[p,u]of i)s.push({name:p,data:u});return{dimensions:l,dataset:s}},nf=(t,n)=>{let{name:o="name",value:a="value",type:r="type"}=n||{};o=o==null?void 0:o.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const i=new Set,c=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[o]||"",g=u[a]||"",_=u[r]||"";if(i.add(m),c.has(_)){const f=c.get(_);f.push({name:m,value:g,...u}),c.set(_,f)}else c.set(_,[{name:m,value:g,...u}])}const l=Array.from(i),s=[];for(const[p,u]of c)s.push({name:p,data:u});return{dimensions:l,dataset:s}},of=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:n}){const o=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(ve);let i=null;const c=e.inject(Me)||"",d=e.inject(fe)||{},l=e.inject(Ut)||{},s=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),_=e.computed(()=>g.value?ar:12),f=e.ref({}),C=e.ref(),w=e.computed(()=>{const V=e.unref(o.value);if((V==null?void 0:V.type)==="customGraph")return C.value;const B=Qu(V,e.unref(f),_.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:V.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:V.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...B}}),k=(V=[],B,I=!1)=>{const H=I?B:null;f.value=tf(V,H)},N=(V=[],B)=>{f.value=nf(V,B)},h=async()=>{var V,B,I;try{const H=Ku({graphicConfig:e.unref(a.value),type:(V=e.unref(o.value))==null?void 0:V.type,request:r,indicatorToken:c});m.value=!0;const P=await H(),{columns:S=[],rows:O=[]}=((B=P==null?void 0:P.data)==null?void 0:B.data)??{};if(((I=e.unref(o.value))==null?void 0:I.type)==="pie"){let T=[];if(S.length>0){const M=S[0],U=S[1];T=O.map(y=>({name:y[M],value:y[U]}))}N(T)}else{let T;S.length>0&&(T={name:S[0],types:S.slice(1).map(M=>({label:M,value:M}))}),k(O,T,!0)}}catch(H){console.error(H)}finally{m.value=!1}},A={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},x=()=>{e.unref(f).dataset.length===0?u.value.setOption(A):u.value.setOption(w.value)},L=()=>{e.unref(o.value).type!=="customGraph"&&h()},D=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(w,()=>{x()},{deep:!0}),e.watch(()=>e.unref(o.value).optionCode,V=>{try{const B=eval;C.value=B(V)}catch(B){console.error(B)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(D),i.observe(p.value)),u.value=or.init(s.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),n({refreshData:L}),{echartRef:s,loading:m}}}),cm="",af={class:"ecan-chart-graph",ref:"chartWrapRef"},rf={style:{width:"100%",height:"100%"},ref:"echartRef"};function lf(t,n,o,a,r,i){const c=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",af,[e.createVNode(c,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",rf,null,512)]),_:1},8,["spinning"])],512)}const Ka=oe(of,[["render",lf],["__scopeId","data-v-8049fed2"]]),sf=e.defineComponent({name:"DataConfig",components:{DataGroup:Xc,StyleGroup:Cu,ChartGraph:Ka,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:vu,VariableGroup:qu,AButton:v.Button,ReloadOutlined:ri},setup(){var A;const t=e.ref("1"),n=e.ref([0,1,2]),o=e.ref(),a=e.inject(Ye),r=e.inject(uo),i=e.inject(fe),c=e.inject(Pe),d=e.inject(bo),l=["text","proportion","select","checkbox","radio","radar","circulate"],s=e.computed(()=>{const x=Z.cloneDeep(e.unref(a));p(x);const L=Z.pick(x,Z.without(Object.keys(x),"position","top","left","width","height"));ke(x.type,l)?(L.height=x.height,L.width=x.width):L.height="290px";const D=Z.cloneDeep(e.unref(i));return D.pageMode="design",D.componentList=c,D.preview=!0,D.pageConfig=d,{...L,graphicConfig:D,toolboxShow:!1,sourceLeft:x.left,sourceTop:x.top}});function p(x){var L,D,V,B;["#ffffff","#fff"].includes((L=x==null?void 0:x.color)==null?void 0:L.toLowerCase())&&(x.color="#000"),["#ffffff","#fff"].includes((D=x==null?void 0:x.variableColor)==null?void 0:D.toLowerCase())&&(x.variableColor="#000"),["#ffffff","#fff"].includes((V=x==null?void 0:x.increaseColor)==null?void 0:V.toLowerCase())&&(x.increaseColor="#000"),["#ffffff","#fff"].includes((B=x==null?void 0:x.declineColor)==null?void 0:B.toLowerCase())&&(x.declineColor="#000")}const u=e.computed(()=>{let x=!0;return ke(e.unref(s).type,l)&&(x=!1),x}),m=e.computed(()=>{var x;return(x=e.unref(s))==null?void 0:x.type}),g=e.computed(()=>{var x;return!!((x=e.unref(s))!=null&&x.isGroupTable)}),_=x=>{const L=x==="1";L&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(L),x==="3"&&N()},f=e.ref(),C=e.inject(ve),w=e.unref(e.inject(Me)),k=(A=window==null?void 0:window.config)==null?void 0:A.pageId;function N(){var H;const{leftAxisList:x=[],rightAxisList:L=[],queryColumnList:D=[],indicators:V=[]}=e.unref(i),B=[...x,...L,...D,...V],I={};for(const P of B){const{id:S="",indexCode:O=""}=P;S&&!yt(P,"calcType")&&!I[S]&&(I[S]=O)}if((H=Object.keys(I))!=null&&H.length){const P=[];for(const S in I)P.push(new Promise((O,T)=>{C.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:S,indexCode:I[S],dataSourceId:""},{headers:{Authentication:w,operateContext:"ygt"}}).then(M=>{var b;const{success:U,data:y=[]}=M.data;U&&((b=y==null?void 0:y.dataViewColumns)!=null&&b.length)?O(y.dataViewColumns):T(y)}).catch(M=>{T(M)})}));Promise.all(P).then(S=>{if(S!=null&&S.length){const O=S.reduce((T,M)=>T.filter(U=>M.find(y=>y.typeGuid===U.typeGuid)));f.value=O.filter(T=>T.typeGuid)}})}}const h=()=>{var L;let x;r&&m.value==="table"?x=window.updateConfig:x=(L=e.unref(o))==null?void 0:L.refreshData,typeof x=="function"&&x()};return e.provide(fo,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:n,componentRef:o,type:m,isGroupTable:g,onChange:_,component:s,fullWidth:u,renderUsedComponents:c,intersection:f,refreshData:h}}}),dm="",cf={class:"data-config"},df={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function pf(t,n,o,a,r,i){const c=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),s=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),_=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshData},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(c),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(l,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",df,null,512)):e.withDirectives((e.openBlock(),e.createBlock(_,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const uf=oe(sf,[["render",pf],["__scopeId","data-v-286c406e"]]),ff=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:uf},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:n,emit:o}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),c=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var A;return((A=e.unref(c))==null?void 0:A.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let s=e.unref(c).graphicConfig?Z.cloneDeep(e.unref(c).graphicConfig):e.ref({});s=e.ref(s);let p=e.unref(c).chartsOptions?Z.cloneDeep(e.unref(c).chartsOptions):e.ref(Z.cloneDeep(Co.line));p=e.ref(p);let u=e.unref(c).tableOptions?Z.cloneDeep(e.unref(c).tableOptions):e.ref(Z.cloneDeep(rr));u=e.ref(u);const m=e.ref([]),g=A=>{m.value=A},_=A=>{s.value={...e.unref(s),...e.unref(A)}},f=(A,x=!0)=>{x?p.value={...e.unref(p),...e.unref(A)}:p.value={...e.unref(A)}},C=A=>{u.value={...e.unref(u),...e.unref(A)}},w=()=>m,k=()=>{a.value=!0,e.unref(c).graphicConfig&&(s.value=Z.cloneDeep(e.unref(c).graphicConfig)),e.unref(c).chartsOptions&&(p.value=Z.cloneDeep(e.unref(c).chartsOptions)),e.nextTick(()=>{a.value=!1})},N=()=>({graphicConfig:e.unref(s),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=N,t.request&&e.provide(ve,t.request),e.provide(po,{setDataList:g,getDataList:w});const h=A=>{o("updateUsedComponent",A)};return e.provide(Ye,c),e.provide(fe,s),e.provide(Ut,p),e.provide(mo,u),e.provide(gn,r),e.provide(uo,l),e.provide(Me,i),e.provide(Se,_),e.provide(hn,f),e.provide(yn,C),e.provide(Pe,t.renderUsedComponentList),e.provide(Gt,h),e.provide(go,t.mapAttributeProps),e.provide(bo,t.pageConfig),n({graphicConfig:s,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),pm="",mf={key:0,class:"config-modal"},hf={class:"config-modal-left"},yf={class:"config-modal-right"};function gf(t,n,o,a,r,i){const c=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mf,[e.createElementVNode("div",hf,[e.createVNode(c)]),e.createElementVNode("div",yf,[e.createVNode(d)])]))}const Qa=co(oe(ff,[["render",gf],["__scopeId","data-v-23d542ce"]])),Xa=co(Ka),Ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Xa,EcanIndicatorLibrary:Qa},Symbol.toStringTag,{value:"Module"})),bf={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(Ja).forEach(a=>{const r=Ja[a];r.install&&t.use(r)})}};Ce.EcanChartGraph=Xa,Ce.EcanIndicatorLibrary=Qa,Ce.default=bf,Object.defineProperties(Ce,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,Dn=!1,$r=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dr;e.nextTick(function(){Dn||(typeof window<"u"&&window.document&&window.document.documentElement&&Br(o,{prepend:!0}),Dn=!0)})},Mr=["icon","primaryColor","secondaryColor"];function vr(t,o){if(t==null)return{};var n=Pr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Pr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function qt(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){jr(t,r,n[r])})}return t}function jr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Rr(t){var o=t.primaryColor,n=t.secondaryColor;Vt.primaryColor=o,Vt.secondaryColor=n||In(o),Vt.calculated=!!n}function Ur(){return qt({},Vt)}var ht=function(o,n){var a=qt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=vr(a,Mr),l=Vt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),$r(),Fr(On(r),"icon should be icon definiton, but got ".concat(r)),!On(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=qt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),qt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};ht.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},ht.inheritAttrs=!1,ht.displayName="IconBase",ht.getTwoToneColors=Ur,ht.setTwoToneColors=Rr;const To=ht;function Gr(t,o){return Wr(t)||Yr(t,o)||Hr(t,o)||zr()}function zr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hr(t,o){if(t){if(typeof t=="string")return $n(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $n(t,o)}}function $n(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Yr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function Wr(t){if(Array.isArray(t))return t}function Mn(t){var o=Fn(t),n=Gr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function qr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Kr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Qr(t,o){return el(t)||Zr(t,o)||Jr(t,o)||Xr()}function Xr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jr(t,o){if(t){if(typeof t=="string")return vn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vn(t,o)}}function vn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Zr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function el(t){if(Array.isArray(t))return t}function Pn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function tl(t,o){if(t==null)return{};var n=ol(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ol(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Mn("#1890ff");var yt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=tl(r,Kr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),w=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var C=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Qr(_,2),x=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:w,icon:s,primaryColor:x,secondaryColor:h,style:C},null)])};yt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},yt.displayName="AntdIcon",yt.inheritAttrs=!1,yt.getTwoToneColor=qr,yt.setTwoToneColor=Mn;const ye=yt;var nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const al=nl;function jn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){rl(t,r,n[r])})}return t}function rl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:al}),null)};Lo.displayName="AppstoreAddOutlined",Lo.inheritAttrs=!1;const Vo=Lo;var ll={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const il=ll;function Rn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){sl(t,r,n[r])})}return t}function sl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:il}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const cl=Bo;var dl={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const pl=dl;function Un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ul(t,r,n[r])})}return t}function ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:pl}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const fl=Oo;var ml={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const hl=ml;function Gn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){yl(t,r,n[r])})}return t}function yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Io=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:hl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var gl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const bl=gl;function zn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Cl(t,r,n[r])})}return t}function Cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Fo=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:bl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const wl=Fo;var kl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const _l=kl;function Hn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){xl(t,r,n[r])})}return t}function xl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:_l}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Sl=Do;var Nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const Al=Nl;function Yn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Tl(t,r,n[r])})}return t}function Tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var $o=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(ye,Yn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Ll={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const Vl=Ll;function Wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Bl(t,r,n[r])})}return t}function Bl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Mo=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:Vl}),null)};Mo.displayName="DownOutlined",Mo.inheritAttrs=!1;const Ol=Mo;var Il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const Fl=Il;function qn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Dl(t,r,n[r])})}return t}function Dl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var vo=function(o,n){var a=qn({},o,n.attrs);return e.createVNode(ye,qn({},a,{icon:Fl}),null)};vo.displayName="InfoCircleOutlined",vo.inheritAttrs=!1;const $l=vo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;function Kn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Pl(t,r,n[r])})}return t}function Pl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Po=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(ye,Kn({},a,{icon:vl}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Qn=Po;var jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Rl=jl;function Xn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ul(t,r,n[r])})}return t}function Ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Xn({},o,n.attrs);return e.createVNode(ye,Xn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const Hl=zl;function Jn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ro=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(ye,Jn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Kl=ql;function Zn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ql(t,r,n[r])})}return t}function Ql(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Uo=function(o,n){var a=Zn({},o,n.attrs);return e.createVNode(ye,Zn({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ea(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ei(t,r,n[r])})}return t}function ei(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Go=function(o,n){var a=ea({},o,n.attrs);return e.createVNode(ye,ea({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const ni=oi;function ta(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(ye,ta({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const ii=li;function oa(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){si(t,r,n[r])})}return t}function si(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ho=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(ye,oa({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:fl,CaretDownOutlined:cl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var A;const t=(A=window==null?void 0:window.config)==null?void 0:A.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var L;return(L=e.unref(a))==null?void 0:L.graphicConfig}),i=e.computed(()=>{var L;return(L=e.unref(r))==null?void 0:L.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const L={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const O=await o.post(`${Ve}/diagram/sourceList`,L,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:N,data:V={}}=O.data;if(N){const{rows:B=[],total:F=0}=V;B==null||B.forEach(H=>{var P;H.show=!1,(P=H.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),s.value=B,l.totalResult=+F}}catch{d.value=!1}},u=L=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[L],m=L=>{s.value[L].show=!s.value[L].show},g=()=>{l.currentPage=1,p()},w=Z.debounce(()=>{l.currentPage=1,p()},200),f=(L,O)=>{l.pageSize=O,l.currentPage=L,p()};e.onMounted(()=>{p()});const C=e.inject(fe),_=e.computed(()=>{const L=["classificationList","rowHeaderList","dimensionList"];let O=[];for(const N in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),N)&&L.includes(N)){const V=e.unref(C)[N];Array.isArray(V)&&(O=O.concat(V))}return O});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:w,onPaginationChange:f,searchText:c,setItemDisabled:(L=[])=>{let O=!1;for(const N of e.unref(_))if(!L.find(B=>B.typeGuid===N.typeGuid)){O=!0;break}return O},onDragStart:(L,O)=>{const N=O.dataViewColumns[L.oldIndex];N&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...N,dataTo:O.dataTo})),O!=null&&O.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(O.hrpIndexVariates)))},getSourceType:L=>L==="0"?"【指标库】":L==="1"?"【视图】":"【其他】"}}}),Bf="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(s,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":w=>m.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:w=>t.onDragStart(w,m)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(w.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Ci=oe(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:ur},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),na={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button},setup(t,{expose:o}){var x;const n=(x=window==null?void 0:window.config)==null?void 0:x.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(fe),s=e.inject(xe),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=async()=>{try{const h=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:A,data:L=[]}=h.data;A&&(c.value=L==null?void 0:L.slice(0,200))}catch(h){console.error(h)}},u=()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},s({[t.type]:h})};let m=!1;const g=()=>{m=!0},w=e.ref(!1),f=()=>{w.value=!0},C=()=>{w.value=!1},_=()=>{m&&u(),m=!1,C()};return o({showModal:f}),e.watch(w,h=>{var A,L;if(h){const O=(L=(A=t.item)==null?void 0:A.sort)==null?void 0:L.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),{visible:w,onCancel:_,customSortList:c,onChange:g,onDeleteConfig:()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O},s({[t.type]:h}),C()}}}}),Of="",Si={class:"button-wrapper"},Ni={class:"sort-item"};function Ai(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),l=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(l,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ni,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Ti=oe(xi,[["render",Ai],["__scopeId","data-v-8e16d201"]]),Ei=e.defineComponent({name:"CustomGroupModal",directives:{focus:na},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var j;const n=e.inject(Me),a=(j=window==null?void 0:window.config)==null?void 0:j.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},w=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),C=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const M=e.unref(c)[D];e.unref(c)[D].data=M.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},x=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(fe),A=e.inject(xe),L=e.computed(()=>e.unref(h).source),O=e.computed(()=>e.unref(h).dataViewId),N=e.ref(!1),V=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(N)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const re=y[ee]||{},{title:he,data:me}=re;D[he]=(me==null?void 0:me.map(Ee=>Ee.label))||[]}const M=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],G=M[t.index];G.customGroup={groupInfoMap:D,otherGroupName:b},A({[t.type]:M})},B=e.ref(!1),F=()=>{B.value=!0},H=()=>{B.value=!1},P=()=>{H(),i&&V(),i=!1},S=()=>{i=!0},I=new Set,E=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(N.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const M in T)if(Object.prototype.hasOwnProperty.call(T,M)){const K=T[M].map(Q=>(I.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:M,data:K},D++}await v()},v=async()=>{var y;try{const b=await n.post(`${Ve}/diagram/groupvalue`,{source:e.unref(L),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const M=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(G=>{I.has(G)||M.push({label:G,checked:!1})}),e.unref(c)[0].data=M}}catch(b){console.error(b)}};return e.watch(B,y=>{y&&E(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:F}),{visible:B,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:N,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:w,onMoveInGroup:C,selectGroupIndex:f,onEditTitle:_,onTitleChange:x,onFinishEditTitle:k,onUseOtherGroup:S,customGroupEditTitleList:u}}}),If="",Ff="",Li={class:"custom-group-header"},Vi={class:"move-and-create"},Bi={class:"select-tip"},Oi={class:"select-count"},Ii={class:"create-group"},Fi={class:"custom-group-content"},Di=["onClick"],$i={class:"extra"},Mi={class:"custom-group-list"},vi={class:"text"};function Pi(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),C=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(C,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Li,[e.createElementVNode("div",Vi,[e.createElementVNode("div",null,[e.createElementVNode("span",Bi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Oi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(s,{key:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ii,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Fi,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(w,{key:x},{header:e.withCtx(()=>[t.customGroupEditTitleList[x]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,x),onBlur:h=>t.onFinishEditTitle(x),onPressEnter:h=>t.onFinishEditTitle(x)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(x),["prevent","stop"])},e.toDisplayString(k.title),9,Di))]),extra:e.withCtx(()=>[e.createElementVNode("div",$i,[x===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),x!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(x),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,A)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":L=>h.checked=L,class:"custom-group",key:A},{default:e.withCtx(()=>[e.createElementVNode("span",vi,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ji=oe(Ei,[["render",Pi],["__scopeId","data-v-7e3049d2"]]);let ke=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};var Ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},Ui={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Ri,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Ui);const Gi=Yo;se.extend(Gi);const zi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Vo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Qn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var st,ct,At,dt,Le,Qe,tt,ot,ze,pt,ut,ft,nt;const o=(st=window==null?void 0:window.config)==null?void 0:st.pageId,n=e.inject(fe),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=se(),c=e.computed(()=>{var Y;const z=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:J="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${J}-startTime`,label:`${ne||J}-开始时间值`,keyName:`${ne||J}-startTime`,id:J},{value:`${J}-endTime`,label:`${ne||J}-结束时间值`,keyName:`${ne||J}-endTime`,id:J}):z.push({value:J,label:`${ne||J}`,keyName:`${ne||J}`,id:J})}),z}),p=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},w=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],f=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),C=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),_=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],x=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(ct=t.data)==null?void 0:ct.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(dt=t.data)==null?void 0:dt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:A(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((pt=t.data)==null?void 0:pt.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((ft=t.data)!=null&&ft.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function A(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const ne=e.unref(c).find(J=>J.keyName===X);return ne?ne.value:X}else return X}const L=e.ref(!1),O=e.computed(()=>h.value.fieldType==="DATE"),N=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(z)){let J=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const _e=e.unref(n)[ce];Array.isArray(_e)&&(X.includes(ce)?J=J.concat(_e.filter(at=>at.show)):J=J.concat(_e))}Y=J}else["leftAxisList","rightAxisList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:V,deleteCondition:B,addCondition:F}=e.inject(yn,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),H=()=>{B(t.index,t.path)};e.watch(h,z=>{const Y=Z.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{h.value.fieldValue="",h.value.useCurrentTime=z});const P=z=>{var U;const Y=e.unref(N).find(W=>W.value===z)||{},{name:X,genericType:ne,id:J,label:ce,typeGuid:_e,indexCode:at,indexCodeNum:R}=Y;h.value={id:J,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:_e,indexCode:at,indexCodeNum:R,dataType:"",useCurrentTime:!1,keyValue:((U=e.unref(h))==null?void 0:U.keyValue)||ke()}},S=z=>{const Y=e.unref(c).find(X=>X.value===z)||{};e.unref(h).componentId=Y.id||""},I=e.computed(()=>{const z=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),z==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),E=e.computed(()=>{let z="";const Y=e.unref(I).find(X=>X.value===e.unref(h).rule);return Y&&(z=Y.label),z}),v=e.computed(()=>{let z={fontSize:"12px"};return e.unref(E)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),j=e.ref([]),y=async()=>{var z;if(!(e.unref(j).length>0))try{const Y=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(j.value=(z=ne==null?void 0:ne.slice(0,200))==null?void 0:z.map(J=>({label:J,value:J})))}catch(Y){console.error(Y)}},b=z=>{e.unref(h).rule=z,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&y()},T=z=>{e.unref(h).dataType=z,e.unref(h).fieldValue=""},D=e.ref(),M=z=>{D.value=z,e.unref(h).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,J,ce,_e,at,R,U,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((J=t.data)==null?void 0:J.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(_e=t.data)==null?void 0:_e.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const ae=e.unref(h).calcWays[0];if(ae){const te=ae.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((R=t.data)==null?void 0:R.radioValue)||"";const ae=e.unref(C).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});ae&&Ee(ae,t.data)}}else D.value=((W=(U=t.data)==null?void 0:U.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=h.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=z=>{if(e.unref(h).activeKey===z){e.unref(C)[z].radioValue=e.unref(h).radioValue,e.unref(C)[e.unref(h).activeKey]&&(e.unref(C)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(C)[z].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(C)[z].afterNum=e.unref(h).calcWays[0]));return}e.unref(C).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{m.value=!0;const X=z.target.value,ne=Y.type,J=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),_e=Y.afterNum;Y.value=de(X,ne,J,ce,_e)},ee=z=>{const Y=e.unref(h).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,J=e.unref(h).radioValue;let ce=0,_e=0;return J==="1"?ce=Math.abs(e.unref(h).calcWays[0]):J==="2"&&(_e=e.unref(h).calcWays[0]),de(J,X,ne,ce,_e)},re=(z,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const J=z.target.value;X==="+"?Y.value=se().add(J,Y.type).format(e.unref(h).dateFormat):Y.value=se().subtract(J,Y.type).format(e.unref(h).dateFormat)}},he=(z,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=z.radioValue,z.radioValue==="1"?e.unref(h).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(h).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),L.value=!1},me=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,L.value=!1};function Ee(z,Y){const{radioValue:X="",calcWays:ne=[]}=Y;z.radioValue=X,ne!=null&&ne.length&&(X==="1"?z.beforeNum=Math.abs(ne[0]):X==="2"&&(z.afterNum=ne[0]))}function de(z,Y,X,ne,J){if(z==="1")return se().subtract(ne,Y).format(X);if(z==="2")return se().add(J,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:N,ruleOptions:I,onFieldChange:P,condition:h,valueOptions:j,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:M,fieldValues:D,onDelete:H,isDateType:O,formatList:w,tabDateList:C,compareList:_,menuRule:k,dateBtnLabel:E,downIconStyle:v,popoverVisible:L,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:x,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:re,okDatePickConfig:he,onChangeComponent:S,filterOption:$e,okCustomConfig:me,clickConditionMenu:({key:z})=>{F(t.path,t.index,z==="2"?"||":"&&")}}}}),Df="",$f="",Hi={class:"condition"},Yi=["title"],Wi={class:"rule"},qi={class:"data-type"},Ki={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Qi={class:"popover-content-wrap"},Xi={key:0,class:"use-current-time"},Ji={class:"tabFilterRadio"},Zi={key:0},es={key:1},ts={style:{"margin-left":"10px"}},os={style:{"margin-left":"10px"}},ns={style:{position:"absolute",bottom:"10px"}},as={style:{display:"flex"}},rs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ls(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),C=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),A=e.resolveComponent("appstore-add-outlined"),L=e.resolveComponent("a-popover"),O=e.resolveComponent("a-input"),N=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:B.label},e.toDisplayString(B.label),9,Yi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Wi,[t.isDateType?(e.openBlock(),e.createBlock(g,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,B=>(e.openBlock(),e.createBlock(c,{key:B.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,F=>{var H;return e.openBlock(),e.createBlock(c,{key:F.value,disabled:F.value==="component"&&!((H=t.controlList)!=null&&H.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value?"color: #1890FF;":"")},e.toDisplayString(F.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",qi,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ki,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(w,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(w,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=B=>t.condition.fieldValue=B),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(L,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=B=>t.popoverVisible=B),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Qi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=B=>t.isUseCurrentTime=B)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(B,F)=>(e.openBlock(),e.createBlock(x,{key:F,tab:B.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(k,{value:B.radioValue,"onUpdate:value":H=>B.radioValue=H,onChange:H=>t.changeRadioValue(H,B)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Zi,"相对当前时间:"+e.toDisplayString(B.value),1)):(e.openBlock(),e.createElementBlock("div",es,"相对当前时间:"+e.toDisplayString(t.getFieldValue(F)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.beforeNum,"onUpdate:value":H=>B.beforeNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ts,e.toDisplayString(B.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.afterNum,"onUpdate:value":H=>B.afterNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",os,e.toDisplayString(B.afterLabel),1)]),_:2},1032,["style"]),B.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),B.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ns,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=H=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:H=>t.okDatePickConfig(B,F)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(x,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=B=>t.customTabData.expression=B),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=B=>t.customTabData.unit=B),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=B=>t.customTabData.around=B)},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=B=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=B=>{t.popoverVisible=!0})},[e.createVNode(A)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(O,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=B=>t.condition.fieldValue=B)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(N,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const is=oe(zi,[["render",ls],["__scopeId","data-v-d10a7ca9"]]),ss=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:is}}),Mf="",cs={key:0,class:"condition-list"},ds={key:0,class:"condition-container"},ps={key:0,class:"condition-text"},us={key:1,class:"condition-text"},fs={class:"conditions"};function ms(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",ds,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",ps,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",us,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",fs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const hs=oe(ss,[["render",ms],["__scopeId","data-v-553c1496"]]),ys=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=Z.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),vf="",aa=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),gs={class:"truncations"},bs={class:"rule"},Cs={class:"field-value"},ws={class:"field-value"},ks=aa(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),_s=aa(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),xs=["onClick"];function Ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",bs,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Cs,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",ws,[ks,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),_s]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,xs)]))),128))])}const Ns=oe(ys,[["render",Ss],["__scopeId","data-v-f543c690"]]),ge=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},As=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),gt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},ra=(t,o)=>{var f;const n=Z.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;ia(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const C of m){const _=Je((C==null?void 0:C.conditions)||[]);if(_!=null&&_.length){const k=_.filter(x=>sa(x,o)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const h=sa(x,o),A={};return x!=null&&x.dateFormat&&(A.format=x.dateFormat),{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:h.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0,indexCode:x.indexCode,typeGuid:x.typeGuid,indexCodeNum:x.indexCodeNum,...A}});if(k!=null&&k.length)for(const x of k)g.find(h=>h.keyName===x.keyName)||g.push(x)}}const w=g.length;for(let C=0;C<w;C++){const _=g[C];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:x,prop:h,format:A,dataType:L="component",customValue:O}=_,N=la(_);Wo({sqlCondition:N,renderUsedComponents:o,id:k,dateFormat:A,prop:h,keyName:x,dataType:L,customValue:O}),u.push(N)}for(let C=u.length-1;C>=0;C--){const _=u[C];_.globalCondition||Je(u).find(x=>x.alias===_.alias&&x.globalCondition)&&u.splice(C,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function la(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Ts=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function ia(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)ia(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=la(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Ts)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(x=>x.id===a),{value:g,format:w="YYYY-MM-DD",operate:f,type:C="",useCurrentTime:_}=m||{},k=r||w;if(ge(C,"date")){let x;if(_?x=se():x=se(g),f&&g){const{mode:h,type:A,value:L}=f;if(L)switch(A){case"add":x=x.add(L,h);break;case"minus":x=x.subtract(L,h);break}}if(c&&p&&u)switch(u){case"add":x=x.add(c,p);break;case"minus":x=x.subtract(c,p);break}o.fieldValue=(x==null?void 0:x.format(k))||"",o.dateFormat=k}else if(C==="ecanRangePicker"){const{interval:x,intervalUnit:h,startTime:A,endTime:L}=m||{};let O=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(O=V[V.length-1])}if(!O)return;let N=null;if(_&&(O==="startTime"?N=se().subtract(x,h):O==="endTime"&&(N=se())),m[O]&&(N=se(m[O])),f){const{type:V,value:B,mode:F}=f;switch(V){case"add":N=N&&N.add(B,F);break;case"minus":N=N&&N.subtract(B,F)}}if(c&&p&&u){if(c==="rangeValue"){if(A&&L){const V=se(L).diff(se(A),p)+1;switch(u){case"add":N=N&&N.add(V,p);break;case"minus":N=N&&N.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":N=N&&N.add(c,p);break;case"minus":N=N&&N.subtract(c,p)}}if(N&&(o.fieldValue=N==null?void 0:N.format(k)),O==="rangeValue"&&A&&L){const V=Es(k);V&&(o.fieldValue=se(L).diff(se(A),V)+1)}o.dateFormat=k}else{const x=g&&g.match(/\{(.+?)\}/g);x!=null&&x.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function sa(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}function Es(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:hs,TruncationList:Ns,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(fe),i=e.inject(xe),s=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=S=>{var I;for(const E of S)(I=E.conditions)!=null&&I.length?g(E.conditions):E.keyValue=ke()};e.watch(m,S=>{var I,E,v,j;if(S){if(Array.isArray((I=t.item)==null?void 0:I.conditions)){const y=Z.cloneDeep(((E=t.item)==null?void 0:E.conditions)||[]);g(y),p.value=y}Array.isArray((v=t.item)==null?void 0:v.truncations)?u.value=Z.cloneDeep((j=t.item)==null?void 0:j.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let w=!1;const f=S=>{var I;w=!0,e.unref(p)==null||((I=e.unref(p))==null?void 0:I.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:ke()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:ke()}))};e.provide(yn,{updateCondition(S,I,E){var y;w=!0;let v=e.unref(p);const j=E.split("-");if(j!=null&&j.length)for(const b of j)if(v[b])v=(y=v[b])==null?void 0:y.conditions;else break;Array.isArray(v)&&v[I]&&(v[I]=S)},deleteCondition(S,I){var j,y,b;w=!0;let E=e.unref(p);const v=I.split("-");if(v!=null&&v.length){for(const T of v)if(E[T])E=(j=E[T])==null?void 0:j.conditions;else break;if(Array.isArray(E)&&E[S])if(E.splice(S,1),E.length===1){if(v.length>0){const T=v.length-1,D=v[T],M=v.slice(0,T);let G=e.unref(p),K="";for(const Q of M)if(G[Q])K=(y=G[Q])==null?void 0:y.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===E[0].join){if(Array.isArray(E[0].conditions)){const Q=Z.cloneDeep(E[0].conditions);G.splice(+D,1),G.splice(+D,0,...Q)}}else G[D]=E[0]}}else E.length===0&&(p.value=[])}},addCondition(S,I,E){var b,T;w=!0;let v=e.unref(p),j="";const y=S.split("-");if(y!=null&&y.length){for(const D of y)if(v[D])j=(b=v[D])==null?void 0:b.join,v=(T=v[D])==null?void 0:T.conditions;else break;if(j===E)v.splice(I+1,0,{keyValue:ke()});else{const D=Z.cloneDeep(v[I]);v[I]={join:E,conditions:[D,{keyValue:ke()}]}}}}});const C=S=>{w=!0,u.value=S},_=e.computed(()=>{var I;const S=[];return(I=e.unref(s))==null||I.forEach(E=>{const{keyName:v="",id:j="",type:y}=E;y==="ecanRangePicker"?S.push({value:`${j}-startTime`,label:`${v||j}-开始时间值`,keyName:`${v||j}-startTime`},{value:`${j}-endTime`,label:`${v||j}-结束时间值`,keyName:`${v||j}-endTime`}):S.push({value:j,label:`${v||j}`,keyName:`${v||j}`})}),S}),k=()=>{var b,T,D;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),I=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],E=Je(Z.cloneDeep(I[t.index].conditions));I[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(I[t.index].truncations=e.unref(u));const v=Je(e.unref(p));for(const M of v)if(M.dataType==="component"&&M.fieldValue){const G=e.unref(_).find(K=>K.value===M.fieldValue);G&&(M.fieldValue=G.keyName)}const j=E.filter(M=>!v.find(G=>G.componentId===M.componentId)).filter(M=>!S.find(G=>G.id===M.componentId)),y=v.filter(M=>!E.find(G=>G.componentId===M.componentId));x(j,y),i({[t.type]:I,sqlConditions:ra({...e.unref(r),[t.type]:I},e.unref(s))})};function x(S,I){var v;const E=S.map(j=>({...j,delete:!0})).concat(I.map(j=>({...j,add:!0})));for(const j of E){const y=e.unref(s).find(b=>b.id===j.componentId);if(y){const{type:b,id:T,events:D=[]}=y,M=Qt(b);if(j.add)D.find(G=>{var K;return G.on===M&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||c({id:T,events:[...D,{on:M,target:(v=e.unref(l))==null?void 0:v.id,emit:"refreshData"}].reverse()});else if(j.delete){const G=D.findIndex(K=>{var Q;return K.on===M&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(D.splice(G,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},A=()=>{p.value=[],m.value=!1},L=()=>{w&&k(),w=!1,A()},O=()=>{A()},N=e.inject(Me),V=e.unref(e.inject(ve)),B=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(gn,F);const H=async S=>{var I;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:E,indexCode:v}=S,j=await N.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:B,dataSourceId:e.unref(d),indexGuid:E,indexCode:v},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=j.data;y&&((I=b==null?void 0:b.dataViewColumns)!=null&&I.length)&&(F.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(E){console.error(E)}};return e.watch(()=>t.item,S=>{S&&m.value&&H(S)}),o({showModal:h}),{visible:m,onOk:L,onCancel:O,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:C,activeKey:n}}}),Pf="",Vs={class:"header"},Bs={class:"header"};function Os(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(l,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Bs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[6]||(o[6]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const Is=oe(Ls,[["render",Os],["__scopeId","data-v-498bb1e7"]]),Fs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),jf="",Ds=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),$s={class:"config-name"},Ms=Ds(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function vs(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[Ms,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ps=oe(Fs,[["render",vs],["__scopeId","data-v-de6a1755"]]),js=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=Z.cloneDeep(k),l.value=Z.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var A,L;const _=Je(((A=e.unref(a))==null?void 0:A.controlList)||[]),k=p.filter(O=>!e.unref(l).includes(O)).filter(O=>!_.find(N=>N.id===O)),x=e.unref(l).filter(O=>!p.includes(O)).filter(O=>!_.find(N=>N.id===O)),h=k.map(O=>({componentId:O,delete:!0})).concat(x.map(O=>({componentId:O,add:!0})));for(const O of h){const N=e.unref(i).find(V=>V.id===O.componentId);if(N){const{type:V,id:B,events:F=[]}=N,H=Qt(V);if(O.add)F.find(P=>{var S;return P.on===H&&P.target===((S=e.unref(s))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:B,events:[...F,{on:H,target:(L=e.unref(s))==null?void 0:L.id,emit:"refreshData"}].reverse()});else if(O.delete){const P=F.findIndex(S=>{var I;return S.on===H&&S.target===((I=e.unref(s))==null?void 0:I.id)&&S.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:B,events:F}))}}}},w=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},C=(_,k)=>{var x;return(x=k==null?void 0:k.keyName)==null?void 0:x.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:w,onCancel:f,idFilterOption:C,fieldName:l,usedComponentList:c}}}),Rf="",Rs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Us={class:"sort-by-cpnt"},Gs=Rs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function zs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[Gs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Hs=oe(js,[["render",zs],["__scopeId","data-v-08af1ef8"]]),Ys=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:w=""}=m;i.value=w,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var w;return(w=g==null?void 0:g.label)==null?void 0:w.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Uf="",Ws=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),qs={class:"dim-by-count"},Ks=Ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Qs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[Ks,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Xs=oe(Ys,[["render",Qs],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},Js=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(fe),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(B=>{var F;return B.id!==((F=t.item)==null?void 0:F.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),w=e.ref(""),f=V=>{const B=document.getElementById("calTextArea");let F=m.value;if(document.selection){const H=document.selection.createRange();H.text=V}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const H=B.selectionStart,P=B.selectionEnd;let S=H;F=F.substring(0,H)+V+F.substring(P,F.length),S+=V.length,B.selectionStart=B.selectionEnd=S}else F+=V;m.value=F},C=["+","-","*","/","(",")"],_=(V,B)=>{let F="";switch(B){case"name":{F="${"+V+"}";break}case"function":{F=V+"()";break}default:F=V}f(F)},k=[],x=e.ref([]),h=e.ref(!0),A=e.ref([]),L=V=>{var B;for(const F of V)(B=F==null?void 0:F.children)!=null&&B.length?L(F.children):k.push({key:F.key,title:F.title})},O=async()=>{try{const V=await n.get(`${Ve}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:F=[]}=V.data;B&&(F!=null&&F.length)&&(L(F),A.value=F)}catch(V){console.error(V)}},N=V=>{x.value=V,h.value=!1};return e.watch(w,V=>{const B=k.map(F=>F.title.indexOf(V)>-1?qo(F.key,A.value):null).filter((F,H,P)=>F&&P.indexOf(F)===H);x.value=B,w.value=V,h.value=!0}),e.onMounted(()=>{O()}),{fieldList:p,varList:u,myValue:m,calculMethods:C,funcDescsData:A,searchFuncValue:w,expandedKeys:x,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:N}}}),Gf="",zf="",Zs={class:"formula-calculation"},ec={class:"field-area"},tc={style:{"text-align":"center",padding:"10px 0"}},oc=["onClick"],nc=["onClick"],ac={class:"cal_right_bottom"},rc={class:"cal_fu"},lc=["onClick"],ic={class:"function-wrap"},sc={class:"wrap-search"},cc={class:"tree-box"},dc={key:0},pc={style:{color:"#f50"}},uc={key:1},fc=["onClick"],mc={class:"cal_a"};function hc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Zs,[e.createVNode(w,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,oc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,nc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ac,[e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,C)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:C},e.toDisplayString(f),9,lc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",cc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:C})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",dc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",pc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",uc,e.toDisplayString(f),1)),C?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,fc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const yc=oe(Js,[["render",hc],["__scopeId","data-v-ba051d9b"]]),gc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:yc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(Pe),a=e.inject(fe),r=e.inject(xe),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const I of P)Object.prototype.hasOwnProperty.call(e.unref(a),I)&&(S=S.concat(e.unref(a)[I]));return S}),l={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},m=e.ref({}),g=e.ref(),w=e.ref(!1),f=e.ref();e.watch(w,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y}=t.item;if(f.value={label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y},j==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u));else f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let C=!1;const _=()=>{C=!0},k=P=>{const S=e.unref(i).find(I=>I.id===P);S&&(f.value.builtInCalcWay=S.keyName),C=!0},x=()=>{var v;const P=((v=e.unref(a)[t.type])==null?void 0:v.slice())||[],{label:S,builtInFormula:I}=e.unref(f)||{},E={};if(I==="DATE_OFFSET"&&(E.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const j=ke();P.push({...e.unref(f),...E,id:j,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...E,name:S});r({[t.type]:P})},h=()=>{w.value=!0},A=()=>{w.value=!1},L=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const I=e.unref(d).find(E=>E.label===S);return I?I.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},O=e.computed(()=>{let P={label:[{required:!0,validator:L,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),N=()=>{g.value.validate().then(()=>{C&&x(),C=!1,A()})},V=()=>{g.value.clearValidate(),A()},B=()=>{C=!0,e.unref(f).builtInCalcWay=""},F=e.computed(()=>{let P="";const S=e.unref(f).builtInCalcWay,I=e.unref(f).builtInValueSource;if(!I||!S)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+I+"】由小到大在所有值中的排名":P="【"+I+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
|
|
60
|
+
`,S==="ASC"?P=P+"【"+I+"】由小到大的组内的排名":P=P+"【"+I+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let E="";switch(S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P="将所有【"+I+"】"+E;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let E="";switch(P=`所有【】的
|
|
61
|
+
`,S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P=P+"将所有【"+I+"】"+E;break}}return P}),H=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:h}),{visible:w,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:N,onChange:_,formRules:O,accessLogic:F,formRef:g,onChangeBuiltInFormula:B,componentList:i,onChangeComponent:k,filterOption:H,offsetConfig:m}}}),Hf="",Yf="",bc={key:0,class:"accesstip"},Cc={style:{display:"flex","align-items":"center"}};function wc(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),w=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),C=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(C,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(f,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=_=>t.formState.formula=_),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=_=>t.formState.builtInCalcWay=_),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",bc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=_=>t.formState.builtInValueSource=_),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",Cc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(w,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const kc=oe(gc,[["render",wc],["__scopeId","data-v-33575cd9"]]),_c=e.defineComponent({name:"DataConfigCard",directives:{focus:na},components:{CalculationModal:kc,FilterModal:Is,CustomGroupModal:ji,SettingOutlined:ci,DeleteOutlined:Sl,CopyOutlined:wl,InfoCircleOutlined:$l,CustomSortModal:Ti,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Ps,SortByCpnt:Hs,DimByCount:Xs},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(fe),a=e.inject(xe),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(R={})=>{var q;const{type:U}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(R.scope)?i.includes(U)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(R.scope)&&s.includes(U)&&(W=!0),U==="dimensionList"){const ie=((q=e.unref(n)[U])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(R="{}")=>{var U,W;try{const q=JSON.parse(R);if(!c(q))return;const ie=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=ke(),ie.push(q);let ae=[];if(["IDX","BUILT_IN_IDX"].includes(q.scope)){const te=sessionStorage.getItem("indicator-variates");if(te){const le=JSON.parse(te);if(le!=null&&le.length){ae=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of le)ae.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:ke()})}}}a({[t.type]:ie,variableList:ae,variableConditions:Bt(ae,r)}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(R="{}")=>{var U;try{const{cardItem:W,type:q,index:ie}=JSON.parse(R);if(!c(W)||q===t.type)return;const ae=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];g(ae,W),ae.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:ae,[q]:te})}catch(W){console.error(W)}};function g(R,U){const W=[];if(R.forEach(q=>{q.label.includes(U.label)&&W.push(q.label.split(U.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){U.label=U.label+q;break}}}const w=(R,U)=>{var ie,ae;const W=(ie=R.target)==null?void 0:ie.checked,q=((ae=e.unref(n)[t.type])==null?void 0:ae.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[U].show=W,a({[t.type]:q})},f=R=>{var W;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];U.splice(R,1),a({[t.type]:U})},C=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const R=sessionStorage.getItem("indicator-list-item"),U=sessionStorage.getItem("indicator-card-item");R?u(R):U&&m(U)},k=R=>{var le,pe;const{newIndex:U,oldIndex:W,from:q,to:ie}=R,ae=q.id,te=ie.id;if(U>=0&&W>=0){if(ae===te){const be=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=be.splice(W,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}else if(t.type===te){const be=((pe=e.unref(n)[te])==null?void 0:pe.slice())||[];if(be!=null&&be.length){const He=be.splice(be.length-1,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}}}},x=(R,U)=>{const W=R.oldIndex,q=U[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),A=e.ref([]);let L=!1;e.watch(()=>e.unref(h).length,R=>{A.value=new Array(R).fill(!1)},{flush:"post",immediate:!0});const O=R=>{var W,q,ie;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=U[R])!=null&&q.randomKey){const ae=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=ae.length-1;te>=0;te--)ae[te].randomKey===U[R].randomKey&&ae.splice(te,1);a({variableConditions:Bt(ae,r),variableList:ae})}U.splice(R,1),a({[t.type]:U})},N=R=>{A.value[R]=!0},V=()=>{L=!0},B=(R,U,W)=>{var q,ie,ae,te;if(A.value[U]=!1,L){const le=(q=R.target)==null?void 0:q.value,pe=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],be=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.formula)==null?void 0:Ce.includes(W)}).map(ue=>ue.id),He=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.builtInValueSource)==null?void 0:Ce.includes(W)}).map(ue=>ue.id);if(be!=null&&be.length)for(const ue of be){const Ce=pe.find(mt=>mt.id===ue);Ce.formula=Ce.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const ue of He){const Ce=pe.find(mt=>mt.id===ue);Ce.builtInValueSource=Ce.builtInValueSource.replaceAll(W,le)}if(pe[U].label=le,(ae=pe[U])!=null&&ae.randomKey){const ue=((te=e.unref(n))==null?void 0:te.variableList)||[],Ce=ue.filter(mt=>mt.randomKey===pe[U].randomKey);Ce!=null&&Ce.length&&Ce.forEach(mt=>{mt.label=le}),a({variableConditions:Bt(ue,r),variableList:ue})}a({[t.type]:pe})}L=!1},F="DEFAULT",H=e.computed(()=>{const R=[],{scope:U,label:W}=e.unref(l);let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(U)&&(q=q.filter(le=>le.label===W)),U==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=Z.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,R.push(le)}const{leftAxisList:ie=[],rightAxisList:ae=[],indicators:te=[]}=e.unref(n)||{};return[{id:F,label:"默认",name:"默认"},...q,...R,...ie,...ae,...te]}),P=(R={},U,W="ASC")=>{var pe;const{label:q,name:ie,id:ae,defaultCode:te}=R,le=((pe=e.unref(n)[t.type])==null?void 0:pe.slice())||[];ae===F?delete le[U].sort:le[U].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},S=(R={},U="ASC")=>{const q={ASC:"升序",DESC:"降序"}[U],{sort:ie}=R,{label:ae,order:te}=ie||{};return ae&&te===U?`${q}(${ae})`:q},I=e.ref(),E=e.ref(),v=e.ref(),j=e.ref(),y=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(v))==null||W.showModal()},b=R=>{var U;return"自定义排序"+(((U=R==null?void 0:R.sort)==null?void 0:U.type)==="CUSTOM"?"(已配置)":"")},T=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(j))==null||W.showModal()},D=R=>"自定义分组"+((R==null?void 0:R.customGroup)!=null?"(已配置)":""),M=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].aggregate=R,a({[t.type]:W})},Q=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].distinct=R,a({[t.type]:W})},ee=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].dateFormat=R,a({[t.type]:W})},re=(R="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[R]})`,he=R=>`是否去重(${{0:"否",1:"是"}[R]||"否"})`,me=(R={})=>{var U;return"过滤"+(R!=null&&R.conditions&&((U=R==null?void 0:R.conditions)==null?void 0:U.length)>0?"(已配置)":"")},Ee=e.ref(),de=e.ref(),$e=e.ref(),et=e.ref(),mo=(R={},U)=>{I.value=R,E.value=U,e.unref(Ee).showModal()},st=(R={},U)=>{I.value=R,E.value=U,e.unref(de).showModal(R)},ct=(R={},U)=>{I.value=R,E.value=U,e.unref($e).showModal(R)},At=(R={},U)=>{I.value=R,E.value=U,e.unref(et).showModal(R,e.unref(Y))},dt=e.ref(),Le=e.ref("add"),Qe=(R,U,W)=>{var q;Le.value=R,R==="edit"&&(I.value=U,E.value=W),(q=e.unref(dt))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),ze=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{}),ut=async()=>{try{const R=await tt.post(`${Ve}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:U,data:W=[]}=R.data;U&&(ze.value=W)}catch(R){console.error(R)}},ft=(R,U)=>{const W=e.unref(n)[t.type]||{};W[U]=R,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(R,U)=>{var q;const{name:W}=U;if(!nt.includes(t.type)&&R&>(U,"indexCode")){const ie=await tt.post(`${Ve}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:U.id,indexCode:U.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:ae,data:te}=ie.data;ae&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],z.value[W]={name:te.name,code:te.indexCode})}},ne=R=>{l.value=R},J=R=>{const U=document.createElement("input");document.body.appendChild(U),U.setAttribute("value",R),U.select(),document.execCommand("copy"),document.body.removeChild(U),$.message.success("复制成功")},ce=e.inject(Ye),_e=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:w,onDropEnd:f,onDragItemEnd:C,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:x,cardItemList:h,onDelete:O,onEdit:N,onCommitLabelChange:B,sortList:H,onSort:P,handleSortTitle:S,showCustomSortModal:y,customSortModalRef:v,currentItem:I,currentIndex:E,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:j,showCustomGroupModal:T,editLabelList:A,onLabelChange:V,aggregateList:M,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:re,handleDistinctTitle:he,onShowCalculationModal:Qe,handleFilterTitle:me,filterModalRef:Ee,configNameRef:de,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mo,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:ze,fieldData:pt,onFieldChange:ft,onVisibleChange:X,onClickSetting:ne,copyDataViewName:J,dataViewMap:z,isShowConfigName:_e,showConfigNameModal:st,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:ct,dataSelectIndicators:p,showDimByCountModal:At}}}),Wf="",qf="",bt=t=>(e.pushScopeId("data-v-c2ca0016"),t=t(),e.popScopeId(),t),xc={class:"title"},Sc={class:"title-text"},Nc={class:"field-wrap"},Ac={class:"field-item"},Tc=bt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ec={class:"field-item"},Lc=bt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Vc={class:"title"},Bc={class:"title-text"},Oc=bt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Ic=bt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Fc={class:"card-item-wrap"},Dc={class:"card-item-inner"},$c=["onClick"],Mc=["onClick"],vc=["onClick"],Pc={style:{display:"flex","align-items":"center"}},jc=["title"],Rc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Uc={style:{display:"flex","align-items":"center"}},Gc=["title"],zc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),w=e.resolveComponent("a-sub-menu"),f=e.resolveComponent("a-menu-divider"),C=e.resolveComponent("copy-outlined"),_=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),x=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),A=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),N=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),B=e.resolveComponent("sort-by-cpnt"),F=e.resolveComponent("dim-by-count"),H=e.resolveComponent("calculation-modal"),P=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",xc,[e.createElementVNode("div",Sc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[e.createElementVNode("div",Ac,[Tc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ec,[Lc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=S=>t.onFieldChange(S,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Vc,[e.createElementVNode("div",Bc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Oc]),default:e.withCtx(()=>[e.createVNode(l,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Ic])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(A,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=S=>t.cardItemList=S),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:I})=>[e.createElementVNode("div",Fc,[e.createVNode(h,{class:"card-item",checked:S.show,onChange:E=>t.onCheckboxChange(E,I)},{default:e.withCtx(()=>[e.createElementVNode("div",Dc,[!t.editLabelList[I]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])},e.toDisplayString(S.label),9,$c)):e.createCommentVNode("",!0),!t.editLabelList[I]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])}," 请点击填入名字 ",8,Mc)):e.createCommentVNode("",!0),t.editLabelList[I]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:E=>t.onCommitLabelChange(E,I,S.label),onPressEnter:E=>t.onCommitLabelChange(E,I,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(E=>t.onShowCalculationModal("edit",S,I),["prevent","stop"])}," fx ",8,vc)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:E=>t.onVisibleChange(E,S)},{overlay:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{class:"menu-item",style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g,{onClick:E=>t.showCustomSortModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{onClick:E=>t.showCustomGroupModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDateFormatChange(E.value,I)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===E.value||!S.dateFormat&&E.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(E.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:E=>t.showFilterModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onAggregateChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:E=>t.showConfigNameModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:E=>t.showSortByCpntModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:E=>t.showDimByCountModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(w,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDistinctChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Rc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,jc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[zc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Gc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon",onClick:E=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(x,{class:"delete-icon",onClick:e.withModifiers(E=>t.onDelete(I),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(N,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(B,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(F,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(H,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Yc=oe(_c,[["render",Hc],["__scopeId","data-v-c2ca0016"]]),Wc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(xe),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var C,_;const l=Z.cloneDeep((C=e.unref(t))==null?void 0:C.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],w=Wc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const x=g[k];if(!x)break;r.push({...w[x],type:x})}for(const k of c)s(l,k)&&!g.find(x=>x===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Kf="",Qf="",Kc={class:"data-group"};function Qc(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Xc=oe(qc,[["render",Qc],["__scopeId","data-v-64cc2643"]]),Jc=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Zc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},ed=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function td(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const od=oe(ed,[["render",td]]),nd=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ad(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(s,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(s,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const ca=oe(nd,[["render",ad]]),rd=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function ld(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const id=oe(rd,[["render",ld]]),sd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function cd(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dd=oe(sd,[["render",cd]]),pd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function ud(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const fd=oe(pd,[["render",ud]]);var Se="top",Oe="bottom",Ie="right",Ne="left",Ko="auto",Ot=[Se,Oe,Ie,Ne],Ct="start",It="end",md="clippingParents",da="viewport",Ft="popper",hd="reference",pa=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),ua=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),yd="beforeRead",gd="read",bd="afterRead",Cd="beforeMain",wd="main",kd="afterMain",_d="beforeWrite",xd="write",Sd="afterWrite",Nd=[yd,gd,bd,Cd,wd,kd,_d,xd,Sd];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Te(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function rt(t){var o=Te(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Te(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Te(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ad(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Td(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Ed={name:"applyStyles",enabled:!0,phase:"write",fn:Ad,effect:Td,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var lt=Math.max,Xt=Math.min,wt=Math.round;function Xo(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function fa(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Fe(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=rt(t)?Te(t):window,d=s.visualViewport,l=!fa()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function ma(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Te(t).getComputedStyle(t)}function Ld(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((rt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ha(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Vd(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Te(t),n=ha(t);n&&Ld(n)&&qe(n).position==="static";)n=ha(n);return n&&(Re(n)==="html"||Re(n)==="body"&&qe(n).position==="static")?o:n||Vd(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return lt(t,Xt(o,n))}function Bd(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ya(){return{top:0,right:0,bottom:0,left:0}}function ga(t){return Object.assign({},ya(),t)}function ba(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Od=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ga(typeof o!="number"?o:ba(o,Ot))};function Id(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ue(n.placement),l=Zo(d),c=[Ne,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Od(r.padding,n),m=Jo(i),g=l==="y"?Se:Ne,w=l==="y"?Oe:Ie,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],C=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,x=f/2-C/2,h=u[g],A=k-m[p]-u[w],L=k/2-m[p]/2+x,O=$t(h,L,A),N=l;n.modifiersData[a]=(o={},o[N]=O,o.centerOffset=O-L,o)}}function Fd(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||ma(o.elements.popper,r)&&(o.elements.arrow=r))}const Dd={name:"arrow",enabled:!0,phase:"main",fn:Id,effect:Fd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var $d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Md(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function Ca(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,w=s.y,f=w===void 0?0:w,C=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=C.x,f=C.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),x=Ne,h=Se,A=window;if(c){var L=Dt(n),O="clientHeight",N="clientWidth";if(L===Te(n)&&(L=Ze(n),qe(L).position!=="static"&&d==="absolute"&&(O="scrollHeight",N="scrollWidth")),L=L,r===Se||(r===Ne||r===Ie)&&i===It){h=Oe;var V=u&&L===A&&A.visualViewport?A.visualViewport.height:L[O];f-=V-a.height,f*=l?1:-1}if(r===Ne||(r===Se||r===Oe)&&i===It){x=Ie;var B=u&&L===A&&A.visualViewport?A.visualViewport.width:L[N];g-=B-a.width,g*=l?1:-1}}var F=Object.assign({position:d},c&&$d),H=p===!0?Md({x:g,y:f},Te(n)):{x:g,y:f};if(g=H.x,f=H.y,l){var P;return Object.assign({},F,(P={},P[h]=k?"0":"",P[x]=_?"0":"",P.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},F,(o={},o[h]=k?f+"px":"",o[x]=_?g+"px":"",o.transform="",o))}function vd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ue(o.placement),variation:_t(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,Ca(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Ca(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Pd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vd,data:{}};var Zt={passive:!0};function jd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Te(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Rd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jd,data:{}};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Ud[o]})}var Gd={start:"end",end:"start"};function wa(t){return t.replace(/start|end/g,function(o){return Gd[o]})}function en(t){var o=Te(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function zd(t,o){var n=Te(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=fa();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Hd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=lt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=lt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=lt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ka(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&on(t)?t:ka(Jt(t))}function Mt(t,o){var n;o===void 0&&(o=[]);var a=ka(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Te(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(Mt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yd(t,o){var n=kt(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function _a(t,o,n){return o===da?nn(zd(t,n)):rt(o)?Yd(o,n):nn(Hd(Ze(t)))}function Wd(t){var o=Mt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?Dt(t):t;return rt(a)?o.filter(function(r){return rt(r)&&ma(r,a)&&Re(r)!=="body"}):[]}function qd(t,o,n,a){var r=o==="clippingParents"?Wd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=_a(t,c,a);return l.top=lt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=lt(p.left,l.left),l},_a(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function xa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ue(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Se:l={x:s,y:o.y-n.height};break;case Oe:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case Ne:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function vt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?md:d,c=n.rootBoundary,p=c===void 0?da:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,w=g===void 0?!1:g,f=n.padding,C=f===void 0?0:f,_=ga(typeof C!="number"?C:ba(C,Ot)),k=m===Ft?hd:Ft,x=t.rects.popper,h=t.elements[w?k:m],A=qd(rt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),L=kt(t.elements.reference),O=xa({reference:L,element:x,strategy:"absolute",placement:r}),N=nn(Object.assign({},x,O)),V=m===Ft?N:L,B={top:A.top-V.top+_.top,bottom:V.bottom-A.bottom+_.bottom,left:A.left-V.left+_.left,right:V.right-A.right+_.right},F=t.modifiersData.offset;if(m===Ft&&F){var H=F[r];Object.keys(B).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,I=[Se,Oe].indexOf(P)>=0?"y":"x";B[P]+=H[I]*S})}return B}function Kd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ua:l,p=_t(a),u=p?d?pa:pa.filter(function(w){return _t(w)===p}):Ot,m=u.filter(function(w){return c.indexOf(w)>=0});m.length===0&&(m=u);var g=m.reduce(function(w,f){return w[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ue(f)],w},{});return Object.keys(g).sort(function(w,f){return g[w]-g[f]})}function Qd(t){if(Ue(t)===Ko)return[];var o=eo(t);return[wa(t),o,wa(o)]}function Xd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,w=g===void 0?!0:g,f=n.allowedAutoPlacements,C=o.options.placement,_=Ue(C),k=_===C,x=l||(k||!w?[eo(C)]:Qd(C)),h=[C].concat(x).reduce(function(G,K){return G.concat(Ue(K)===Ko?Kd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:w,allowedAutoPlacements:f}):K)},[]),A=o.rects.reference,L=o.rects.popper,O=new Map,N=!0,V=h[0],B=0;B<h.length;B++){var F=h[B],H=Ue(F),P=_t(F)===Ct,S=[Se,Oe].indexOf(H)>=0,I=S?"width":"height",E=vt(o,{placement:F,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),v=S?P?Ie:Ne:P?Oe:Se;A[I]>L[I]&&(v=eo(v));var j=eo(v),y=[];if(i&&y.push(E[H]<=0),d&&y.push(E[v]<=0,E[j]<=0),y.every(function(G){return G})){V=F,N=!1;break}O.set(F,y)}if(N)for(var b=w?3:1,T=function(K){var Q=h.find(function(ee){var re=O.get(ee);if(re)return re.slice(0,K).every(function(he){return he})});if(Q)return V=Q,"break"},D=b;D>0;D--){var M=T(D);if(M==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const Jd={name:"flip",enabled:!0,phase:"main",fn:Xd,requiresIfExists:["offset"],data:{_skip:!1}};function Sa(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function Na(t){return[Se,Ie,Oe,Ne].some(function(o){return t[o]>=0})}function Zd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=vt(o,{elementContext:"reference"}),d=vt(o,{altBoundary:!0}),l=Sa(s,a),c=Sa(d,r,i),p=Na(l),u=Na(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ep={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zd};function tp(t,o,n){var a=Ue(t),r=[Ne,Se].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ne,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function op(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ua.reduce(function(p,u){return p[u]=tp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const np={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:op};function ap(t){var o=t.state,n=t.name;o.modifiersData[n]=xa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const rp={name:"popperOffsets",enabled:!0,phase:"read",fn:ap,data:{}};function lp(t){return t==="x"?"y":"x"}function ip(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,w=n.tetherOffset,f=w===void 0?0:w,C=vt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ue(o.placement),k=_t(o.placement),x=!k,h=Zo(_),A=lp(h),L=o.modifiersData.popperOffsets,O=o.rects.reference,N=o.rects.popper,V=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,B=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),F=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,H={x:0,y:0};if(L){if(i){var P,S=h==="y"?Se:Ne,I=h==="y"?Oe:Ie,E=h==="y"?"height":"width",v=L[h],j=v+C[S],y=v-C[I],b=g?-N[E]/2:0,T=k===Ct?O[E]:N[E],D=k===Ct?-N[E]:-O[E],M=o.elements.arrow,G=g&&M?Jo(M):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ya(),Q=K[S],ee=K[I],re=$t(0,O[E],G[E]),he=x?O[E]/2-b-re-Q-B.mainAxis:T-re-Q-B.mainAxis,me=x?-O[E]/2+b+re+ee+B.mainAxis:D+re+ee+B.mainAxis,Ee=o.elements.arrow&&Dt(o.elements.arrow),de=Ee?h==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,$e=(P=F==null?void 0:F[h])!=null?P:0,et=v+he-$e-de,mo=v+me-$e,st=$t(g?Xt(j,et):j,v,g?lt(y,mo):y);L[h]=st,H[h]=st-v}if(d){var ct,At=h==="x"?Se:Ne,dt=h==="x"?Oe:Ie,Le=L[A],Qe=A==="y"?"height":"width",tt=Le+C[At],ot=Le-C[dt],ze=[Se,Ne].indexOf(_)!==-1,pt=(ct=F==null?void 0:F[A])!=null?ct:0,ut=ze?tt:Le-O[Qe]-N[Qe]-pt+B.altAxis,ft=ze?Le+O[Qe]+N[Qe]-pt-B.altAxis:ot,nt=g&&ze?Bd(ut,Le,ft):$t(g?ut:tt,Le,g?ft:ot);L[A]=nt,H[A]=nt-Le}o.modifiersData[a]=H}}const sp={name:"preventOverflow",enabled:!0,phase:"main",fn:ip,requiresIfExists:["offset"]};function cp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dp(t){return t===Te(t)||!Fe(t)?en(t):cp(t)}function pp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function up(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&pp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Re(o)!=="body"||on(i))&&(d=dp(o)),Fe(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function fp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function mp(t){var o=fp(t);return Nd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function hp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function yp(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var Aa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ta(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function gp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Aa:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Aa,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:rt(d)?Mt(d):d.contextElement?Mt(d.contextElement):[],popper:Mt(l)};var x=mp(yp([].concat(a,p.options.modifiers)));return p.orderedModifiers=x.filter(function(h){return h.enabled}),w(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,x=_.popper;if(Ta(k,x)){p.rects={reference:up(k,Dt(x),p.options.strategy==="fixed"),popper:Jo(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(B){return p.modifiersData[B.name]=Object.assign({},B.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var A=p.orderedModifiers[h],L=A.fn,O=A.options,N=O===void 0?{}:O,V=A.name;typeof L=="function"&&(p=L({state:p,options:N,name:V,instance:g})||p)}}}},update:hp(function(){return new Promise(function(C){g.forceUpdate(),C(p)})}),destroy:function(){f(),m=!0}};if(!Ta(d,l))return g;g.setOptions(c).then(function(C){!m&&c.onFirstUpdate&&c.onFirstUpdate(C)});function w(){p.orderedModifiers.forEach(function(C){var _=C.name,k=C.options,x=k===void 0?{}:k,h=C.effect;if(typeof h=="function"){var A=h({state:p,name:_,instance:g,options:x}),L=function(){};u.push(A||L)}})}function f(){u.forEach(function(C){return C()}),u=[]}return g}}var bp=[Rd,rp,Pd,Ed,np,Jd,sp,Dd,ep],Cp=gp({defaultModifiers:bp});function an(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Ea(t,o){if(t){if(typeof t=="string")return an(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,o):void 0}}function wp(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Ea(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xt(t){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},xt(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Va(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Ba={exports:{}},Oa={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Oa),function(t){var o=Oa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var M=b&&b.prototype instanceof h?b:h,G=Object.create(M.prototype),K=new v(D||[]);return d(G,"_invoke",{value:P(y,T,K)}),G}function w(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",C="suspendedYield",_="executing",k="completed",x={};function h(){}function A(){}function L(){}var O={};m(O,c,function(){return this});var N=Object.getPrototypeOf,V=N&&N(N(j([])));V&&V!==i&&s.call(V,c)&&(O=V);var B=L.prototype=h.prototype=Object.create(O);function F(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function H(y,b){function T(M,G,K,Q){var ee=w(y[M],y,G);if(ee.type!=="throw"){var re=ee.arg,he=re.value;return he&&o(he)=="object"&&s.call(he,"__await")?b.resolve(he.__await).then(function(me){T("next",me,K,Q)},function(me){T("throw",me,K,Q)}):b.resolve(he).then(function(me){re.value=me,K(re)},function(me){return T("throw",me,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(M,G){function K(){return new b(function(Q,ee){T(M,G,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(y,b,T){var D=f;return function(M,G){if(D===_)throw new Error("Generator is already running");if(D===k){if(M==="throw")throw G;return{value:a,done:!0}}for(T.method=M,T.arg=G;;){var K=T.delegate;if(K){var Q=S(K,T);if(Q){if(Q===x)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=w(y,b,T);if(ee.type==="normal"){if(D=T.done?k:C,ee.arg===x)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function S(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,S(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),x;var M=w(D,y.iterator,b.arg);if(M.type==="throw")return b.method="throw",b.arg=M.arg,b.delegate=null,x;var G=M.arg;return G?G.done?(b[y.resultName]=G.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,x):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,x)}function I(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function E(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function v(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(I,this),this.reset(!0)}function j(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function M(){for(;++T<y.length;)if(s.call(y,T))return M.value=y[T],M.done=!1,M;return M.value=a,M.done=!0,M};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return A.prototype=L,d(B,"constructor",{value:L,configurable:!0}),d(L,"constructor",{value:A,configurable:!0}),A.displayName=m(L,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===A||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,L):(y.__proto__=L,m(y,u,"GeneratorFunction")),y.prototype=Object.create(B),y},r.awrap=function(y){return{__await:y}},F(H.prototype),m(H.prototype,p,function(){return this}),r.AsyncIterator=H,r.async=function(y,b,T,D,M){M===void 0&&(M=Promise);var G=new H(g(y,b,T,D),M);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},F(B),m(B,u,"Generator"),m(B,c,function(){return this}),m(B,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function M(){for(;T.length;){var G=T.pop();if(G in b)return M.value=G,M.done=!1,M}return M.done=!0,M}},r.values=j,v.prototype={constructor:v,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(E),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,re){return G.type="throw",G.arg=y,b.next=ee,re&&(b.method="next",b.arg=a),!!re}for(var D=this.tryEntries.length-1;D>=0;--D){var M=this.tryEntries[D],G=M.completion;if(M.tryLoc==="root")return T("end");if(M.tryLoc<=this.prev){var K=s.call(M,"catchLoc"),Q=s.call(M,"finallyLoc");if(K&&Q){if(this.prev<M.catchLoc)return T(M.catchLoc,!0);if(this.prev<M.finallyLoc)return T(M.finallyLoc)}else if(K){if(this.prev<M.catchLoc)return T(M.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return T(M.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var M=D;break}}M&&(y==="break"||y==="continue")&&M.tryLoc<=b&&b<=M.finallyLoc&&(M=null);var G=M?M.completion:{};return G.type=y,G.arg=b,M?(this.method="next",this.next=M.finallyLoc,x):this.complete(G)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),x},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),E(T),x}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var M=D.arg;E(T)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:j(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),x}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ba);var to=Ba.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function kp(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=kp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var w=m/t.size*100,f=100-g/t.size*100;n("change",w,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},_p=Ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),xp=Ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Ke(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),no.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[_p,xp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Sp={ref:"canvas"};Ke(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),ao.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),i=function(){var s=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Np={ref:"canvas"};Ke(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),ro.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Np,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),Ap={class:"input"},Tp={class:"label"},Ep=[".value"];function Pt(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var i,s,d,l,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Ea(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Fa(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("span",Tp,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,Ep)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var Da=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},$a={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat($a[o]||o).concat($a[n]||n)},Ma=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(a))},St=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},jt=function(t,o,n){t=6*St(t,360),o=St(o,100),n=St(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},va=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=Da(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(Ma(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=Da(a,r/100,i/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%)");case"rgb":var g=jt(a,r,i),w=g.r,f=g.g,C=g.b;return"rgb(".concat(w,", ").concat(f,", ").concat(C,")");default:return Ma(jt(a,r,i))}},so=function(t){var o=t.r,n=t.g,a=t.b;o=St(o,255),n=St(n,255),a=St(a,255);var r,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Pa=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},ja=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=za(a);return va(r,o,n)}return""},Ra=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ra(t),a=n.r,r=n.g,i=n.b,s=n.a;return De(De({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ua(t),c=l.h,p=l.s,u=l.l,m=l.a;return De(De({},Pa({h:c,s:p,l:u})),{},{a:+m});default:var g=ja(t),w=g.r,f=g.g,C=g.b,_=g.a;return De(De({},so({r:w,g:f,b:C})),{},{a:_/255})}else switch(o){case"rgb":return De(De({},so(Ra(t))),{},{a:1});case"hsv":var k=Ga(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return De(De({},Pa(Ua(t))),{},{a:1});default:return De(De({},so(ja(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},za=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},Rt=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),i=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Lp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Lp)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return ln(a,"hex",!0)})})}}}),Vp={class:"colors"};function Ha(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ge(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ha(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Vp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,x=(k=t.value)===null||k===void 0?void 0:k.trim();if(x!=null&&x!==""){var h=cn(x);return za(sn(x,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,x){var h="";k!=null?(h=va(Ge({},k),t.format,t.showAlpha),s.value=Ge({},k)):s.value=null,d.value=h;var A=l();JSON.stringify(k)!==JSON.stringify(A)&&JSON.stringify(k)!==JSON.stringify(x)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,x;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(x=e.unref(i))===null||x===void 0?void 0:x.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),w=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),C=e.ref(-1),_=function(k,x,h){if(k.length!==0){var A=sn(k,x,h),L=A.h,O=A.s,N=A.v;if(!(isNaN(L)||isNaN(O)||isNaN(N))){var V=1,B=A.a;isNaN(B)||(V=B),i.value={h:L,s:O,v:N,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:w,onSelectSaturation:function(k,x){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:x,a:e.unref(m)}:i.value=Ge(Ge({},e.unref(i)),{},{s:k,v:x})},onSelectHue:function(k){C.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=Ge(Ge({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=Ge(Ge({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){C.value=-1,d.value=k},handleChange:function(){var k,x=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(x!==""){var h=t.showAlpha,A=t.format,L=function(O,N,V){if(V)switch(N){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(N){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(x,A,h);L?_(x,A,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:C,onSelectColor:function(k,x){if(C.value=x,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Bp={class:"picker-inner"},Op={class:"picker-header"};Ke(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Bp,[e.createElementVNode("div",Op,[e.createVNode(s,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(l,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),Ip=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function Ya(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),uo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(Ip),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var it=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(S){return ln(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",I=Array.isArray(S)?S:[S];a.value=I.map(function(E){return ln(E,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,w,f=e.ref(null),C=e.ref(null),_=(l=f,c=C,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){it.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(S){var I=S.state,E=I.styles,v=I.placement,j=E.popper;u.value=dn(dn(dn({},j),p),{},{transformOrigin:v==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(S,I){var E,v=Pt(S,2),j=v[0],y=v[1],b=Pt(I,2),T=b[0],D=b[1];if(j&&y&&(T!==j||D!==T)){(E=it)===null||E===void 0||E.destroy();var M=j.$el||j,G=y.$el||y;e.nextTick(function(){it=Cp(M,G,m)})}}),e.onBeforeUnmount(function(){var S;it&&((S=it)===null||S===void 0||S.destroy(),it=null)}),{instance:it,style:u}),k=_.style,x=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},A=e.ref(),L=function(){var S=Va(oo.mark(function I(E){var v,j,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(j=E.target,(y=(v=j.dataset)===null||v===void 0?void 0:v.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){x(),clearTimeout(g)},100)):x(),i.value=b,f.value=j;case 10:case"end":return T.stop()}},I)}));return function(I){return S.apply(this,arguments)}}(),O=function(){var S=Va(oo.mark(function I(E){var v,j,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=E.target,!(!((v=e.unref(A))!==null&&v!==void 0&&v.isEqualNode(b))&&(!((j=e.unref(A))===null||j===void 0)&&j.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(C))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},I)}));return function(I){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(x(),clearTimeout(w))});var N,V=e.ref(t.max>e.unref(a).length),B=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),F=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),H=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(C)]},function(){e.nextTick(function(){var S,I;(S=e.unref(A))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(H)),(I=e.unref(C))===null||I===void 0||(I=I.$el)===null||I===void 0||I.setAttribute("pick-colors-theme",e.unref(H))})},{immediate:!0}),e.provide("theme",{theme:H});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&x()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),g&&(clearTimeout(g),g=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(S){var I=e.unref(i),E=e.unref(a).slice(),v=e.unref(a).length;if(I!=null){I>=0?E[I]=S:(i.value=v,E.push(S));var j="";j=Array.isArray(t.value)||t.addColor?E:S,t.value===void 0?a.value=Array.isArray(j)?j:[j]:(n("update:value",j),n("change",j,S,I)),t.addColor&&v>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:A,onColorClick:L,pickerRef:C,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var I=S.target;N=+I.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var I=+S.target.dataset.index,E=wp(e.unref(a)),v=E[N];E.splice(N,1);var j=E.slice(0,I),y=E.splice(I),b=j.concat([v]).concat(y);n("update:value",b),n("change",b,b[N],N)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:F,toPopupContainer:B}}});Ke(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(s,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(l,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const Fp=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),Xf="",Dp={class:"color-pick"};function $p(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Dp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Mp=oe(Fp,[["render",$p],["__scopeId","data-v-e2113f43"]]),vp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Jf="",Pp={class:"color-group-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rp=oe(vp,[["render",jp],["__scopeId","data-v-b2be8322"]]),Up=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Vo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:ca,PlusCircleOutlined:Wl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const m=c[0];if(Object.prototype.toString.call(m)==="[object Object]"){const g=Object.keys(m),w={};g.forEach(f=>{w[f]=""}),c.push(w)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const w=c==null?void 0:c.target,f=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Zf="",Gp={class:"form-group"},zp={class:"form-row"},Hp={key:0,class:"label"},Yp={key:1,class:"label"},Wp={class:"icon-group"};function qp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Hp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Yp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kp=oe(Up,[["render",qp],["__scopeId","data-v-f0c0ab4d"]]),Qp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Xp(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jp=oe(Qp,[["render",Xp]]),Zp=e.defineComponent({name:"PropsToForm",components:{Input:od,InputNumber:ca,RadioGroup:id,Select:dd,Switch:fd,ColorPick:Mp,ColorGroupPick:Rp,FormGroup:Kp,Textarea:Jp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:w="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[w]:(C,_=!0)=>{i(_?{[u]:C}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:Z.reduce(l,(c,p,u)=>{const m=Zc[u];if(Array.isArray(m)){const g=m.find(w=>{const{onlyType:f,excludeType:C}=w;return f==null&&C==null?!0:f?ge(e.unref(r),f):C?!ge(e.unref(r),C):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:ge}}}),em="",eu={class:"props-to-form"},tu={class:"label"},ou={class:"component-wrapper"};function nu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tu,e.toDisplayString(s.label),1),e.createElementVNode("div",ou,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const au=oe(Zp,[["render",nu],["__scopeId","data-v-c6fb2484"]]);function ru(){return new Worker("/assets/editor.worker-02df2e61.js")}function lu(){return new Worker("/assets/json.worker-867823a6.js")}function iu(){return new Worker("/assets/ts.worker-7254b425.js")}const su=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(i,s){return s==="json"?new lu:s==="typescript"||s==="javascript"?new iu:new ru}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=er.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(Z.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),tm="",cu={class:"editor",ref:"dom"};function du(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",cu,null,512)}const Wa=oe(su,[["render",du],["__scopeId","data-v-71e88372"]]),pu=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],uu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:Wa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var C,_,k;let f=[];if(r.value=[],!o.value)f=((C=e.unref(n))==null?void 0:C.queryColumnList)||[];else{const x=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...x,...h]}f.forEach(x=>{var A;let h=(A=e.unref(a))==null?void 0:A.find(L=>L.prop===x.name);h||(h={label:x.label,prop:x.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,C,_)=>{f&&C&&(i=f,s=C,d.value=f[C]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(C){console.error(C)}},changeRenderBool:(f,C)=>{f.style=C.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),om="",fu={class:"table-column-config"};function mu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",fu,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:w,text:f,record:C})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(C,_),checked:C.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:C.width,"onUpdate:value":_=>C.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.renderText,"onUpdate:value":_=>C.renderText=_,readOnly:!0,onClick:_=>t.renderSave(C,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.headerTemplate,"onUpdate:value":_=>C.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(C,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:C.headerAlign,"onUpdate:value":_=>C.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:C.align,"onUpdate:value":_=>C.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:C.fixed,"onUpdate:value":_=>C.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:C.dataFormat,"onUpdate:value":_=>C.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[C.dataFormat&&C.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:C.retentiondigit,"onUpdate:value":_=>C.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const hu=oe(uu,[["render",mu],["__scopeId","data-v-afebddc0"]]),yu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:au,TableColumnConfig:hu,Editor:Wa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=A=>{i({...wn[A]},!1),d()},c=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Jc.map(A=>{const{props:L,title:O,enableProps:N,onlyType:V,excludeType:B}=A,F=[];L.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&F.push(S):F.push(S))});let H,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(H=typeof N=="string"&&r.value?r.value[N]:void 0,P=Z.pick(e.unref(r),F)):(H=typeof N=="string"&&a.value?a.value[N]:void 0,P=Z.pick(e.unref(a),F)),{title:O,enableProps:H,enablePropsName:N,onlyType:V,excludeType:B,props:P}}).filter(({props:A})=>Object.keys(A).length>0)),m=(A,L)=>{const{onlyType:O,excludeType:N}=A;return O==null&&N==null?!0:O?ge(L,O):N?!ge(L,N):!1},g=(A,L)=>(L==null||L.stopPropagation(),A),w=(A,L)=>{L!=null&&i({[L]:A})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),C=A=>{try{const L=JSON.parse(A||"{}");i(L,!1)}catch(L){console.error(L)}},_=e.ref(""),k=A=>{try{_.value=A}catch(L){console.error(L)}},x=(A,L)=>{try{s({[L]:A})}catch(O){console.error(O)}},h=e.computed(()=>{var A;return["customGraph"].includes((A=e.unref(a))==null?void 0:A.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:C,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:x,onSwitchClick:g,onSwitchChange:w,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),nm="",am="",gu={class:"style-group"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:C=>t.onSwitchChange(C,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var C;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((C=f.onlyType)!=null&&C.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(w)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Cu=oe(yu,[["render",bu],["__scopeId","data-v-2fb3e2ad"]]),wu=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Qn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(M=>{var G;return M.id===((G=t.control)==null?void 0:G.id)});if(b){const M=b.type,G=Z.pick(b,["value","startTime","endTime"]);(D=Object.keys(G))!=null&&D.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(re=>ge(M,re.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:M=[]}=b,G=Qt(T),K=M.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(M.splice(K,1),n({id:D,events:M}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,O(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),w=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},C=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},x=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),A=e.inject(fe),L=e.computed(()=>{var Ee;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:M=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(A),Q=Z.cloneDeep([...y,...b,...T,...D,...M,...G,...K]);if(Q!=null&&Q.length)for(const de of Q)de.id=de.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(de=>({...de,id:de.name,label:de.title||de.label})),...Q];((Ee=e.unref(h))==null?void 0:Ee.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const re=new Map,he=ee.length;for(let de=0;de<he;de++){const $e=ee[de],{id:et}=$e||{};re.set(et,$e)}return[...re].map(([de,$e])=>$e)});function O(y,b){var K,Q;const{type:T,id:D,events:M=[]}=y,G=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(A))==null?void 0:K.controlList)||[]).find(re=>re.id===e.unref(g))||u(e.unref(g))),M.find(ee=>{var re;return ee.on===G&&ee.target===((re=e.unref(h))==null?void 0:re.id)&&ee.emit==="refreshData"})||n({id:D,events:[...M,{on:G,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const N=(y,b)=>{if(y){const{label:T,name:D,id:M,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},re={...t.control,conditionKey:M,conditionLabel:T,conditionName:D,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};gt(re,"rule")||(re.rule="EQUAL"),gt(re,"dataType")||(re.dataType="component"),r({control:re,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},B=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},F=e.computed(()=>{const y=e.unref(L).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),H=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(G=>G.id===b),M=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(D==null?void 0:D.type,M)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),I=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:w,onPropChange:f,onModeChange:x,onRuleChange:C,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:L,onConditionKeyChange:N,idFilterOption:V,filterOption:B,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:F,dataTypeOption:H,isShowProp:S,isShowFormat:I,isShowModelProp:P,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),rm="",lm="",ku={class:"control-card"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(s,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(s,{key:3,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(s,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-d25f813a"]]),Su=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:xu}}),im="",Nu={key:0,class:"condition-list"},Au={key:0,class:"condition-container"},Tu={key:0,class:"condition-text"},Eu={key:1,class:"condition-text"},Lu={class:"conditions"};function Vu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Au,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Tu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Eu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Lu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Bu=oe(Su,[["render",Vu],["__scopeId","data-v-916ff9bd"]]),Ou=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Bu,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(fe),n=e.inject(xe),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(gt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),gt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:ra({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:ke()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:ke()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:ke()}),i({controlList:u})))},d=p=>{var C,_,k,x;const{index:u,path:m}=p;let g=Z.cloneDeep((C=e.unref(a))==null?void 0:C.slice()),w=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(w[h])w=(_=w[h])==null?void 0:_.conditions;else break;if(Array.isArray(w)&&w[u])if(w.splice(u,1),w.length===1){if(f.length>0){const h=f.length-1,A=f[h],L=f.slice(0,h);let O=g,N="";for(const V of L)if(O[V])N=(k=O[V])==null?void 0:k.join,O=(x=O[V])==null?void 0:x.conditions;else break;if(N===w[0].join){if(Array.isArray(w[0].conditions)){const V=Z.cloneDeep(w[0].conditions);O.splice(+A,1),O.splice(+A,0,...V)}}else O[A]=w[0]}}else w.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,w=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=w;const C=g.split("-");if(C!=null&&C.length)for(const x of C)if(f[x])f=(k=f[x])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:w})},c=(p,u,m)=>{var _,k,x;const g=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let w=g,f="";const C=p.split("-");if(C!=null&&C.length){for(const h of C)if(w[h])f=(k=w[h])==null?void 0:k.join,w=(x=w[h])==null?void 0:x.conditions;else break;if(f===m)w.splice(u+1,0,{keyValue:ke()});else{const h=Z.cloneDeep(w[u]);w[u]={join:m,conditions:[h,{keyValue:ke()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),sm="",Iu={class:"control-group"},Fu={class:"control-group-header"},Du={class:"control-group-content"};function $u(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Iu,[e.createElementVNode("div",Fu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Du,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Mu=oe(Ou,[["render",$u],["__scopeId","data-v-1e37d2d3"]]),vu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Vo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(A=>A.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(Z.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var A;let h=null;if(((A=e.unref(l))==null?void 0:A.dataType)==="component"){const L=e.unref(r).find(O=>{var N;return O.id===((N=e.unref(l))==null?void 0:N.id)});L&&(h=L)}return h}),p=e.computed(()=>{var A;let h=!1;return((A=e.unref(l))==null?void 0:A.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=ge(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(ge(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):ge(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,A)=>{h&&(e.unref(l).keyName=A.keyName)},w=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]:[]),C=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,A)=>{var L;return(L=A==null?void 0:A.keyName)==null?void 0:L.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:w,onChangeDataType:C,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),cm="",Pu={class:"variable-item"},ju=["title"],Ru={class:"popover-content-wrap"},Uu={style:{display:"flex"}};function Gu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Pu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,ju)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const zu=oe(vu,[["render",Gu],["__scopeId","data-v-1d5b6ae6"]]),Hu=e.defineComponent({name:"VariableGroup",components:{VariableItem:zu},setup(){const t=e.inject(fe),o=e.inject(xe),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=Z.cloneDeep(e.unref(a));l.push({keyValue:ke(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=Z.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=Z.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),dm="",Yu={class:"variable-group"},Wu={class:"variable-group-header"},qu={class:"variable-group-content"};function Ku(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Yu,[e.createElementVNode("div",Wu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const Qu=oe(Hu,[["render",Ku],["__scopeId","data-v-fd60cd09"]]),Xu=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:_,aggregate:k}=s;let x;return _&&(x=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:x}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:w=[],seriesList:f=[],leftAxisList:C=[],rightAxisList:_=[],queryColumnList:k=[],indicators:x=[],dataSourceId:h,idxLibMode:A,preview:L=!1}=s||{};m==null&&(ge(d,"table")?m="1":m="2");let O;if(Array.isArray(w)&&w.length>0){const F=w.length;for(let H=0;H<F;H++){const P=w[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){O={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}let N;if(Array.isArray(f)&&f.length>0){const F=f.length;for(let H=0;H<F;H++){const P=f[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){N={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}const V=[];k==null||k.forEach(F=>{V.push(o(F))});const B=[];if(C==null||C.forEach(F=>{F.location="LEFT",B.push(i(F))}),_==null||_.forEach(F=>{F.location="RIGHT",B.push(i(F))}),x==null||x.forEach(F=>{F.location="LEFT",B.push(i(F))}),!(m==="1"&&V.length===0)&&!(m==="2"&&B.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:O,series:N,indicatorList:B,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:A,preview:L})}catch(F){console.error(F)}}},qa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],w=i[g];w!=null&&(c=c.replace(g,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=qa(c,n)),t=t.replace(l,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Ut=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=qa(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},Ju=(t,o,n)=>{switch(t.type){case"bar":return Zu(t,o,n);case"line":return ef(t,o,n);case"pie":return tf(t,o,n);case"comboGraph":return of(t,o,n);default:return{}}},Zu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(l),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},ef=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(l)}},tf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:As(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},of=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const w=m[g],{tooltipFormatter:f}=w||{},{marker:C,seriesName:_,name:k,value:x,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:C,name:k,value:x,seriesName:_,a:_,b:k,c:x,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(s)}},nf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:w,value:f}=g,C={...t[0],value:t[0][f]};r.add(w),p.push(C)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const w=a[g],{label:f,value:C}=w,_={...u,value:u[C]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},af=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",w=u[r]||"";if(i.add(m),s.has(w)){const f=s.get(w);f.push({name:m,value:g,...u}),s.set(w,f)}else s.set(w,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},rf=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(fe)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),w=e.computed(()=>g.value?ar:12),f=e.ref({}),C=e.ref(),_=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return C.value;const B=Ju(V,e.unref(f),w.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:V.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:V.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...B}}),k=(V=[],B,F=!1)=>{const H=F?B:null;f.value=nf(V,H)},x=(V=[],B)=>{f.value=af(V,B)},h=async()=>{var V,B,F;try{const H=Xu({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const P=await H(),{columns:S=[],rows:I=[]}=((B=P==null?void 0:P.data)==null?void 0:B.data)??{};if(((F=e.unref(n.value))==null?void 0:F.type)==="pie"){let E=[];if(S.length>0){const v=S[0],j=S[1];E=I.map(y=>({name:y[v],value:y[j]}))}x(E)}else{let E;S.length>0&&(E={name:S[0],types:S.slice(1).map(v=>({label:v,value:v}))}),k(I,E,!0)}}catch(H){console.error(H)}finally{m.value=!1}},A={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},L=()=>{e.unref(f).dataset.length===0?u.value.setOption(A):u.value.setOption(_.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&h()},N=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(_,()=>{L()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const B=eval;C.value=B(V)}catch(B){console.error(B)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(N),i.observe(p.value)),u.value=nr.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:O}),{echartRef:c,loading:m}}}),pm="",lf={class:"ecan-chart-graph",ref:"chartWrapRef"},sf={style:{width:"100%",height:"100%"},ref:"echartRef"};function cf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",lf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",sf,null,512)]),_:1},8,["spinning"])],512)}const Ka=oe(rf,[["render",cf],["__scopeId","data-v-8049fed2"]]),df=e.defineComponent({name:"DataConfig",components:{DataGroup:Xc,StyleGroup:Cu,ChartGraph:Ka,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Mu,VariableGroup:Qu,AButton:$.Button,ReloadOutlined:ri},setup(){var O;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(fe),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const N=Z.cloneDeep(e.unref(a));p(N);const V=Z.pick(N,Z.without(Object.keys(N),"position","top","left","width","height"));ge(N.type,l)?(V.height=N.height,V.width=N.width):V.height="290px";const B=Z.cloneDeep(e.unref(i));return B.pageMode="design",B.componentList=s,B.preview=!0,B.pageConfig=d,{...V,graphicConfig:B,toolboxShow:!1,sourceLeft:N.left,sourceTop:N.top}});function p(N){var V,B,F,H;["#ffffff","#fff"].includes((V=N==null?void 0:N.color)==null?void 0:V.toLowerCase())&&(N.color="#000"),["#ffffff","#fff"].includes((B=N==null?void 0:N.variableColor)==null?void 0:B.toLowerCase())&&(N.variableColor="#000"),["#ffffff","#fff"].includes((F=N==null?void 0:N.increaseColor)==null?void 0:F.toLowerCase())&&(N.increaseColor="#000"),["#ffffff","#fff"].includes((H=N==null?void 0:N.declineColor)==null?void 0:H.toLowerCase())&&(N.declineColor="#000")}const u=e.computed(()=>{let N=!0;return ge(e.unref(c).type,l)&&(N=!1),N}),m=e.computed(()=>{var N;return(N=e.unref(c))==null?void 0:N.type}),g=e.computed(()=>{var N;return!!((N=e.unref(c))!=null&&N.isGroupTable)}),w=N=>{const V=N==="1";V&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(V),N==="3"&&x()},f=e.ref(),C=e.inject(Me),_=e.unref(e.inject(ve)),k=(O=window==null?void 0:window.config)==null?void 0:O.pageId;function x(){var S;const{leftAxisList:N=[],rightAxisList:V=[],queryColumnList:B=[],indicators:F=[]}=e.unref(i),H=[...N,...V,...B,...F],P={};for(const I of H){const{id:E="",indexCode:v=""}=I;E&&!gt(I,"calcType")&&!P[E]&&(P[E]=v)}if((S=Object.keys(P))!=null&&S.length){const I=[];for(const E in P)I.push(new Promise((v,j)=>{C.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:E,indexCode:P[E],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?v(T.dataViewColumns):j(T)}).catch(y=>{j(y)})}));Promise.all(I).then(E=>{if(E!=null&&E.length){const v=E.reduce((j,y)=>j.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=v.filter(j=>j.typeGuid)}})}}const h=()=>{var V;let N;r&&m.value==="table"?N=window.updateConfig:N=(V=e.unref(n))==null?void 0:V.refreshData,typeof N=="function"&&N()},A=e.inject(xe),L=()=>{var N;A({variableConditions:Bt(((N=e.unref(i))==null?void 0:N.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:w,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:L}}}),um="",pf={class:"data-config"},uf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function ff(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),w=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",pf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(l,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",uf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(w,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const mf=oe(df,[["render",ff],["__scopeId","data-v-d85f4e1e"]]),hf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:mf},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var A;return((A=e.unref(s))==null?void 0:A.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?Z.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?Z.cloneDeep(e.unref(s).chartsOptions):e.ref(Z.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?Z.cloneDeep(e.unref(s).tableOptions):e.ref(Z.cloneDeep(rr));u=e.ref(u);const m=e.ref([]),g=A=>{m.value=A},w=A=>{c.value={...e.unref(c),...e.unref(A)}},f=(A,L=!0)=>{L?p.value={...e.unref(p),...e.unref(A)}:p.value={...e.unref(A)}},C=A=>{u.value={...e.unref(u),...e.unref(A)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=Z.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=Z.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},x=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=x,t.request&&e.provide(Me,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=A=>{n("updateUsedComponent",A)};return e.provide(Ye,s),e.provide(fe,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(ve,i),e.provide(xe,w),e.provide(ho,f),e.provide(yo,C),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),fm="",yf={key:0,class:"config-modal"},gf={class:"config-modal-left"},bf={class:"config-modal-right"};function Cf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",gf,[e.createVNode(s)]),e.createElementVNode("div",bf,[e.createVNode(d)])]))}const Qa=pn(oe(hf,[["render",Cf],["__scopeId","data-v-23d542ce"]])),Xa=pn(Ka),Ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Xa,EcanIndicatorLibrary:Qa},Symbol.toStringTag,{value:"Module"})),wf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Ja).forEach(a=>{const r=Ja[a];r.install&&t.use(r)})}};we.EcanChartGraph=Xa,we.EcanIndicatorLibrary=Qa,we.default=wf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|