@ecan-bi/indicator-library 1.0.29 → 1.0.30
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 +4633 -4011
- 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/IndicatorLibrary.vue.d.ts +19 -0
- package/types/indicator/indicator-library/data-config/DataConfig.vue.d.ts +1 -0
- package/types/indicator/indicator-library/data-config/control-group/ControlCard.vue.d.ts +52 -0
- package/types/indicator/indicator-library/data-config/control-group/ControlGroup.vue.d.ts +10 -0
- package/types/indicator/indicator-library/data-config/control-group/index.d.ts +2 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/calculation-modal/CalculationModal.vue.d.ts +2 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/filter-modal/Condition.vue.d.ts +13 -11
- package/types/indicator/indicator-library/data-config/style-config-group/props-to-form/form-group/FormGroup.vue.d.ts +1 -1
- package/types/indicator/indicator-library/index.d.ts +18 -0
- package/types/utils/constant.d.ts +3 -0
- package/types/utils/util.d.ts +9 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(de,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):(de=typeof globalThis<"u"?globalThis:de||self,e(de["@ecan-bi/indicator-library"]={},de.Vue,de.LodashEs,de.AntDesignVue,de.Draggable,null,null,de.Dayjs,null,de.MonacoEditor,null,de.Echarts))})(this,function(de,e,ae,I,tt,mp,hp,pe,yp,ua,gp,fa){var pa;"use strict";function ma(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 ha=ma(fa),Oo=(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},Le="$request",Se=((pa=window==null?void 0:window.config)==null?void 0:pa.indicatorURL)||"",Te="INDICATOR_TOKEN",Vo="DATA_LIST",ot="SELECTED_COMPONENT",ge="GRAPHIC_CONFIG",Fe="UPDATE_GRAPHIC_CONFIG",vo="SHOW_STYLE_CONFIG",Io="REFRESH_DATA",bt="CHARTS_OPTIONS",Fo="TABLE_OPTIONS",ya=18,Mt="UPDATE_CHARTS_OPTIONS",jt="UPDATE_TABLE_OPTIONS",Rt="SOURCE_TYPE",$o="CHANGE_CONDITION",Do="DATA_VIEW_COLUMNS",Po={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%"}},ga={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},ba=e.defineComponent({name:"DataViewList",components:{ASpin:I.Spin,ATreeSelect:I.TreeSelect,Draggable:tt},setup(){var L;const t=e.inject(Le),o=e.unref(e.inject(Te)),n=e.inject(ge),a=e.inject(Fe),r=e.computed(()=>{var N;return((N=e.unref(n))==null?void 0:N.dataViewId)||null}),l=e.ref(!1),c=e.ref([]),d=(L=window==null?void 0:window.config)==null?void 0:L.pageId,i=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),s=async()=>{var A,_;const N=r.value;l.value=!0;try{const{data:k}=await t.post(`${Se}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:N,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,k.success&&((A=c.value)==null||A.push(i),c.value=(_=c.value)==null?void 0:_.concat(p([k.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(N=[],A)=>{const _=[];return N.forEach(k=>{_.push({id:k.id,pId:A??k.parentId,value:k.id,title:k.name,isLeaf:k.leaf||!1,nature:k.nature,selectable:k.leaf||!1})}),_},u=async(N,A)=>{var g;let _=0;if(N){const{value:C}=N.dataRef;_=C}const{data:k}=await t.post(`${Se}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:_},{headers:{Authentication:o,operateContext:"ygt"}});k.success&&(c.value=(g=e.unref(c))==null?void 0:g.concat(p(k.data)),A&&e.unref(r)&&await s())},f=N=>{m(N),a({dataViewId:N,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:b}=e.inject(Vo,{setDataList:N=>N}),h=e.ref(!1),y=e.ref([]),m=async N=>{if(N){y.value=[],h.value=!0;try{const A=await t.post(`${Se}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:N,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:_,data:k={}}=A.data;if(h.value=!1,_){const{rows:g=[]}=k;g==null||g.forEach(C=>{var B;const S=((B=C==null?void 0:C.dataViewColumns)==null?void 0:B.map(M=>({...M,show:!0})))||[];y.value=[...e.unref(y),...S]}),b(e.unref(y))}}catch{h.value=!1}}},E=N=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[N],w=(N,A)=>{const _=A[N.oldIndex];if(_){const k={..._,label:_.name,name:_.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(k))}};return e.onMounted(async()=>{await u(void 0,!0),m(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:c,treeSelectLoading:l,dataViewList:y,dataViewLoading:h,onDataViewIdChange:f,mapGenericType:E,onDragStart:w}}}),kp="",ee=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},Ca={class:"data-view-list"},wa={class:"columns"},xa={class:"column-item"},_a={class:"column-item-name"};function ka(t,o,n,a,r,l){const c=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),i=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Ca,[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",wa,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=s=>t.dataViewList=s),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=s=>t.onDragStart(s,t.dataViewList))},{item:e.withCtx(({element:s})=>[e.createElementVNode("div",xa,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(s.genericType))+"】 ",1),e.createElementVNode("span",_a,e.toDisplayString(s.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Sa=ee(ba,[["render",ka],["__scopeId","data-v-4a66f7d2"]]);function be(t,o){Aa(t)&&(t="100%");var n=Na(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 Aa(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Na(t){return typeof t=="string"&&t.indexOf("%")!==-1}function La(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ct(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ut(t){return t.length===1?"0"+t:String(t)}function Ta(t,o,n){return{r:be(t,255)*255,g:be(o,255)*255,b:be(n,255)*255}}function Gt(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 Ea(t,o,n){var a,r,l;if(t=be(t,360),o=be(o,100),n=be(n,100),o===0)r=n,l=n,a=n;else{var c=n<.5?n*(1+o):n+o-n*o,d=2*n-c;a=Gt(d,c,t+1/3),r=Gt(d,c,t),l=Gt(d,c,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ba(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),l=0,c=a,d=a-r,i=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s:i,v:c}}function Oa(t,o,n){t=be(t,360)*6,o=be(o,100),n=be(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),c=n*(1-r*o),d=n*(1-(1-r)*o),i=a%6,s=[n,c,l,l,d,n][i],p=[d,n,n,c,l,l][i],u=[l,l,d,n,n,c][i];return{r:s*255,g:p*255,b:u*255}}function Va(t,o,n,a){var r=[Ut(Math.round(t).toString(16)),Ut(Math.round(o).toString(16)),Ut(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 Mo(t){return me(t)/255}function me(t){return parseInt(t,16)}var jo={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 nt(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,c=!1,d=!1;return typeof t=="string"&&(t=Fa(t)),typeof t=="object"&&(Ve(t.r)&&Ve(t.g)&&Ve(t.b)?(o=Ta(t.r,t.g,t.b),c=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ve(t.h)&&Ve(t.s)&&Ve(t.v)?(a=Ct(t.s),r=Ct(t.v),o=Oa(t.h,a,r),c=!0,d="hsv"):Ve(t.h)&&Ve(t.s)&&Ve(t.l)&&(a=Ct(t.s),l=Ct(t.l),o=Ea(t.h,a,l),c=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=La(n),{ok:c,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 va="[-\\+]?\\d+%?",Ia="[-\\+]?\\d*\\.\\d+%?",$e="(?:".concat(Ia,")|(?:").concat(va,")"),zt="[\\s|\\(]+(".concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")\\s*\\)?"),Ht="[\\s|\\(]+(".concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")\\s*\\)?"),Ae={CSS_UNIT:new RegExp($e),rgb:new RegExp("rgb"+zt),rgba:new RegExp("rgba"+Ht),hsl:new RegExp("hsl"+zt),hsla:new RegExp("hsla"+Ht),hsv:new RegExp("hsv"+zt),hsva:new RegExp("hsva"+Ht),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 Fa(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(jo[t])t=jo[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ae.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ae.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ae.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Ae.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ae.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Ae.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ae.hex8.exec(t),n?{r:me(n[1]),g:me(n[2]),b:me(n[3]),a:Mo(n[4]),format:o?"name":"hex8"}:(n=Ae.hex6.exec(t),n?{r:me(n[1]),g:me(n[2]),b:me(n[3]),format:o?"name":"hex"}:(n=Ae.hex4.exec(t),n?{r:me(n[1]+n[1]),g:me(n[2]+n[2]),b:me(n[3]+n[3]),a:Mo(n[4]+n[4]),format:o?"name":"hex8"}:(n=Ae.hex3.exec(t),n?{r:me(n[1]+n[1]),g:me(n[2]+n[2]),b:me(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Ve(t){return!!Ae.CSS_UNIT.exec(String(t))}var wt=2,Ro=.16,$a=.05,Da=.05,Pa=.15,Uo=5,Go=4,Ma=[{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 zo(t){var o=t.r,n=t.g,a=t.b,r=Ba(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function xt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Va(o,n,a,!1))}function ja(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 Ho(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-wt*o:Math.round(t.h)+wt*o:a=n?Math.round(t.h)+wt*o:Math.round(t.h)-wt*o,a<0?a+=360:a>=360&&(a-=360),a}function Wo(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-Ro*o:o===Go?a=t.s+Ro:a=t.s+$a*o,a>1&&(a=1),n&&o===Uo&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function qo(t,o,n){var a;return n?a=t.v+Da*o:a=t.v-Pa*o,a>1&&(a=1),Number(a.toFixed(2))}function Wt(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=nt(t),r=Uo;r>0;r-=1){var l=zo(a),c=xt(nt({h:Ho(l,r,!0),s:Wo(l,r,!0),v:qo(l,r,!0)}));n.push(c)}n.push(xt(a));for(var d=1;d<=Go;d+=1){var i=zo(a),s=xt(nt({h:Ho(i,d),s:Wo(i,d),v:qo(i,d)}));n.push(s)}return o.theme==="dark"?Ma.map(function(p){var u=p.index,f=p.opacity,b=xt(ja(nt(o.backgroundColor||"#141414"),nt(n[u]),f*100));return b}):n}var qt={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"},Yt={},Kt={};Object.keys(qt).forEach(function(t){Yt[t]=Wt(qt[t]),Yt[t].primary=Yt[t][5],Kt[t]=Wt(qt[t],{theme:"dark",backgroundColor:"#141414"}),Kt[t].primary=Kt[t][5]});var Yo=[],at=[],Ra="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Ua(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ga(t,o){if(o=o||{},t===void 0)throw new Error(Ra);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Yo.indexOf(a);r===-1&&(r=Yo.push(a)-1,at[r]={});var l;return at[r]!==void 0&&at[r][n]!==void 0?l=at[r][n]:(l=at[r][n]=Ua(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function Ko(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){za(t,r,n[r])})}return t}function za(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Ha(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Wa(t,o){Ha(t,"[@ant-design/icons-vue] ".concat(o))}function Xo(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Xt(t,o,n){return n?e.h(t.tag,Ko({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Xt(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Ko({key:o},t.attrs),(t.children||[]).map(function(a,r){return Xt(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function Qo(t){return Wt(t)[0]}function Jo(t){return t?Array.isArray(t)?t:[t]:[]}var qa=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.30 */
|
|
2
|
+
(function(se,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):(se=typeof globalThis<"u"?globalThis:se||self,e(se["@ecan-bi/indicator-library"]={},se.Vue,se.LodashEs,se.AntDesignVue,se.Draggable,null,null,se.Dayjs,null,se.MonacoEditor,null,se.Echarts))})(this,function(se,e,te,P,at,vp,$p,ae,Fp,xa,Dp,_a){var ga;"use strict";function ka(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 Sa=ka(_a),Fn=(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},Se="$request",xe=((ga=window==null?void 0:window.config)==null?void 0:ga.indicatorURL)||"",Ae="INDICATOR_TOKEN",Dn="DATA_LIST",De="SELECTED_COMPONENT",de="GRAPHIC_CONFIG",Be="UPDATE_GRAPHIC_CONFIG",Pn="SHOW_STYLE_CONFIG",Mn="REFRESH_DATA",wt="CHARTS_OPTIONS",jn="TABLE_OPTIONS",Aa=18,Ut="UPDATE_CHARTS_OPTIONS",Gt="UPDATE_TABLE_OPTIONS",zt="SOURCE_TYPE",Rn="CHANGE_CONDITION",Un="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",Ht="UPDATE_USED_COMPONENT",Gn="MAP_ATTRIBUTE_PROPS",zn={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%"}},Na={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},La=e.defineComponent({name:"DataViewList",components:{ASpin:P.Spin,ATreeSelect:P.TreeSelect,Draggable:at},setup(){var B;const t=e.inject(Se),n=e.unref(e.inject(Ae)),o=e.inject(de),a=e.inject(Be),r=e.computed(()=>{var L;return((L=e.unref(o))==null?void 0:L.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(B=window==null?void 0:window.config)==null?void 0:B.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var E,k;const L=r.value;l.value=!0;try{const{data:O}=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});l.value=!1,O.success&&((E=i.value)==null||E.push(s),i.value=(k=i.value)==null?void 0:k.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(L=[],E)=>{const k=[];return L.forEach(O=>{k.push({id:O.id,pId:E??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),k},u=async(L,E)=>{var b;let k=0;if(L){const{value:y}=L.dataRef;k=y}const{data:O}=await t.post(`${xe}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:k},{headers:{Authentication:n,operateContext:"ygt"}});O.success&&(i.value=(b=e.unref(i))==null?void 0:b.concat(p(O.data)),E&&e.unref(r)&&await c())},f=L=>{C(L),a({dataViewId:L,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(Dn,{setDataList:L=>L}),w=e.ref(!1),m=e.ref([]),C=async L=>{if(L){m.value=[],w.value=!0;try{const E=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:k,data:O={}}=E.data;if(w.value=!1,k){const{rows:b=[]}=O;b==null||b.forEach(y=>{var T;const S=((T=y==null?void 0:y.dataViewColumns)==null?void 0:T.map(I=>({...I,show:!0})))||[];m.value=[...e.unref(m),...S]}),h(e.unref(m))}}catch{w.value=!1}}},g=L=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[L],x=(L,E)=>{const k=E[L.oldIndex];if(k){const O={...k,label:k.name,name:k.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:i,treeSelectLoading:l,dataViewList:m,dataViewLoading:w,onDataViewIdChange:f,mapGenericType:g,onDragStart:x}}}),Gp="",J=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},Ta={class:"data-view-list"},Ea={class:"columns"},Ba={class:"column-item"},Oa={class:"column-item-name"};function Va(t,n,o,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Ta,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{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",Ea,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":n[0]||(n[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:n[1]||(n[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ba,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Oa,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ia=J(La,[["render",Va],["__scopeId","data-v-4a66f7d2"]]);function he(t,n){va(t)&&(t="100%");var o=$a(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 va(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function $a(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Fa(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function xt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Wt(t){return t.length===1?"0"+t:String(t)}function Da(t,n,o){return{r:he(t,255)*255,g:he(n,255)*255,b:he(o,255)*255}}function qt(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 Pa(t,n,o){var a,r,l;if(t=he(t,360),n=he(n,100),o=he(o,100),n===0)r=o,l=o,a=o;else{var i=o<.5?o*(1+n):o+n-o*n,d=2*o-i;a=qt(d,i,t+1/3),r=qt(d,i,t),l=qt(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ma(t,n,o){t=he(t,255),n=he(n,255),o=he(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(n-o)/d+(n<o?6:0);break;case n:l=(o-t)/d+2;break;case o:l=(t-n)/d+4;break}l/=6}return{h:l,s,v:i}}function ja(t,n,o){t=he(t,360)*6,n=he(n,100),o=he(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:c*255,g:p*255,b:u*255}}function Ra(t,n,o,a){var r=[Wt(Math.round(t).toString(16)),Wt(Math.round(n).toString(16)),Wt(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 Hn(t){return fe(t)/255}function fe(t){return parseInt(t,16)}var Wn={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 rt(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=za(t)),typeof t=="object"&&(Oe(t.r)&&Oe(t.g)&&Oe(t.b)?(n=Da(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Oe(t.h)&&Oe(t.s)&&Oe(t.v)?(a=xt(t.s),r=xt(t.v),n=ja(t.h,a,r),i=!0,d="hsv"):Oe(t.h)&&Oe(t.s)&&Oe(t.l)&&(a=xt(t.s),l=xt(t.l),n=Pa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=Fa(o),{ok:i,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 Ua="[-\\+]?\\d+%?",Ga="[-\\+]?\\d*\\.\\d+%?",$e="(?:".concat(Ga,")|(?:").concat(Ua,")"),Yt="[\\s|\\(]+(".concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")\\s*\\)?"),Kt="[\\s|\\(]+(".concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")[,|\\s]+(").concat($e,")\\s*\\)?"),_e={CSS_UNIT:new RegExp($e),rgb:new RegExp("rgb"+Yt),rgba:new RegExp("rgba"+Kt),hsl:new RegExp("hsl"+Yt),hsla:new RegExp("hsla"+Kt),hsv:new RegExp("hsv"+Yt),hsva:new RegExp("hsva"+Kt),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 za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(Wn[t])t=Wn[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=_e.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=_e.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=_e.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=_e.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=_e.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=_e.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=_e.hex8.exec(t),o?{r:fe(o[1]),g:fe(o[2]),b:fe(o[3]),a:Hn(o[4]),format:n?"name":"hex8"}:(o=_e.hex6.exec(t),o?{r:fe(o[1]),g:fe(o[2]),b:fe(o[3]),format:n?"name":"hex"}:(o=_e.hex4.exec(t),o?{r:fe(o[1]+o[1]),g:fe(o[2]+o[2]),b:fe(o[3]+o[3]),a:Hn(o[4]+o[4]),format:n?"name":"hex8"}:(o=_e.hex3.exec(t),o?{r:fe(o[1]+o[1]),g:fe(o[2]+o[2]),b:fe(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function Oe(t){return!!_e.CSS_UNIT.exec(String(t))}var _t=2,qn=.16,Ha=.05,Wa=.05,qa=.15,Yn=5,Kn=4,Ya=[{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 Xn(t){var n=t.r,o=t.g,a=t.b,r=Ma(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function kt(t){var n=t.r,o=t.g,a=t.b;return"#".concat(Ra(n,o,a,!1))}function Ka(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 Qn(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-_t*n:Math.round(t.h)+_t*n:a=o?Math.round(t.h)+_t*n:Math.round(t.h)-_t*n,a<0?a+=360:a>=360&&(a-=360),a}function Jn(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-qn*n:n===Kn?a=t.s+qn:a=t.s+Ha*n,a>1&&(a=1),o&&n===Yn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Zn(t,n,o){var a;return o?a=t.v+Wa*n:a=t.v-qa*n,a>1&&(a=1),Number(a.toFixed(2))}function Xt(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=rt(t),r=Yn;r>0;r-=1){var l=Xn(a),i=kt(rt({h:Qn(l,r,!0),s:Jn(l,r,!0),v:Zn(l,r,!0)}));o.push(i)}o.push(kt(a));for(var d=1;d<=Kn;d+=1){var s=Xn(a),c=kt(rt({h:Qn(s,d),s:Jn(s,d),v:Zn(s,d)}));o.push(c)}return n.theme==="dark"?Ya.map(function(p){var u=p.index,f=p.opacity,h=kt(Ka(rt(n.backgroundColor||"#141414"),rt(o[u]),f*100));return h}):o}var Qt={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"},Jt={},Zt={};Object.keys(Qt).forEach(function(t){Jt[t]=Xt(Qt[t]),Jt[t].primary=Jt[t][5],Zt[t]=Xt(Qt[t],{theme:"dark",backgroundColor:"#141414"}),Zt[t].primary=Zt[t][5]});var eo=[],lt=[],Xa="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Qa(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ja(t,n){if(n=n||{},t===void 0)throw new Error(Xa);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=eo.indexOf(a);r===-1&&(r=eo.push(a)-1,lt[r]={});var l;return lt[r]!==void 0&<[r][o]!==void 0?l=lt[r][o]:(l=lt[r][o]=Qa(),o==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function to(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){Za(t,r,o[r])})}return t}function Za(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function er(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function tr(t,n){er(t,"[@ant-design/icons-vue] ".concat(n))}function no(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function en(t,n,o){return o?e.h(t.tag,to({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return en(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,to({key:n},t.attrs),(t.children||[]).map(function(a,r){return en(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function oo(t){return Xt(t)[0]}function ao(t){return t?Array.isArray(t)?t:[t]:[]}var nr=`
|
|
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
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dr(t,o){if(t){if(typeof t=="string")return on(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 on(t,o)}}function on(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 pr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,c,d;try{for(n=n.call(t);!(r=(c=n.next()).done)&&(a.push(c.value),!(o&&a.length===o));r=!0);}catch(i){l=!0,d=i}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function ur(t){if(Array.isArray(t))return t}function nn(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){Jt(t,r,n[r])})}return t}function Jt(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function fr(t,o){if(t==null)return{};var n=mr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function mr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}tn("#1890ff");var He=function(o,n){var a,r=nn({},o,n.attrs),l=r.class,c=r.icon,d=r.spin,i=r.rotate,s=r.tabindex,p=r.twoToneColor,u=r.onClick,f=fr(r,ir),b=(a={anticon:!0},Jt(a,"anticon-".concat(c.name),!!c.name),Jt(a,l,l),a),h=d===""||d||c.name==="loading"?"anticon-spin":"",y=s;y===void 0&&u&&(y=-1,f.tabindex=y);var m=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,E=Jo(p),w=sr(E,2),L=w[0],N=w[1];return e.createVNode("span",nn({role:"img","aria-label":c.name},f,{onClick:u,class:b}),[e.createVNode(Qt,{class:h,icon:c,primaryColor:L,secondaryColor:N,style:m},null)])};He.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},He.displayName="AntdIcon",He.inheritAttrs=!1,He.getTwoToneColor=lr,He.setTwoToneColor=tn;const Ce=He;var hr={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 yr=hr;function an(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){gr(t,r,n[r])})}return t}function gr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Zt=function(o,n){var a=an({},o,n.attrs);return e.createVNode(Ce,an({},a,{icon:yr}),null)};Zt.displayName="AppstoreAddOutlined",Zt.inheritAttrs=!1;const rn=Zt;var br={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 Cr=br;function ln(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){wr(t,r,n[r])})}return t}function wr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var eo=function(o,n){var a=ln({},o,n.attrs);return e.createVNode(Ce,ln({},a,{icon:Cr}),null)};eo.displayName="CaretDownOutlined",eo.inheritAttrs=!1;const xr=eo;var _r={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 kr=_r;function sn(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){Sr(t,r,n[r])})}return t}function Sr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var to=function(o,n){var a=sn({},o,n.attrs);return e.createVNode(Ce,sn({},a,{icon:kr}),null)};to.displayName="CaretRightOutlined",to.inheritAttrs=!1;const Ar=to;var Nr={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 Lr=Nr;function cn(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){Tr(t,r,n[r])})}return t}function Tr(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=cn({},o,n.attrs);return e.createVNode(Ce,cn({},a,{icon:Lr}),null)};oo.displayName="CloseOutlined",oo.inheritAttrs=!1;const dn=oo;var Er={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 Br=Er;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){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}var no=function(o,n){var a=pn({},o,n.attrs);return e.createVNode(Ce,pn({},a,{icon:Br}),null)};no.displayName="CopyOutlined",no.inheritAttrs=!1;const Vr=no;var vr={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 Ir=vr;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){Fr(t,r,n[r])})}return t}function Fr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ao=function(o,n){var a=un({},o,n.attrs);return e.createVNode(Ce,un({},a,{icon:Ir}),null)};ao.displayName="DeleteOutlined",ao.inheritAttrs=!1;const $r=ao;var Dr={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 Pr=Dr;function fn(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){Mr(t,r,n[r])})}return t}function Mr(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=fn({},o,n.attrs);return e.createVNode(Ce,fn({},a,{icon:Pr}),null)};ro.displayName="DoubleRightOutlined",ro.inheritAttrs=!1;const jr=ro;var Rr={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 Ur=Rr;function mn(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){Gr(t,r,n[r])})}return t}function Gr(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=mn({},o,n.attrs);return e.createVNode(Ce,mn({},a,{icon:Ur}),null)};lo.displayName="DownOutlined",lo.inheritAttrs=!1;const zr=lo;var Hr={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 Wr=Hr;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){qr(t,r,n[r])})}return t}function qr(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=hn({},o,n.attrs);return e.createVNode(Ce,hn({},a,{icon:Wr}),null)};io.displayName="MinusCircleOutlined",io.inheritAttrs=!1;const Yr=io;var Kr={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 Xr=Kr;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){Qr(t,r,n[r])})}return t}function Qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var so=function(o,n){var a=yn({},o,n.attrs);return e.createVNode(Ce,yn({},a,{icon:Xr}),null)};so.displayName="PlusCircleOutlined",so.inheritAttrs=!1;const Jr=so;var Zr={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 el=Zr;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){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 co=function(o,n){var a=gn({},o,n.attrs);return e.createVNode(Ce,gn({},a,{icon:el}),null)};co.displayName="PlusOutlined",co.inheritAttrs=!1;const ol=co;var nl={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 al=nl;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){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 po=function(o,n){var a=bn({},o,n.attrs);return e.createVNode(Ce,bn({},a,{icon:al}),null)};po.displayName="SettingOutlined",po.inheritAttrs=!1;const ll=po,il=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Ar,CaretDownOutlined:xr,AInputSearch:I.InputSearch,ASpin:I.Spin,APagination:I.Pagination,Draggable:tt},setup(){var N;const t=(N=window==null?void 0:window.config)==null?void 0:N.pageId,o=e.inject(Le),n=e.unref(e.inject(Te)),a=e.inject(ot),r=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.graphicConfig}),l=e.computed(()=>{var A;return(A=e.unref(r))==null?void 0:A.dataSourceId}),c=e.ref([]),d=e.ref(!1),i=e.reactive({pageSize:20,currentPage:1,totalResult:0}),s=e.ref(""),p=async()=>{d.value=!0;const A={source:"INDICATOR_LIB",queryRequest:{pageSize:i.pageSize,pageNum:i.currentPage},indexName:e.unref(s),pageId:t,dataSourceId:e.unref(l)};try{const _=await o.post(`${Se}/diagram/sourceList`,A,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:k,data:g={}}=_.data;if(k){const{rows:C=[],total:S=0}=g;C==null||C.forEach(B=>{var M;B.show=!1,(M=B.dataViewColumns)==null||M.forEach(U=>{U.show=!0,U.edit=!1,U.title&&(U.label=U.title)})}),c.value=C,i.totalResult=+S}}catch{d.value=!1}},u=A=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[A],f=A=>{c.value[A].show=!c.value[A].show},b=()=>{i.currentPage=1,p()},h=ae.debounce(()=>{i.currentPage=1,p()},200),y=(A,_)=>{i.pageSize=_,i.currentPage=A,p()};e.onMounted(()=>{p()});const m=e.inject(ge),E=e.computed(()=>{const A=["classificationList","rowHeaderList"];let _=[];for(const k in e.unref(m))if(Object.prototype.hasOwnProperty.call(e.unref(m),k)&&A.includes(k)){const g=e.unref(m)[k];Array.isArray(g)&&(_=_.concat(g))}return _});return{dataSourceList:c,dataSourceLoading:d,pagination:i,onToggleGroup:f,mapScope:u,onSearch:b,onChange:h,onPaginationChange:y,searchText:s,setItemDisabled:(A=[])=>{let _=!1;for(const k of e.unref(E))if(!A.find(C=>C.typeGuid===k.typeGuid)){_=!0;break}return _},onDragStart:(A,_)=>{const k=_[A.oldIndex];k&&sessionStorage.setItem("indicator-list-item",JSON.stringify(k))}}}}),Sp="",sl={class:"data-source-list"},cl={class:"columns"},dl={class:"column-item"},pl=["onClick"],ul={key:0},fl={class:"column-child-item"},ml={class:"column-child-item-name"};function hl(t,o,n,a,r,l){const c=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),i=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",sl,[e.createVNode(c,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",cl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,b)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",dl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:h=>t.onToggleGroup(b)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(i,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,pl)]),f.show?(e.openBlock(),e.createElementBlock("div",ul,[e.createVNode(s,{modelValue:f.dataViewColumns,"onUpdate:modelValue":h=>f.dataViewColumns=h,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:h=>t.onDragStart(h,f.dataViewColumns)},{item:e.withCtx(({element:h})=>[e.createElementVNode("div",fl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(h.scope))+"】 ",1),e.createElementVNode("span",ml,e.toDisplayString(h.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]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const yl=ee(il,[["render",hl],["__scopeId","data-v-b23ce142"]]),gl=e.defineComponent({name:"DataList",components:{DataSourceList:yl,DataViewList:Sa},setup(){return{source:e.inject(Rt)}}});function bl(t,o,n,a,r,l){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 Cl=ee(gl,[["render",bl]]),Cn={mounted(t){t.focus()}},wl=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:tt,AModal:I.Modal,AButton:I.Button},setup(t,{expose:o}){var L;const n=(L=window==null?void 0:window.config)==null?void 0:L.pageId,a=e.inject(Le),r=e.unref(e.inject(Te)),l=e.inject(ge),c=e.inject(Fe),d=e.computed(()=>e.unref(l).source),i=e.computed(()=>e.unref(l).dataViewId),s=e.ref([]),p=async()=>{try{const N=await a.post(`${Se}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(i),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:A,data:_=[]}=N.data;A&&(s.value=_==null?void 0:_.slice(0,200))}catch(N){console.error(N)}},u=()=>{var g;const N=((g=e.unref(l)[t.type])==null?void 0:g.slice())||[],A=N[t.index],{label:_,name:k}=t.item;A.sort={label:_,columnName:k,type:"CUSTOM",customOrderColumns:e.unref(s)},c({[t.type]:N})};let f=!1;const b=()=>{f=!0},h=e.ref(!1),y=()=>{h.value=!0},m=()=>{h.value=!1},E=()=>{f&&u(),f=!1,m()};return o({showModal:y}),e.watch(h,N=>{var A,_;if(N){const k=(_=(A=t.item)==null?void 0:A.sort)==null?void 0:_.customOrderColumns;k==null?p():s.value=k}else s.value=[]},{flush:"post"}),{visible:h,onCancel:E,customSortList:s,onChange:b,onDeleteConfig:()=>{var g;const N=((g=e.unref(l)[t.type])==null?void 0:g.slice())||[],A=N[t.index],{label:_,name:k}=t.item;A.sort={label:_,columnName:k},c({[t.type]:N}),m()}}}}),Ap="",xl={class:"button-wrapper"},_l={class:"sort-item"};function kl(t,o,n,a,r,l){const c=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),i=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(i,{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",xl,[e.createVNode(c,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[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",_l,e.toDisplayString(s),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Sl=ee(wl,[["render",kl],["__scopeId","data-v-7293d3f8"]]),Al=e.defineComponent({name:"CustomGroupModal",directives:{focus:Cn},components:{CloseOutlined:dn,AModal:I.Modal,ASelect:I.Select,ASelectOption:I.SelectOption,AButton:I.Button,AInput:I.Input,ACheckbox:I.Checkbox,ACollapse:I.Collapse,ACollapsePanel:I.CollapsePanel,ATag:I.Tag,ACheckableTag:I.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var K;const n=e.inject(Le),a=(K=window==null?void 0:window.config)==null?void 0:K.pageId,r=e.unref(e.inject(Te));let l=!1;const c=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),i=e.ref([]),s=e.ref([]),p=e.computed(()=>{const x=e.unref(s).map(T=>T.title);return new Set(x)}),u=e.ref([]);e.watch(()=>e.unref(s).length,x=>{u.value=new Array(x).fill(!1)});const f=e.computed(()=>{let x=0;return e.unref(s).forEach(T=>{var O;(O=T.data)==null||O.forEach(P=>{P.checked&&x++})}),x}),b=()=>{const x=e.unref(d);if(!x){I.message.error("创建分组名不能空");return}e.unref(p).has(x)?I.message.error("分组名已存在,请重新命名"):(e.unref(s).push({title:x,data:[]}),l=!0)},h=x=>{e.unref(s).splice(x,1),l=!0},y=e.ref(null),m=()=>{if(e.unref(f)===0){I.message.error("当前移入分组已选个数为0");return}const x=e.unref(y);if(x==null){I.message.error("请选择移入分组");return}if(!e.unref(s)[x]){I.message.error("移入分组不存在,请重新选择");return}const T=[],O=e.unref(s).length;for(let P=0;P<O;P++){const D=e.unref(s)[P];e.unref(s)[P].data=D.data.filter(W=>(W.checked&&T.push({...W,checked:!1}),!W.checked))}e.unref(s)[x].data=[...T,...e.unref(s)[x].data],l=!0},E=x=>{e.unref(u)[x]=!0},w=x=>{e.unref(u)[x]=!1},L=(x,T)=>{const O=x.target.value;e.unref(p).has(O)&&I.message.error("组名不能相同,请修改"),e.unref(s)[T].title=O,l=!0},N=e.inject(ge),A=e.inject(Fe),_=e.computed(()=>e.unref(N).source),k=e.computed(()=>e.unref(N).dataViewId),g=e.ref(!1),C=()=>{var X,J;const x=e.unref(s);let T="";e.unref(g)&&(T=(X=x[0])==null?void 0:X.title);const O=x==null?void 0:x.length,P={};for(let te=1;te<O;te++){const re=x[te]||{},{title:se,data:ie}=re;P[se]=(ie==null?void 0:ie.map(Ne=>Ne.label))||[]}const D=((J=e.unref(N)[t.type])==null?void 0:J.slice())||[],W=D[t.index];W.customGroup={groupInfoMap:P,otherGroupName:T},A({[t.type]:D})},S=e.ref(!1),B=()=>{S.value=!0},M=()=>{S.value=!1},U=()=>{M(),l&&C(),l=!1},R=()=>{l=!0},z=new Set,H=async()=>{const x=t.item.customGroup||{},T=x.otherGroupName,O=x.groupInfoMap;(T===""||T==null)&&(g.value=!1),e.unref(s)[0]={title:T||"未分组",data:[]};let P=1;for(const D in O)if(Object.prototype.hasOwnProperty.call(O,D)){const X=O[D].map(J=>(z.add(J),{label:J,checked:!1}));e.unref(s)[P]={title:D,data:X},P++}await Y()},Y=async()=>{var x;try{const T=await n.post(`${Se}/diagram/groupvalue`,{source:e.unref(_),dataViewId:e.unref(k),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:P=[]}=T.data;if(O){const D=[];(x=P==null?void 0:P.slice(0,200))==null||x.forEach(W=>{z.has(W)||D.push({label:W,checked:!1})}),e.unref(s)[0].data=D}}catch(T){console.error(T)}};return e.watch(S,x=>{x&&H()},{flush:"post"}),o({showModal:B}),{visible:S,title:c,activeKey:i,customGroupList:s,onCancel:U,useOtherGroup:g,selectCount:f,createGroupTitle:d,onAddGroup:b,onDeleteGroup:h,onMoveInGroup:m,selectGroupIndex:y,onEditTitle:E,onTitleChange:L,onFinishEditTitle:w,onUseOtherGroup:R,customGroupEditTitleList:u}}}),Np="",Lp="",Nl={class:"custom-group-header"},Ll={class:"move-and-create"},Tl={class:"select-tip"},El={class:"select-count"},Bl={class:"create-group"},Ol={class:"custom-group-content"},Vl=["onClick"],vl={class:"extra"},Il={class:"custom-group-list"},Fl={class:"text"};function $l(t,o,n,a,r,l){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),i=e.resolveComponent("a-button"),s=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),b=e.resolveComponent("a-checkable-tag"),h=e.resolveComponent("a-collapse-panel"),y=e.resolveComponent("a-collapse"),m=e.resolveComponent("a-modal"),E=e.resolveDirective("focus");return e.openBlock(),e.createBlock(m,{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",Nl,[e.createElementVNode("div",Ll,[e.createElementVNode("div",null,[e.createElementVNode("span",Tl,[e.createTextVNode(" 已选"),e.createElementVNode("span",El,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=w=>t.selectGroupIndex=w),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,L)=>(e.openBlock(),e.createBlock(c,{key:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(i,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Bl,[e.createTextVNode(" 创建分组: "),e.createVNode(s,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=w=>t.createGroupTitle=w),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Ol,[e.createVNode(y,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,L)=>(e.openBlock(),e.createBlock(h,{key:L},{header:e.withCtx(()=>[t.customGroupEditTitleList[L]?e.withDirectives((e.openBlock(),e.createBlock(s,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:N=>t.onTitleChange(N,L),onBlur:N=>t.onFinishEditTitle(L),onPressEnter:N=>t.onFinishEditTitle(L)},null,8,["value","onChange","onBlur","onPressEnter"])),[[E]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(N=>t.onEditTitle(L),["prevent","stop"])},e.toDisplayString(w.title),9,Vl))]),extra:e.withCtx(()=>[e.createElementVNode("div",vl,[L===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),L!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(N=>t.onDeleteGroup(L),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(N,A)=>(e.openBlock(),e.createBlock(b,{color:"red",checked:N.checked,"onUpdate:checked":_=>N.checked=_,class:"custom-group",key:A},{default:e.withCtx(()=>[e.createElementVNode("span",Fl,e.toDisplayString(N.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Dl=ee(Al,[["render",$l],["__scopeId","data-v-1e6c74df"]]);var Pl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},uo={},Ml={get exports(){return uo},set exports(t){uo=t}};(function(t,o){(function(n,a){t.exports=a()})(Pl,function(){var n="month",a="quarter";return function(r,l){var c=l.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,n):d.bind(this)(s,p)};var i=c.startOf;c.startOf=function(s,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(s)===a){var b=this.quarter()-1;return f?this.month(3*b).startOf(n).startOf("day"):this.month(3*b+2).endOf(n).endOf("day")}return i.bind(this)(s,p)}}})})(Ml);const jl=uo,De=(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},Rl=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),fo=(t,o)=>Object.prototype.hasOwnProperty.call(t,o);pe.extend(jl);const Ul=e.defineComponent({name:"Condition",components:{CloseOutlined:dn,DownOutlined:zr,AppstoreAddOutlined:rn,ASelect:I.Select,AInput:I.Input,ADatePicker:I.DatePicker,AButton:I.Button,ADropdown:I.Dropdown,AMenu:I.Menu,AMenuItem:I.MenuItem,ASubMenu:I.SubMenu,APopover:I.Popover,ATabs:I.Tabs,ATabPane:I.TabPane,ARadioGroup:I.RadioGroup,ARadio:I.Radio,AInputNumber:I.InputNumber,ASelectOption:I.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var X,J,te,re,se,ie,Ne,Ue,Ge,Ze,et;const o=(X=window==null?void 0:window.config)==null?void 0:X.pageId,n=e.inject(ge),a=e.inject(Le),r=e.unref(e.inject(Te)),l=e.inject(Do),c=e.computed(()=>{var F,j;return(j=(F=e.unref(n))==null?void 0:F.controlList)==null?void 0:j.map(q=>{const{keyName:v="",id:V="",prop:$=""}=q;let G="";return $==="startTime"?G="-开始时间值":$==="endTime"&&(G="-结束时间值"),{...q,label:`${v||V}${G}`,value:`${v||V}-${$}`}})}),d=e.computed(()=>{var F;return(F=e.unref(n))==null?void 0:F.dataViewId}),i=e.computed(()=>{var F;return(F=e.unref(n))==null?void 0:F.source}),s=e.ref(!1),p={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},u=[{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([{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:""}]),b=[{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"}],h=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],y=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(J=t.data)==null?void 0:J.fieldName,fieldType:(te=t.data)==null?void 0:te.fieldType,rule:(re=t.data)==null?void 0:re.rule,id:(se=t.data)==null?void 0:se.id,fieldValue:((ie=t.data)==null?void 0:ie.fieldType)==="DATE"&&((Ne=t.data)==null?void 0:Ne.dataType)==="time"?pe((Ue=t.data)==null?void 0:Ue.fieldValue):(Ge=t.data)==null?void 0:Ge.fieldValue,label:(Ze=t.data)==null?void 0:Ze.label,targetSource:"",typeGuid:(et=t.data)==null?void 0:et.typeGuid,dataType:""}),E=e.ref(!1),w=e.computed(()=>m.value.fieldType==="DATE"),L=e.computed(()=>{const F=t.type;let j=[];if(["classificationList","seriesList","rowHeaderList"].includes(F)){let q=[];for(const v in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),v)&&!["controlList","sqlConditions"].includes(v)){const V=e.unref(n)[v];Array.isArray(V)&&(q=q.concat(V))}j=q}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(F)&&(j=e.unref(l));return j.map(q=>({...q,label:q.title||q.label,value:q.name}))}),{updateCondition:N,deleteCondition:A}=e.inject($o,{updateCondition:(F,j,q)=>{},deleteCondition:(F,j)=>{}}),_=()=>{A(t.level,t.index)};e.watch(m,F=>{const j=ae.cloneDeep(F);F.fieldType==="DATE"&&F.dataType!=="component"&&F.fieldValue&&(j.fieldValue=F.fieldValue.format(F.dateFormat)),N(j,t.level,t.index)},{deep:!0});const k=F=>{const j=e.unref(L).find(ne=>ne.value===F)||{},{name:q,genericType:v,id:V,label:$,typeGuid:G}=j;m.value={id:V,fieldName:q,fieldType:v,label:$,rule:void 0,fieldValue:v==="DATE"?null:void 0,targetSource:"",typeGuid:G}},g=e.computed(()=>{const F=e.unref(m).fieldType;return F==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:F==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:F==="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"}]:[]}),C=e.computed(()=>{let F="";const j=e.unref(g).find(q=>q.value===e.unref(m).rule);return j&&(F=j.label),F}),S=e.computed(()=>{let F={fontSize:"12px"};return e.unref(C)||(F={...F,position:"absolute",right:"11px",top:"9px"}),F}),B=e.ref([]),M=async()=>{var F;if(!(e.unref(B).length>0))try{const j=await a.post(`${Se}/diagram/groupvalue`,{source:e.unref(i),dataViewId:e.unref(d),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:q,data:v=[]}=j.data;q&&(B.value=(F=v==null?void 0:v.slice(0,200))==null?void 0:F.map(V=>({label:V,value:V})))}catch(j){console.error(j)}},U=F=>{e.unref(m).rule=F,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(F)&&M()},R=()=>{e.unref(m).fieldValue=""},z=e.ref(),H=F=>{z.value=F,e.unref(m).fieldValue=(F==null?void 0:F.join(","))||""},Y=F=>{const{keyPath:j}=F;e.unref(m).rule=j[0],e.unref(m).dataType=j[1],e.unref(m).dateFormat=j[2],e.unref(m).fieldValue=""};e.watch(m,F=>{fo(F,"dataType")||(m.value.dataType="")},{deep:!0}),e.onMounted(()=>{var v,V,$,G,ne,oe,Z,ce;if(m.value.dataType=((v=t.data)==null?void 0:v.dataType)||"",e.unref(m).fieldType==="DATE"){e.unref(m).dateFormat=(V=t.data)==null?void 0:V.dateFormat,e.unref(m).activeKey=($=t.data)==null?void 0:$.activeKey,e.unref(m).radioValue=((G=t.data)==null?void 0:G.radioValue)||"",e.unref(m).calcWays=((ne=t.data)==null?void 0:ne.calcWays)||[],e.unref(m).dateCalcTypes=((oe=t.data)==null?void 0:oe.dateCalcTypes)||[];const ye=e.unref(f).find(Q=>{var le;return Q.key===((le=t.data)==null?void 0:le.activeKey)});ye&&D(ye,t.data)}else z.value=((ce=(Z=t.data)==null?void 0:Z.fieldValue)==null?void 0:ce.split(","))||[];const{fieldType:F,fieldName:j,rule:q}=m.value;F!=="DATE"&&j&&q&&["IN","NOT_IN"].includes(q)&&M()});const K=F=>{if(e.unref(m).activeKey===F){e.unref(f)[F].radioValue=e.unref(m).radioValue,e.unref(f)[e.unref(m).activeKey]&&(e.unref(f)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(f)[F].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(f)[F].afterNum=e.unref(m).calcWays[0]));return}e.unref(f).forEach(j=>{j.beforeNum=0,j.afterNum=0,j.radioValue="1",j.value=""})},x=(F,j)=>{s.value=!0;const q=F.target.value,v=j.type,V=e.unref(m).dateFormat,$=Math.abs(j.beforeNum),G=j.afterNum;j.value=W(q,v,V,$,G)},T=F=>{const j=e.unref(m).activeKey;if(F!==j)return;let q="";j===0?q="years":j===1?q="quarters":j===2?q="months":j===3?q="weeks":j===4&&(q="days");const v=e.unref(m).dateFormat,V=e.unref(m).radioValue;let $=0,G=0;return V==="1"?$=Math.abs(e.unref(m).calcWays[0]):V==="2"&&(G=e.unref(m).calcWays[0]),W(V,q,v,$,G)},O=(F,j,q,v)=>{if(s.value=!0,j.radioValue===v){const V=F.target.value;q==="+"?j.value=pe().add(V,j.type).format(e.unref(m).dateFormat):j.value=pe().subtract(V,j.type).format(e.unref(m).dateFormat)}},P=(F,j)=>{(e.unref(m).fieldType!=="DATE"||e.unref(m).dataType!=="component")&&(m.value.fieldValue=pe(F.value,e.unref(m).dateFormat)),e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=j,e.unref(m).radioValue=F.radioValue,F.radioValue==="1"?e.unref(m).calcWays[0]="-"+F.beforeNum:F.radioValue==="2"?e.unref(m).calcWays[0]=F.afterNum:F.radioValue==="3"?j===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":F.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),j===0?e.unref(m).dateCalcTypes=["YEAR"]:j===1?e.unref(m).dateCalcTypes=["QUARTER"]:j===2?e.unref(m).dateCalcTypes=["MONTH"]:j===3?e.unref(m).dateCalcTypes=["WEEK"]:j===4&&(e.unref(m).dateCalcTypes=["DAY"]),E.value=!1};function D(F,j){const{radioValue:q="",calcWays:v=[]}=j;F.radioValue=q,v!=null&&v.length&&(q==="1"?F.beforeNum=Math.abs(v[0]):q==="2"&&(F.afterNum=v[0]))}function W(F,j,q,v,V){if(F==="1")return pe().subtract(v,j).format(q);if(F==="2")return pe().add(V,j).format(q);if(F==="3"){if(j==="years")return pe().startOf("year").format(q);if(j==="quarters")return pe().startOf("quarter").format(q);if(j==="months")return pe().startOf("month").format(q);if(j==="days")return pe().format(q)}else if(F==="4"){if(j==="years")return pe().endOf("year").format(q);if(j==="quarters")return pe().endOf("quarter").format(q);if(j==="months")return pe().endOf("month").format(q)}return""}return{fieldOptions:L,ruleOptions:g,onFieldChange:k,condition:m,valueOptions:B,onRuleChange:U,onDataTypeChange:R,onFieldValueSelectChange:H,fieldValues:z,onDelete:_,isDateType:w,formatList:u,tabDateList:f,compareList:b,menuRule:h,dateBtnLabel:C,downIconStyle:S,popoverVisible:E,dateRadioStyle:p,showTime:s,controlList:c,dataTypeList:y,handleMenuClick:Y,changeTabInitDate:K,changeRadioValue:x,getFieldValue:T,blurCompare:O,okDatePickConfig:P}}}),Tp="",Ep="",Gl={class:"condition"},zl=["title"],Hl={class:"rule"},Wl={class:"data-type"},ql={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Yl={class:"popover-content-wrap"},Kl={class:"tabFilterRadio"},Xl={key:0},Ql={key:1},Jl={style:{"margin-left":"10px"}},Zl={style:{"margin-left":"10px"}},ei={style:{position:"absolute",bottom:"10px"}};function ti(t,o,n,a,r,l){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),i=e.resolveComponent("a-menu-item"),s=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),b=e.resolveComponent("a-dropdown"),h=e.resolveComponent("a-date-picker"),y=e.resolveComponent("a-input-number"),m=e.resolveComponent("a-radio"),E=e.resolveComponent("a-radio-group"),w=e.resolveComponent("a-tab-pane"),L=e.resolveComponent("a-tabs"),N=e.resolveComponent("appstore-add-outlined"),A=e.resolveComponent("a-popover"),_=e.resolveComponent("a-input"),k=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Gl,[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,(g,C)=>(e.openBlock(),e.createBlock(c,{key:C,value:g.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:g.label},e.toDisplayString(g.label),9,zl)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Hl,[t.isDateType?(e.openBlock(),e.createBlock(b,{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,g=>(e.openBlock(),e.createBlock(s,{key:g.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===g.value?"color: #1890FF;":"")},e.toDisplayString(g.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,C=>{var S;return e.openBlock(),e.createBlock(s,{key:C.value,disabled:C.value==="component"&&!((S=t.controlList)!=null&&S.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===g.value&&t.condition.dataType===C.value?"color: #1890FF;":"")},e.toDisplayString(C.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,B=>(e.openBlock(),e.createBlock(i,{key:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===g.value&&t.condition.dataType===C.value&&t.condition.dateFormat===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,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",Wl,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,"onUpdate:value":o[0]||(o[0]=g=>t.condition.dataType=g),onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(g,C)=>(e.openBlock(),e.createBlock(c,{key:C,value:g.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",ql,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(h,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=g=>t.condition.fieldValue=g),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[2]||(o[2]=g=>t.condition.fieldValue=g),options:t.controlList},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(A,{visible:t.popoverVisible,"onUpdate:visible":o[5]||(o[5]=g=>t.popoverVisible=g),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Yl,[e.createVNode(L,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(g,C)=>(e.openBlock(),e.createBlock(w,{key:C,tab:g.label},{default:e.withCtx(()=>[e.createElementVNode("div",Kl,[e.createVNode(E,{value:g.radioValue,"onUpdate:value":S=>g.radioValue=S,onChange:S=>t.changeRadioValue(S,g)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Xl,"相对当前时间:"+e.toDisplayString(g.value),1)):(e.openBlock(),e.createElementBlock("div",Ql,"相对当前时间:"+e.toDisplayString(t.getFieldValue(C)),1)),e.createVNode(m,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(y,{value:g.beforeNum,"onUpdate:value":S=>g.beforeNum=S,min:0,onBlur:S=>t.blurCompare(S,g,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Jl,e.toDisplayString(g.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(m,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(y,{value:g.afterNum,"onUpdate:value":S=>g.afterNum=S,min:0,onBlur:S=>t.blurCompare(S,g,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Zl,e.toDisplayString(g.afterLabel),1)]),_:2},1032,["style"]),g.beforeText?(e.openBlock(),e.createBlock(m,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),g.afterText?(e.openBlock(),e.createBlock(m,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ei,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=S=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:S=>t.okDatePickConfig(g,C)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[4]||(o[4]=g=>{t.popoverVisible=!0})},[e.createVNode(N)])]),_: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"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[6]||(o[6]=g=>t.condition.fieldValue=g),options:t.controlList},null,8,["value","options"])):(e.openBlock(),e.createBlock(_,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[7]||(o[7]=g=>t.condition.fieldValue=g)},null,8,["value"])),e.createVNode(k,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const oi=ee(Ul,[["render",ti],["__scopeId","data-v-ff848178"]]),ni=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:oi}}),Bp="",ai={key:0,class:"condition-list"},ri={key:0,class:"condition-container"},li={key:0,class:"condition-text"},ii={key:1,class:"condition-text"},si={class:"conditions"};function ci(t,o,n,a,r,l){const c=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[i.join&&i.conditions&&Array.isArray(i.conditions)?(e.openBlock(),e.createElementBlock("div",ri,[i.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i.join==="||"?(e.openBlock(),e.createElementBlock("div",li,"或")):e.createCommentVNode("",!0),i.join==="&&"?(e.openBlock(),e.createElementBlock("div",ii,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",si,[i.conditions.length>0?(e.openBlock(),e.createBlock(c,{key:0,level:t.level+1,list:i.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{key:1,class:"condition",data:i,level:t.level,index:s,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const di=ee(ni,[["render",ci],["__scopeId","data-v-975987ba"]]),pi=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:I.Select,AInput:I.Input,AInputNumber:I.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=ae.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Op="",wn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),ui={class:"truncations"},fi={class:"rule"},mi={class:"field-value"},hi={class:"field-value"},yi=wn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),gi=wn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),bi=["onClick"];function Ci(t,o,n,a,r,l){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),i=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",ui,[(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",fi,[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",mi,[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",hi,[yi,e.createVNode(i,{value:s.name,"onUpdate:value":u=>s.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),gi]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(s)},"清空",8,bi)]))),128))])}const wi=ee(pi,[["render",Ci],["__scopeId","data-v-f543c690"]]),xi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:di,TruncationList:wi,AModal:I.Modal,AButton:I.Button,ATabs:I.Tabs,ATabPane:I.TabPane},setup(t,{expose:o}){var k;const n=e.ref("1"),a=()=>{var g;return`添加过滤条件-${((g=t.item)==null?void 0:g.label)||""}`},r=e.inject(ge),l=e.inject(Fe),c=e.computed(()=>{var g;return(g=e.unref(r))==null?void 0:g.dataSourceId}),d=e.ref([]),i=e.ref([]),s=e.ref(!1);e.watch(s,g=>{var C,S,B,M;g&&(Array.isArray((C=t.item)==null?void 0:C.conditions)&&(d.value=ae.cloneDeep((S=t.item)==null?void 0:S.conditions)||[]),Array.isArray((B=t.item)==null?void 0:B.truncations)&&(i.value=ae.cloneDeep((M=t.item)==null?void 0:M.truncations)||[]))},{flush:"post"});let p=!1;const u=g=>{var C;p=!0,e.unref(d)==null||((C=e.unref(d))==null?void 0:C.length)===0?d.value=[{}]:e.unref(d)[0]!=null&&(e.unref(d)[0].conditions==null||e.unref(d)[0].join!==g?d.value=[{join:g,conditions:[e.unref(d)[0],{}]}]:e.unref(d)[0].conditions.length>1&&e.unref(d)[0].join===g&&d.value[0].conditions.push({}))};e.provide($o,{updateCondition(g,C,S){var M;p=!0;let B=e.unref(d);for(let U=0;U<C&&B[0];U++)B=(M=B[0])==null?void 0:M.conditions;Array.isArray(B)&&B[S]&&(B[S]=g)},deleteCondition(g,C){var B,M;p=!0;let S=e.unref(d);for(let U=0;U<g&&S[0];U++)S=(B=S[0])==null?void 0:B.conditions;if(Array.isArray(S)&&S[C]&&(S.splice(C,1),S.length===1)){let U=e.unref(d);const R=g-2>0?g-2:0;for(let z=0;z<R&&U[0];z++)U=(M=U[0])==null?void 0:M.conditions;U[0].join===S[0].join?U[0].conditions=[...S[0].conditions,...U[0].conditions.slice(1)]:U[0]=S[0]}}});const f=g=>{p=!0,i.value=g},b=()=>{var C,S;const g=((C=e.unref(r)[t.type])==null?void 0:C.slice())||[];g[t.index].conditions=e.unref(d),t.type==="classificationList"&&((S=e.unref(i))!=null&&S.length)&&(g[t.index].truncations=e.unref(i)),l({[t.type]:g})},h=()=>{s.value=!0},y=()=>{d.value=[],s.value=!1},m=()=>{p&&b(),p=!1,y()},E=()=>{y()},w=e.inject(Le),L=e.unref(e.inject(Te)),N=(k=window==null?void 0:window.config)==null?void 0:k.pageId,A=e.ref([]);e.provide(Do,A);const _=async g=>{var C;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const S=await w.post(`${Se}/diagram/hrpIndexWithComplex`,{pageId:N,dataSourceId:e.unref(c),hrpIndexGuid:g,indexGuid:g},{headers:{Authentication:L,operateContext:"ygt"}}),{success:B,data:M=[]}=S.data;B&&((C=M==null?void 0:M.dataViewColumns)!=null&&C.length)&&(A.value=M.dataViewColumns)}catch(S){console.error(S)}};return e.watch(()=>t.item,g=>{g&&s.value&&_(g.id)}),o({showModal:h}),{visible:s,onOk:m,onCancel:E,handleTitle:a,conditionList:d,truncationList:i,addCondition:u,onUpdatetruncation:f,activeKey:n}}}),Vp="",_i={class:"header"},ki={class:"header"};function Si(t,o,n,a,r,l){const c=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),i=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:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[t.type==="classificationList"?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(i,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",_i,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(c,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(c,{key:1,onClick:o[2]||(o[2]=f=>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(i,{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",ki,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(c,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(c,{key:1,onClick:o[6]||(o[6]=f=>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 Ai=ee(xi,[["render",Si],["__scopeId","data-v-58de8512"]]);let Ni=(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};const mo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:mo(t,r.children)&&(n=mo(t,r.children)))}return n},Li=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:I.Row,ACol:I.Col,ATextarea:I.Textarea,APopover:I.Popover,AInputSearch:I.InputSearch,ATree:I.Tree,DoubleRightOutlined:jr},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Le),a=e.unref(e.inject(Te)),r=e.inject(ge),l=e.computed(()=>e.unref(r).leftAxisList||[]),c=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),i=e.computed(()=>e.unref(r).queryColumnList||[]),s=e.computed(()=>{const _=e.unref(l).concat(e.unref(c)).concat(e.unref(d)).concat(e.unref(i));return(_==null?void 0:_.filter(k=>k.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:_=>{o("update:value",_),o("change",_)}}),u=e.ref(""),f=_=>{const k=document.getElementById("calTextArea");let g=p.value;if(document.selection){const C=document.selection.createRange();C.text=_}else if(typeof k.selectionStart=="number"&&typeof k.selectionEnd=="number"){const C=k.selectionStart,S=k.selectionEnd;let B=C;g=g.substring(0,C)+_+g.substring(S,g.length),B+=_.length,k.selectionStart=k.selectionEnd=B}else g+=_;p.value=g},b=["+","-","*","/","(",")"],h=(_,k)=>{let g="";switch(k){case"name":{g="${"+_+"}";break}case"function":{g=_+"()";break}default:g=_}f(g)},y=[],m=e.ref([]),E=e.ref(!0),w=e.ref([]),L=_=>{var k;for(const g of _)(k=g==null?void 0:g.children)!=null&&k.length?L(g.children):y.push({key:g.key,title:g.title})},N=async()=>{try{const _=await n.get(`${Se}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:k,data:g=[]}=_.data;k&&(g!=null&&g.length)&&(L(g),w.value=g)}catch(_){console.error(_)}},A=_=>{m.value=_,E.value=!1};return e.watch(u,_=>{const k=y.map(g=>g.title.indexOf(_)>-1?mo(g.key,w.value):null).filter((g,C,S)=>g&&S.indexOf(g)===C);m.value=k,u.value=_,E.value=!0}),e.onMounted(()=>{N()}),{fieldList:s,myValue:p,calculMethods:b,funcDescsData:w,searchFuncValue:u,expandedKeys:m,autoExpandParent:E,selectedElem:h,onExpand:A}}}),vp="",Ip="",Ti={class:"formula-calculation"},Ei={class:"field-area"},Bi=["onClick"],Oi={class:"cal_right_bottom"},Vi={class:"cal_fu"},vi=["onClick"],Ii={class:"function-wrap"},Fi={class:"wrap-search"},$i={class:"tree-box"},Di={key:0},Pi={style:{color:"#f50"}},Mi={key:1},ji=["onClick"],Ri={class:"cal_a"};function Ui(t,o,n,a,r,l){const c=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),i=e.resolveComponent("a-input-search"),s=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(c,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Ei,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(b,h)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:h,onClick:y=>t.selectedElem(b.label,"name")},e.toDisplayString(b.label),9,Bi))),128))])]),_:1}),e.createVNode(c,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=b=>t.myValue=b),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Oi,[e.createElementVNode("ul",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(b,h)=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.selectedElem(b,"symbol"),key:h},e.toDisplayString(b),9,vi))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Ii,[e.createElementVNode("div",Fi,[e.createVNode(i,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=b=>t.searchFuncValue=b),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",$i,[e.createVNode(s,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:b,leaf:h})=>[b.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Di,[e.createTextVNode(e.toDisplayString(b.substr(0,b.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Pi,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(b.substr(b.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",Mi,e.toDisplayString(b),1)),h?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:y=>t.selectedElem(b,"function")},"插入",8,ji)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Ri,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Gi=ee(Li,[["render",Ui],["__scopeId","data-v-1e6dd439"]]),zi=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Gi,AForm:I.Form,AModal:I.Modal,AFormItem:I.FormItem,AInput:I.Input,ASelect:I.Select,ASelectOption:I.SelectOption,ATextarea:I.Textarea},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(ge),a=e.inject(Fe),r=e.computed(()=>e.unref(n)[t.type]||[]),l=e.computed(()=>{const k=["leftAxisList","rightAxisList","queryColumnList","indicators"];let g=[];for(const C of k)Object.prototype.hasOwnProperty.call(e.unref(n),C)&&(g=g.concat(e.unref(n)[C]));return g}),c={span:4},d={span:18},i={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},s=e.ref(),p=e.ref(!1),u=e.ref();e.watch(p,k=>{if(k)if(t.mode==="edit"){const{label:g,calcType:C,formula:S,builtInValueSource:B,builtInFormula:M,builtInCalcWay:U}=t.item;u.value={label:g,calcType:C,formula:S,builtInValueSource:B,builtInFormula:M,builtInCalcWay:U}}else t.mode==="add"&&(u.value=ae.cloneDeep(i));else u.value=ae.cloneDeep(i)},{immediate:!0,deep:!0});let f=!1;const b=()=>{f=!0},h=()=>{var C;const k=((C=e.unref(n)[t.type])==null?void 0:C.slice())||[],{label:g}=e.unref(u)||{};if(t.mode==="add"){const S=Ni();k.push({...e.unref(u),id:S,show:!0,name:g})}else t.mode==="edit"&&(k[t.index]={...k[t.index],...e.unref(u),name:g});a({[t.type]:k})},y=()=>{p.value=!0},m=()=>{p.value=!1},E=async(k,g)=>{if(g==="")return Promise.reject(new Error("请输入指标名"));{const C=e.unref(l).find(S=>S.label===g);return C?C.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},w=e.computed(()=>{let k={label:[{required:!0,validator:E,trigger:"change"}]};return u.value.calcType==="BUILT_IN"&&(k={...k,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),k}),L=()=>{s.value.validate().then(()=>{f&&h(),f=!1,m()})},N=()=>{s.value.clearValidate(),m()},A=()=>{f=!0,e.unref(u).builtInCalcWay=""},_=e.computed(()=>{let k="";const g=e.unref(u).builtInCalcWay,C=e.unref(u).builtInValueSource;if(!C||!g)return k;switch(e.unref(u).builtInFormula){case"BUILT_IN_RANK":{g==="ASC"?k="【"+C+"】由小到大在所有值中的排名":k="【"+C+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{k=`所有【】的
|
|
60
|
-
`,
|
|
61
|
-
`,g){case"SUM":{S="求和";break}case"AVG":{S="求平均值";break}case"MIN":{S="求最小值";break}case"MAX":{S="求最大值";break}}k=k+"将所有【"+C+"】"+S;break}}return k});return o({showModal:y}),{visible:p,onCancel:N,labelCol:c,wrapperCol:d,formState:u,builtInValueSourceList:r,onOK:L,onChange:b,formRules:w,accessLogic:_,formRef:s,onChangeBuiltInFormula:A}}}),Fp="",Hi={key:0,class:"accesstip"};function Wi(t,o,n,a,r,l){const c=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),i=e.resolveComponent("a-select-option"),s=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-form"),b=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(b,{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":o[0]||(o[0]=h=>t.formState.label=h),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":o[1]||(o[1]=h=>t.formState.calcType=h),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(i,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(i,{value:"BUILT_IN"},{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]=h=>t.formState.formula=h),item:t.item,onChange:t.onChange},null,8,["value","item","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":o[3]||(o[3]=h=>t.formState.builtInFormula=h),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(i,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(i,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(i,{value:"FIRST_ROW_RATE"},{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":o[4]||(o[4]=h=>t.formState.builtInValueSource=h),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(h,y)=>(e.openBlock(),e.createBlock(i,{key:y,value:h.label,disabled:t.item.label===h.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(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":o[5]||(o[5]=h=>t.formState.builtInCalcWay=h),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(i,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(i,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(i,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(i,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(i,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(i,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(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",Hi," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const qi=ee(zi,[["render",Wi],["__scopeId","data-v-0c00a5ba"]]),Yi=e.defineComponent({name:"DataConfigCard",directives:{focus:Cn},components:{CalculationModal:qi,FilterModal:Ai,CustomGroupModal:Dl,SettingOutlined:ll,DeleteOutlined:$r,CopyOutlined:Vr,CustomSortModal:Sl,PlusOutlined:ol,ACard:I.Card,ACheckbox:I.Checkbox,AInput:I.Input,ADropdown:I.Dropdown,AMenu:I.Menu,ASubMenu:I.SubMenu,AMenuItem:I.MenuItem,AMenuDivider:I.MenuDivider,ASelect:I.Select,Draggable:tt},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(ge),a=e.inject(Fe),r=["leftAxisList","rightAxisList","indicators","queryColumnList"],l=["classificationList","seriesList","rowHeaderList","queryColumnList"],c=e.inject(Rt),d=(v={})=>{if(e.unref(c)==="SQL_VIEW")return!0;let V=!1;return v.scope==="IDX"?r.includes(t.type)&&(V=!0):["DIM","BUILT_IN_DIM"].includes(v.scope)&&l.includes(t.type)&&(V=!0),V},i=(v="{}")=>{var V;try{const $=JSON.parse(v);if(!d($))return;const G=((V=e.unref(n)[t.type])==null?void 0:V.slice())||[];["classificationList","seriesList"].includes(t.type)&&G.forEach(ne=>{ne.show=!1}),p(G,$),G.push($),a({[t.type]:G}),sessionStorage.setItem("indicator-list-item","")}catch($){console.error($)}},s=(v="{}")=>{var V;try{const{cardItem:$,type:G,index:ne}=JSON.parse(v);if(!d($)||G===t.type)return;const oe=((V=e.unref(n)[t.type])==null?void 0:V.slice())||[];p(oe,$),oe.push($);const Z=e.unref(n)[G].slice()||[];Z.splice(ne,1),a({[t.type]:oe,[G]:Z})}catch($){console.error($)}};function p(v,V){const $=[];if(v.forEach(G=>{G.label.includes(V.label)&&$.push(G.label.split(V.label)[1])}),$.length>=1){for(let G=1;G<=$.length;G++)if(!$.includes(G+"")){V.label=V.label+G;break}}}const u=(v,V)=>{var ne,oe;const $=(ne=v.target)==null?void 0:ne.checked,G=((oe=e.unref(n)[t.type])==null?void 0:oe.slice())||[];["classificationList","seriesList"].includes(t.type)&&G.forEach(Z=>{Z.show=!1}),G[V].show=$,a({[t.type]:G})},f=v=>{var $;const V=(($=e.unref(n)[t.type])==null?void 0:$.slice())||[];V.splice(v,1),a({[t.type]:V})},b=()=>{sessionStorage.setItem("indicator-card-item","")},h=()=>{const v=sessionStorage.getItem("indicator-list-item"),V=sessionStorage.getItem("indicator-card-item");v?i(v):V&&s(V)},y=v=>{var ce,ye;const{newIndex:V,oldIndex:$,from:G,to:ne}=v,oe=G.id,Z=ne.id;if(V>=0&&$>=0){if(oe===Z){const Q=((ce=e.unref(n)[t.type])==null?void 0:ce.slice())||[],le=Q.splice($,1)[0];le&&(Q.splice(V,0,le),a({[t.type]:Q}))}else if(t.type===Z){const Q=((ye=e.unref(n)[Z])==null?void 0:ye.slice())||[];if(Q!=null&&Q.length){const le=Q.splice(Q.length-1,1)[0];le&&(Q.splice(V,0,le),a({[t.type]:Q}))}}}},m=(v,V)=>{const $=v.oldIndex,G=V[$];G&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:G,type:t.type,index:$}))},E=e.computed(()=>e.unref(n)[t.type]||[]),w=e.ref([]);let L=!1;e.watch(()=>e.unref(E).length,v=>{w.value=new Array(v).fill(!1)},{flush:"post",immediate:!0});const N=v=>{var $;const V=(($=e.unref(n)[t.type])==null?void 0:$.slice())||[];V.splice(v,1),a({[t.type]:V})},A=v=>{w.value[v]=!0},_=()=>{L=!0},k=(v,V,$)=>{var G,ne;if(w.value[V]=!1,L){const oe=(G=v.target)==null?void 0:G.value,Z=((ne=e.unref(n)[t.type])==null?void 0:ne.slice())||[],ce=Z.filter(Q=>{var le;return(le=Q==null?void 0:Q.formula)==null?void 0:le.includes($)}).map(Q=>Q.id),ye=Z.filter(Q=>{var le;return(le=Q==null?void 0:Q.builtInValueSource)==null?void 0:le.includes($)}).map(Q=>Q.id);if(ce!=null&&ce.length)for(const Q of ce){const le=Z.find(Bo=>Bo.id===Q);le.formula=le.formula.replaceAll($,oe)}if(ye!=null&&ye.length)for(const Q of ye){const le=Z.find(Bo=>Bo.id===Q);le.builtInValueSource=le.builtInValueSource.replaceAll($,oe)}Z[V].label=oe,a({[t.type]:Z})}L=!1},g="DEFAULT",C=e.computed(()=>{const v=e.unref(n)[t.type]||[],{leftAxisList:V=[],rightAxisList:$=[],indicators:G=[]}=e.unref(n)||{};return[{id:g,label:"默认",name:"默认"},...v,...V,...$,...G]}),S=(v={},V,$="ASC")=>{var ce;const{label:G,name:ne,id:oe}=v,Z=((ce=e.unref(n)[t.type])==null?void 0:ce.slice())||[];oe===g?delete Z[V].sort:Z[V].sort={label:G,columnName:ne,type:"NORMAL",order:$},a({[t.type]:Z})},B=(v={},V="ASC")=>{const G={ASC:"升序",DESC:"降序"}[V],{sort:ne}=v,{label:oe,order:Z}=ne||{};return oe&&Z===V?`${G}(${oe})`:G},M=e.ref(),U=e.ref(),R=e.ref(),z=e.ref(),H=(v={},V)=>{var $;M.value=v,U.value=V,($=e.unref(R))==null||$.showModal()},Y=v=>{var V;return"自定义排序"+(((V=v==null?void 0:v.sort)==null?void 0:V.type)==="CUSTOM"?"(已配置)":"")},K=(v={},V)=>{var $;M.value=v,U.value=V,($=e.unref(z))==null||$.showModal()},x=v=>"自定义分组"+((v==null?void 0:v.customGroup)!=null?"(已配置)":""),T=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],O=(v,V)=>{var G;const $=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];$[V].aggregate=v,a({[t.type]:$})},P=(v,V)=>{var G;const $=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];$[V].dateFormat=v,a({[t.type]:$})},D=(v="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[v]})`,W=(v={})=>{var V;return"过滤"+(v!=null&&v.conditions&&((V=v==null?void 0:v.conditions)==null?void 0:V.length)>0?"(已配置)":"")},X=e.ref(),J=(v={},V)=>{M.value=v,U.value=V,e.unref(X).showModal()},te=e.ref(),re=e.ref("add"),se=(v,V,$)=>{var G;re.value=v,v==="edit"&&(M.value=V,U.value=$),(G=e.unref(te))==null||G.showModal()},ie=e.inject(Le),Ne=e.unref(e.inject(Te)),Ue=e.ref([]),Ge=e.computed(()=>e.unref(n)[t.type]||{}),Ze=async()=>{try{const v=await ie.post(`${Se}/diagram/dimFields`,{},{headers:{Authentication:Ne,operateContext:"ygt"}}),{success:V,data:$=[]}=v.data;V&&(Ue.value=$)}catch(v){console.error(v)}},et=(v,V)=>{const $=e.unref(n)[t.type]||{};$[V]=v,a({[t.type]:$})},F=e.ref({}),j=async(v,V)=>{var G;const{name:$}=V;if(v&&fo(V,"indexCode")&&!fo(e.unref(F),$)){const ne=await ie.post(`${Se}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:V.id,pageId:(G=window==null?void 0:window.config)==null?void 0:G.pageId},{headers:{Authentication:Ne,operateContext:"ygt"}}),{success:oe,data:Z=[]}=ne.data;oe&&(F.value[$]={name:Z.name,code:Z.indexCode})}},q=v=>{const V=document.createElement("input");document.body.appendChild(V),V.setAttribute("value",v),V.select(),document.execCommand("copy"),document.body.removeChild(V),I.message.success("复制成功")};return e.onMounted(()=>{t.type==="formFields"&&Ze()}),{onCheckboxChange:u,onDropEnd:f,onDragItemEnd:b,onDragItemAdd:h,onDragItemSort:y,onDragItemStart:m,cardItemList:E,onDelete:N,onEdit:A,onCommitLabelChange:k,sortList:C,onSort:S,handleSortTitle:B,showCustomSortModal:H,customSortModalRef:R,currentItem:M,currentIndex:U,handleCustomSortTitle:Y,handleCustomGroupTitle:x,customGroupModalRef:z,showCustomGroupModal:K,editLabelList:w,onLabelChange:_,aggregateList:T,onAggregateChange:O,onDateFormatChange:P,handleAggregateTitle:D,onShowCalculationModal:se,handleFilterTitle:W,filterModalRef:X,showFilterModal:J,calculationModalRef:te,calculationModalMode:re,formatList:o,fieldOptions:Ue,fieldData:Ge,onFieldChange:et,onVisibleChange:j,copyDataViewName:q,dataViewMap:F}}}),$p="",Dp="",lt=t=>(e.pushScopeId("data-v-f595b49a"),t=t(),e.popScopeId(),t),Ki={class:"title"},Xi={class:"title-text"},Qi={class:"field-wrap"},Ji={class:"field-item"},Zi=lt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),es={class:"field-item"},ts=lt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),os={class:"title"},ns={class:"title-text"},as=lt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),rs={class:"card-item-wrap"},ls={class:"card-item-inner"},is=["onClick"],ss=["onClick"],cs=["onClick"],ds={style:{display:"flex","align-items":"center"}},ps=["title"],us=lt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),fs={style:{display:"flex","align-items":"center"}},ms=["title"],hs=lt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function ys(t,o,n,a,r,l){const c=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),i=e.resolveComponent("plus-outlined"),s=e.resolveComponent("a-input"),p=e.resolveComponent("setting-outlined"),u=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-sub-menu"),b=e.resolveComponent("a-menu-divider"),h=e.resolveComponent("copy-outlined"),y=e.resolveComponent("a-menu"),m=e.resolveComponent("a-dropdown"),E=e.resolveComponent("delete-outlined"),w=e.resolveComponent("a-checkbox"),L=e.resolveComponent("draggable"),N=e.resolveComponent("custom-sort-modal"),A=e.resolveComponent("custom-group-modal"),_=e.resolveComponent("filter-modal"),k=e.resolveComponent("calculation-modal"),g=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",Ki,[e.createElementVNode("div",Xi,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createElementVNode("div",Ji,[Zi,e.createVNode(c,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=C=>t.onFieldChange(C,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",es,[ts,e.createVNode(c,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=C=>t.onFieldChange(C,"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",os,[e.createElementVNode("div",ns,e.toDisplayString(t.title),1),["classificationList","seriesList","rowHeaderList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(C=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(i,{class:"add-calculation-icon"}),as]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(L,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=C=>t.cardItemList=C),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]=C=>t.onDragItemStart(C,t.cardItemList))},{item:e.withCtx(({element:C,index:S})=>[e.createElementVNode("div",rs,[e.createVNode(w,{class:"card-item",checked:C.show,onChange:B=>t.onCheckboxChange(B,S)},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[!t.editLabelList[S]&&C.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(B=>t.onEdit(S),["prevent","stop"])},e.toDisplayString(C.label),9,is)):e.createCommentVNode("",!0),!t.editLabelList[S]&&!C.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(B=>t.onEdit(S),["prevent","stop"])}," 请点击填入名字 ",8,ss)):e.createCommentVNode("",!0),t.editLabelList[S]?e.withDirectives((e.openBlock(),e.createBlock(s,{key:2,"default-value":C.label,size:"small",onBlur:B=>t.onCommitLabelChange(B,S,C.label),onPressEnter:B=>t.onCommitLabelChange(B,S,C.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[g]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN"].includes(C.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(B=>t.onShowCalculationModal("edit",C,S),["prevent","stop"])}," fx ",8,cs)):e.createCommentVNode("",!0),e.createVNode(m,{trigger:["click"],onVisibleChange:B=>t.onVisibleChange(B,C)},{overlay:e.withCtx(()=>[e.createVNode(y,null,{default:e.withCtx(()=>[["classificationList","seriesList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:t.handleSortTitle(C,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,B=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:B.id,onClick:M=>t.onSort(B,S,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f,{title:t.handleSortTitle(C,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,B=>(e.openBlock(),e.createBlock(u,{class:"menu-item",style:{"white-space":"nowrap"},key:B.id,onClick:M=>t.onSort(B,S,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(u,{onClick:B=>t.showCustomSortModal(C,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(b),e.createVNode(u,{onClick:B=>t.showCustomGroupModal(C,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(b),C.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,B=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:B.value,onClick:M=>t.onDateFormatChange(B.value,S)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(C.dateFormat===B.value||!C.dateFormat&&B.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(b)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(u,{onClick:B=>t.showFilterModal(C,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(C)),1)]),_:2},1032,["onClick"]),e.createVNode(b),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{title:t.handleAggregateTitle(C.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,B=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:B.value,onClick:M=>t.onAggregateChange(B.value,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(b)],64)),t.dataViewMap[C.name]?(e.openBlock(),e.createBlock(u,{key:2,onClick:B=>t.copyDataViewName(t.dataViewMap[C.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[C.name].name},[us,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[C.name].name),1)],8,ps),e.createVNode(h,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[C.name]?(e.openBlock(),e.createBlock(u,{key:3,onClick:B=>t.copyDataViewName(t.dataViewMap[C.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",fs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[C.name].code},[hs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[C.name].code),1)],8,ms),e.createVNode(h,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(p,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(E,{class:"delete-icon",onClick:e.withModifiers(B=>t.onDelete(S),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(N,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(A,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(_,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(k,{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 gs=ee(Yi,[["render",ys],["__scopeId","data-v-f595b49a"]]),bs={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"}},Cs=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:gs},setup(){const t=e.inject(ot),o=e.computed(()=>{var i;return(i=e.unref(t))==null?void 0:i.type}),n=e.computed(()=>{var i;return!!((i=e.unref(t))!=null&&i.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Fe),c=(i,s)=>Object.prototype.hasOwnProperty.call(i,s);return(()=>{var m,E;const i=ae.cloneDeep((m=e.unref(t))==null?void 0:m.graphicConfig),s=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["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"],text:["indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const w=u.length;f=((E=f.slice(w,w+1))==null?void 0:E.toLowerCase())+f.slice(w+1)}const b=p[f],h=bs,y=(b==null?void 0:b.length)||0;for(let w=0;w<y;w++){const L=b[w];if(!L)break;r.push({...h[L],type:L})}for(const w of s)c(i,w)&&!b.find(L=>L===w)&&(i[w]=[]);l(i)})(),{cardsMap:a,cards:r}}}),Pp="",Mp="",ws={class:"data-group"};function xs(t,o,n,a,r,l){const c=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",ws,[(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 _s=ee(Cs,[["render",xs],["__scopeId","data-v-603b1b70"]]),ks=[{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"]}],Ss={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"}},As=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:I.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function Ns(t,o,n,a,r,l){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 Ls=ee(As,[["render",Ns]]),Ts=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:I.InputNumber,ASelect:I.Select,ASelectOption:I.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")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?o("change",u):o("change",`${u}${f}`)},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:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Es(t,o,n,a,r,l){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),i=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(i,{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]=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":o[1]||(o[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 xn=ee(Ts,[["render",Es]]),Bs=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:I.RadioGroup,ARadioButton:I.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function Os(t,o,n,a,r,l){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,i=>(e.openBlock(),e.createBlock(c,{key:i.value,value:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const Vs=ee(Bs,[["render",Os]]),vs=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:I.Select,ASelectOption:I.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function Is(t,o,n,a,r,l){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,i=>(e.openBlock(),e.createBlock(c,{key:i.value,value:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const Fs=ee(vs,[["render",Is]]),$s=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:I.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function Ds(t,o,n,a,r,l){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 Ps=ee($s,[["render",Ds]]);var ue="top",we="bottom",xe="right",fe="left",ho="auto",it=[ue,we,xe,fe],We="start",st="end",Ms="clippingParents",_n="viewport",ct="popper",js="reference",kn=it.reduce(function(t,o){return t.concat([o+"-"+We,o+"-"+st])},[]),Sn=[].concat(it,[ho]).reduce(function(t,o){return t.concat([o,o+"-"+We,o+"-"+st])},[]),Rs="beforeRead",Us="read",Gs="afterRead",zs="beforeMain",Hs="main",Ws="afterMain",qs="beforeWrite",Ys="write",Ks="afterWrite",Xs=[Rs,Us,Gs,zs,Hs,Ws,qs,Ys,Ks];function Ee(t){return t?(t.nodeName||"").toLowerCase():null}function he(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function Me(t){var o=he(t).Element;return t instanceof o||t instanceof Element}function _e(t){var o=he(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function yo(t){if(typeof ShadowRoot>"u")return!1;var o=he(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Qs(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!_e(l)||!Ee(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(c){var d=r[c];d===!1?l.removeAttribute(c):l.setAttribute(c,d===!0?"":d)}))})}function Js(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],l=o.attributes[a]||{},c=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=c.reduce(function(i,s){return i[s]="",i},{});!_e(r)||!Ee(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(i){r.removeAttribute(i)}))})}}const Zs={name:"applyStyles",enabled:!0,phase:"write",fn:Qs,effect:Js,requires:["computeStyles"]};function Be(t){return t.split("-")[0]}var je=Math.max,kt=Math.min,qe=Math.round;function go(){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 An(){return!/^((?!chrome|android).)*safari/i.test(go())}function Ye(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&_e(t)&&(r=t.offsetWidth>0&&qe(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&qe(a.height)/t.offsetHeight||1);var c=Me(t)?he(t):window,d=c.visualViewport,i=!An()&&n,s=(a.left+(i&&d?d.offsetLeft:0))/r,p=(a.top+(i&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:s+u,bottom:p+f,left:s,x:s,y:p}}function bo(t){var o=Ye(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 Nn(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&yo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function ve(t){return he(t).getComputedStyle(t)}function ec(t){return["table","td","th"].indexOf(Ee(t))>=0}function Pe(t){return((Me(t)?t.ownerDocument:t.document)||window.document).documentElement}function St(t){return Ee(t)==="html"?t:t.assignedSlot||t.parentNode||(yo(t)?t.host:null)||Pe(t)}function Ln(t){return!_e(t)||ve(t).position==="fixed"?null:t.offsetParent}function tc(t){var o=/firefox/i.test(go()),n=/Trident/i.test(go());if(n&&_e(t)){var a=ve(t);if(a.position==="fixed")return null}var r=St(t);for(yo(r)&&(r=r.host);_e(r)&&["html","body"].indexOf(Ee(r))<0;){var l=ve(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function dt(t){for(var o=he(t),n=Ln(t);n&&ec(n)&&ve(n).position==="static";)n=Ln(n);return n&&(Ee(n)==="html"||Ee(n)==="body"&&ve(n).position==="static")?o:n||tc(t)||o}function Co(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function pt(t,o,n){return je(t,kt(o,n))}function oc(t,o,n){var a=pt(t,o,n);return a>n?n:a}function Tn(){return{top:0,right:0,bottom:0,left:0}}function En(t){return Object.assign({},Tn(),t)}function Bn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var nc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,En(typeof o!="number"?o:Bn(o,it))};function ac(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,c=n.modifiersData.popperOffsets,d=Be(n.placement),i=Co(d),s=[fe,xe].indexOf(d)>=0,p=s?"height":"width";if(!(!l||!c)){var u=nc(r.padding,n),f=bo(l),b=i==="y"?ue:fe,h=i==="y"?we:xe,y=n.rects.reference[p]+n.rects.reference[i]-c[i]-n.rects.popper[p],m=c[i]-n.rects.reference[i],E=dt(l),w=E?i==="y"?E.clientHeight||0:E.clientWidth||0:0,L=y/2-m/2,N=u[b],A=w-f[p]-u[h],_=w/2-f[p]/2+L,k=pt(N,_,A),g=i;n.modifiersData[a]=(o={},o[g]=k,o.centerOffset=k-_,o)}}function rc(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)||Nn(o.elements.popper,r)&&(o.elements.arrow=r))}const lc={name:"arrow",enabled:!0,phase:"main",fn:ac,effect:rc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ke(t){return t.split("-")[1]}var ic={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:qe(n*r)/r||0,y:qe(a*r)/r||0}}function On(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,c=t.offsets,d=t.position,i=t.gpuAcceleration,s=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=c.x,b=f===void 0?0:f,h=c.y,y=h===void 0?0:h,m=typeof p=="function"?p({x:b,y}):{x:b,y};b=m.x,y=m.y;var E=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),L=fe,N=ue,A=window;if(s){var _=dt(n),k="clientHeight",g="clientWidth";if(_===he(n)&&(_=Pe(n),ve(_).position!=="static"&&d==="absolute"&&(k="scrollHeight",g="scrollWidth")),_=_,r===ue||(r===fe||r===xe)&&l===st){N=we;var C=u&&_===A&&A.visualViewport?A.visualViewport.height:_[k];y-=C-a.height,y*=i?1:-1}if(r===fe||(r===ue||r===we)&&l===st){L=xe;var S=u&&_===A&&A.visualViewport?A.visualViewport.width:_[g];b-=S-a.width,b*=i?1:-1}}var B=Object.assign({position:d},s&&ic),M=p===!0?sc({x:b,y},he(n)):{x:b,y};if(b=M.x,y=M.y,i){var U;return Object.assign({},B,(U={},U[N]=w?"0":"",U[L]=E?"0":"",U.transform=(A.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",U))}return Object.assign({},B,(o={},o[N]=w?y+"px":"",o[L]=E?b+"px":"",o.transform="",o))}function cc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,c=l===void 0?!0:l,d=n.roundOffsets,i=d===void 0?!0:d,s={placement:Be(o.placement),variation:Ke(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,On(Object.assign({},s,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:c,roundOffsets:i})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,On(Object.assign({},s,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const dc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cc,data:{}};var At={passive:!0};function pc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,c=a.resize,d=c===void 0?!0:c,i=he(o.elements.popper),s=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&s.forEach(function(p){p.addEventListener("scroll",n.update,At)}),d&&i.addEventListener("resize",n.update,At),function(){l&&s.forEach(function(p){p.removeEventListener("scroll",n.update,At)}),d&&i.removeEventListener("resize",n.update,At)}}const uc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pc,data:{}};var fc={left:"right",right:"left",bottom:"top",top:"bottom"};function Nt(t){return t.replace(/left|right|bottom|top/g,function(o){return fc[o]})}var mc={start:"end",end:"start"};function Vn(t){return t.replace(/start|end/g,function(o){return mc[o]})}function wo(t){var o=he(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function xo(t){return Ye(Pe(t)).left+wo(t).scrollLeft}function hc(t,o){var n=he(t),a=Pe(t),r=n.visualViewport,l=a.clientWidth,c=a.clientHeight,d=0,i=0;if(r){l=r.width,c=r.height;var s=An();(s||!s&&o==="fixed")&&(d=r.offsetLeft,i=r.offsetTop)}return{width:l,height:c,x:d+xo(t),y:i}}function yc(t){var o,n=Pe(t),a=wo(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=je(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=je(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+xo(t),i=-a.scrollTop;return ve(r||n).direction==="rtl"&&(d+=je(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:d,y:i}}function _o(t){var o=ve(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function vn(t){return["html","body","#document"].indexOf(Ee(t))>=0?t.ownerDocument.body:_e(t)&&_o(t)?t:vn(St(t))}function ut(t,o){var n;o===void 0&&(o=[]);var a=vn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=he(a),c=r?[l].concat(l.visualViewport||[],_o(a)?a:[]):a,d=o.concat(c);return r?d:d.concat(ut(St(c)))}function ko(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gc(t,o){var n=Ye(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 In(t,o,n){return o===_n?ko(hc(t,n)):Me(o)?gc(o,n):ko(yc(Pe(t)))}function bc(t){var o=ut(St(t)),n=["absolute","fixed"].indexOf(ve(t).position)>=0,a=n&&_e(t)?dt(t):t;return Me(a)?o.filter(function(r){return Me(r)&&Nn(r,a)&&Ee(r)!=="body"}):[]}function Cc(t,o,n,a){var r=o==="clippingParents"?bc(t):[].concat(o),l=[].concat(r,[n]),c=l[0],d=l.reduce(function(i,s){var p=In(t,s,a);return i.top=je(p.top,i.top),i.right=kt(p.right,i.right),i.bottom=kt(p.bottom,i.bottom),i.left=je(p.left,i.left),i},In(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 Fn(t){var o=t.reference,n=t.element,a=t.placement,r=a?Be(a):null,l=a?Ke(a):null,c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,i;switch(r){case ue:i={x:c,y:o.y-n.height};break;case we:i={x:c,y:o.y+o.height};break;case xe:i={x:o.x+o.width,y:d};break;case fe:i={x:o.x-n.width,y:d};break;default:i={x:o.x,y:o.y}}var s=r?Co(r):null;if(s!=null){var p=s==="y"?"height":"width";switch(l){case We:i[s]=i[s]-(o[p]/2-n[p]/2);break;case st:i[s]=i[s]+(o[p]/2-n[p]/2);break}}return i}function ft(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,c=l===void 0?t.strategy:l,d=n.boundary,i=d===void 0?Ms:d,s=n.rootBoundary,p=s===void 0?_n:s,u=n.elementContext,f=u===void 0?ct:u,b=n.altBoundary,h=b===void 0?!1:b,y=n.padding,m=y===void 0?0:y,E=En(typeof m!="number"?m:Bn(m,it)),w=f===ct?js:ct,L=t.rects.popper,N=t.elements[h?w:f],A=Cc(Me(N)?N:N.contextElement||Pe(t.elements.popper),i,p,c),_=Ye(t.elements.reference),k=Fn({reference:_,element:L,strategy:"absolute",placement:r}),g=ko(Object.assign({},L,k)),C=f===ct?g:_,S={top:A.top-C.top+E.top,bottom:C.bottom-A.bottom+E.bottom,left:A.left-C.left+E.left,right:C.right-A.right+E.right},B=t.modifiersData.offset;if(f===ct&&B){var M=B[r];Object.keys(S).forEach(function(U){var R=[xe,we].indexOf(U)>=0?1:-1,z=[ue,we].indexOf(U)>=0?"y":"x";S[U]+=M[z]*R})}return S}function wc(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,c=n.padding,d=n.flipVariations,i=n.allowedAutoPlacements,s=i===void 0?Sn:i,p=Ke(a),u=p?d?kn:kn.filter(function(h){return Ke(h)===p}):it,f=u.filter(function(h){return s.indexOf(h)>=0});f.length===0&&(f=u);var b=f.reduce(function(h,y){return h[y]=ft(t,{placement:y,boundary:r,rootBoundary:l,padding:c})[Be(y)],h},{});return Object.keys(b).sort(function(h,y){return b[h]-b[y]})}function xc(t){if(Be(t)===ho)return[];var o=Nt(t);return[Vn(t),o,Vn(o)]}function _c(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,c=n.altAxis,d=c===void 0?!0:c,i=n.fallbackPlacements,s=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,b=n.flipVariations,h=b===void 0?!0:b,y=n.allowedAutoPlacements,m=o.options.placement,E=Be(m),w=E===m,L=i||(w||!h?[Nt(m)]:xc(m)),N=[m].concat(L).reduce(function(W,X){return W.concat(Be(X)===ho?wc(o,{placement:X,boundary:p,rootBoundary:u,padding:s,flipVariations:h,allowedAutoPlacements:y}):X)},[]),A=o.rects.reference,_=o.rects.popper,k=new Map,g=!0,C=N[0],S=0;S<N.length;S++){var B=N[S],M=Be(B),U=Ke(B)===We,R=[ue,we].indexOf(M)>=0,z=R?"width":"height",H=ft(o,{placement:B,boundary:p,rootBoundary:u,altBoundary:f,padding:s}),Y=R?U?xe:fe:U?we:ue;A[z]>_[z]&&(Y=Nt(Y));var K=Nt(Y),x=[];if(l&&x.push(H[M]<=0),d&&x.push(H[Y]<=0,H[K]<=0),x.every(function(W){return W})){C=B,g=!1;break}k.set(B,x)}if(g)for(var T=h?3:1,O=function(X){var J=N.find(function(te){var re=k.get(te);if(re)return re.slice(0,X).every(function(se){return se})});if(J)return C=J,"break"},P=T;P>0;P--){var D=O(P);if(D==="break")break}o.placement!==C&&(o.modifiersData[a]._skip=!0,o.placement=C,o.reset=!0)}}const kc={name:"flip",enabled:!0,phase:"main",fn:_c,requiresIfExists:["offset"],data:{_skip:!1}};function $n(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 Dn(t){return[ue,xe,we,fe].some(function(o){return t[o]>=0})}function Sc(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,c=ft(o,{elementContext:"reference"}),d=ft(o,{altBoundary:!0}),i=$n(c,a),s=$n(d,r,l),p=Dn(i),u=Dn(s);o.modifiersData[n]={referenceClippingOffsets:i,popperEscapeOffsets:s,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const Ac={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Sc};function Nc(t,o,n){var a=Be(t),r=[fe,ue].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,c=l[0],d=l[1];return c=c||0,d=(d||0)*r,[fe,xe].indexOf(a)>=0?{x:d,y:c}:{x:c,y:d}}function Lc(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,c=Sn.reduce(function(p,u){return p[u]=Nc(u,o.rects,l),p},{}),d=c[o.placement],i=d.x,s=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=i,o.modifiersData.popperOffsets.y+=s),o.modifiersData[a]=c}const Tc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Lc};function Ec(t){var o=t.state,n=t.name;o.modifiersData[n]=Fn({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const Bc={name:"popperOffsets",enabled:!0,phase:"read",fn:Ec,data:{}};function Oc(t){return t==="x"?"y":"x"}function Vc(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,c=n.altAxis,d=c===void 0?!1:c,i=n.boundary,s=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,b=f===void 0?!0:f,h=n.tetherOffset,y=h===void 0?0:h,m=ft(o,{boundary:i,rootBoundary:s,padding:u,altBoundary:p}),E=Be(o.placement),w=Ke(o.placement),L=!w,N=Co(E),A=Oc(N),_=o.modifiersData.popperOffsets,k=o.rects.reference,g=o.rects.popper,C=typeof y=="function"?y(Object.assign({},o.rects,{placement:o.placement})):y,S=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),B=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,M={x:0,y:0};if(_){if(l){var U,R=N==="y"?ue:fe,z=N==="y"?we:xe,H=N==="y"?"height":"width",Y=_[N],K=Y+m[R],x=Y-m[z],T=b?-g[H]/2:0,O=w===We?k[H]:g[H],P=w===We?-g[H]:-k[H],D=o.elements.arrow,W=b&&D?bo(D):{width:0,height:0},X=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Tn(),J=X[R],te=X[z],re=pt(0,k[H],W[H]),se=L?k[H]/2-T-re-J-S.mainAxis:O-re-J-S.mainAxis,ie=L?-k[H]/2+T+re+te+S.mainAxis:P+re+te+S.mainAxis,Ne=o.elements.arrow&&dt(o.elements.arrow),Ue=Ne?N==="y"?Ne.clientTop||0:Ne.clientLeft||0:0,Ge=(U=B==null?void 0:B[N])!=null?U:0,Ze=Y+se-Ge-Ue,et=Y+ie-Ge,F=pt(b?kt(K,Ze):K,Y,b?je(x,et):x);_[N]=F,M[N]=F-Y}if(d){var j,q=N==="x"?ue:fe,v=N==="x"?we:xe,V=_[A],$=A==="y"?"height":"width",G=V+m[q],ne=V-m[v],oe=[ue,fe].indexOf(E)!==-1,Z=(j=B==null?void 0:B[A])!=null?j:0,ce=oe?G:V-k[$]-g[$]-Z+S.altAxis,ye=oe?V+k[$]+g[$]-Z-S.altAxis:ne,Q=b&&oe?oc(ce,V,ye):pt(b?ce:G,V,b?ye:ne);_[A]=Q,M[A]=Q-V}o.modifiersData[a]=M}}const vc={name:"preventOverflow",enabled:!0,phase:"main",fn:Vc,requiresIfExists:["offset"]};function Ic(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Fc(t){return t===he(t)||!_e(t)?wo(t):Ic(t)}function $c(t){var o=t.getBoundingClientRect(),n=qe(o.width)/t.offsetWidth||1,a=qe(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Dc(t,o,n){n===void 0&&(n=!1);var a=_e(o),r=_e(o)&&$c(o),l=Pe(o),c=Ye(t,r,n),d={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(a||!a&&!n)&&((Ee(o)!=="body"||_o(l))&&(d=Fc(o)),_e(o)?(i=Ye(o,!0),i.x+=o.clientLeft,i.y+=o.clientTop):l&&(i.x=xo(l))),{x:c.left+d.scrollLeft-i.x,y:c.top+d.scrollTop-i.y,width:c.width,height:c.height}}function Pc(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var c=[].concat(l.requires||[],l.requiresIfExists||[]);c.forEach(function(d){if(!n.has(d)){var i=o.get(d);i&&r(i)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function Mc(t){var o=Pc(t);return Xs.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function jc(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Rc(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 Pn={placement:"bottom",modifiers:[],strategy:"absolute"};function Mn(){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 Uc(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?Pn:r;return function(d,i,s){s===void 0&&(s=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pn,l),modifiersData:{},elements:{reference:d,popper:i},attributes:{},styles:{}},u=[],f=!1,b={state:p,setOptions:function(E){var w=typeof E=="function"?E(p.options):E;y(),p.options=Object.assign({},l,p.options,w),p.scrollParents={reference:Me(d)?ut(d):d.contextElement?ut(d.contextElement):[],popper:ut(i)};var L=Mc(Rc([].concat(a,p.options.modifiers)));return p.orderedModifiers=L.filter(function(N){return N.enabled}),h(),b.update()},forceUpdate:function(){if(!f){var E=p.elements,w=E.reference,L=E.popper;if(Mn(w,L)){p.rects={reference:Dc(w,dt(L),p.options.strategy==="fixed"),popper:bo(L)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(S){return p.modifiersData[S.name]=Object.assign({},S.data)});for(var N=0;N<p.orderedModifiers.length;N++){if(p.reset===!0){p.reset=!1,N=-1;continue}var A=p.orderedModifiers[N],_=A.fn,k=A.options,g=k===void 0?{}:k,C=A.name;typeof _=="function"&&(p=_({state:p,options:g,name:C,instance:b})||p)}}}},update:jc(function(){return new Promise(function(m){b.forceUpdate(),m(p)})}),destroy:function(){y(),f=!0}};if(!Mn(d,i))return b;b.setOptions(s).then(function(m){!f&&s.onFirstUpdate&&s.onFirstUpdate(m)});function h(){p.orderedModifiers.forEach(function(m){var E=m.name,w=m.options,L=w===void 0?{}:w,N=m.effect;if(typeof N=="function"){var A=N({state:p,name:E,instance:b,options:L}),_=function(){};u.push(A||_)}})}function y(){u.forEach(function(m){return m()}),u=[]}return b}}var Gc=[uc,Bc,dc,Zs,Tc,kc,vc,lc,Ac],zc=Uc({defaultModifiers:Gc});function So(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 jn(t,o){if(t){if(typeof t=="string")return So(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)?So(t,o):void 0}}function Hc(t){return function(o){if(Array.isArray(o))return So(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||jn(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 Xe(t){return Xe=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},Xe(t)}function Rn(t,o,n,a,r,l,c){try{var d=t[l](c),i=d.value}catch(s){return void n(s)}d.done?o(i):Promise.resolve(i).then(a,r)}function Un(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function c(i){Rn(l,a,r,c,d,"next",i)}function d(i){Rn(l,a,r,c,d,"throw",i)}c(void 0)})}}var Gn={exports:{}},zn={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})(zn),function(t){var o=zn.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,c=l.hasOwnProperty,d=Object.defineProperty||function(x,T,O){x[T]=O.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",p=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(x,T,O){return Object.defineProperty(x,T,{value:O,enumerable:!0,configurable:!0,writable:!0}),x[T]}try{f({},"")}catch{f=function(T,O,P){return T[O]=P}}function b(x,T,O,P){var D=T&&T.prototype instanceof N?T:N,W=Object.create(D.prototype),X=new Y(P||[]);return d(W,"_invoke",{value:U(x,O,X)}),W}function h(x,T,O){try{return{type:"normal",arg:x.call(T,O)}}catch(P){return{type:"throw",arg:P}}}r.wrap=b;var y="suspendedStart",m="suspendedYield",E="executing",w="completed",L={};function N(){}function A(){}function _(){}var k={};f(k,s,function(){return this});var g=Object.getPrototypeOf,C=g&&g(g(K([])));C&&C!==l&&c.call(C,s)&&(k=C);var S=_.prototype=N.prototype=Object.create(k);function B(x){["next","throw","return"].forEach(function(T){f(x,T,function(O){return this._invoke(T,O)})})}function M(x,T){function O(D,W,X,J){var te=h(x[D],x,W);if(te.type!=="throw"){var re=te.arg,se=re.value;return se&&o(se)=="object"&&c.call(se,"__await")?T.resolve(se.__await).then(function(ie){O("next",ie,X,J)},function(ie){O("throw",ie,X,J)}):T.resolve(se).then(function(ie){re.value=ie,X(re)},function(ie){return O("throw",ie,X,J)})}J(te.arg)}var P;d(this,"_invoke",{value:function(D,W){function X(){return new T(function(J,te){O(D,W,J,te)})}return P=P?P.then(X,X):X()}})}function U(x,T,O){var P=y;return function(D,W){if(P===E)throw new Error("Generator is already running");if(P===w){if(D==="throw")throw W;return{value:a,done:!0}}for(O.method=D,O.arg=W;;){var X=O.delegate;if(X){var J=R(X,O);if(J){if(J===L)continue;return J}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(P===y)throw P=w,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);P=E;var te=h(x,T,O);if(te.type==="normal"){if(P=O.done?w:m,te.arg===L)continue;return{value:te.arg,done:O.done}}te.type==="throw"&&(P=w,O.method="throw",O.arg=te.arg)}}}function R(x,T){var O=T.method,P=x.iterator[O];if(P===a)return T.delegate=null,O==="throw"&&x.iterator.return&&(T.method="return",T.arg=a,R(x,T),T.method==="throw")||O!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+O+"' method")),L;var D=h(P,x.iterator,T.arg);if(D.type==="throw")return T.method="throw",T.arg=D.arg,T.delegate=null,L;var W=D.arg;return W?W.done?(T[x.resultName]=W.value,T.next=x.nextLoc,T.method!=="return"&&(T.method="next",T.arg=a),T.delegate=null,L):W:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,L)}function z(x){var T={tryLoc:x[0]};1 in x&&(T.catchLoc=x[1]),2 in x&&(T.finallyLoc=x[2],T.afterLoc=x[3]),this.tryEntries.push(T)}function H(x){var T=x.completion||{};T.type="normal",delete T.arg,x.completion=T}function Y(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(z,this),this.reset(!0)}function K(x){if(x||x===""){var T=x[s];if(T)return T.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var O=-1,P=function D(){for(;++O<x.length;)if(c.call(x,O))return D.value=x[O],D.done=!1,D;return D.value=a,D.done=!0,D};return P.next=P}}throw new TypeError(o(x)+" is not iterable")}return A.prototype=_,d(S,"constructor",{value:_,configurable:!0}),d(_,"constructor",{value:A,configurable:!0}),A.displayName=f(_,u,"GeneratorFunction"),r.isGeneratorFunction=function(x){var T=typeof x=="function"&&x.constructor;return!!T&&(T===A||(T.displayName||T.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,_):(x.__proto__=_,f(x,u,"GeneratorFunction")),x.prototype=Object.create(S),x},r.awrap=function(x){return{__await:x}},B(M.prototype),f(M.prototype,p,function(){return this}),r.AsyncIterator=M,r.async=function(x,T,O,P,D){D===void 0&&(D=Promise);var W=new M(b(x,T,O,P),D);return r.isGeneratorFunction(T)?W:W.next().then(function(X){return X.done?X.value:W.next()})},B(S),f(S,u,"Generator"),f(S,s,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(x){var T=Object(x),O=[];for(var P in T)O.push(P);return O.reverse(),function D(){for(;O.length;){var W=O.pop();if(W in T)return D.value=W,D.done=!1,D}return D.done=!0,D}},r.values=K,Y.prototype={constructor:Y,reset:function(x){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(H),!x)for(var T in this)T.charAt(0)==="t"&&c.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=a)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var T=this;function O(te,re){return W.type="throw",W.arg=x,T.next=te,re&&(T.method="next",T.arg=a),!!re}for(var P=this.tryEntries.length-1;P>=0;--P){var D=this.tryEntries[P],W=D.completion;if(D.tryLoc==="root")return O("end");if(D.tryLoc<=this.prev){var X=c.call(D,"catchLoc"),J=c.call(D,"finallyLoc");if(X&&J){if(this.prev<D.catchLoc)return O(D.catchLoc,!0);if(this.prev<D.finallyLoc)return O(D.finallyLoc)}else if(X){if(this.prev<D.catchLoc)return O(D.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return O(D.finallyLoc)}}}},abrupt:function(x,T){for(var O=this.tryEntries.length-1;O>=0;--O){var P=this.tryEntries[O];if(P.tryLoc<=this.prev&&c.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var D=P;break}}D&&(x==="break"||x==="continue")&&D.tryLoc<=T&&T<=D.finallyLoc&&(D=null);var W=D?D.completion:{};return W.type=x,W.arg=T,D?(this.method="next",this.next=D.finallyLoc,L):this.complete(W)},complete:function(x,T){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&T&&(this.next=T),L},finish:function(x){for(var T=this.tryEntries.length-1;T>=0;--T){var O=this.tryEntries[T];if(O.finallyLoc===x)return this.complete(O.completion,O.afterLoc),H(O),L}},catch:function(x){for(var T=this.tryEntries.length-1;T>=0;--T){var O=this.tryEntries[T];if(O.tryLoc===x){var P=O.completion;if(P.type==="throw"){var D=P.arg;H(O)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(x,T,O){return this.delegate={iterator:K(x),resultName:T,nextLoc:O},this.method==="next"&&(this.arg=a),L}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Gn);var Lt=Gn.exports(),Tt=Lt;try{regeneratorRuntime=Lt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Lt:Function("r","regeneratorRuntime = r")(Lt)}function Wc(t){var o=function(n,a){if(Xe(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(Xe(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return Xe(o)==="symbol"?o:String(o)}function Ao(t,o,n){return(o=Wc(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Et=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 l=r.target.getBoundingClientRect(),c=l.left,d=l.top,i=function(s){var p=s.clientX,u=s.clientY,f=p-c,b=u-d;f<0&&(f=0),b<0&&(b=0),f>t.size&&(f=t.size),b>t.size&&(b=t.size);var h=f/t.size*100,y=100-b/t.size*100;n("change",h,y)};i(r),document.addEventListener("mousemove",i),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s)})}}}}),Hn=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},qc=Hn(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Yc=Hn(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ie(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))}}Ie(".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}"),Et.render=function(t,o,n,a,r,l){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"]))},[qc,Yc,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Et.__scopeId="data-v-24517fec",Et.__file="src/picker/Saturation.vue";var Bt=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 l=r.value.getContext("2d"),c=l.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"),l.fillStyle=c,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var c=l.target.getBoundingClientRect().top,d=function(i){var s=i.clientY-c;s<0&&(s=0),s>t.height&&(s=t.height);var p=-100*s/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function i(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",i)})}}}}),Kc={ref:"canvas"};Ie(".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}"),Bt.render=function(t,o,n,a,r,l){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",Kc,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Bt.__scopeId="data-v-78b9f4f0",Bt.__file="src/picker/Hue.vue";var Ot=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(),l=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"),f=2*s;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),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 i=c.createLinearGradient(0,0,0,t.height);i.addColorStop(.01,"rgba(255,255,255,0)"),i.addColorStop(.99,t.color),c.fillStyle=i,c.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(c){var d=c.target.getBoundingClientRect().top,i=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));n("change",u)};i(c),document.addEventListener("mousemove",i),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s)})}}}}),Xc={ref:"canvas"};Ie(".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}"),Ot.render=function(t,o,n,a,r,l){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",Xc,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Ot.__scopeId="data-v-24dc9656",Ot.__file="src/picker/Alpha.vue";var Vt=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")}}}}),Qc={class:"input"},Jc={class:"label"},Zc=[".value"];function mt(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 l,c,d,i,s=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(s.push(l.value),s.length!==a);p=!0);}catch(f){u=!0,c=f}finally{try{if(!p&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw c}}return s}}(t,o)||jn(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 Wn(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 ke(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Wn(Object(n),!0).forEach(function(a){Ao(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ie(".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}"),Vt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Qc,[e.createElementVNode("span",Jc,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,Zc)])},Vt.__scopeId="data-v-d52a4d02",Vt.__file="src/picker/InputValue.vue";var qn=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},Yn={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},vt=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(Yn[o]||o).concat(Yn[n]||n)},Kn=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(vt(o)).concat(vt(n)).concat(vt(a))},Qe=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)},ht=function(t,o,n){t=6*Qe(t,360),o=Qe(o,100),n=Qe(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),c=n*(1-r*o),d=n*(1-(1-r)*o),i=a%6,s=[n,c,l,l,d,n][i],p=[d,n,n,c,l,l][i],u=[l,l,d,n,n,c][i];return{r:Math.round(255*s),g:Math.round(255*p),b:Math.round(255*u)}},Xn=function(t,o,n){var a=t.h,r=t.s,l=t.v,c=t.a;if(n)switch(o){case"hsl":var d=qn(a,r/100,l/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(l),"%, ").concat(c,")");case"rgb":var i=ht(a,r,l),s=i.r,p=i.g,u=i.b;return"rgba(".concat(s,", ").concat(p,", ").concat(u,", ").concat(c,")");default:return"".concat(Kn(ht(a,r,l))).concat(vt(255*c))}else switch(o){case"hsl":var f=qn(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var b=ht(a,r,l),h=b.r,y=b.g,m=b.b;return"rgb(".concat(h,", ").concat(y,", ").concat(m,")");default:return Kn(ht(a,r,l))}},It=function(t){var o=t.r,n=t.g,a=t.b;o=Qe(o,255),n=Qe(n,255),a=Qe(a,255);var r,l=Math.max(o,n,a),c=Math.min(o,n,a),d=l,i=l-c,s=l===0?0:i/l;if(l===c)r=0;else{switch(l){case o:r=(n-a)/i+(n<a?6:0);break;case n:r=(a-o)/i+2;break;case a:r=(o-n)/i+4}r/=6}return{h:360*r,s:100*s,v:100*d}},Qn=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},Jn=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]}},No=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Lo(t,To(t),n),r=oa(a);return Xn(r,o,n)}return""},Zn=function(t){var o=mt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},ea=function(t){var o=mt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},ta=function(t){var o=mt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Lo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Zn(t),a=n.r,r=n.g,l=n.b,c=n.a;return ke(ke({},It({r:a,g:r,b:l})),{},{a:+c});case"hsv":var d=ta(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var i=ea(t),s=i.h,p=i.s,u=i.l,f=i.a;return ke(ke({},Qn({h:s,s:p,l:u})),{},{a:+f});default:var b=Jn(t),h=b.r,y=b.g,m=b.b,E=b.a;return ke(ke({},It({r:h,g:y,b:m})),{},{a:E/255})}else switch(o){case"rgb":return ke(ke({},It(Zn(t))),{},{a:1});case"hsv":var w=ta(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return ke(ke({},Qn(ea(t))),{},{a:1});default:return ke(ke({},It(Jn(t))),{},{a:1})}},To=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},oa=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}},yt=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)+"")}),l=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"):""}}),c=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var i=function(s){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*s;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,s,s),u.fillRect(s,s,s,s),p}(5);d.fillStyle=d.createPattern(i,"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:o,colorItemStyle:l}}}),ed=["draggable"];Ie(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),yt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,ed)},yt.__scopeId="data-v-02da71fd",yt.__file="src/color-item/ColorItem.vue";var Ft=e.defineComponent({name:"Colors",components:{ColorItem:yt},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 No(a,"hex",!0)})})}}}),td={class:"colors"};function na(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 Oe(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?na(Object(n),!0).forEach(function(a){Ao(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ie(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Ft.render=function(t,o,n,a,r,l){var c=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",td,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,i){return e.openBlock(),e.createBlock(c,{key:i,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===i,onClick:e.withModifiers(function(s){return t.onSelectColor(d,+i)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Ft.__scopeId="data-v-0f8b52a8",Ft.__file="src/picker/Colors.vue";var $t=e.defineComponent({name:"Picker",components:{Colors:Ft,Saturation:Et,Hue:Bt,Alpha:Ot,InputValue:Vt},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 Oe(Oe({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),c=e.ref(),d=e.ref(),i=function(){var w,L=(w=t.value)===null||w===void 0?void 0:w.trim();if(L!=null&&L!==""){var N=To(L);return oa(Lo(L,N,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=i())},{immediate:!0}),e.watch(l,function(w,L){var N="";w!=null?(N=Xn(Oe({},w),t.format,t.showAlpha),c.value=Oe({},w)):c.value=null,d.value=N;var A=i();JSON.stringify(w)!==JSON.stringify(A)&&JSON.stringify(w)!==JSON.stringify(L)&&n("change",N)},{immediate:!0});var s=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.v)||0}),f=e.computed(function(){var w,L;return((w=e.unref(l))===null||w===void 0?void 0:w.a)!=null?(L=e.unref(l))===null||L===void 0?void 0:L.a:1}),b=e.computed(function(){return ht(e.unref(s),e.unref(p),e.unref(u))}),h=e.computed(function(){return"rgb(".concat(e.unref(b).r,", ").concat(e.unref(b).g,", ").concat(e.unref(b).b,")")}),y=e.computed(function(){var w=t.format;if(t.showAlpha)switch(w){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(w){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),m=e.ref(-1),E=function(w,L,N){if(w.length!==0){var A=Lo(w,L,N),_=A.h,k=A.s,g=A.v;if(!(isNaN(_)||isNaN(k)||isNaN(g))){var C=1,S=A.a;isNaN(S)||(C=S),l.value={h:_,s:k,v:g,a:C}}}};return{h:s,s:p,v:u,a:f,rgbStr:h,onSelectSaturation:function(w,L){m.value=-1,e.unref(l)==null?l.value={h:e.unref(s),s:w,v:L,a:e.unref(f)}:l.value=Oe(Oe({},e.unref(l)),{},{s:w,v:L})},onSelectHue:function(w){m.value=-1,e.unref(l)==null&&(l.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=Oe(Oe({},e.unref(l)),{},{h:w})},onSelectAlpha:function(w){m.value=-1,e.unref(l)==null?l.value={h:e.unref(s),s:e.unref(p),v:e.unref(u),a:w}:l.value=Oe(Oe({},e.unref(l)),{},{a:w})},label:y,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){m.value=-1,d.value=w},handleChange:function(){var w,L=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(L!==""){var N=t.showAlpha,A=t.format,_=function(k,g,C){if(C)switch(g){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(k);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(k);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(k);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(k)}else switch(g){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(k);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(k);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(k);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(k)}}(L,A,N);_?E(L,A,N):e.unref(c)!=null?l.value=e.unref(c):d.value=""}else l.value=null},selectColorIndex:m,onSelectColor:function(w,L){if(m.value=L,(w=w.trim())==="")l.value=null;else{var N=To(w);N?E(w,N,!0):l.value=null}}}}}),od={class:"picker-inner"},nd={class:"picker-header"};Ie(".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}"),$t.render=function(t,o,n,a,r,l){var c=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),i=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",od,[e.createElementVNode("div",nd,[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(i,{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)},$t.__scopeId="data-v-6ceadec6",$t.__file="src/picker/Picker.vue";var Dt=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"):""}})}}}),ad=[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 aa(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 Eo(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?aa(Object(n),!0).forEach(function(a){Ao(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ie(".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}"),Dt.render=function(t,o,n,a,r,l){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(ad),4)},Dt.__scopeId="data-v-ceb1719c",Dt.__file="src/add-color-item/AddColorItem.vue";var Re=null,Je=e.defineComponent({name:"ColorPicker",components:{ColorItem:yt,Picker:$t,AddColorItem:Dt},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(R){return No(R,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var R=t.value||"",z=Array.isArray(R)?R:[R];a.value=z.map(function(H){return No(H,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),c=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var i,s,p,u,f,b,h,y=e.ref(null),m=e.ref(null),E=(i=y,s=m,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Re.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(R){var z=R.state,H=z.styles,Y=z.placement,K=H.popper;u.value=Eo(Eo(Eo({},K),p),{},{transformOrigin:Y==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(i),e.unref(s)]},function(R,z){var H,Y=mt(R,2),K=Y[0],x=Y[1],T=mt(z,2),O=T[0],P=T[1];if(K&&x&&(O!==K||P!==O)){(H=Re)===null||H===void 0||H.destroy();var D=K.$el||K,W=x.$el||x;e.nextTick(function(){Re=zc(D,W,f)})}}),e.onBeforeUnmount(function(){var R;Re&&((R=Re)===null||R===void 0||R.destroy(),Re=null)}),{instance:Re,style:u}),w=E.style,L=function(){e.unref(y)==null&&(y.value=e.unref(U)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},N=function(){l.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(),_=function(){var R=Un(Tt.mark(function z(H){var Y,K,x,T;return Tt.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(K=H.target,(x=(Y=K.dataset)===null||Y===void 0?void 0:Y.index)!=null&&x!==""){O.next=4;break}return O.abrupt("return");case 4:if(T=+x,e.unref(l)!==T){O.next=7;break}return O.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==T?(N(),b&&clearTimeout(b),b=setTimeout(function(){L(),clearTimeout(b)},100)):L(),l.value=T,y.value=K;case 10:case"end":return O.stop()}},z)}));return function(z){return R.apply(this,arguments)}}(),k=function(){var R=Un(Tt.mark(function z(H){var Y,K,x,T,O;return Tt.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(T=H.target,!(!((Y=e.unref(A))!==null&&Y!==void 0&&Y.isEqualNode(T))&&(!((K=e.unref(A))===null||K===void 0)&&K.contains(T)))){P.next=4;break}return P.abrupt("return");case 4:if(O=(x=e.unref(m))===null||x===void 0?void 0:x.$el,!(O!=null&&O.contains(T))){P.next=8;break}return P.abrupt("return");case 8:h&&clearTimeout(h),h=setTimeout(function(){e.unref(d)&&N()},0);case 10:case"end":return P.stop()}},z)}));return function(z){return R.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(L(),clearTimeout(h))});var g,C=e.ref(t.max>e.unref(a).length),S=e.computed(function(){return typeof t.popupContainer=="string"||Xe(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),B=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),M=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(m)]},function(){e.nextTick(function(){var R,z;(R=e.unref(A))===null||R===void 0||R.setAttribute("pick-colors-theme",e.unref(M)),(z=e.unref(m))===null||z===void 0||(z=z.$el)===null||z===void 0||z.setAttribute("pick-colors-theme",e.unref(M))})},{immediate:!0}),e.provide("theme",{theme:M});var U=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",k,!1),t.showPicker&&L()}),e.onUnmounted(function(){document.removeEventListener("mouseup",k,!1),b&&(clearTimeout(b),b=null),h&&(clearTimeout(h),h=null)}),{valueList:a,colorItemSelected:function(R){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===R},selectedColor:c,selectedIndex:l,isShowPicker:d,addColorItemShow:C,onPickerChange:function(R){var z=e.unref(l),H=e.unref(a).slice(),Y=e.unref(a).length;if(z!=null){z>=0?H[z]=R:(l.value=Y,H.push(R));var K="";K=Array.isArray(t.value)||t.addColor?H:R,t.value===void 0?a.value=Array.isArray(K)?K:[K]:(n("update:value",K),n("change",K,R,z)),t.addColor&&Y>=t.max&&(C.value=!1,n("overflowMax"))}},colorPicker:A,onColorClick:_,pickerRef:m,onColorItemDragStart:function(R){R.dataTransfer.effectAllowed="move";var z=R.target;g=+z.dataset.index},onColorItemDragOver:function(R){},onColorItemDrop:function(R){var z=+R.target.dataset.index,H=Hc(e.unref(a)),Y=H[g];H.splice(g,1);var K=H.slice(0,z),x=H.splice(z),T=K.concat([Y]).concat(x);n("update:value",T),n("change",T,T[g],g)},colorItemsRef:U,pickerStyle:w,values:r,teleportDisabled:B,toPopupContainer:S}}});Ie(".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)}"),Je.render=function(t,o,n,a,r,l){var c=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),i=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(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(i,{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)},Je.__scopeId="data-v-3c43ade8",Je.__file="src/ColorPicker.vue";const rd=e.defineComponent({name:"ColorPick",components:{PickColors:Je,AInput:I.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}}}}),jp="",ld={class:"color-pick"};function id(t,o,n,a,r,l){const c=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",ld,[e.createVNode(c,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=i=>t.colorValue=i)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=i=>t.colorValue=i),size:25},null,8,["value"])])}const sd=ee(rd,[["render",id],["__scopeId","data-v-e2113f43"]]),cd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Je},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{I.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Rp="",dd={class:"color-group-pick"};function pd(t,o,n,a,r,l){const c=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",dd,[e.createVNode(c,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const ud=ee(cd,[["render",pd],["__scopeId","data-v-b2be8322"]]),fd=e.defineComponent({name:"FormGroup",components:{Draggable:tt,AppstoreAddOutlined:rn,MinusCircleOutlined:Yr,PickColors:Je,InputNumber:xn,PlusCircleOutlined:Jr},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:s=>{o("change",s)}});return{myValue:n,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 f=s[0];if(Object.prototype.toString.call(f)==="[object Object]"){const b=Object.keys(f),h={};b.forEach(y=>{h[y]=""}),s.push(h)}else typeof f=="string"&&s.push(f);n.value=s}else I.message.warn("已达到最大上限")},useComponentType:s=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[s],onValueChange:(s,p,u)=>{var b;const f=(b=t.value)==null?void 0:b.slice();if(Array.isArray(f)){const h=s==null?void 0:s.target,y=(h==null?void 0:h.value)!=null?h==null?void 0:h.value:s;u?f[p][u]=y:f[p]=y,n.value=f}},onDelete:s=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){I.message.warn("已经是最后一条数据,无法删除");return}p.splice(s,1),n.value=p}},theme:"light",formatTypeValue:s=>s||"value"}}}),Up="",md={class:"form-group"},hd={class:"form-row"},yd={key:0,class:"label"},gd={key:1,class:"label"},bd={class:"icon-group"};function Cd(t,o,n,a,r,l){const c=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),i=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",md,[e.createVNode(c,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=s=>t.myValue=s),"item-key":"id"},{item:e.withCtx(({element:s,index:p})=>[e.createElementVNode("div",hd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",yd,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",gd,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:b=>t.onValueChange(b,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",bd,[(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(i,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const wd=ee(fd,[["render",Cd],["__scopeId","data-v-f0c0ab4d"]]),xd=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:I.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function _d(t,o,n,a,r,l){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 kd=ee(xd,[["render",_d]]),Sd=e.defineComponent({name:"PropsToForm",components:{Input:Ls,InputNumber:xn,RadioGroup:Vs,Select:Fs,Switch:Ps,ColorPick:sd,ColorGroupPick:ud,FormGroup:wd,Textarea:kd},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(bt),n=e.inject(Mt),a=e.inject(jt),r=e.computed(()=>{var i;return(i=e.unref(o))==null?void 0:i.type}),l=i=>{t.componentType&&t.componentType==="table"?a(i):n(i)},c=i=>{const{result:s,mapAttributeProp:p,key:u,value:f}=i;if(s==null||typeof s!="object")return;const{valueProp:b="value",changeValueEventName:h="change",events:y}=p;s[u]={...p,valueProp:b,value:f,events:{[h]:(m,E=!0)=>{l(E?{[u]:m}:{})},...y}}};return{formProps:e.computed(()=>{const i=t.props;return i==null||typeof i!="object"?{}:ae.reduce(i,(s,p,u)=>{const f=Ss[u];if(Array.isArray(f)){const b=f.find(h=>{const{onlyType:y,excludeType:m}=h;return y==null&&m==null?!0:y?De(e.unref(r),y):m?!De(e.unref(r),m):!1});b&&c({result:s,value:p,key:u,mapAttributeProp:b})}else c({result:s,value:p,key:u,mapAttributeProp:f});return s},{})}),lowerCaseIncludes:De}}}),Gp="",Ad={class:"props-to-form"},Nd={class:"label"},Ld={class:"component-wrapper"};function Td(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Ad,[(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",Nd,e.toDisplayString(c.label),1),e.createElementVNode("div",Ld,[Array.isArray(c)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c,(i,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:s,class:"component",style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.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 Ed=ee(Sd,[["render",Td],["__scopeId","data-v-c6fb2484"]]);function Bd(){return new Worker("/assets/editor.worker-02df2e61.js")}function Od(){return new Worker("/assets/json.worker-867823a6.js")}function Vd(){return new Worker("/assets/ts.worker-7254b425.js")}const vd=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(l,c){return c==="json"?new Od:c==="typescript"||c==="javascript"?new Vd:new Bd}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=ua.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(ae.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const c=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),c!=null&&a.setPosition(c)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),zp="",Id={class:"editor",ref:"dom"};function Fd(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Id,null,512)}const ra=ee(vd,[["render",Fd],["__scopeId","data-v-71e88372"]]),$d=[{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}],Dd=e.defineComponent({name:"TableColumnConfig",components:{ATable:I.Table,AModal:I.Modal,ACheckbox:I.Checkbox,AInput:I.Input,AInputNumber:I.InputNumber,ASelect:I.Select,ASelectOption:I.SelectOption,Editor:ra},setup(){const t=e.inject(ot),o=e.computed(()=>{var y;return!!((y=e.unref(t))!=null&&y.isGroupTable)}),n=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.graphicConfig)||{}}),a=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.tableColumns)||[]}),r=e.ref([]);let l=null,c="";const d=e.ref(""),i=e.ref(""),s=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var m,E,w;let y=[];if(r.value=[],!o.value)y=((m=e.unref(n))==null?void 0:m.queryColumnList)||[];else{const L=((E=e.unref(n))==null?void 0:E.rowHeaderList)||[],N=((w=e.unref(n))==null?void 0:w.indicators)||[];y=[...L,...N]}y.forEach(L=>{var A;let N=(A=e.unref(a))==null?void 0:A.find(_=>_.prop===L.name);N||(N={label:L.label,prop:L.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(N)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:$d,configData:r,editorTitle:i,editorVisible:s,optionCode:d,handleOk:()=>{l&&c&&(l[c]=d.value),d.value="",s.value=!1},renderSave:(y,m,E)=>{y&&m&&(l=y,c=m,d.value=y[m]||"",s.value=!0,i.value=E)},onEditorChange:y=>{try{d.value=y}catch(m){console.error(m)}},changeRenderBool:(y,m)=>{y.style=m.target.checked,y.style?y.renderBool===void 0&&(y.renderBool=!1):delete y.renderBool}}}}),Hp="",Pd={class:"table-column-config"};function Md(t,o,n,a,r,l){const c=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),i=e.resolveComponent("a-select-option"),s=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),b=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Pd,[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:h,text:y,record:m})=>[h.dataIndex==="style"?(e.openBlock(),e.createBlock(c,{key:0,onChange:E=>t.changeRenderBool(m,E),checked:m.style},null,8,["onChange","checked"])):h.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:m.width,"onUpdate:value":E=>m.width=E,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):h.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[m.style?(e.openBlock(),e.createBlock(d,{key:1,value:m.renderText,"onUpdate:value":E=>m.renderText=E,readOnly:!0,onClick:E=>t.renderSave(m,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):h.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[m.style?(e.openBlock(),e.createBlock(d,{key:1,value:m.headerTemplate,"onUpdate:value":E=>m.headerTemplate=E,readOnly:!0,onClick:E=>t.renderSave(m,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):h.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(s,{key:4,style:{width:"100%"},size:"small",value:m.headerAlign,"onUpdate:value":E=>m.headerAlign=E},{default:e.withCtx(()=>[e.createVNode(i,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(i,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(i,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):h.dataIndex==="align"?(e.openBlock(),e.createBlock(s,{key:5,style:{width:"100%"},size:"small",value:m.align,"onUpdate:value":E=>m.align=E},{default:e.withCtx(()=>[e.createVNode(i,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(i,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(i,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):h.dataIndex==="fixed"?(e.openBlock(),e.createBlock(s,{key:6,style:{width:"100%"},size:"small",value:m.fixed,"onUpdate:value":E=>m.fixed=E},{default:e.withCtx(()=>[e.createVNode(i,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(i,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(i,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):h.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(s,{key:7,value:m.dataFormat,"onUpdate:value":E=>m.dataFormat=E,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(i,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(i,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(i,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):h.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[m.dataFormat&&m.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:m.retentiondigit,"onUpdate:value":E=>m.retentiondigit=E,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(b,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=h=>t.editorVisible=h),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{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 jd=ee(Dd,[["render",Md],["__scopeId","data-v-afebddc0"]]),Rd=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Ed,TableColumnConfig:jd,Editor:ra,AFormItem:I.FormItem,ASelect:I.Select,ASelectOption:I.SelectOption,ACollapse:I.Collapse,ACollapsePanel:I.CollapsePanel,ASwitch:I.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(bt),r=e.inject(Fo),l=e.inject(Mt),c=e.inject(jt),d=e.inject(Io),i=A=>{l({...Po[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(()=>ks.map(A=>{const{props:_,title:k,enableProps:g,onlyType:C,excludeType:S}=A,B=[];_.forEach(R=>{typeof R=="string"&&(p.includes(R)?t.isGroupTable&&B.push(R):B.push(R))});let M,U;return t.componentType&&(C!=null&&C.includes(t.componentType))?(M=typeof g=="string"&&r.value?r.value[g]:void 0,U=ae.pick(e.unref(r),B)):(M=typeof g=="string"&&a.value?a.value[g]:void 0,U=ae.pick(e.unref(a),B)),{title:k,enableProps:M,enablePropsName:g,onlyType:C,excludeType:S,props:U}}).filter(({props:A})=>Object.keys(A).length>0)),f=(A,_)=>{const{onlyType:k,excludeType:g}=A;return k==null&&g==null?!0:k?De(_,k):g?!De(_,g):!1},b=(A,_)=>(_==null||_.stopPropagation(),A),h=(A,_)=>{_!=null&&l({[_]:A})},y=e.computed(()=>JSON.stringify(e.unref(a),null,2)),m=A=>{try{const _=JSON.parse(A||"{}");l(_,!1)}catch(_){console.error(_)}},E=e.ref(""),w=A=>{try{E.value=A}catch(_){console.error(_)}},L=(A,_)=>{try{c({[_]:A})}catch(k){console.error(k)}},N=e.computed(()=>{var A;return["customGraph"].includes((A=e.unref(a))==null?void 0:A.type)});return{type:s,handleChangeType:i,activePanel:o,tablePanel:n,ComponentString:y,updateComponentOptions:m,tableOptions:r,optionCode:E,onEditorChange:w,tableEditorChange:L,onSwitchClick:b,onSwitchChange:h,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:N}}}),Wp="",qp="",Ud={class:"style-group"};function Gd(t,o,n,a,r,l){const c=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),i=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),b=e.resolveComponent("a-collapse"),h=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Ud,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=y=>t.type=y),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(b,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=y=>t.activePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[t.isRenderForm(y,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.title?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{extra:e.withCtx(()=>[typeof y.enableProps=="boolean"?(e.openBlock(),e.createBlock(s,{key:0,checked:y.enableProps,onChange:m=>t.onSwitchChange(m,y.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:y.props,disabled:typeof y.enableProps=="boolean"?!y.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(f,{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(b,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=y=>t.tablePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[y.title&&((m=y.onlyType)!=null&&m.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:y.props,disabled:typeof y.enableProps=="boolean"?!y.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(h)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=y=>t.tableEditorChange(y,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=y=>t.tableEditorChange(y,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const zd=ee(Rd,[["render",Gd],["__scopeId","data-v-14fce418"]]),Hd=(t={})=>{const o=(c={})=>{const{label:d,name:i,location:s,show:p,indexCode:u}=c;return{label:d,columnName:i,location:s,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(c,d)=>Object.prototype.hasOwnProperty.call(c,d),a=c=>{n(c,"dataType")&&(c.fieldType==="DATE"&&(c.label=c.fieldName,c.dataType==="component"&&(c.fieldValue="${"+c.fieldValue+"}")),delete c.dataType),n(c,"activeKey")&&delete c.activeKey,n(c,"radioValue")&&delete c.radioValue},r=c=>{const d=[];return c!=null&&c.length&&c.forEach(i=>{if(i.join&&i.conditions){const s=!i.conditions.some(p=>p.join&&p.conditions);i.conditions.forEach((p,u)=>{a(p),s?u<i.conditions.length-1?d.push({join:i.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:i.join}):d.push(p)})}else a(i),d.push(i)}),d},l=(c={})=>{const{label:d,name:i,location:s,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:b,builtInValueSource:h,builtInCalcWay:y,formula:m,conditions:E,aggregate:w}=c;let L;return E&&(L=r(E)),{label:d.trim(),columnName:i,location:s,show:p,calcType:f,hrpIndexCode:u,aggregate:w,builtInFormula:b,builtInValueSource:h,builtInCalcWay:y,formula:m,conditions:L}};return async()=>{const{graphicConfig:c,type:d,request:i}=t;let{source:s,dataViewId:p,plugin:u="1",layer:f,chartType:b,classificationList:h=[],seriesList:y=[],leftAxisList:m=[],rightAxisList:E=[],queryColumnList:w=[],indicators:L=[],dataSourceId:N,idxLibMode:A,preview:_=!1}=c||{};f==null&&(De(d,"table")?f="1":f="2");let k;if(Array.isArray(h)&&h.length>0){const B=h.length;for(let M=0;M<B;M++){const U=h[M]||{},{label:R="",name:z="",show:H=!1,sort:Y,customGroup:K,conditions:x}=U;if(H||B===1){k={label:R.trim(),columnName:z,show:H,sort:Y,customGroup:K,conditions:r(x)};break}}}let g;if(Array.isArray(y)&&y.length>0){const B=y.length;for(let M=0;M<B;M++){const U=y[M]||{},{label:R="",name:z="",show:H=!1,sort:Y,customGroup:K,conditions:x}=U;if(H||B===1){g={label:R.trim(),columnName:z,show:H,sort:Y,customGroup:K,conditions:r(x)};break}}}const C=[];w==null||w.forEach(B=>{C.push(o(B))});const S=[];if(m==null||m.forEach(B=>{B.location="LEFT",S.push(l(B))}),E==null||E.forEach(B=>{B.location="RIGHT",S.push(l(B))}),L==null||L.forEach(B=>{B.location="LEFT",S.push(l(B))}),!(f==="1"&&C.length===0)&&!(f==="2"&&S.length===0))try{return await i.post("/diagram",{source:s,dataViewId:p,plugin:u,layer:f,chartType:b,classification:k,series:g,indicatorList:S,queryColumns:C,pageFlag:!0,sqlConditions:[],dataSourceId:N,idxLibMode:A,preview:_})}catch(B){console.error(B)}}},la=(t,o)=>{const n={dayjs:pe,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let c;try{c=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return c},Pt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},c=t.match(/\{(.+?)\}/g);if(c==null||c.length===0)return t;for(let d=0;d<c.length;d++){const i=c[d];let s=i.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=s.match(p);for(let f=0;f<u.length;f++){const b=u[f],h=l[b];h!=null&&(s=s.replace(b,h))}(/\(.*\)/g.test(s)||/[+/\\*]/g.test(s))&&(s=la(s,n)),t=t.replace(i,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},gt=(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 l=0;l<a;l++){const c=n[l];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,o);try{let i=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(i=la(d)),t=t.replace(c,i)}catch{t=t.replace(c,d)}}return t},Wd=(t,o,n)=>{switch(t.type){case"bar":return qd(t,o,n);case"line":return Yd(t,o,n);case"pie":return Kd(t,o,n);case"comboGraph":return Xd(t,o,n);default:return{}}},qd=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:c=[]}=o,d=e.computed(()=>{const s=c,p=s.length,u=[];for(let f=0;f<p;f++){const b={...s[f],type:"bar",barWidth:t.barWidth};t.isStack&&(b.stack="stack"),b.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(b)}return u}),i=e.computed(()=>l.map(s=>{let p={};return s&&typeof s=="object"?p={...s,textStyle:{fontSize:n}}:p={value:s,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const p=s.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let b=0;b<p;b++){const{marker:h,seriesName:y,name:m,value:E,data:w}=s[b]||{};b===0&&(u+=`${m}<br/>`),u+=Pt(f,{textData:{marker:h,name:m,value:E,a:y,b:m,c:E,...w}},{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(i),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 gt(r,s)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l: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(s){return gt(a,s)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},Yd=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:c=[]}=o,d=e.computed(()=>l.map(s=>{let p={};return s&&typeof s=="object"?p={...s,textStyle:{fontSize:n}}:p={value:s,textStyle:{fontSize:n}},p})),i=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:n},show:t.tooltipShow,formatter:s=>{const p=s.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let b=0;b<p;b++){const{marker:h,seriesName:y,name:m,value:E,data:w}=s[b]||{};b===0&&(u+=`${m}<br/>`),u+=Pt(f,{textData:{marker:h,name:m,value:E,a:y,b:m,c:E,...w}},{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 gt(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:n,color:t.yAxisLabelColor,formatter(s){return gt(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:n}},series:e.unref(i)}},Kd=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,c=t.colors;r=r.map((d,i)=>({label:l?{color:c[i]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:c,seriesName:d,name:i,value:s,percent:p,data:u}=l||{};return Pt(t.tooltipFormatter,{textData:{marker:c,name:i,value:s,percent:p,a:d,b:i,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: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:Rl(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:{}}}]}},Xd=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(i=>{let s={};return i&&typeof i=="object"?s={...i,textStyle:{fontSize:n}}:s={value:i,textStyle:{fontSize:n}},s})),c=e.computed(()=>{const i=[],s=r.length,p=t.seriesTypes;for(let u=0;u<s;u++){const f=p[u];i.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return i}),d=e.computed(()=>{const i=t.yAxis;return i==null?void 0:i.map(s=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return gt(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:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:i=>{const s=i.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let b=0;b<s;b++){const h=f[b],{tooltipFormatter:y}=h||{},{marker:m,seriesName:E,name:w,value:L,data:N}=i[b]||{};b===0&&(p+=`${w}<br/>`),p+=Pt(y||u,{textData:{marker:m,name:w,value:L,seriesName:E,a:E,b:w,c:L,...N}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),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)}},Qd=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,c=t.length,d=a.length;if(c===1){const p=[];for(let f=0;f<d;f++){const b=a[f],{label:h,value:y}=b,m={...t[0],value:t[0][y]};r.add(h),p.push(m)}const u=t[0][n]||"";l.set(u,p)}else for(let p=0;p<c;p++){const u=t[p],f=u[n];r.add(f);for(let b=0;b<d;b++){const h=a[b],{label:y,value:m}=h,E={...u,value:u[m]};if(l.has(y)){const w=l.get(y);w.push(E),l.set(y,w)}else l.set(y,[E])}}const i=Array.from(r),s=[];for(const[p,u]of l)s.push({name:p,data:u});return{dimensions:i,dataset:s}},Jd=(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 l=new Set,c=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",b=u[a]||"",h=u[r]||"";if(l.add(f),c.has(h)){const y=c.get(h);y.push({name:f,value:b,...u}),c.set(h,y)}else c.set(h,[{name:f,value:b,...u}])}const i=Array.from(l),s=[];for(const[p,u]of c)s.push({name:p,data:u});return{dimensions:i,dataset:s}},Zd=e.defineComponent({name:"ChartGraph",components:{ASpin:I.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):i),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Le);let l=null;const c=e.inject(Te)||"",d=e.inject(ge)||{},i=e.inject(bt)||{},s=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),b=e.ref(!1),h=e.computed(()=>b.value?ya:12),y=e.ref({}),m=e.ref(),E=e.computed(()=>{const C=e.unref(n.value);if((C==null?void 0:C.type)==="customGraph")return m.value;const S=Wd(C,e.unref(y),h.value);return{toolbox:{show:C.toolboxShow,left:C.toolboxLeft,top:C.toolboxTop,itemSize:C.toolboxItemSize,itemGap:C.toolboxItemGap,feature:{myDataZoom:{show:b.value?!1:C.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:C.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:C.titleText,subtext:C.titleSubtext,left:"center"},grid:{top:C.gridTop,bottom:C.gridBottom,left:C.gridLeft,right:C.gridRight,containLabel:C.gridContainLabel},color:C.colors,...S}}),w=(C=[],S,B=!1)=>{const M=B?S:null;y.value=Qd(C,M)},L=(C=[],S)=>{y.value=Jd(C,S)},N=async()=>{var C,S,B;try{const M=Hd({graphicConfig:e.unref(a.value),type:(C=e.unref(n.value))==null?void 0:C.type,request:r,indicatorToken:c});f.value=!0;const U=await M(),{columns:R=[],rows:z=[]}=((S=U==null?void 0:U.data)==null?void 0:S.data)??{};if(((B=e.unref(n.value))==null?void 0:B.type)==="pie"){let H=[];if(R.length>0){const Y=R[0],K=R[1];H=z.map(x=>({name:x[Y],value:x[K]}))}L(H)}else{let H;R.length>0&&(H={name:R[0],types:R.slice(1).map(Y=>({label:Y,value:Y}))}),w(z,H,!0)}}catch(M){console.error(M)}finally{f.value=!1}},A={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},_=()=>{e.unref(y).dataset.length===0?u.value.setOption(A):u.value.setOption(E.value)},k=()=>{e.unref(n.value).type!=="customGraph"&&N()},g=()=>{var C;(C=u.value)==null||C.resize()};return e.watch(E,()=>{_()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,C=>{try{const S=eval;m.value=S(C)}catch(S){console.error(S)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(g),l.observe(p.value)),u.value=ha.init(s.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:k}),{echartRef:s,loading:f}}}),Yp="",ep={class:"ecan-chart-graph",ref:"chartWrapRef"},tp={style:{width:"100%",height:"100%"},ref:"echartRef"};function op(t,o,n,a,r,l){const c=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",ep,[e.createVNode(c,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",tp,null,512)]),_:1},8,["spinning"])],512)}const ia=ee(Zd,[["render",op],["__scopeId","data-v-8049fed2"]]),np=e.defineComponent({name:"DataConfig",components:{DataGroup:_s,StyleGroup:zd,ChartGraph:ia,ATabs:I.Tabs,ATabPane:I.TabPane},setup(){const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(ot),r=e.inject(vo),l=e.inject(ge),c=["text","proportion","select","checkbox","radio","radar"],d=e.computed(()=>{const h=ae.cloneDeep(e.unref(a));i(h);const y=ae.pick(h,ae.without(Object.keys(h),"position","top","left","width","height"));De(h.type,c)?(y.height=h.height,y.width=h.width):y.height="290px";const m=ae.cloneDeep(e.unref(l));return m.pageMode="design",m.preview=!0,{...y,graphicConfig:m,toolboxShow:!1}});function i(h){var y,m,E,w;["#ffffff","#fff"].includes((y=h==null?void 0:h.color)==null?void 0:y.toLowerCase())&&(h.color="#000"),["#ffffff","#fff"].includes((m=h==null?void 0:h.variableColor)==null?void 0:m.toLowerCase())&&(h.variableColor="#000"),["#ffffff","#fff"].includes((E=h==null?void 0:h.increaseColor)==null?void 0:E.toLowerCase())&&(h.increaseColor="#000"),["#ffffff","#fff"].includes((w=h==null?void 0:h.declineColor)==null?void 0:w.toLowerCase())&&(h.declineColor="#000")}const s=e.computed(()=>{let h=!0;return De(e.unref(d).type,c)&&(h=!1),h}),p=e.computed(()=>{var h;return(h=e.unref(d))==null?void 0:h.type}),u=e.computed(()=>{var h;return!!((h=e.unref(d))!=null&&h.isGroupTable)}),f=h=>{const y=h==="1";y&&b(),window.changeShowTable&&window.changeShowTable(y)},b=()=>{var y;let h;r&&p.value==="table"?h=window.updateConfig:h=(y=e.unref(n))==null?void 0:y.refreshData,typeof h=="function"&&h()};return e.provide(Io,b),e.watch(l,()=>{b()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:p,isGroupTable:u,onChange:f,component:d,fullWidth:s}}}),Kp="",ap={class:"data-config"},rp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function lp(t,o,n,a,r,l){const c=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),i=e.resolveComponent("style-group"),s=e.resolveComponent("a-tabs"),p=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",ap,[e.createVNode(s,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=u=>t.activeKey=u),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(c)]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(i,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.activeKey==="1"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"?(e.openBlock(),e.createElementBlock("div",rp,null,512)):(e.openBlock(),e.createBlock(p,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"]))],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:1,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))],64)):e.createCommentVNode("",!0)])}const ip=ee(np,[["render",lp],["__scopeId","data-v-5f307467"]]),sp=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Cl,DataConfig:ip},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null}},setup(t,{expose:o}){const n=e.ref(!1),a=e.computed(()=>t.sourceType),r=e.computed(()=>t.indicatorToken||""),l=e.computed(()=>t.selectedComponent),c=e.computed(()=>{var L;return((L=e.unref(l))==null?void 0:L.tableColumns)||[]}),d=e.computed(()=>t.isShowStyleConfig);let i=e.unref(l).graphicConfig?ae.cloneDeep(e.unref(l).graphicConfig):e.ref({});i=e.ref(i);let s=e.unref(l).chartsOptions?ae.cloneDeep(e.unref(l).chartsOptions):e.ref(ae.cloneDeep(Po.line));s=e.ref(s);let p=e.unref(l).tableOptions?ae.cloneDeep(e.unref(l).tableOptions):e.ref(ae.cloneDeep(ga));p=e.ref(p);const u=e.ref([]),f=L=>{u.value=L},b=L=>{i.value={...e.unref(i),...e.unref(L)}},h=(L,N=!0)=>{N?s.value={...e.unref(s),...e.unref(L)}:s.value={...e.unref(L)}},y=L=>{p.value={...e.unref(p),...e.unref(L)}},m=()=>u,E=()=>{n.value=!0,e.unref(l).graphicConfig&&(i.value=ae.cloneDeep(e.unref(l).graphicConfig)),e.unref(l).chartsOptions&&(s.value=ae.cloneDeep(e.unref(l).chartsOptions)),e.nextTick(()=>{n.value=!1})},w=()=>({graphicConfig:e.unref(i),chartsOptions:e.unref(s),tableOptions:e.unref(p),tableColumns:e.unref(c)});return window.getIndicatorData=w,t.request&&e.provide(Le,t.request),e.provide(Vo,{setDataList:f,getDataList:m}),e.provide(ot,l),e.provide(ge,i),e.provide(bt,s),e.provide(Fo,p),e.provide(Rt,a),e.provide(vo,d),e.provide(Te,r),e.provide(Fe,b),e.provide(Mt,h),e.provide(jt,y),o({graphicConfig:i,chartsOptions:s,updateIndicatorData:E}),{isUpdate:n}}}),Xp="",cp={key:0,class:"config-modal"},dp={class:"config-modal-left"},pp={class:"config-modal-right"};function up(t,o,n,a,r,l){const c=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",cp,[e.createElementVNode("div",dp,[e.createVNode(c)]),e.createElementVNode("div",pp,[e.createVNode(d)])]))}const sa=Oo(ee(sp,[["render",up],["__scopeId","data-v-b0bc9a3c"]])),ca=Oo(ia),da=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:ca,EcanIndicatorLibrary:sa},Symbol.toStringTag,{value:"Module"})),fp={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(da).forEach(a=>{const r=da[a];r.install&&t.use(r)})}};de.EcanChartGraph=ca,de.EcanIndicatorLibrary=sa,de.default=fp,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,ro=!1,or=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nr;e.nextTick(function(){ro||(typeof window<"u"&&window.document&&window.document.documentElement&&Ja(n,{prepend:!0}),ro=!0)})},ar=["icon","primaryColor","secondaryColor"];function rr(t,n){if(t==null)return{};var o=lr(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function lr(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}function St(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){ir(t,r,o[r])})}return t}function ir(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var it={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function sr(t){var n=t.primaryColor,o=t.secondaryColor;it.primaryColor=n,it.secondaryColor=o||oo(n),it.calculated=!!o}function cr(){return St({},it)}var He=function(n,o){var a=St({},n,o.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=rr(a,ar),s=it;if(l&&(s={primaryColor:l,secondaryColor:i||oo(l)}),or(),tr(no(r),"icon should be icon definiton, but got ".concat(r)),!no(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=St({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),en(c.icon,"svg-".concat(c.name),St({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};He.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},He.inheritAttrs=!1,He.displayName="IconBase",He.getTwoToneColors=cr,He.setTwoToneColors=sr;const tn=He;function dr(t,n){return mr(t)||fr(t,n)||ur(t,n)||pr()}function pr(){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 ur(t,n){if(t){if(typeof t=="string")return lo(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 lo(t,n)}}function lo(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 fr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function mr(t){if(Array.isArray(t))return t}function io(t){var n=ao(t),o=dr(n,2),a=o[0],r=o[1];return tn.setTwoToneColors({primaryColor:a,secondaryColor:r})}function hr(){var t=tn.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var yr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function gr(t,n){return xr(t)||wr(t,n)||Cr(t,n)||br()}function br(){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 Cr(t,n){if(t){if(typeof t=="string")return so(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 so(t,n)}}function so(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 wr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function xr(t){if(Array.isArray(t))return t}function co(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){nn(t,r,o[r])})}return t}function nn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function _r(t,n){if(t==null)return{};var o=kr(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function kr(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}io("#1890ff");var We=function(n,o){var a,r=co({},n,o.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=_r(r,yr),h=(a={anticon:!0},nn(a,"anticon-".concat(i.name),!!i.name),nn(a,l,l),a),w=d===""||d||i.name==="loading"?"anticon-spin":"",m=c;m===void 0&&u&&(m=-1,f.tabindex=m);var C=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,g=ao(p),x=gr(g,2),B=x[0],L=x[1];return e.createVNode("span",co({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(tn,{class:w,icon:i,primaryColor:B,secondaryColor:L,style:C},null)])};We.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},We.displayName="AntdIcon",We.inheritAttrs=!1,We.getTwoToneColor=hr,We.setTwoToneColor=io;const ye=We;var Sr={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 Ar=Sr;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){Nr(t,r,o[r])})}return t}function Nr(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=po({},n,o.attrs);return e.createVNode(ye,po({},a,{icon:Ar}),null)};on.displayName="AppstoreAddOutlined",on.inheritAttrs=!1;const uo=on;var Lr={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 Tr=Lr;function fo(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){Er(t,r,o[r])})}return t}function Er(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var an=function(n,o){var a=fo({},n,o.attrs);return e.createVNode(ye,fo({},a,{icon:Tr}),null)};an.displayName="CaretDownOutlined",an.inheritAttrs=!1;const Br=an;var Or={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 Vr=Or;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){Ir(t,r,o[r])})}return t}function Ir(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=mo({},n,o.attrs);return e.createVNode(ye,mo({},a,{icon:Vr}),null)};rn.displayName="CaretRightOutlined",rn.inheritAttrs=!1;const vr=rn;var $r={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 Fr=$r;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){Dr(t,r,o[r])})}return t}function Dr(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=ho({},n,o.attrs);return e.createVNode(ye,ho({},a,{icon:Fr}),null)};ln.displayName="CloseOutlined",ln.inheritAttrs=!1;const sn=ln;var Pr={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 Mr=Pr;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){jr(t,r,o[r])})}return t}function jr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var cn=function(n,o){var a=yo({},n,o.attrs);return e.createVNode(ye,yo({},a,{icon:Mr}),null)};cn.displayName="CopyOutlined",cn.inheritAttrs=!1;const Rr=cn;var Ur={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 Gr=Ur;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){zr(t,r,o[r])})}return t}function zr(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=go({},n,o.attrs);return e.createVNode(ye,go({},a,{icon:Gr}),null)};dn.displayName="DeleteOutlined",dn.inheritAttrs=!1;const Hr=dn;var Wr={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 qr=Wr;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){Yr(t,r,o[r])})}return t}function Yr(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=bo({},n,o.attrs);return e.createVNode(ye,bo({},a,{icon:qr}),null)};pn.displayName="DoubleRightOutlined",pn.inheritAttrs=!1;const Kr=pn;var Xr={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 Qr=Xr;function Co(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){Jr(t,r,o[r])})}return t}function Jr(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=Co({},n,o.attrs);return e.createVNode(ye,Co({},a,{icon:Qr}),null)};un.displayName="DownOutlined",un.inheritAttrs=!1;const Zr=un;var el={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 tl=el;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){nl(t,r,o[r])})}return t}function nl(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=wo({},n,o.attrs);return e.createVNode(ye,wo({},a,{icon:tl}),null)};fn.displayName="MinusCircleOutlined",fn.inheritAttrs=!1;const ol=fn;var al={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 rl=al;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){ll(t,r,o[r])})}return t}function ll(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=xo({},n,o.attrs);return e.createVNode(ye,xo({},a,{icon:rl}),null)};mn.displayName="PlusCircleOutlined",mn.inheritAttrs=!1;const il=mn;var sl={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 cl=sl;function _o(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 hn=function(n,o){var a=_o({},n,o.attrs);return e.createVNode(ye,_o({},a,{icon:cl}),null)};hn.displayName="PlusOutlined",hn.inheritAttrs=!1;const pl=hn;var ul={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 fl=ul;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){ml(t,r,o[r])})}return t}function ml(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var yn=function(n,o){var a=ko({},n,o.attrs);return e.createVNode(ye,ko({},a,{icon:fl}),null)};yn.displayName="SettingOutlined",yn.inheritAttrs=!1;const hl=yn,yl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:vr,CaretDownOutlined:Br,AInputSearch:P.InputSearch,ASpin:P.Spin,APagination:P.Pagination,Draggable:at},setup(){var L;const t=(L=window==null?void 0:window.config)==null?void 0:L.pageId,n=e.inject(Se),o=e.unref(e.inject(Ae)),a=e.inject(De),r=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.graphicConfig}),l=e.computed(()=>{var E;return(E=e.unref(r))==null?void 0:E.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const E={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const k=await n.post(`${xe}/diagram/sourceList`,E,{headers:{Authentication:o,operateContext:"ygt"}});d.value=!1;const{success:O,data:b={}}=k.data;if(O){const{rows:y=[],total:S=0}=b;y==null||y.forEach(T=>{var I;T.show=!1,(I=T.dataViewColumns)==null||I.forEach(F=>{F.show=!0,F.edit=!1,F.title&&(F.label=F.title)})}),i.value=y,s.totalResult=+S}}catch{d.value=!1}},u=E=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[E],f=E=>{i.value[E].show=!i.value[E].show},h=()=>{s.currentPage=1,p()},w=te.debounce(()=>{s.currentPage=1,p()},200),m=(E,k)=>{s.pageSize=k,s.currentPage=E,p()};e.onMounted(()=>{p()});const C=e.inject(de),g=e.computed(()=>{const E=["classificationList","rowHeaderList"];let k=[];for(const O in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),O)&&E.includes(O)){const b=e.unref(C)[O];Array.isArray(b)&&(k=k.concat(b))}return k});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:w,onPaginationChange:m,searchText:c,setItemDisabled:(E=[])=>{let k=!1;for(const O of e.unref(g))if(!E.find(y=>y.typeGuid===O.typeGuid)){k=!0;break}return k},onDragStart:(E,k)=>{const O=k[E.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),zp="",gl={class:"data-source-list"},bl={class:"columns"},Cl={class:"column-item"},wl=["onClick"],xl={key:0},_l={class:"column-child-item"},kl={class:"column-child-item-name"};function Sl(t,n,o,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=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",gl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",bl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Cl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,wl)]),f.show?(e.openBlock(),e.createElementBlock("div",xl,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":w=>f.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:w=>t.onDragStart(w,f.dataViewColumns)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",_l,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",kl,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":n[1]||(n[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Al=J(yl,[["render",Sl],["__scopeId","data-v-b23ce142"]]),Nl=e.defineComponent({name:"DataList",components:{DataSourceList:Al,DataViewList:Ia},setup(){return{source:e.inject(zt)}}});function Ll(t,n,o,a,r,l){const i=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(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Tl=J(Nl,[["render",Ll]]),So={mounted(t){t.focus()}},El=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:at,AModal:P.Modal,AButton:P.Button},setup(t,{expose:n}){var B;const o=(B=window==null?void 0:window.config)==null?void 0:B.pageId,a=e.inject(Se),r=e.unref(e.inject(Ae)),l=e.inject(de),i=e.inject(Be),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const L=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:k=[]}=L.data;E&&(c.value=k==null?void 0:k.slice(0,200))}catch(L){console.error(L)}},u=()=>{var b;const L=((b=e.unref(l)[t.type])==null?void 0:b.slice())||[],E=L[t.index],{label:k,name:O}=t.item;E.sort={label:k,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:L})};let f=!1;const h=()=>{f=!0},w=e.ref(!1),m=()=>{w.value=!0},C=()=>{w.value=!1},g=()=>{f&&u(),f=!1,C()};return n({showModal:m}),e.watch(w,L=>{var E,k;if(L){const O=(k=(E=t.item)==null?void 0:E.sort)==null?void 0:k.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!L)},{flush:"post"}),{visible:w,onCancel:g,customSortList:c,onChange:h,onDeleteConfig:()=>{var b;const L=((b=e.unref(l)[t.type])==null?void 0:b.slice())||[],E=L[t.index],{label:k,name:O}=t.item;E.sort={label:k,columnName:O},i({[t.type]:L}),C()}}}}),Hp="",Bl={class:"button-wrapper"},Ol={class:"sort-item"};function Vl(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{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",Bl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[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",Ol,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Il=J(El,[["render",Vl],["__scopeId","data-v-8e16d201"]]),vl=e.defineComponent({name:"CustomGroupModal",directives:{focus:So},components:{CloseOutlined:sn,AModal:P.Modal,ASelect:P.Select,ASelectOption:P.SelectOption,AButton:P.Button,AInput:P.Input,ACheckbox:P.Checkbox,ACollapse:P.Collapse,ACollapsePanel:P.CollapsePanel,ATag:P.Tag,ACheckableTag:P.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){var z;const o=e.inject(Se),a=(z=window==null?void 0:window.config)==null?void 0:z.pageId,r=e.unref(e.inject(Ae));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const _=e.unref(c).map(A=>A.title);return new Set(_)}),u=e.ref([]);e.watch(()=>e.unref(c).length,_=>{u.value=new Array(_).fill(!1)});const f=e.computed(()=>{let _=0;return e.unref(c).forEach(A=>{var v;(v=A.data)==null||v.forEach(U=>{U.checked&&_++})}),_}),h=()=>{const _=e.unref(d);if(!_){P.message.error("创建分组名不能空");return}e.unref(p).has(_)?P.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:_,data:[]}),l=!0)},w=_=>{e.unref(c).splice(_,1),l=!0},m=e.ref(null),C=()=>{if(e.unref(f)===0){P.message.error("当前移入分组已选个数为0");return}const _=e.unref(m);if(_==null){P.message.error("请选择移入分组");return}if(!e.unref(c)[_]){P.message.error("移入分组不存在,请重新选择");return}const A=[],v=e.unref(c).length;for(let U=0;U<v;U++){const R=e.unref(c)[U];e.unref(c)[U].data=R.data.filter(Y=>(Y.checked&&A.push({...Y,checked:!1}),!Y.checked))}e.unref(c)[_].data=[...A,...e.unref(c)[_].data],l=!0},g=_=>{e.unref(u)[_]=!0},x=_=>{e.unref(u)[_]=!1},B=(_,A)=>{const v=_.target.value;e.unref(p).has(v)&&P.message.error("组名不能相同,请修改"),e.unref(c)[A].title=v,l=!0},L=e.inject(de),E=e.inject(Be),k=e.computed(()=>e.unref(L).source),O=e.computed(()=>e.unref(L).dataViewId),b=e.ref(!1),y=()=>{var X,Z;const _=e.unref(c);let A="";e.unref(b)&&(A=(X=_[0])==null?void 0:X.title);const v=_==null?void 0:_.length,U={};for(let ee=1;ee<v;ee++){const oe=_[ee]||{},{title:ie,data:le}=oe;U[ie]=(le==null?void 0:le.map(ke=>ke.label))||[]}const R=((Z=e.unref(L)[t.type])==null?void 0:Z.slice())||[],Y=R[t.index];Y.customGroup={groupInfoMap:U,otherGroupName:A},E({[t.type]:R})},S=e.ref(!1),T=()=>{S.value=!0},I=()=>{S.value=!1},F=()=>{I(),l&&y(),l=!1},$=()=>{l=!0},M=new Set,j=async()=>{const _=t.item.customGroup||{},A=_.otherGroupName,v=_.groupInfoMap;(A===""||A==null)&&(b.value=!1),e.unref(c)[0]={title:A||"未分组",data:[]};let U=1;for(const R in v)if(Object.prototype.hasOwnProperty.call(v,R)){const X=v[R].map(Z=>(M.add(Z),{label:Z,checked:!1}));e.unref(c)[U]={title:R,data:X},U++}await H()},H=async()=>{var _;try{const A=await o.post(`${xe}/diagram/groupvalue`,{source:e.unref(k),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:v,data:U=[]}=A.data;if(v){const R=[];(_=U==null?void 0:U.slice(0,200))==null||_.forEach(Y=>{M.has(Y)||R.push({label:Y,checked:!1})}),e.unref(c)[0].data=R}}catch(A){console.error(A)}};return e.watch(S,_=>{_&&j(),window.changeShowTable&&window.changeShowTable(!_)},{flush:"post"}),n({showModal:T}),{visible:S,title:i,activeKey:s,customGroupList:c,onCancel:F,useOtherGroup:b,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:w,onMoveInGroup:C,selectGroupIndex:m,onEditTitle:g,onTitleChange:B,onFinishEditTitle:x,onUseOtherGroup:$,customGroupEditTitleList:u}}}),Wp="",qp="",$l={class:"custom-group-header"},Fl={class:"move-and-create"},Dl={class:"select-tip"},Pl={class:"select-count"},Ml={class:"create-group"},jl={class:"custom-group-content"},Rl=["onClick"],Ul={class:"extra"},Gl={class:"custom-group-list"},zl={class:"text"};function Hl(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("a-collapse"),C=e.resolveComponent("a-modal"),g=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",$l,[e.createElementVNode("div",Fl,[e.createElementVNode("div",null,[e.createElementVNode("span",Dl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Pl,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[0]=x=>t.selectGroupIndex=x),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,B)=>(e.openBlock(),e.createBlock(i,{key:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ml,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[1]=x=>t.createGroupTitle=x),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":n[2]||(n[2]=x=>t.useOtherGroup=x),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",jl,[e.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=x=>t.activeKey=x),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,B)=>(e.openBlock(),e.createBlock(w,{key:B},{header:e.withCtx(()=>[t.customGroupEditTitleList[B]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:x.title,size:"small",onChange:L=>t.onTitleChange(L,B),onBlur:L=>t.onFinishEditTitle(B),onPressEnter:L=>t.onFinishEditTitle(B)},null,8,["value","onChange","onBlur","onPressEnter"])),[[g]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(L=>t.onEditTitle(B),["prevent","stop"])},e.toDisplayString(x.title),9,Rl))]),extra:e.withCtx(()=>[e.createElementVNode("div",Ul,[B===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),B!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(L=>t.onDeleteGroup(B),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.data,(L,E)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:L.checked,"onUpdate:checked":k=>L.checked=k,class:"custom-group",key:E},{default:e.withCtx(()=>[e.createElementVNode("span",zl,e.toDisplayString(L.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Wl=J(vl,[["render",Hl],["__scopeId","data-v-7e3049d2"]]);var ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gn={},Yl={get exports(){return gn},set exports(t){gn=t}};(function(t,n){(function(o,a){t.exports=a()})(ql,function(){var o="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,o):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(o).startOf("day"):this.month(3*h+2).endOf(o).endOf("day")}return s.bind(this)(c,p)}}})})(Yl);const Kl=gn;ae.extend(Kl);const Xl=e.defineComponent({name:"Condition",components:{CloseOutlined:sn,DownOutlined:Zr,AppstoreAddOutlined:uo,ASelect:P.Select,AInput:P.Input,ADatePicker:P.DatePicker,AButton:P.Button,ADropdown:P.Dropdown,AMenu:P.Menu,AMenuItem:P.MenuItem,ASubMenu:P.SubMenu,APopover:P.Popover,ATabs:P.Tabs,ATabPane:P.TabPane,ARadioGroup:P.RadioGroup,ARadio:P.Radio,AInputNumber:P.InputNumber,ASelectOption:P.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var ee,oe,ie,le,ke,Ue,Ge,et,tt,ve,ze,nt,G;const n=(ee=window==null?void 0:window.config)==null?void 0:ee.pageId,o=e.inject(de),a=e.inject(Se),r=e.unref(e.inject(Ae)),l=e.inject(Un),i=e.inject(Pe),d=e.computed(()=>{var V;const N=[];return(V=e.unref(i))==null||V.forEach(D=>{const{keyName:W="",id:q="",type:K}=D;K==="ecanRangePicker"?N.push({id:q,label:`${W||q}-开始时间值`,value:`${W||q}-startTime`},{id:q,label:`${W||q}-结束时间值`,value:`${W||q}-endTime`}):N.push({id:q,label:`${W||q}`,value:`${W||q}`})}),N}),s=e.computed(()=>{var N;return(N=e.unref(o))==null?void 0:N.dataViewId}),c=e.computed(()=>{var N;return(N=e.unref(o))==null?void 0:N.source}),p=e.ref(!1),u={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},f=[{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"}],h=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"}],m=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],C=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],g=e.ref({fieldName:(oe=t.data)==null?void 0:oe.fieldName,fieldType:(ie=t.data)==null?void 0:ie.fieldType,rule:(le=t.data)==null?void 0:le.rule,id:(ke=t.data)==null?void 0:ke.id,fieldValue:((Ue=t.data)==null?void 0:Ue.fieldType)==="DATE"&&((Ge=t.data)==null?void 0:Ge.dataType)==="time"?ae((et=t.data)==null?void 0:et.fieldValue):(tt=t.data)==null?void 0:tt.fieldValue,label:(ve=t.data)==null?void 0:ve.label,targetSource:"",typeGuid:(ze=t.data)==null?void 0:ze.typeGuid,dataType:((nt=t.data)==null?void 0:nt.dataType)||"",componentId:((G=t.data)==null?void 0:G.componentId)||""}),x=e.ref(!1),B=e.computed(()=>g.value.fieldType==="DATE"),L=e.computed(()=>{const N=t.type;let V=[];if(["classificationList","seriesList","rowHeaderList"].includes(N)){let D=[];for(const W in e.unref(o))if(Object.prototype.hasOwnProperty.call(e.unref(o),W)&&!["controlList","sqlConditions"].includes(W)){const q=e.unref(o)[W];Array.isArray(q)&&(["classificationList","seriesList","rowHeaderList"].includes(W)?D=D.concat(q.filter(K=>K.show)):D=D.concat(q))}V=D}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(N)&&(V=e.unref(l));return V.map(D=>({...D,label:D.title||D.label,value:D.name}))}),{updateCondition:E,deleteCondition:k}=e.inject(Rn,{updateCondition:(N,V,D)=>{},deleteCondition:(N,V)=>{}}),O=()=>{k(t.level,t.index)};e.watch(g,N=>{const V=te.cloneDeep(N);N.fieldType==="DATE"&&N.dataType!=="component"&&N.fieldValue&&(V.fieldValue=N.fieldValue.format(N.dateFormat)),E(V,t.level,t.index)},{deep:!0});const b=N=>{const V=e.unref(L).find(ce=>ce.value===N)||{},{name:D,genericType:W,id:q,label:K,typeGuid:ne}=V;g.value={id:q,fieldName:D,fieldType:W,label:K,rule:"",fieldValue:W==="DATE"?null:void 0,targetSource:"",typeGuid:ne,dataType:""}},y=N=>{const V=e.unref(d).find(D=>D.value===N)||{};e.unref(g).componentId=V.id||""},S=e.computed(()=>{const N=e.unref(g).fieldType;return N==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:N==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:N==="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"}]:[]}),T=e.computed(()=>{let N="";const V=e.unref(S).find(D=>D.value===e.unref(g).rule);return V&&(N=V.label),N}),I=e.computed(()=>{let N={fontSize:"12px"};return e.unref(T)||(N={...N,position:"absolute",right:"11px",top:"9px"}),N}),F=e.ref([]),$=async()=>{var N;if(!(e.unref(F).length>0))try{const V=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(g).fieldName,hrpIndexTypeGuid:e.unref(g).typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:D,data:W=[]}=V.data;D&&(F.value=(N=W==null?void 0:W.slice(0,200))==null?void 0:N.map(q=>({label:q,value:q})))}catch(V){console.error(V)}},M=N=>{e.unref(g).rule=N,e.unref(g).fieldValue=e.unref(g).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(N)&&$()},j=N=>{e.unref(g).dataType=N,e.unref(g).fieldValue=""},H=e.ref(),z=N=>{H.value=N,e.unref(g).fieldValue=(N==null?void 0:N.join(","))||""},_=N=>{const{keyPath:V}=N;e.unref(g).rule=V[0],e.unref(g).dataType=V[1],e.unref(g).dateFormat=V[2],e.unref(g).fieldValue=""};e.onMounted(()=>{var W,q,K,ne,ce,Q,re,ot,ba;if(g.value.dataType=((W=t.data)==null?void 0:W.dataType)||"",g.value.componentId=((q=t.data)==null?void 0:q.componentId)||"",e.unref(g).fieldType==="DATE"){e.unref(g).dateFormat=(K=t.data)==null?void 0:K.dateFormat,e.unref(g).activeKey=(ne=t.data)==null?void 0:ne.activeKey,e.unref(g).radioValue=((ce=t.data)==null?void 0:ce.radioValue)||"",e.unref(g).calcWays=((Q=t.data)==null?void 0:Q.calcWays)||[],e.unref(g).dateCalcTypes=((re=t.data)==null?void 0:re.dateCalcTypes)||[];const Ca=e.unref(h).find(Ip=>{var wa;return Ip.key===((wa=t.data)==null?void 0:wa.activeKey)});Ca&&X(Ca,t.data)}else H.value=((ba=(ot=t.data)==null?void 0:ot.fieldValue)==null?void 0:ba.split(","))||[];const{fieldType:N,fieldName:V,rule:D}=g.value;N!=="DATE"&&V&&D&&["IN","NOT_IN"].includes(D)&&$()});const A=N=>{if(e.unref(g).activeKey===N){e.unref(h)[N].radioValue=e.unref(g).radioValue,e.unref(h)[e.unref(g).activeKey]&&(e.unref(h)[e.unref(g).activeKey].radioValue=e.unref(g).radioValue,e.unref(g).radioValue==="1"?e.unref(h)[N].beforeNum=e.unref(g).calcWays[0]:e.unref(g).radioValue==="2"&&(e.unref(h)[N].afterNum=e.unref(g).calcWays[0]));return}e.unref(h).forEach(V=>{V.beforeNum=0,V.afterNum=0,V.radioValue="1",V.value=""})},v=(N,V)=>{p.value=!0;const D=N.target.value,W=V.type,q=e.unref(g).dateFormat,K=Math.abs(V.beforeNum),ne=V.afterNum;V.value=Z(D,W,q,K,ne)},U=N=>{const V=e.unref(g).activeKey;if(N!==V)return;let D="";V===0?D="years":V===1?D="quarters":V===2?D="months":V===3?D="weeks":V===4&&(D="days");const W=e.unref(g).dateFormat,q=e.unref(g).radioValue;let K=0,ne=0;return q==="1"?K=Math.abs(e.unref(g).calcWays[0]):q==="2"&&(ne=e.unref(g).calcWays[0]),Z(q,D,W,K,ne)},R=(N,V,D,W)=>{if(p.value=!0,V.radioValue===W){const q=N.target.value;D==="+"?V.value=ae().add(q,V.type).format(e.unref(g).dateFormat):V.value=ae().subtract(q,V.type).format(e.unref(g).dateFormat)}},Y=(N,V)=>{(e.unref(g).fieldType!=="DATE"||e.unref(g).dataType!=="component")&&(g.value.fieldValue=ae(N.value,e.unref(g).dateFormat)),e.unref(g).calcWays||(e.unref(g).calcWays=[]),e.unref(g).activeKey=V,e.unref(g).radioValue=N.radioValue,N.radioValue==="1"?e.unref(g).calcWays[0]="-"+N.beforeNum:N.radioValue==="2"?e.unref(g).calcWays[0]=N.afterNum:N.radioValue==="3"?V===4?e.unref(g).calcWays[0]="0":e.unref(g).calcWays[0]="BEGIN":N.radioValue==="4"&&(e.unref(g).calcWays[0]="END"),V===0?e.unref(g).dateCalcTypes=["YEAR"]:V===1?e.unref(g).dateCalcTypes=["QUARTER"]:V===2?e.unref(g).dateCalcTypes=["MONTH"]:V===3?e.unref(g).dateCalcTypes=["WEEK"]:V===4&&(e.unref(g).dateCalcTypes=["DAY"]),x.value=!1};function X(N,V){const{radioValue:D="",calcWays:W=[]}=V;N.radioValue=D,W!=null&&W.length&&(D==="1"?N.beforeNum=Math.abs(W[0]):D==="2"&&(N.afterNum=W[0]))}function Z(N,V,D,W,q){if(N==="1")return ae().subtract(W,V).format(D);if(N==="2")return ae().add(q,V).format(D);if(N==="3"){if(V==="years")return ae().startOf("year").format(D);if(V==="quarters")return ae().startOf("quarter").format(D);if(V==="months")return ae().startOf("month").format(D);if(V==="days")return ae().format(D)}else if(N==="4"){if(V==="years")return ae().endOf("year").format(D);if(V==="quarters")return ae().endOf("quarter").format(D);if(V==="months")return ae().endOf("month").format(D)}return""}return{fieldOptions:L,ruleOptions:S,onFieldChange:b,condition:g,valueOptions:F,onRuleChange:M,onDataTypeChange:j,onFieldValueSelectChange:z,fieldValues:H,onDelete:O,isDateType:B,formatList:f,tabDateList:h,compareList:w,menuRule:m,dateBtnLabel:T,downIconStyle:I,popoverVisible:x,dateRadioStyle:u,showTime:p,controlList:d,dataTypeList:C,handleMenuClick:_,changeTabInitDate:A,changeRadioValue:v,getFieldValue:U,blurCompare:R,okDatePickConfig:Y,onChangeComponent:y}}}),Yp="",Kp="",Ql={class:"condition"},Jl=["title"],Zl={class:"rule"},ei={class:"data-type"},ti={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},ni={class:"popover-content-wrap"},oi={class:"tabFilterRadio"},ai={key:0},ri={key:1},li={style:{"margin-left":"10px"}},ii={style:{"margin-left":"10px"}},si={style:{position:"absolute",bottom:"10px"}};function ci(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),m=e.resolveComponent("a-input-number"),C=e.resolveComponent("a-radio"),g=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),B=e.resolveComponent("a-tabs"),L=e.resolveComponent("appstore-add-outlined"),E=e.resolveComponent("a-popover"),k=e.resolveComponent("a-input"),O=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ql,[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,y)=>(e.openBlock(),e.createBlock(i,{key:y,value:b.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:b.label},e.toDisplayString(b.label),9,Jl)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Zl,[t.isDateType?(e.openBlock(),e.createBlock(h,{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,y=>{var S;return e.openBlock(),e.createBlock(c,{key:y.value,disabled:y.value==="component"&&!((S=t.controlList)!=null&&S.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===b.value&&t.condition.dataType===y.value?"color: #1890FF;":"")},e.toDisplayString(y.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,T=>(e.openBlock(),e.createBlock(s,{key:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===b.value&&t.condition.dataType===y.value&&t.condition.dateFormat===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,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",ei,[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,y)=>(e.openBlock(),e.createBlock(i,{key:y,value:b.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",ti,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(w,{key:0,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"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[1]||(n[1]=b=>t.condition.fieldValue=b),options:t.controlList,onChange:t.onChangeComponent},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(E,{visible:t.popoverVisible,"onUpdate:visible":n[4]||(n[4]=b=>t.popoverVisible=b),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",ni,[e.createVNode(B,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(b,y)=>(e.openBlock(),e.createBlock(x,{key:y,tab:b.label},{default:e.withCtx(()=>[e.createElementVNode("div",oi,[e.createVNode(g,{value:b.radioValue,"onUpdate:value":S=>b.radioValue=S,onChange:S=>t.changeRadioValue(S,b)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ai,"相对当前时间:"+e.toDisplayString(b.value),1)):(e.openBlock(),e.createElementBlock("div",ri,"相对当前时间:"+e.toDisplayString(t.getFieldValue(y)),1)),e.createVNode(C,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(m,{value:b.beforeNum,"onUpdate:value":S=>b.beforeNum=S,min:0,onBlur:S=>t.blurCompare(S,b,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",li,e.toDisplayString(b.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(C,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(m,{value:b.afterNum,"onUpdate:value":S=>b.afterNum=S,min:0,onBlur:S=>t.blurCompare(S,b,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ii,e.toDisplayString(b.afterLabel),1)]),_:2},1032,["style"]),b.beforeText?(e.openBlock(),e.createBlock(C,{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(C,{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",si,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:n[2]||(n[2]=S=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:S=>t.okDatePickConfig(b,y)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:n[3]||(n[3]=b=>{t.popoverVisible=!0})},[e.createVNode(L)])]),_: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"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[5]||(n[5]=b=>t.condition.fieldValue=b),options:t.controlList,onChange:t.onChangeComponent},null,8,["value","options","onChange"])):(e.openBlock(),e.createBlock(k,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[6]||(n[6]=b=>t.condition.fieldValue=b)},null,8,["value"])),e.createVNode(O,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const di=J(Xl,[["render",ci],["__scopeId","data-v-af19bca8"]]),pi=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:di}}),Xp="",ui={key:0,class:"condition-list"},fi={key:0,class:"condition-container"},mi={key:0,class:"condition-text"},hi={key:1,class:"condition-text"},yi={class:"conditions"};function gi(t,n,o,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",fi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",mi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",hi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",yi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:Math.random(),data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const bi=J(pi,[["render",gi],["__scopeId","data-v-8f9eae92"]]),Ci=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:P.Select,AInput:P.Input,AInputNumber:P.InputNumber},setup(t,{emit:n}){const o=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&n("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=te.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:o,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Qp="",Ao=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),wi={class:"truncations"},xi={class:"rule"},_i={class:"field-value"},ki={class:"field-value"},Si=Ao(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ai=Ao(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ni=["onClick"];function Li(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",wi,[(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",xi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",_i,[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",ki,[Si,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ai]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ni)]))),128))])}const Ti=J(Ci,[["render",Li],["__scopeId","data-v-f543c690"]]),Ne=(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},Ei=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),bn=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),At=t=>{const n=[];for(const o of t)o.conditions?n.push(...At(o.conditions)):(o==null?void 0:o.dataType)==="component"&&n.push(o);return n},No=(t,n)=>{var m;const{controlList:o=[],classificationList:a=[],rowHeaderList:r=[],seriesList:l=[],leftAxisList:i=[],rightAxisList:d=[],queryColumnList:s=[],indicators:c=[]}=t,p=[],u=[...a,...r,...l,...i,...d,...s,...c],f=[];for(const C of u){const g=At((C==null?void 0:C.conditions)||[]);g!=null&&g.length&&f.push(...g.filter(x=>n.find(L=>L.id===x.componentId)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const B=n.find(L=>L.id===x.componentId);return{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:B.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0}}))}const h=o.concat(f),w=h.length;for(let C=0;C<w;C++){const g=h[C];if(g&&!((m=Object.keys(g))!=null&&m.length))continue;const{id:x,keyName:B,conditionLabel:L,conditionKey:E,conditionValueType:k,prop:O,rule:b="NONE",notGlobal:y=!1}=g;let S=B||x;S&&O&&(S+=`-${O}`);const T=n.find(z=>z.id===x),I={rule:b,label:L,fieldName:E,fieldValue:"",valueType:k,alias:S,globalCondition:!y},{value:F,format:$="YYYY-MM-DD",operate:M,type:j="",useCurrentTime:H}=T||{};if(Ne(j,"date")){let z;if(H?z=ae():z=ae(F),M&&F){const{mode:_,type:A,value:v}=M;if(v)switch(A){case"add":z=z.add(v,_);break;case"minus":z=z.subtract(v,_);break}}I.fieldValue=(z==null?void 0:z.format($))||"",I.dateFormat=$}else if(j==="ecanRangePicker"&&O){const{interval:z,intervalUnit:_}=T||{};O==="startTime"?I.rule="GREATER_EQUAL":O==="endTime"&&(I.rule="LESS_EQUAL");let A=null;if(H&&(O==="startTime"?A=ae().subtract(z,_):O==="endTime"&&(A=ae())),T[O]&&(A=ae(T[O])),M){const{type:v,value:U,mode:R}=M;switch(v){case"add":A=A&&A.add(U,R);break;case"minus":A=A&&A.subtract(U,R)}}A&&(I.fieldValue=A==null?void 0:A.format($)),I.dateFormat=$}else I.fieldValue=F;p.push(I)}for(let C=p.length-1;C>=0;C--){const g=p[C];g.globalCondition||p.find(B=>B.alias===g.alias&&B.globalCondition)&&p.splice(C,1)}return p},Cn=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}return n},Bi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:bi,TruncationList:Ti,AModal:P.Modal,AButton:P.Button,ATabs:P.Tabs,ATabPane:P.TabPane},setup(t,{expose:n}){var T;const o=e.ref("1"),a=()=>{var I;return`添加过滤条件-${((I=t.item)==null?void 0:I.label)||""}`},r=e.inject(de),l=e.inject(Be),i=e.inject(Pe),d=e.computed(()=>{var I;return(I=e.unref(r))==null?void 0:I.dataSourceId}),s=e.inject(De),c=e.inject(Ht),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,I=>{var F,$,M,j;I&&(Array.isArray((F=t.item)==null?void 0:F.conditions)&&(p.value=te.cloneDeep(($=t.item)==null?void 0:$.conditions)||[]),Array.isArray((M=t.item)==null?void 0:M.truncations)?u.value=te.cloneDeep((j=t.item)==null?void 0:j.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!I)},{flush:"post"});let h=!1;const w=I=>{var F;h=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==I?p.value=[{join:I,conditions:[e.unref(p)[0],{}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===I&&p.value[0].conditions.push({}))};e.provide(Rn,{updateCondition(I,F,$){var j;h=!0;let M=e.unref(p);for(let H=0;H<F&&M[0];H++)M=(j=M[0])==null?void 0:j.conditions;Array.isArray(M)&&M[$]&&(M[$]=I)},deleteCondition(I,F){var M,j;h=!0;let $=e.unref(p);for(let H=0;H<I&&$[0];H++)$=(M=$[0])==null?void 0:M.conditions;if(Array.isArray($)&&$[F]&&($.splice(F,1),$.length===1)){let H=e.unref(p);const z=I-2>0?I-2:0;for(let _=0;_<z&&H[0];_++)H=(j=H[0])==null?void 0:j.conditions;H[0].join===$[0].join?H[0].conditions=[...$[0].conditions,...H[0].conditions.slice(1)]:H[0]=$[0]}}});const m=I=>{h=!0,u.value=I},C=()=>{var z,_;const{controlList:I=[]}=e.unref(r),F=((z=e.unref(r)[t.type])==null?void 0:z.slice())||[],$=At(te.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList"].includes(t.type)&&((_=e.unref(u))!=null&&_.length)&&(F[t.index].truncations=e.unref(u));const M=At(e.unref(p)),j=$.filter(A=>!M.find(v=>v.componentId===A.componentId)).filter(A=>!I.find(v=>v.id===A.componentId)),H=M.filter(A=>!$.find(v=>v.componentId===A.componentId));g(j,H),l({[t.type]:F,sqlConditions:No({...e.unref(r),[t.type]:F},e.unref(i))})};function g(I,F){var M;const $=I.map(j=>({...j,delete:!0})).concat(F.map(j=>({...j,add:!0})));for(const j of $){const H=e.unref(i).find(z=>z.id===j.componentId);if(H){const{type:z,id:_,events:A=[]}=H,v=Cn(z);if(j.add)A.find(U=>{var R;return U.on===v&&U.target===((R=e.unref(s))==null?void 0:R.id)&&U.emit==="refreshData"})||c({id:_,events:[...A,{on:v,target:(M=e.unref(s))==null?void 0:M.id,emit:"refreshData"}].reverse()});else if(j.delete){const U=A.findIndex(R=>{var Y;return R.on===v&&R.target===((Y=e.unref(s))==null?void 0:Y.id)&&R.emit==="refreshData"});U!==-1&&(A.splice(U,1),c({id:_,events:A}))}}}}const x=()=>{f.value=!0},B=()=>{p.value=[],f.value=!1},L=()=>{h&&C(),h=!1,B()},E=()=>{B()},k=e.inject(Se),O=e.unref(e.inject(Ae)),b=(T=window==null?void 0:window.config)==null?void 0:T.pageId,y=e.ref([]);e.provide(Un,y);const S=async I=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const $=await k.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:b,dataSourceId:e.unref(d),hrpIndexGuid:I,indexGuid:I},{headers:{Authentication:O,operateContext:"ygt"}}),{success:M,data:j=[]}=$.data;M&&((F=j==null?void 0:j.dataViewColumns)!=null&&F.length)&&(y.value=j.dataViewColumns)}catch($){console.error($)}};return e.watch(()=>t.item,I=>{I&&f.value&&S(I.id)}),n({showModal:x}),{visible:f,onOk:L,onCancel:E,handleTitle:a,conditionList:p,truncationList:u,addCondition:w,onUpdatetruncation:m,activeKey:o}}}),Jp="",Oi={class:"header"},Vi={class:"header"};function Ii(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=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:"50%",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"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Oi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[0]||(n[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[1]||(n[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[2]||(n[2]=f=>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(s,{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",Vi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[4]||(n[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[5]||(n[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[6]||(n[6]=f=>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 vi=J(Bi,[["render",Ii],["__scopeId","data-v-67078dd2"]]);let $i=(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};const wn=(t,n)=>{let o;for(let a=0;a<n.length;a++){const r=n[a];r.children&&(r.children.some(l=>l.key===t)?o=r.key:wn(t,r.children)&&(o=wn(t,r.children)))}return o},Fi=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:P.Row,ACol:P.Col,ATextarea:P.Textarea,APopover:P.Popover,AInputSearch:P.InputSearch,ATree:P.Tree,DoubleRightOutlined:Kr},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(Se),a=e.unref(e.inject(Ae)),r=e.inject(de),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const k=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(k==null?void 0:k.filter(O=>O.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:k=>{n("update:value",k),n("change",k)}}),u=e.ref(""),f=k=>{const O=document.getElementById("calTextArea");let b=p.value;if(document.selection){const y=document.selection.createRange();y.text=k}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const y=O.selectionStart,S=O.selectionEnd;let T=y;b=b.substring(0,y)+k+b.substring(S,b.length),T+=k.length,O.selectionStart=O.selectionEnd=T}else b+=k;p.value=b},h=["+","-","*","/","(",")"],w=(k,O)=>{let b="";switch(O){case"name":{b="${"+k+"}";break}case"function":{b=k+"()";break}default:b=k}f(b)},m=[],C=e.ref([]),g=e.ref(!0),x=e.ref([]),B=k=>{var O;for(const b of k)(O=b==null?void 0:b.children)!=null&&O.length?B(b.children):m.push({key:b.key,title:b.title})},L=async()=>{try{const k=await o.get(`${xe}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:b=[]}=k.data;O&&(b!=null&&b.length)&&(B(b),x.value=b)}catch(k){console.error(k)}},E=k=>{C.value=k,g.value=!1};return e.watch(u,k=>{const O=m.map(b=>b.title.indexOf(k)>-1?wn(b.key,x.value):null).filter((b,y,S)=>b&&S.indexOf(b)===y);C.value=O,u.value=k,g.value=!0}),e.onMounted(()=>{L()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:x,searchFuncValue:u,expandedKeys:C,autoExpandParent:g,selectedElem:w,onExpand:E}}}),Zp="",eu="",Di={class:"formula-calculation"},Pi={class:"field-area"},Mi=["onClick"],ji={class:"cal_right_bottom"},Ri={class:"cal_fu"},Ui=["onClick"],Gi={class:"function-wrap"},zi={class:"wrap-search"},Hi={class:"tree-box"},Wi={key:0},qi={style:{color:"#f50"}},Yi={key:1},Ki=["onClick"],Xi={class:"cal_a"};function Qi(t,n,o,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Di,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Pi,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:m=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,Mi))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":n[0]||(n[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ji,[e.createElementVNode("ul",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:m=>t.selectedElem(h,"symbol"),key:w},e.toDisplayString(h),9,Ui))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Gi,[e.createElementVNode("div",zi,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":n[1]||(n[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",Hi,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:w})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Wi,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",qi,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",Yi,e.toDisplayString(h),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:m=>t.selectedElem(h,"function")},"插入",8,Ki)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Xi,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Ji=J(Fi,[["render",Qi],["__scopeId","data-v-1e6dd439"]]),Zi=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Ji,AForm:P.Form,AModal:P.Modal,AFormItem:P.FormItem,AInput:P.Input,ASelect:P.Select,ASelectOption:P.SelectOption,ATextarea:P.Textarea},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(de),r=e.inject(Be),l=e.computed(()=>e.unref(o)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const S=["leftAxisList","rightAxisList","queryColumnList","indicators"];let T=[];for(const I of S)Object.prototype.hasOwnProperty.call(e.unref(a),I)&&(T=T.concat(e.unref(a)[I]));return T}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u=e.ref(),f=e.ref(!1),h=e.ref();e.watch(f,S=>{if(S)if(t.mode==="edit"){const{label:T,calcType:I,formula:F,builtInValueSource:$,builtInFormula:M,builtInCalcWay:j}=t.item;h.value={label:T,calcType:I,formula:F,builtInValueSource:$,builtInFormula:M,builtInCalcWay:j}}else t.mode==="add"&&(h.value=te.cloneDeep(p));else h.value=te.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!S)},{immediate:!0,deep:!0});let w=!1;const m=()=>{w=!0},C=S=>{const T=e.unref(l).find(I=>I.id===S);T&&(h.value.builtInCalcWay=T.keyName),w=!0},g=()=>{var I;const S=((I=e.unref(a)[t.type])==null?void 0:I.slice())||[],{label:T}=e.unref(h)||{};if(t.mode==="add"){const F=$i();S.push({...e.unref(h),id:F,show:!0,name:T})}else t.mode==="edit"&&(S[t.index]={...S[t.index],...e.unref(h),name:T});r({[t.type]:S})},x=()=>{f.value=!0},B=()=>{f.value=!1},L=async(S,T)=>{if(T==="")return Promise.reject(new Error("请输入指标名"));{const I=e.unref(d).find(F=>F.label===T);return I?I.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},E=e.computed(()=>{let S={label:[{required:!0,validator:L,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&(S={...S,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),S}),k=()=>{u.value.validate().then(()=>{w&&g(),w=!1,B()})},O=()=>{u.value.clearValidate(),B()},b=()=>{w=!0,e.unref(h).builtInCalcWay=""},y=e.computed(()=>{let S="";const T=e.unref(h).builtInCalcWay,I=e.unref(h).builtInValueSource;if(!I||!T)return S;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{T==="ASC"?S="【"+I+"】由小到大在所有值中的排名":S="【"+I+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{S=`所有【】的
|
|
60
|
+
`,T==="ASC"?S=S+"【"+I+"】由小到大的组内的排名":S=S+"【"+I+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let F="";switch(T){case"SUM":{F="求和";break}case"AVG":{F="求平均值";break}case"MIN":{F="求最小值";break}case"MAX":{F="求最大值";break}}S="将所有【"+I+"】"+F;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let F="";switch(S=`所有【】的
|
|
61
|
+
`,T){case"SUM":{F="求和";break}case"AVG":{F="求平均值";break}case"MIN":{F="求最小值";break}case"MAX":{F="求最大值";break}}S=S+"将所有【"+I+"】"+F;break}}return S});return n({showModal:x}),{visible:f,onCancel:O,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:k,onChange:m,formRules:E,accessLogic:y,formRef:u,onChangeBuiltInFormula:b,componentList:l,onChangeComponent:C}}}),tu="",es={key:0,class:"accesstip"};function ts(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{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(i,{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(c,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{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,onChange:t.onChange},null,8,["value","item","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":n[3]||(n[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{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":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,m)=>(e.openBlock(),e.createBlock(s,{key:m,value:w.label,disabled: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"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(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":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(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(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",es," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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"])):e.createCommentVNode("",!0)],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,{value:t.formState.builtInValueSource,"onUpdate:value":n[6]||(n[6]=w=>t.formState.builtInValueSource=w),onChange:t.onChangeComponent},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.componentList,(w,m)=>(e.openBlock(),e.createBlock(s,{key:m,value:w.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.keyName),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const ns=J(Zi,[["render",ts],["__scopeId","data-v-d21823c3"]]),os=e.defineComponent({name:"DataConfigCard",directives:{focus:So},components:{CalculationModal:ns,FilterModal:vi,CustomGroupModal:Wl,SettingOutlined:hl,DeleteOutlined:Hr,CopyOutlined:Rr,CustomSortModal:Il,PlusOutlined:pl,ACard:P.Card,ACheckbox:P.Checkbox,AInput:P.Input,ADropdown:P.Dropdown,AMenu:P.Menu,ASubMenu:P.SubMenu,AMenuItem:P.MenuItem,AMenuDivider:P.MenuDivider,ASelect:P.Select,Draggable:at},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(de),a=e.inject(Be),r=["leftAxisList","rightAxisList","indicators","queryColumnList"],l=["classificationList","seriesList","rowHeaderList","queryColumnList"],i=e.inject(zt),d=(G={})=>{if(e.unref(i)==="SQL_VIEW")return!0;let N=!1;return G.scope==="IDX"?r.includes(t.type)&&(N=!0):["DIM","BUILT_IN_DIM"].includes(G.scope)&&l.includes(t.type)&&(N=!0),N},s=(G="{}")=>{var N;try{const V=JSON.parse(G);if(!d(V))return;const D=((N=e.unref(o)[t.type])==null?void 0:N.slice())||[];["classificationList","seriesList"].includes(t.type)&&D.forEach(W=>{W.show=!1}),p(D,V),D.push(V),a({[t.type]:D}),sessionStorage.setItem("indicator-list-item","")}catch(V){console.error(V)}},c=(G="{}")=>{var N;try{const{cardItem:V,type:D,index:W}=JSON.parse(G);if(!d(V)||D===t.type)return;const q=((N=e.unref(o)[t.type])==null?void 0:N.slice())||[];p(q,V),q.push(V);const K=e.unref(o)[D].slice()||[];K.splice(W,1),a({[t.type]:q,[D]:K})}catch(V){console.error(V)}};function p(G,N){const V=[];if(G.forEach(D=>{D.label.includes(N.label)&&V.push(D.label.split(N.label)[1])}),V.length>=1){for(let D=1;D<=V.length;D++)if(!V.includes(D+"")){N.label=N.label+D;break}}}const u=(G,N)=>{var W,q;const V=(W=G.target)==null?void 0:W.checked,D=((q=e.unref(o)[t.type])==null?void 0:q.slice())||[];["classificationList","seriesList"].includes(t.type)&&D.forEach(K=>{K.show=!1}),D[N].show=V,a({[t.type]:D})},f=G=>{var V;const N=((V=e.unref(o)[t.type])==null?void 0:V.slice())||[];N.splice(G,1),a({[t.type]:N})},h=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const G=sessionStorage.getItem("indicator-list-item"),N=sessionStorage.getItem("indicator-card-item");G?s(G):N&&c(N)},m=G=>{var ne,ce;const{newIndex:N,oldIndex:V,from:D,to:W}=G,q=D.id,K=W.id;if(N>=0&&V>=0){if(q===K){const Q=((ne=e.unref(o)[t.type])==null?void 0:ne.slice())||[],re=Q.splice(V,1)[0];re&&(Q.splice(N,0,re),a({[t.type]:Q}))}else if(t.type===K){const Q=((ce=e.unref(o)[K])==null?void 0:ce.slice())||[];if(Q!=null&&Q.length){const re=Q.splice(Q.length-1,1)[0];re&&(Q.splice(N,0,re),a({[t.type]:Q}))}}}},C=(G,N)=>{const V=G.oldIndex,D=N[V];D&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:D,type:t.type,index:V}))},g=e.computed(()=>e.unref(o)[t.type]||[]),x=e.ref([]);let B=!1;e.watch(()=>e.unref(g).length,G=>{x.value=new Array(G).fill(!1)},{flush:"post",immediate:!0});const L=G=>{var V;const N=((V=e.unref(o)[t.type])==null?void 0:V.slice())||[];N.splice(G,1),a({[t.type]:N})},E=G=>{x.value[G]=!0},k=()=>{B=!0},O=(G,N,V)=>{var D,W;if(x.value[N]=!1,B){const q=(D=G.target)==null?void 0:D.value,K=((W=e.unref(o)[t.type])==null?void 0:W.slice())||[],ne=K.filter(Q=>{var re;return(re=Q==null?void 0:Q.formula)==null?void 0:re.includes(V)}).map(Q=>Q.id),ce=K.filter(Q=>{var re;return(re=Q==null?void 0:Q.builtInValueSource)==null?void 0:re.includes(V)}).map(Q=>Q.id);if(ne!=null&&ne.length)for(const Q of ne){const re=K.find(ot=>ot.id===Q);re.formula=re.formula.replaceAll(V,q)}if(ce!=null&&ce.length)for(const Q of ce){const re=K.find(ot=>ot.id===Q);re.builtInValueSource=re.builtInValueSource.replaceAll(V,q)}K[N].label=q,a({[t.type]:K})}B=!1},b="DEFAULT",y=e.computed(()=>{const G=e.unref(o)[t.type]||[],{leftAxisList:N=[],rightAxisList:V=[],indicators:D=[]}=e.unref(o)||{};return[{id:b,label:"默认",name:"默认"},...G,...N,...V,...D]}),S=(G={},N,V="ASC")=>{var ne;const{label:D,name:W,id:q}=G,K=((ne=e.unref(o)[t.type])==null?void 0:ne.slice())||[];q===b?delete K[N].sort:K[N].sort={label:D,columnName:W,type:"NORMAL",order:V},a({[t.type]:K})},T=(G={},N="ASC")=>{const D={ASC:"升序",DESC:"降序"}[N],{sort:W}=G,{label:q,order:K}=W||{};return q&&K===N?`${D}(${q})`:D},I=e.ref(),F=e.ref(),$=e.ref(),M=e.ref(),j=(G={},N)=>{var V;I.value=G,F.value=N,(V=e.unref($))==null||V.showModal()},H=G=>{var N;return"自定义排序"+(((N=G==null?void 0:G.sort)==null?void 0:N.type)==="CUSTOM"?"(已配置)":"")},z=(G={},N)=>{var V;I.value=G,F.value=N,(V=e.unref(M))==null||V.showModal()},_=G=>"自定义分组"+((G==null?void 0:G.customGroup)!=null?"(已配置)":""),A=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],v=(G,N)=>{var D;const V=((D=e.unref(o)[t.type])==null?void 0:D.slice())||[];V[N].aggregate=G,a({[t.type]:V})},U=(G,N)=>{var D;const V=((D=e.unref(o)[t.type])==null?void 0:D.slice())||[];V[N].dateFormat=G,a({[t.type]:V})},R=(G="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[G]})`,Y=(G={})=>{var N;return"过滤"+(G!=null&&G.conditions&&((N=G==null?void 0:G.conditions)==null?void 0:N.length)>0?"(已配置)":"")},X=e.ref(),Z=(G={},N)=>{I.value=G,F.value=N,e.unref(X).showModal()},ee=e.ref(),oe=e.ref("add"),ie=(G,N,V)=>{var D;oe.value=G,G==="edit"&&(I.value=N,F.value=V),(D=e.unref(ee))==null||D.showModal()},le=e.inject(Se),ke=e.unref(e.inject(Ae)),Ue=e.ref([]),Ge=e.computed(()=>e.unref(o)[t.type]||{}),et=async()=>{try{const G=await le.post(`${xe}/diagram/dimFields`,{},{headers:{Authentication:ke,operateContext:"ygt"}}),{success:N,data:V=[]}=G.data;N&&(Ue.value=V)}catch(G){console.error(G)}},tt=(G,N)=>{const V=e.unref(o)[t.type]||{};V[N]=G,a({[t.type]:V})},ve=e.ref({}),ze=async(G,N)=>{var D;const{name:V}=N;if(G&&bn(N,"indexCode")&&!bn(e.unref(ve),V)){const W=await le.post(`${xe}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:N.id,pageId:(D=window==null?void 0:window.config)==null?void 0:D.pageId},{headers:{Authentication:ke,operateContext:"ygt"}}),{success:q,data:K=[]}=W.data;q&&(ve.value[V]={name:K.name,code:K.indexCode})}},nt=G=>{const N=document.createElement("input");document.body.appendChild(N),N.setAttribute("value",G),N.select(),document.execCommand("copy"),document.body.removeChild(N),P.message.success("复制成功")};return e.onMounted(()=>{t.type==="formFields"&&et()}),{onCheckboxChange:u,onDropEnd:f,onDragItemEnd:h,onDragItemAdd:w,onDragItemSort:m,onDragItemStart:C,cardItemList:g,onDelete:L,onEdit:E,onCommitLabelChange:O,sortList:y,onSort:S,handleSortTitle:T,showCustomSortModal:j,customSortModalRef:$,currentItem:I,currentIndex:F,handleCustomSortTitle:H,handleCustomGroupTitle:_,customGroupModalRef:M,showCustomGroupModal:z,editLabelList:x,onLabelChange:k,aggregateList:A,onAggregateChange:v,onDateFormatChange:U,handleAggregateTitle:R,onShowCalculationModal:ie,handleFilterTitle:Y,filterModalRef:X,showFilterModal:Z,calculationModalRef:ee,calculationModalMode:oe,formatList:n,fieldOptions:Ue,fieldData:Ge,onFieldChange:tt,onVisibleChange:ze,copyDataViewName:nt,dataViewMap:ve}}}),nu="",ou="",st=t=>(e.pushScopeId("data-v-69d21ca5"),t=t(),e.popScopeId(),t),as={class:"title"},rs={class:"title-text"},ls={class:"field-wrap"},is={class:"field-item"},ss=st(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),cs={class:"field-item"},ds=st(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),ps={class:"title"},us={class:"title-text"},fs=st(()=>e.createElementVNode("span",null,"添加计算指标",-1)),ms={class:"card-item-wrap"},hs={class:"card-item-inner"},ys=["onClick"],gs=["onClick"],bs=["onClick"],Cs={style:{display:"flex","align-items":"center"}},ws=["title"],xs=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),_s={style:{display:"flex","align-items":"center"}},ks=["title"],Ss=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function As(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),p=e.resolveComponent("setting-outlined"),u=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-sub-menu"),h=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("copy-outlined"),m=e.resolveComponent("a-menu"),C=e.resolveComponent("a-dropdown"),g=e.resolveComponent("delete-outlined"),x=e.resolveComponent("a-checkbox"),B=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),E=e.resolveComponent("custom-group-modal"),k=e.resolveComponent("filter-modal"),O=e.resolveComponent("calculation-modal"),b=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",as,[e.createElementVNode("div",rs,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createElementVNode("div",is,[ss,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:n[0]||(n[0]=y=>t.onFieldChange(y,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",cs,[ds,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:n[1]||(n[1]=y=>t.onFieldChange(y,"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",ps,[e.createElementVNode("div",us,e.toDisplayString(t.title),1),["classificationList","seriesList","rowHeaderList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[2]||(n[2]=e.withModifiers(y=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),fs]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(B,{modelValue:t.cardItemList,"onUpdate:modelValue":n[3]||(n[3]=y=>t.cardItemList=y),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]=y=>t.onDragItemStart(y,t.cardItemList))},{item:e.withCtx(({element:y,index:S})=>[e.createElementVNode("div",ms,[e.createVNode(x,{class:"card-item",checked:y.show,onChange:T=>t.onCheckboxChange(T,S)},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[!t.editLabelList[S]&&y.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(T=>t.onEdit(S),["prevent","stop"])},e.toDisplayString(y.label),9,ys)):e.createCommentVNode("",!0),!t.editLabelList[S]&&!y.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(T=>t.onEdit(S),["prevent","stop"])}," 请点击填入名字 ",8,gs)):e.createCommentVNode("",!0),t.editLabelList[S]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:2,"default-value":y.label,size:"small",onBlur:T=>t.onCommitLabelChange(T,S,y.label),onPressEnter:T=>t.onCommitLabelChange(T,S,y.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[b]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(y.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(T=>t.onShowCalculationModal("edit",y,S),["prevent","stop"])}," fx ",8,bs)):e.createCommentVNode("",!0),e.createVNode(C,{trigger:["click"],onVisibleChange:T=>t.onVisibleChange(T,y)},{overlay:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[["classificationList","seriesList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:t.handleSortTitle(y,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,T=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:T.id,onClick:I=>t.onSort(T,S,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f,{title:t.handleSortTitle(y,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,T=>(e.openBlock(),e.createBlock(u,{class:"menu-item",style:{"white-space":"nowrap"},key:T.id,onClick:I=>t.onSort(T,S,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(u,{onClick:T=>t.showCustomSortModal(y,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(h),e.createVNode(u,{onClick:T=>t.showCustomGroupModal(y,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(h),y.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,T=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:T.value,onClick:I=>t.onDateFormatChange(T.value,S)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(y.dateFormat===T.value||!y.dateFormat&&T.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(h)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(u,{onClick:T=>t.showFilterModal(y,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(h),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{title:t.handleAggregateTitle(y.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,T=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:T.value,onClick:I=>t.onAggregateChange(T.value,S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h)],64)),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(u,{key:2,onClick:T=>t.copyDataViewName(t.dataViewMap[y.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Cs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].name},[xs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].name),1)],8,ws),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(u,{key:3,onClick:T=>t.copyDataViewName(t.dataViewMap[y.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].code},[Ss,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].code),1)],8,ks),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(p,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(g,{class:"delete-icon",onClick:e.withModifiers(T=>t.onDelete(S),["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(E,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(k,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(O,{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 Ns=J(os,[["render",As],["__scopeId","data-v-69d21ca5"]]),Ls={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"}},Ts=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Ns},setup(){const t=e.inject(De),n=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),o=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Be),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var C,g;const s=te.cloneDeep((C=e.unref(t))==null?void 0:C.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["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"],text:["indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"]},u="ecan";let f=e.unref(n);if(f.startsWith(u)){const x=u.length;f=((g=f.slice(x,x+1))==null?void 0:g.toLowerCase())+f.slice(x+1)}const h=p[f],w=Ls,m=(h==null?void 0:h.length)||0;for(let x=0;x<m;x++){const B=h[x];if(!B)break;r.push({...w[B],type:B})}for(const x of c)i(s,x)&&!h.find(B=>B===x)&&(s[x]=[]);l(s)})(),{cardsMap:a,cards:r}}}),au="",ru="",Es={class:"data-group"};function Bs(t,n,o,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Os=J(Ts,[["render",Bs],["__scopeId","data-v-603b1b70"]]),Vs=[{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"]}],Is={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"}},vs=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:P.Input},emits:["change"],setup(t,{emit:n}){return{onInputChange:a=>{n("change",a.target.value)}}}});function $s(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const Fs=J(vs,[["render",$s]]),Ds=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:P.InputNumber,ASelect:P.Select,ASelectOption:P.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")),l=e.ref(a("suffix"));return{inputValue:o,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?n("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?n("change",u):n("change",`${u}${f}`)},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:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Ps(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{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]=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(i,{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":n[1]||(n[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(i,{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 Lo=J(Ds,[["render",Ps]]),Ms=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:P.RadioGroup,ARadioButton:P.RadioButton},emits:["change"],setup(t,{emit:n}){return{onRadioChange:a=>{n("change",a.target.value)}}}});function js(t,n,o,a,r,l){const i=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,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const Rs=J(Ms,[["render",js]]),Us=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:P.Select,ASelectOption:P.SelectOption},emits:["change"],setup(t,{emit:n}){return{onSelectChange:a=>{n("change",a)}}}});function Gs(t,n,o,a,r,l){const i=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,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const zs=J(Us,[["render",Gs]]),Hs=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:P.Switch},emit:["change"],setup(t,{emit:n}){return{onSwitchChange:a=>{n("change",a)}}}});function Ws(t,n,o,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const qs=J(Hs,[["render",Ws]]);var pe="top",ge="bottom",be="right",ue="left",xn="auto",ct=[pe,ge,be,ue],qe="start",dt="end",Ys="clippingParents",To="viewport",pt="popper",Ks="reference",Eo=ct.reduce(function(t,n){return t.concat([n+"-"+qe,n+"-"+dt])},[]),Bo=[].concat(ct,[xn]).reduce(function(t,n){return t.concat([n,n+"-"+qe,n+"-"+dt])},[]),Xs="beforeRead",Qs="read",Js="afterRead",Zs="beforeMain",ec="main",tc="afterMain",nc="beforeWrite",oc="write",ac="afterWrite",rc=[Xs,Qs,Js,Zs,ec,tc,nc,oc,ac];function Le(t){return t?(t.nodeName||"").toLowerCase():null}function me(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function Me(t){var n=me(t).Element;return t instanceof n||t instanceof Element}function Ce(t){var n=me(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function _n(t){if(typeof ShadowRoot>"u")return!1;var n=me(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function lc(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},l=n.elements[o];!Ce(l)||!Le(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function ic(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],l=n.attributes[a]||{},i=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Ce(r)||!Le(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const sc={name:"applyStyles",enabled:!0,phase:"write",fn:lc,effect:ic,requires:["computeStyles"]};function Te(t){return t.split("-")[0]}var je=Math.max,Nt=Math.min,Ye=Math.round;function kn(){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 Oo(){return!/^((?!chrome|android).)*safari/i.test(kn())}function Ke(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,l=1;n&&Ce(t)&&(r=t.offsetWidth>0&&Ye(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&Ye(a.height)/t.offsetHeight||1);var i=Me(t)?me(t):window,d=i.visualViewport,s=!Oo()&&o,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Sn(t){var n=Ke(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 Vo(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&_n(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Ve(t){return me(t).getComputedStyle(t)}function cc(t){return["table","td","th"].indexOf(Le(t))>=0}function Fe(t){return((Me(t)?t.ownerDocument:t.document)||window.document).documentElement}function Lt(t){return Le(t)==="html"?t:t.assignedSlot||t.parentNode||(_n(t)?t.host:null)||Fe(t)}function Io(t){return!Ce(t)||Ve(t).position==="fixed"?null:t.offsetParent}function dc(t){var n=/firefox/i.test(kn()),o=/Trident/i.test(kn());if(o&&Ce(t)){var a=Ve(t);if(a.position==="fixed")return null}var r=Lt(t);for(_n(r)&&(r=r.host);Ce(r)&&["html","body"].indexOf(Le(r))<0;){var l=Ve(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||n&&l.willChange==="filter"||n&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function ut(t){for(var n=me(t),o=Io(t);o&&cc(o)&&Ve(o).position==="static";)o=Io(o);return o&&(Le(o)==="html"||Le(o)==="body"&&Ve(o).position==="static")?n:o||dc(t)||n}function An(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ft(t,n,o){return je(t,Nt(n,o))}function pc(t,n,o){var a=ft(t,n,o);return a>o?o:a}function vo(){return{top:0,right:0,bottom:0,left:0}}function $o(t){return Object.assign({},vo(),t)}function Fo(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var uc=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,$o(typeof n!="number"?n:Fo(n,ct))};function fc(t){var n,o=t.state,a=t.name,r=t.options,l=o.elements.arrow,i=o.modifiersData.popperOffsets,d=Te(o.placement),s=An(d),c=[ue,be].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=uc(r.padding,o),f=Sn(l),h=s==="y"?pe:ue,w=s==="y"?ge:be,m=o.rects.reference[p]+o.rects.reference[s]-i[s]-o.rects.popper[p],C=i[s]-o.rects.reference[s],g=ut(l),x=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,B=m/2-C/2,L=u[h],E=x-f[p]-u[w],k=x/2-f[p]/2+B,O=ft(L,k,E),b=s;o.modifiersData[a]=(n={},n[b]=O,n.centerOffset=O-k,n)}}function mc(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)||Vo(n.elements.popper,r)&&(n.elements.arrow=r))}const hc={name:"arrow",enabled:!0,phase:"main",fn:fc,effect:mc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xe(t){return t.split("-")[1]}var yc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gc(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:Ye(o*r)/r||0,y:Ye(a*r)/r||0}}function Do(t){var n,o=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,w=i.y,m=w===void 0?0:w,C=typeof p=="function"?p({x:h,y:m}):{x:h,y:m};h=C.x,m=C.y;var g=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),B=ue,L=pe,E=window;if(c){var k=ut(o),O="clientHeight",b="clientWidth";if(k===me(o)&&(k=Fe(o),Ve(k).position!=="static"&&d==="absolute"&&(O="scrollHeight",b="scrollWidth")),k=k,r===pe||(r===ue||r===be)&&l===dt){L=ge;var y=u&&k===E&&E.visualViewport?E.visualViewport.height:k[O];m-=y-a.height,m*=s?1:-1}if(r===ue||(r===pe||r===ge)&&l===dt){B=be;var S=u&&k===E&&E.visualViewport?E.visualViewport.width:k[b];h-=S-a.width,h*=s?1:-1}}var T=Object.assign({position:d},c&&yc),I=p===!0?gc({x:h,y:m},me(o)):{x:h,y:m};if(h=I.x,m=I.y,s){var F;return Object.assign({},T,(F={},F[L]=x?"0":"",F[B]=g?"0":"",F.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",F))}return Object.assign({},T,(n={},n[L]=x?m+"px":"",n[B]=g?h+"px":"",n.transform="",n))}function bc(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,l=o.adaptive,i=l===void 0?!0:l,d=o.roundOffsets,s=d===void 0?!0:d,c={placement:Te(n.placement),variation:Xe(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,Do(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:s})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Do(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const Cc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bc,data:{}};var Tt={passive:!0};function wc(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=me(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",o.update,Tt)}),d&&s.addEventListener("resize",o.update,Tt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",o.update,Tt)}),d&&s.removeEventListener("resize",o.update,Tt)}}const xc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wc,data:{}};var _c={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(t){return t.replace(/left|right|bottom|top/g,function(n){return _c[n]})}var kc={start:"end",end:"start"};function Po(t){return t.replace(/start|end/g,function(n){return kc[n]})}function Nn(t){var n=me(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function Ln(t){return Ke(Fe(t)).left+Nn(t).scrollLeft}function Sc(t,n){var o=me(t),a=Fe(t),r=o.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Oo();(c||!c&&n==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Ln(t),y:s}}function Ac(t){var n,o=Fe(t),a=Nn(t),r=(n=t.ownerDocument)==null?void 0:n.body,l=je(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=je(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Ln(t),s=-a.scrollTop;return Ve(r||o).direction==="rtl"&&(d+=je(o.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Tn(t){var n=Ve(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function Mo(t){return["html","body","#document"].indexOf(Le(t))>=0?t.ownerDocument.body:Ce(t)&&Tn(t)?t:Mo(Lt(t))}function mt(t,n){var o;n===void 0&&(n=[]);var a=Mo(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),l=me(a),i=r?[l].concat(l.visualViewport||[],Tn(a)?a:[]):a,d=n.concat(i);return r?d:d.concat(mt(Lt(i)))}function En(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Nc(t,n){var o=Ke(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 jo(t,n,o){return n===To?En(Sc(t,o)):Me(n)?Nc(n,o):En(Ac(Fe(t)))}function Lc(t){var n=mt(Lt(t)),o=["absolute","fixed"].indexOf(Ve(t).position)>=0,a=o&&Ce(t)?ut(t):t;return Me(a)?n.filter(function(r){return Me(r)&&Vo(r,a)&&Le(r)!=="body"}):[]}function Tc(t,n,o,a){var r=n==="clippingParents"?Lc(t):[].concat(n),l=[].concat(r,[o]),i=l[0],d=l.reduce(function(s,c){var p=jo(t,c,a);return s.top=je(p.top,s.top),s.right=Nt(p.right,s.right),s.bottom=Nt(p.bottom,s.bottom),s.left=je(p.left,s.left),s},jo(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Ro(t){var n=t.reference,o=t.element,a=t.placement,r=a?Te(a):null,l=a?Xe(a):null,i=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,s;switch(r){case pe:s={x:i,y:n.y-o.height};break;case ge:s={x:i,y:n.y+n.height};break;case be:s={x:n.x+n.width,y:d};break;case ue:s={x:n.x-o.width,y:d};break;default:s={x:n.x,y:n.y}}var c=r?An(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case qe:s[c]=s[c]-(n[p]/2-o[p]/2);break;case dt:s[c]=s[c]+(n[p]/2-o[p]/2);break}}return s}function ht(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,l=o.strategy,i=l===void 0?t.strategy:l,d=o.boundary,s=d===void 0?Ys:d,c=o.rootBoundary,p=c===void 0?To:c,u=o.elementContext,f=u===void 0?pt:u,h=o.altBoundary,w=h===void 0?!1:h,m=o.padding,C=m===void 0?0:m,g=$o(typeof C!="number"?C:Fo(C,ct)),x=f===pt?Ks:pt,B=t.rects.popper,L=t.elements[w?x:f],E=Tc(Me(L)?L:L.contextElement||Fe(t.elements.popper),s,p,i),k=Ke(t.elements.reference),O=Ro({reference:k,element:B,strategy:"absolute",placement:r}),b=En(Object.assign({},B,O)),y=f===pt?b:k,S={top:E.top-y.top+g.top,bottom:y.bottom-E.bottom+g.bottom,left:E.left-y.left+g.left,right:y.right-E.right+g.right},T=t.modifiersData.offset;if(f===pt&&T){var I=T[r];Object.keys(S).forEach(function(F){var $=[be,ge].indexOf(F)>=0?1:-1,M=[pe,ge].indexOf(F)>=0?"y":"x";S[F]+=I[M]*$})}return S}function Ec(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,l=o.rootBoundary,i=o.padding,d=o.flipVariations,s=o.allowedAutoPlacements,c=s===void 0?Bo:s,p=Xe(a),u=p?d?Eo:Eo.filter(function(w){return Xe(w)===p}):ct,f=u.filter(function(w){return c.indexOf(w)>=0});f.length===0&&(f=u);var h=f.reduce(function(w,m){return w[m]=ht(t,{placement:m,boundary:r,rootBoundary:l,padding:i})[Te(m)],w},{});return Object.keys(h).sort(function(w,m){return h[w]-h[m]})}function Bc(t){if(Te(t)===xn)return[];var n=Et(t);return[Po(t),n,Po(n)]}function Oc(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!0:i,s=o.fallbackPlacements,c=o.padding,p=o.boundary,u=o.rootBoundary,f=o.altBoundary,h=o.flipVariations,w=h===void 0?!0:h,m=o.allowedAutoPlacements,C=n.options.placement,g=Te(C),x=g===C,B=s||(x||!w?[Et(C)]:Bc(C)),L=[C].concat(B).reduce(function(Y,X){return Y.concat(Te(X)===xn?Ec(n,{placement:X,boundary:p,rootBoundary:u,padding:c,flipVariations:w,allowedAutoPlacements:m}):X)},[]),E=n.rects.reference,k=n.rects.popper,O=new Map,b=!0,y=L[0],S=0;S<L.length;S++){var T=L[S],I=Te(T),F=Xe(T)===qe,$=[pe,ge].indexOf(I)>=0,M=$?"width":"height",j=ht(n,{placement:T,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),H=$?F?be:ue:F?ge:pe;E[M]>k[M]&&(H=Et(H));var z=Et(H),_=[];if(l&&_.push(j[I]<=0),d&&_.push(j[H]<=0,j[z]<=0),_.every(function(Y){return Y})){y=T,b=!1;break}O.set(T,_)}if(b)for(var A=w?3:1,v=function(X){var Z=L.find(function(ee){var oe=O.get(ee);if(oe)return oe.slice(0,X).every(function(ie){return ie})});if(Z)return y=Z,"break"},U=A;U>0;U--){var R=v(U);if(R==="break")break}n.placement!==y&&(n.modifiersData[a]._skip=!0,n.placement=y,n.reset=!0)}}const Vc={name:"flip",enabled:!0,phase:"main",fn:Oc,requiresIfExists:["offset"],data:{_skip:!1}};function Uo(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 Go(t){return[pe,be,ge,ue].some(function(n){return t[n]>=0})}function Ic(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,l=n.modifiersData.preventOverflow,i=ht(n,{elementContext:"reference"}),d=ht(n,{altBoundary:!0}),s=Uo(i,a),c=Uo(d,r,l),p=Go(s),u=Go(c);n.modifiersData[o]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const vc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ic};function $c(t,n,o){var a=Te(t),r=[ue,pe].indexOf(a)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ue,be].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function Fc(t){var n=t.state,o=t.options,a=t.name,r=o.offset,l=r===void 0?[0,0]:r,i=Bo.reduce(function(p,u){return p[u]=$c(u,n.rects,l),p},{}),d=i[n.placement],s=d.x,c=d.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=s,n.modifiersData.popperOffsets.y+=c),n.modifiersData[a]=i}const Dc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fc};function Pc(t){var n=t.state,o=t.name;n.modifiersData[o]=Ro({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const Mc={name:"popperOffsets",enabled:!0,phase:"read",fn:Pc,data:{}};function jc(t){return t==="x"?"y":"x"}function Rc(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!1:i,s=o.boundary,c=o.rootBoundary,p=o.altBoundary,u=o.padding,f=o.tether,h=f===void 0?!0:f,w=o.tetherOffset,m=w===void 0?0:w,C=ht(n,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),g=Te(n.placement),x=Xe(n.placement),B=!x,L=An(g),E=jc(L),k=n.modifiersData.popperOffsets,O=n.rects.reference,b=n.rects.popper,y=typeof m=="function"?m(Object.assign({},n.rects,{placement:n.placement})):m,S=typeof y=="number"?{mainAxis:y,altAxis:y}:Object.assign({mainAxis:0,altAxis:0},y),T=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,I={x:0,y:0};if(k){if(l){var F,$=L==="y"?pe:ue,M=L==="y"?ge:be,j=L==="y"?"height":"width",H=k[L],z=H+C[$],_=H-C[M],A=h?-b[j]/2:0,v=x===qe?O[j]:b[j],U=x===qe?-b[j]:-O[j],R=n.elements.arrow,Y=h&&R?Sn(R):{width:0,height:0},X=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:vo(),Z=X[$],ee=X[M],oe=ft(0,O[j],Y[j]),ie=B?O[j]/2-A-oe-Z-S.mainAxis:v-oe-Z-S.mainAxis,le=B?-O[j]/2+A+oe+ee+S.mainAxis:U+oe+ee+S.mainAxis,ke=n.elements.arrow&&ut(n.elements.arrow),Ue=ke?L==="y"?ke.clientTop||0:ke.clientLeft||0:0,Ge=(F=T==null?void 0:T[L])!=null?F:0,et=H+ie-Ge-Ue,tt=H+le-Ge,ve=ft(h?Nt(z,et):z,H,h?je(_,tt):_);k[L]=ve,I[L]=ve-H}if(d){var ze,nt=L==="x"?pe:ue,G=L==="x"?ge:be,N=k[E],V=E==="y"?"height":"width",D=N+C[nt],W=N-C[G],q=[pe,ue].indexOf(g)!==-1,K=(ze=T==null?void 0:T[E])!=null?ze:0,ne=q?D:N-O[V]-b[V]-K+S.altAxis,ce=q?N+O[V]+b[V]-K-S.altAxis:W,Q=h&&q?pc(ne,N,ce):ft(h?ne:D,N,h?ce:W);k[E]=Q,I[E]=Q-N}n.modifiersData[a]=I}}const Uc={name:"preventOverflow",enabled:!0,phase:"main",fn:Rc,requiresIfExists:["offset"]};function Gc(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function zc(t){return t===me(t)||!Ce(t)?Nn(t):Gc(t)}function Hc(t){var n=t.getBoundingClientRect(),o=Ye(n.width)/t.offsetWidth||1,a=Ye(n.height)/t.offsetHeight||1;return o!==1||a!==1}function Wc(t,n,o){o===void 0&&(o=!1);var a=Ce(n),r=Ce(n)&&Hc(n),l=Fe(n),i=Ke(t,r,o),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!o)&&((Le(n)!=="body"||Tn(l))&&(d=zc(n)),Ce(n)?(s=Ke(n,!0),s.x+=n.clientLeft,s.y+=n.clientTop):l&&(s.x=Ln(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function qc(t){var n=new Map,o=new Set,a=[];t.forEach(function(l){n.set(l.name,l)});function r(l){o.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!o.has(d)){var s=n.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){o.has(l.name)||r(l)}),a}function Yc(t){var n=qc(t);return rc.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function Kc(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function Xc(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 zo={placement:"bottom",modifiers:[],strategy:"absolute"};function Ho(){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 Qc(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,l=r===void 0?zo:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},zo,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(g){var x=typeof g=="function"?g(p.options):g;m(),p.options=Object.assign({},l,p.options,x),p.scrollParents={reference:Me(d)?mt(d):d.contextElement?mt(d.contextElement):[],popper:mt(s)};var B=Yc(Xc([].concat(a,p.options.modifiers)));return p.orderedModifiers=B.filter(function(L){return L.enabled}),w(),h.update()},forceUpdate:function(){if(!f){var g=p.elements,x=g.reference,B=g.popper;if(Ho(x,B)){p.rects={reference:Wc(x,ut(B),p.options.strategy==="fixed"),popper:Sn(B)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(S){return p.modifiersData[S.name]=Object.assign({},S.data)});for(var L=0;L<p.orderedModifiers.length;L++){if(p.reset===!0){p.reset=!1,L=-1;continue}var E=p.orderedModifiers[L],k=E.fn,O=E.options,b=O===void 0?{}:O,y=E.name;typeof k=="function"&&(p=k({state:p,options:b,name:y,instance:h})||p)}}}},update:Kc(function(){return new Promise(function(C){h.forceUpdate(),C(p)})}),destroy:function(){m(),f=!0}};if(!Ho(d,s))return h;h.setOptions(c).then(function(C){!f&&c.onFirstUpdate&&c.onFirstUpdate(C)});function w(){p.orderedModifiers.forEach(function(C){var g=C.name,x=C.options,B=x===void 0?{}:x,L=C.effect;if(typeof L=="function"){var E=L({state:p,name:g,instance:h,options:B}),k=function(){};u.push(E||k)}})}function m(){u.forEach(function(C){return C()}),u=[]}return h}}var Jc=[xc,Mc,Cc,sc,Dc,Vc,Uc,hc,vc],Zc=Qc({defaultModifiers:Jc});function Bn(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 Wo(t,n){if(t){if(typeof t=="string")return Bn(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)?Bn(t,n):void 0}}function ed(t){return function(n){if(Array.isArray(n))return Bn(n)}(t)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(t)||Wo(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 Qe(t){return Qe=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},Qe(t)}function qo(t,n,o,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void o(c)}d.done?n(s):Promise.resolve(s).then(a,r)}function Yo(t){return function(){var n=this,o=arguments;return new Promise(function(a,r){var l=t.apply(n,o);function i(s){qo(l,a,r,i,d,"next",s)}function d(s){qo(l,a,r,i,d,"throw",s)}i(void 0)})}}var Ko={exports:{}},Xo={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})(Xo),function(t){var n=Xo.exports.default;function o(){t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(_,A,v){_[A]=v.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(_,A,v){return Object.defineProperty(_,A,{value:v,enumerable:!0,configurable:!0,writable:!0}),_[A]}try{f({},"")}catch{f=function(A,v,U){return A[v]=U}}function h(_,A,v,U){var R=A&&A.prototype instanceof L?A:L,Y=Object.create(R.prototype),X=new H(U||[]);return d(Y,"_invoke",{value:F(_,v,X)}),Y}function w(_,A,v){try{return{type:"normal",arg:_.call(A,v)}}catch(U){return{type:"throw",arg:U}}}r.wrap=h;var m="suspendedStart",C="suspendedYield",g="executing",x="completed",B={};function L(){}function E(){}function k(){}var O={};f(O,c,function(){return this});var b=Object.getPrototypeOf,y=b&&b(b(z([])));y&&y!==l&&i.call(y,c)&&(O=y);var S=k.prototype=L.prototype=Object.create(O);function T(_){["next","throw","return"].forEach(function(A){f(_,A,function(v){return this._invoke(A,v)})})}function I(_,A){function v(R,Y,X,Z){var ee=w(_[R],_,Y);if(ee.type!=="throw"){var oe=ee.arg,ie=oe.value;return ie&&n(ie)=="object"&&i.call(ie,"__await")?A.resolve(ie.__await).then(function(le){v("next",le,X,Z)},function(le){v("throw",le,X,Z)}):A.resolve(ie).then(function(le){oe.value=le,X(oe)},function(le){return v("throw",le,X,Z)})}Z(ee.arg)}var U;d(this,"_invoke",{value:function(R,Y){function X(){return new A(function(Z,ee){v(R,Y,Z,ee)})}return U=U?U.then(X,X):X()}})}function F(_,A,v){var U=m;return function(R,Y){if(U===g)throw new Error("Generator is already running");if(U===x){if(R==="throw")throw Y;return{value:a,done:!0}}for(v.method=R,v.arg=Y;;){var X=v.delegate;if(X){var Z=$(X,v);if(Z){if(Z===B)continue;return Z}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(U===m)throw U=x,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);U=g;var ee=w(_,A,v);if(ee.type==="normal"){if(U=v.done?x:C,ee.arg===B)continue;return{value:ee.arg,done:v.done}}ee.type==="throw"&&(U=x,v.method="throw",v.arg=ee.arg)}}}function $(_,A){var v=A.method,U=_.iterator[v];if(U===a)return A.delegate=null,v==="throw"&&_.iterator.return&&(A.method="return",A.arg=a,$(_,A),A.method==="throw")||v!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+v+"' method")),B;var R=w(U,_.iterator,A.arg);if(R.type==="throw")return A.method="throw",A.arg=R.arg,A.delegate=null,B;var Y=R.arg;return Y?Y.done?(A[_.resultName]=Y.value,A.next=_.nextLoc,A.method!=="return"&&(A.method="next",A.arg=a),A.delegate=null,B):Y:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,B)}function M(_){var A={tryLoc:_[0]};1 in _&&(A.catchLoc=_[1]),2 in _&&(A.finallyLoc=_[2],A.afterLoc=_[3]),this.tryEntries.push(A)}function j(_){var A=_.completion||{};A.type="normal",delete A.arg,_.completion=A}function H(_){this.tryEntries=[{tryLoc:"root"}],_.forEach(M,this),this.reset(!0)}function z(_){if(_||_===""){var A=_[c];if(A)return A.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var v=-1,U=function R(){for(;++v<_.length;)if(i.call(_,v))return R.value=_[v],R.done=!1,R;return R.value=a,R.done=!0,R};return U.next=U}}throw new TypeError(n(_)+" is not iterable")}return E.prototype=k,d(S,"constructor",{value:k,configurable:!0}),d(k,"constructor",{value:E,configurable:!0}),E.displayName=f(k,u,"GeneratorFunction"),r.isGeneratorFunction=function(_){var A=typeof _=="function"&&_.constructor;return!!A&&(A===E||(A.displayName||A.name)==="GeneratorFunction")},r.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,k):(_.__proto__=k,f(_,u,"GeneratorFunction")),_.prototype=Object.create(S),_},r.awrap=function(_){return{__await:_}},T(I.prototype),f(I.prototype,p,function(){return this}),r.AsyncIterator=I,r.async=function(_,A,v,U,R){R===void 0&&(R=Promise);var Y=new I(h(_,A,v,U),R);return r.isGeneratorFunction(A)?Y:Y.next().then(function(X){return X.done?X.value:Y.next()})},T(S),f(S,u,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(_){var A=Object(_),v=[];for(var U in A)v.push(U);return v.reverse(),function R(){for(;v.length;){var Y=v.pop();if(Y in A)return R.value=Y,R.done=!1,R}return R.done=!0,R}},r.values=z,H.prototype={constructor:H,reset:function(_){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(j),!_)for(var A in this)A.charAt(0)==="t"&&i.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=a)},stop:function(){this.done=!0;var _=this.tryEntries[0].completion;if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var A=this;function v(ee,oe){return Y.type="throw",Y.arg=_,A.next=ee,oe&&(A.method="next",A.arg=a),!!oe}for(var U=this.tryEntries.length-1;U>=0;--U){var R=this.tryEntries[U],Y=R.completion;if(R.tryLoc==="root")return v("end");if(R.tryLoc<=this.prev){var X=i.call(R,"catchLoc"),Z=i.call(R,"finallyLoc");if(X&&Z){if(this.prev<R.catchLoc)return v(R.catchLoc,!0);if(this.prev<R.finallyLoc)return v(R.finallyLoc)}else if(X){if(this.prev<R.catchLoc)return v(R.catchLoc,!0)}else{if(!Z)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return v(R.finallyLoc)}}}},abrupt:function(_,A){for(var v=this.tryEntries.length-1;v>=0;--v){var U=this.tryEntries[v];if(U.tryLoc<=this.prev&&i.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var R=U;break}}R&&(_==="break"||_==="continue")&&R.tryLoc<=A&&A<=R.finallyLoc&&(R=null);var Y=R?R.completion:{};return Y.type=_,Y.arg=A,R?(this.method="next",this.next=R.finallyLoc,B):this.complete(Y)},complete:function(_,A){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&A&&(this.next=A),B},finish:function(_){for(var A=this.tryEntries.length-1;A>=0;--A){var v=this.tryEntries[A];if(v.finallyLoc===_)return this.complete(v.completion,v.afterLoc),j(v),B}},catch:function(_){for(var A=this.tryEntries.length-1;A>=0;--A){var v=this.tryEntries[A];if(v.tryLoc===_){var U=v.completion;if(U.type==="throw"){var R=U.arg;j(v)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(_,A,v){return this.delegate={iterator:z(_),resultName:A,nextLoc:v},this.method==="next"&&(this.arg=a),B}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}(Ko);var Bt=Ko.exports(),Ot=Bt;try{regeneratorRuntime=Bt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Bt:Function("r","regeneratorRuntime = r")(Bt)}function td(t){var n=function(o,a){if(Qe(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var l=r.call(o,a||"default");if(Qe(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}(t,"string");return Qe(n)==="symbol"?n:String(n)}function On(t,n,o){return(n=td(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Vt=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 l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var w=f/t.size*100,m=100-h/t.size*100;o("change",w,m)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Qo=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},nd=Qo(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),od=Qo(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ie(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))}}Ie(".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}"),Vt.render=function(t,n,o,a,r,l){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"]))},[nd,od,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Vt.__scopeId="data-v-24517fec",Vt.__file="src/picker/Saturation.vue";var It=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 l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;o("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),ad={ref:"canvas"};Ie(".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}"),It.render=function(t,n,o,a,r,l){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",ad,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},It.__scopeId="data-v-78b9f4f0",It.__file="src/picker/Hue.vue";var vt=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(),l=function(){var i=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"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=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));o("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),rd={ref:"canvas"};Ie(".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}"),vt.render=function(t,n,o,a,r,l){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",rd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},vt.__scopeId="data-v-24dc9656",vt.__file="src/picker/Alpha.vue";var $t=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")}}}}),ld={class:"input"},id={class:"label"},sd=[".value"];function yt(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 l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(o)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,n)||Wo(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 Jo(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 we(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?Jo(Object(o),!0).forEach(function(a){On(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Jo(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ie(".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}"),$t.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",ld,[e.createElementVNode("span",id,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,sd)])},$t.__scopeId="data-v-d52a4d02",$t.__file="src/picker/InputValue.vue";var Zo=function(t,n,o){return[t,n*o/((t=(2-n)*o)<1?t:2-t)||0,t/2]},ea={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ft=function(t){t=Math.min(Math.round(t),255);var n=Math.floor(t/16),o=t%16;return"".concat(ea[n]||n).concat(ea[o]||o)},ta=function(t){var n=t.r,o=t.g,a=t.b;return isNaN(n)||isNaN(o)||isNaN(a)?"":"#".concat(Ft(n)).concat(Ft(o)).concat(Ft(a))},Je=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)},gt=function(t,n,o){t=6*Je(t,360),n=Je(n,100),o=Je(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},na=function(t,n,o){var a=t.h,r=t.s,l=t.v,i=t.a;if(o)switch(n){case"hsl":var d=Zo(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=gt(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(ta(gt(a,r,l))).concat(Ft(255*i))}else switch(n){case"hsl":var f=Zo(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=gt(a,r,l),w=h.r,m=h.g,C=h.b;return"rgb(".concat(w,", ").concat(m,", ").concat(C,")");default:return ta(gt(a,r,l))}},Dt=function(t){var n=t.r,o=t.g,a=t.b;n=Je(n,255),o=Je(o,255),a=Je(a,255);var r,l=Math.max(n,o,a),i=Math.min(n,o,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case n:r=(o-a)/s+(o<a?6:0);break;case o:r=(a-n)/s+2;break;case a:r=(n-o)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},oa=function(t){var n=t.h,o=t.s,a=t.l;a/=100;var r=o/=100,l=Math.max(a,.01);return o*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+n,s:100*(a===0?2*r/(l+r):2*o/(a+o)),v:100*((a+o)/2)}},aa=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]}},Vn=function(t,n,o){if(typeof t=="string"&&t!==""){var a=In(t,vn(t),o),r=sa(a);return na(r,n,o)}return""},ra=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4);return{r:n[0],g:n[1],b:n[2],a:n[3]}},la=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:o,s:parseFloat(a),l:parseFloat(r),a:l}},ia=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:parseFloat(o),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},In=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,l=o.b,i=o.a;return we(we({},Dt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=ia(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=la(t),c=s.h,p=s.s,u=s.l,f=s.a;return we(we({},oa({h:c,s:p,l:u})),{},{a:+f});default:var h=aa(t),w=h.r,m=h.g,C=h.b,g=h.a;return we(we({},Dt({r:w,g:m,b:C})),{},{a:g/255})}else switch(n){case"rgb":return we(we({},Dt(ra(t))),{},{a:1});case"hsv":var x=ia(t);return{h:x.h,s:x.s,v:x.v,a:1};case"hsl":return we(we({},oa(la(t))),{},{a:1});default:return we(we({},Dt(aa(t))),{},{a:1})}},vn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},sa=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}},bt=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)+"")}),l=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"):""}}),i=function(){var d=n.value.getContext("2d");n.value.width=e.unref(a),n.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"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(){i()}),e.onMounted(function(){i()}),{canvas:n,colorItemStyle:l}}}),cd=["draggable"];Ie(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),bt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,cd)},bt.__scopeId="data-v-02da71fd",bt.__file="src/color-item/ColorItem.vue";var Pt=e.defineComponent({name:"Colors",components:{ColorItem:bt},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 Vn(a,"hex",!0)})})}}}),dd={class:"colors"};function ca(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 Ee(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ca(Object(o),!0).forEach(function(a){On(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ca(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ie(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Pt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",dd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Pt.__scopeId="data-v-0f8b52a8",Pt.__file="src/picker/Colors.vue";var Mt=e.defineComponent({name:"Picker",components:{Colors:Pt,Saturation:Vt,Hue:It,Alpha:vt,InputValue:$t},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 Ee(Ee({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var x,B=(x=t.value)===null||x===void 0?void 0:x.trim();if(B!=null&&B!==""){var L=vn(B);return sa(In(B,L,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(x,B){var L="";x!=null?(L=na(Ee({},x),t.format,t.showAlpha),i.value=Ee({},x)):i.value=null,d.value=L;var E=s();JSON.stringify(x)!==JSON.stringify(E)&&JSON.stringify(x)!==JSON.stringify(B)&&o("change",L)},{immediate:!0});var c=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.h)||0}),p=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.s)||0}),u=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.v)||0}),f=e.computed(function(){var x,B;return((x=e.unref(l))===null||x===void 0?void 0:x.a)!=null?(B=e.unref(l))===null||B===void 0?void 0:B.a:1}),h=e.computed(function(){return gt(e.unref(c),e.unref(p),e.unref(u))}),w=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),m=e.computed(function(){var x=t.format;if(t.showAlpha)switch(x){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(x){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),C=e.ref(-1),g=function(x,B,L){if(x.length!==0){var E=In(x,B,L),k=E.h,O=E.s,b=E.v;if(!(isNaN(k)||isNaN(O)||isNaN(b))){var y=1,S=E.a;isNaN(S)||(y=S),l.value={h:k,s:O,v:b,a:y}}}};return{h:c,s:p,v:u,a:f,rgbStr:w,onSelectSaturation:function(x,B){C.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:x,v:B,a:e.unref(f)}:l.value=Ee(Ee({},e.unref(l)),{},{s:x,v:B})},onSelectHue:function(x){C.value=-1,e.unref(l)==null&&(l.value={h:x,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=Ee(Ee({},e.unref(l)),{},{h:x})},onSelectAlpha:function(x){C.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:x}:l.value=Ee(Ee({},e.unref(l)),{},{a:x})},label:m,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(x){C.value=-1,d.value=x},handleChange:function(){var x,B=(x=e.unref(d))===null||x===void 0?void 0:x.trim();if(B!==""){var L=t.showAlpha,E=t.format,k=function(O,b,y){if(y)switch(b){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(b){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)}}(B,E,L);k?g(B,E,L):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:C,onSelectColor:function(x,B){if(C.value=B,(x=x.trim())==="")l.value=null;else{var L=vn(x);L?g(x,L,!0):l.value=null}}}}}),pd={class:"picker-inner"},ud={class:"picker-header"};Ie(".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}"),Mt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=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",pd,[e.createElementVNode("div",ud,[e.createVNode(i,{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(s,{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)},Mt.__scopeId="data-v-6ceadec6",Mt.__file="src/picker/Picker.vue";var jt=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"):""}})}}}),fd=[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 da(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 $n(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?da(Object(o),!0).forEach(function(a){On(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):da(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Ie(".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}"),jt.render=function(t,n,o,a,r,l){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(fd),4)},jt.__scopeId="data-v-ceb1719c",jt.__file="src/add-color-item/AddColorItem.vue";var Re=null,Ze=e.defineComponent({name:"ColorPicker",components:{ColorItem:bt,Picker:Mt,AddColorItem:jt},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($){return Vn($,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var $=t.value||"",M=Array.isArray($)?$:[$];a.value=M.map(function(j){return Vn(j,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,w,m=e.ref(null),C=e.ref(null),g=(s=m,c=C,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Re.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($){var M=$.state,j=M.styles,H=M.placement,z=j.popper;u.value=$n($n($n({},z),p),{},{transformOrigin:H==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function($,M){var j,H=yt($,2),z=H[0],_=H[1],A=yt(M,2),v=A[0],U=A[1];if(z&&_&&(v!==z||U!==v)){(j=Re)===null||j===void 0||j.destroy();var R=z.$el||z,Y=_.$el||_;e.nextTick(function(){Re=Zc(R,Y,f)})}}),e.onBeforeUnmount(function(){var $;Re&&(($=Re)===null||$===void 0||$.destroy(),Re=null)}),{instance:Re,style:u}),x=g.style,B=function(){e.unref(m)==null&&(m.value=e.unref(F)[0],l.value=0),t.showPicker===void 0?d.value=!0:o("update:showPicker",!0)},L=function(){l.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]))},E=e.ref(),k=function(){var $=Yo(Ot.mark(function M(j){var H,z,_,A;return Ot.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(z=j.target,(_=(H=z.dataset)===null||H===void 0?void 0:H.index)!=null&&_!==""){v.next=4;break}return v.abrupt("return");case 4:if(A=+_,e.unref(l)!==A){v.next=7;break}return v.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==A?(L(),h&&clearTimeout(h),h=setTimeout(function(){B(),clearTimeout(h)},100)):B(),l.value=A,m.value=z;case 10:case"end":return v.stop()}},M)}));return function(M){return $.apply(this,arguments)}}(),O=function(){var $=Yo(Ot.mark(function M(j){var H,z,_,A,v;return Ot.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(A=j.target,!(!((H=e.unref(E))!==null&&H!==void 0&&H.isEqualNode(A))&&(!((z=e.unref(E))===null||z===void 0)&&z.contains(A)))){U.next=4;break}return U.abrupt("return");case 4:if(v=(_=e.unref(C))===null||_===void 0?void 0:_.$el,!(v!=null&&v.contains(A))){U.next=8;break}return U.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&L()},0);case 10:case"end":return U.stop()}},M)}));return function(M){return $.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(B(),clearTimeout(w))});var b,y=e.ref(t.max>e.unref(a).length),S=e.computed(function(){return typeof t.popupContainer=="string"||Qe(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),T=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),I=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(C)]},function(){e.nextTick(function(){var $,M;($=e.unref(E))===null||$===void 0||$.setAttribute("pick-colors-theme",e.unref(I)),(M=e.unref(C))===null||M===void 0||(M=M.$el)===null||M===void 0||M.setAttribute("pick-colors-theme",e.unref(I))})},{immediate:!0}),e.provide("theme",{theme:I});var F=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&B()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function($){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===$},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:y,onPickerChange:function($){var M=e.unref(l),j=e.unref(a).slice(),H=e.unref(a).length;if(M!=null){M>=0?j[M]=$:(l.value=H,j.push($));var z="";z=Array.isArray(t.value)||t.addColor?j:$,t.value===void 0?a.value=Array.isArray(z)?z:[z]:(o("update:value",z),o("change",z,$,M)),t.addColor&&H>=t.max&&(y.value=!1,o("overflowMax"))}},colorPicker:E,onColorClick:k,pickerRef:C,onColorItemDragStart:function($){$.dataTransfer.effectAllowed="move";var M=$.target;b=+M.dataset.index},onColorItemDragOver:function($){},onColorItemDrop:function($){var M=+$.target.dataset.index,j=ed(e.unref(a)),H=j[b];j.splice(b,1);var z=j.slice(0,M),_=j.splice(M),A=z.concat([H]).concat(_);o("update:value",A),o("change",A,A[b],b)},colorItemsRef:F,pickerStyle:x,values:r,teleportDisabled:T,toPopupContainer:S}}});Ie(".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)}"),Ze.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=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(c,p){return e.openBlock(),e.createBlock(i,{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(s,{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)},Ze.__scopeId="data-v-3c43ade8",Ze.__file="src/ColorPicker.vue";const md=e.defineComponent({name:"ColorPick",components:{PickColors:Ze,AInput:P.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}}}}),lu="",hd={class:"color-pick"};function yd(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",hd,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":n[0]||(n[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":n[1]||(n[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const gd=J(md,[["render",yd],["__scopeId","data-v-e2113f43"]]),bd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Ze},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:n}){const o=l=>{n("change",l)},a=e.ref(13);return{onColorsChange:o,max:a,onOverflowMax:()=>{P.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),iu="",Cd={class:"color-group-pick"};function wd(t,n,o,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Cd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const xd=J(bd,[["render",wd],["__scopeId","data-v-b2be8322"]]),_d=e.defineComponent({name:"FormGroup",components:{Draggable:at,AppstoreAddOutlined:uo,MinusCircleOutlined:ol,PickColors:Ze,InputNumber:Lo,PlusCircleOutlined:il},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:c=>{n("change",c)}});return{myValue:o,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 f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),w={};h.forEach(m=>{w[m]=""}),c.push(w)}else typeof f=="string"&&c.push(f);o.value=c}else P.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const w=c==null?void 0:c.target,m=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;u?f[p][u]=m:f[p]=m,o.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){P.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),o.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),su="",kd={class:"form-group"},Sd={class:"form-row"},Ad={key:0,class:"label"},Nd={key:1,class:"label"},Ld={class:"icon-group"};function Td(t,n,o,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",kd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":n[0]||(n[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Sd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Nd,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:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Ld,[(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(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Ed=J(_d,[["render",Td],["__scopeId","data-v-f0c0ab4d"]]),Bd=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:P.Textarea},emits:["change"],setup(t,{emit:n}){return{onTextareaChange:a=>{n("change",a.target.value)}}}});function Od(t,n,o,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Vd=J(Bd,[["render",Od]]),Id=e.defineComponent({name:"PropsToForm",components:{Input:Fs,InputNumber:Lo,RadioGroup:Rs,Select:zs,Switch:qs,ColorPick:gd,ColorGroupPick:xd,FormGroup:Ed,Textarea:Vd},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const n=e.inject(wt),o=e.inject(Ut),a=e.inject(Gt),r=e.computed(()=>{var s;return(s=e.unref(n))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):o(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:w="change",events:m}=p;c[u]={...p,valueProp:h,value:f,events:{[w]:(C,g=!0)=>{l(g?{[u]:C}:{})},...m}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:te.reduce(s,(c,p,u)=>{const f=Is[u];if(Array.isArray(f)){const h=f.find(w=>{const{onlyType:m,excludeType:C}=w;return m==null&&C==null?!0:m?Ne(e.unref(r),m):C?!Ne(e.unref(r),C):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Ne}}}),cu="",vd={class:"props-to-form"},$d={class:"label"},Fd={class:"component-wrapper"};function Dd(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",vd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",$d,e.toDisplayString(i.label),1),e.createElementVNode("div",Fd,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Pd=J(Id,[["render",Dd],["__scopeId","data-v-c6fb2484"]]);function Md(){return new Worker("/assets/editor.worker-02df2e61.js")}function jd(){return new Worker("/assets/json.worker-867823a6.js")}function Rd(){return new Worker("/assets/ts.worker-7254b425.js")}const Ud=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(l,i){return i==="json"?new jd:i==="typescript"||i==="javascript"?new Rd:new Md}};const o=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=xa.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(te.debounce(()=>{const l=a==null?void 0:a.getValue();n("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();n("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:o}}}),du="",Gd={class:"editor",ref:"dom"};function zd(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",Gd,null,512)}const pa=J(Ud,[["render",zd],["__scopeId","data-v-71e88372"]]),Hd=[{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}],Wd=e.defineComponent({name:"TableColumnConfig",components:{ATable:P.Table,AModal:P.Modal,ACheckbox:P.Checkbox,AInput:P.Input,AInputNumber:P.InputNumber,ASelect:P.Select,ASelectOption:P.SelectOption,Editor:pa},setup(){const t=e.inject(De),n=e.computed(()=>{var m;return!!((m=e.unref(t))!=null&&m.isGroupTable)}),o=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.graphicConfig)||{}}),a=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(o,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var C,g,x;let m=[];if(r.value=[],!n.value)m=((C=e.unref(o))==null?void 0:C.queryColumnList)||[];else{const B=((g=e.unref(o))==null?void 0:g.rowHeaderList)||[],L=((x=e.unref(o))==null?void 0:x.indicators)||[];m=[...B,...L]}m.forEach(B=>{var E;let L=(E=e.unref(a))==null?void 0:E.find(k=>k.prop===B.name);L||(L={label:B.label,prop:B.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(L)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:Hd,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(m,C,g)=>{m&&C&&(l=m,i=C,d.value=m[C]||"",c.value=!0,s.value=g)},onEditorChange:m=>{try{d.value=m}catch(C){console.error(C)}},changeRenderBool:(m,C)=>{m.style=C.target.checked,m.style?m.renderBool===void 0&&(m.renderBool=!1):delete m.renderBool}}}}),pu="",qd={class:"table-column-config"};function Yd(t,n,o,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",qd,[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:m,record:C})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:g=>t.changeRenderBool(C,g),checked:C.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:C.width,"onUpdate:value":g=>C.width=g,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":g=>C.renderText=g,readOnly:!0,onClick:g=>t.renderSave(C,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),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":g=>C.headerTemplate=g,readOnly:!0,onClick:g=>t.renderSave(C,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:C.headerAlign,"onUpdate:value":g=>C.headerAlign=g},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{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":g=>C.align=g},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{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":g=>C.fixed=g},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{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":g=>C.dataFormat=g,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{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":g=>C.retentiondigit=g,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":n[0]||(n[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(f,{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 Kd=J(Wd,[["render",Yd],["__scopeId","data-v-afebddc0"]]),Xd=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Pd,TableColumnConfig:Kd,Editor:pa,AFormItem:P.FormItem,ASelect:P.Select,ASelectOption:P.SelectOption,ACollapse:P.Collapse,ACollapsePanel:P.CollapsePanel,ASwitch:P.Switch},setup(t){const n=e.ref([]),o=e.ref(["表格"]),a=e.inject(wt),r=e.inject(jn),l=e.inject(Ut),i=e.inject(Gt),d=e.inject(Mn),s=E=>{l({...zn[E]},!1),d()},c=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Vs.map(E=>{const{props:k,title:O,enableProps:b,onlyType:y,excludeType:S}=E,T=[];k.forEach($=>{typeof $=="string"&&(p.includes($)?t.isGroupTable&&T.push($):T.push($))});let I,F;return t.componentType&&(y!=null&&y.includes(t.componentType))?(I=typeof b=="string"&&r.value?r.value[b]:void 0,F=te.pick(e.unref(r),T)):(I=typeof b=="string"&&a.value?a.value[b]:void 0,F=te.pick(e.unref(a),T)),{title:O,enableProps:I,enablePropsName:b,onlyType:y,excludeType:S,props:F}}).filter(({props:E})=>Object.keys(E).length>0)),f=(E,k)=>{const{onlyType:O,excludeType:b}=E;return O==null&&b==null?!0:O?Ne(k,O):b?!Ne(k,b):!1},h=(E,k)=>(k==null||k.stopPropagation(),E),w=(E,k)=>{k!=null&&l({[k]:E})},m=e.computed(()=>JSON.stringify(e.unref(a),null,2)),C=E=>{try{const k=JSON.parse(E||"{}");l(k,!1)}catch(k){console.error(k)}},g=e.ref(""),x=E=>{try{g.value=E}catch(k){console.error(k)}},B=(E,k)=>{try{i({[k]:E})}catch(O){console.error(O)}},L=e.computed(()=>{var E;return["customGraph"].includes((E=e.unref(a))==null?void 0:E.type)});return{type:c,handleChangeType:s,activePanel:n,tablePanel:o,ComponentString:m,updateComponentOptions:C,tableOptions:r,optionCode:g,onEditorChange:x,tableEditorChange:B,onSwitchClick:h,onSwitchChange:w,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:L}}}),uu="",fu="",Qd={class:"style-group"};function Jd(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Qd,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":n[0]||(n[0]=m=>t.type=m),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":n[1]||(n[1]=m=>t.activePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[t.isRenderForm(m,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.title?(e.openBlock(),e.createBlock(u,{header:m.title,key:m.title},{extra:e.withCtx(()=>[typeof m.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:m.enableProps,onChange:C=>t.onSwitchChange(C,m.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:m.props,disabled:typeof m.enableProps=="boolean"?!m.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(f,{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(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":n[4]||(n[4]=m=>t.tablePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>{var C;return e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[m.title&&((C=m.onlyType)!=null&&C.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:m.title,key:m.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:m.props,disabled:typeof m.enableProps=="boolean"?!m.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(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:n[2]||(n[2]=m=>t.tableEditorChange(m,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:n[3]||(n[3]=m=>t.tableEditorChange(m,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Zd=J(Xd,[["render",Jd],["__scopeId","data-v-14fce418"]]),ep=e.defineComponent({name:"Card",components:{CloseOutlined:sn},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})}},emits:["delete","update"],setup(t,{emit:n}){const o=e.inject(Pe),a=e.inject(Ht),r=e.inject(Gn),l=e.computed(()=>{var b;return(b=e.unref(o))==null?void 0:b.filter(y=>y.keyName!=="")}),i=e.computed(()=>{var S,T;const b=[],y=(S=e.unref(l))==null?void 0:S.find(I=>{var F;return I.id===((F=t.control)==null?void 0:F.id)});if(y){const I=y.type,F=te.pick(y,["value","startTime","endTime"]);(T=Object.keys(F))!=null&&T.length||(F.value="");for(const $ in F)if(Object.prototype.hasOwnProperty.call(F,$)){const M=e.unref(r)[$];if(Array.isArray(M)){const j=M.find(H=>Ne(I,H.onlyType));j&&b.push({label:j.label,value:$})}else b.push({label:M.label,value:$})}}return b}),d=()=>{n("delete",t.index),s(t.control.id)};function s(b){const y=e.unref(l).find(S=>S.id===b);if(y){const{type:S,id:T,events:I=[]}=y,F=Cn(S),$=I.findIndex(M=>{var j;return M.on===F&&M.target===((j=e.unref(m))==null?void 0:j.id)&&M.emit==="refreshData"});$!==-1&&(I.splice($,1),a({id:T,events:I}))}}const c=b=>{const y={...t.control};if(y.id=b,b){const S=e.unref(l).find(T=>T.id===b);S&&(y.keyName=S.keyName,x(S,b))}delete y.prop,n("update",y,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=b=>{n("update",{...t.control,prop:b},t.index)},h=b=>{n("update",{...t.control,rule:b},t.index)},w=b=>{const y={...t.control};b==null?delete y.mode:y.mode=b,delete y.conditionLabel,delete y.conditionName,delete y.conditionKey,delete y.conditionValueType,n("update",y,t.index)},m=e.inject(De),C=e.inject(de),g=e.computed(()=>{const{classificationList:b=[],seriesList:y=[],leftAxisList:S=[],rightAxisList:T=[],indicatorList:I=[]}=e.unref(C),F=te.cloneDeep([...b,...y,...S,...T,...I]);if(F!=null&&F.length)for(const z of F)z.id=z.name;const $=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...F],M=new Map,j=$.length;for(let z=0;z<j;z++){const _=$[z],{id:A}=_||{};M.set(A,_)}return[...M].map(([z,_])=>_)});function x(b,y){var $;const{type:S,id:T,events:I=[]}=b,F=Cn(S);if(e.unref(p)&&y!==e.unref(p)){const{controlList:M=[]}=e.unref(C);M.find(j=>j.id===e.unref(p))||s(e.unref(p))}I.find(M=>{var j;return M.on===F&&M.target===((j=e.unref(m))==null?void 0:j.id)&&M.emit==="refreshData"})||a({id:T,events:[...I,{on:F,target:($=e.unref(m))==null?void 0:$.id,emit:"refreshData"}].reverse()})}const B=(b,y)=>{if(b){const{label:S,name:T,id:I,genericType:F}=y||{};n("update",{...t.control,conditionKey:I,conditionLabel:S,conditionName:T,conditionValueType:F},t.index)}else{const S={...t.control};delete S.conditionLabel,delete S.conditionName,delete S.conditionKey,delete S.conditionValueType,n("update",S,t.index)}},L=(b,y)=>{var S;return(S=y==null?void 0:y.keyName)==null?void 0:S.toLowerCase().includes(b==null?void 0:b.toLowerCase())},E=(b,y)=>{var S;return(S=y==null?void 0:y.label)==null?void 0:S.toLowerCase().includes(b==null?void 0:b.toLowerCase())},k=e.computed(()=>{const b=e.unref(g).find(S=>S.id===t.control.conditionKey);let y="";return b&&(y=(b==null?void 0:b.genericType)||""),y==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:y==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:y==="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"}]:[]}),O=e.computed(()=>{let b=!1;const{id:y=""}=t.control;if(y){const S=e.unref(l).find(T=>T.id===y);(S==null?void 0:S.type)==="ecanRangePicker"&&(b=!0)}return b});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:w,onRuleChange:h,conditionKeyOptions:g,onConditionKeyChange:B,idFilterOption:L,filterOption:E,ruleOption:k,isShowProp:O}}}),mu="",hu="",tp={class:"control-card"};function np(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",tp,[e.createVNode(i,{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(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:0,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const op=J(ep,[["render",np],["__scopeId","data-v-bbaef691"]]),ap=e.defineComponent({name:"ControlGroup",components:{ControlCard:op,AButton:P.Button},setup(t,{expose:n}){const o=e.inject(Pe),a=e.inject(de),r=e.inject(Be),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&!bn(h,"rule")&&(h.rule="EQUAL");return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:No({...e.unref(a),...u},e.unref(o))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var w;const h=(w=e.unref(l))==null?void 0:w.slice();h[f]=u,d({controlList:h})};return n({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),yu="",rp={class:"control-group"},lp={class:"control-group-header"},ip={class:"control-group-content"};function sp(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",rp,[e.createElementVNode("div",lp,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","onDelete","onUpdate"]))),128))])])}const cp=J(ap,[["render",sp],["__scopeId","data-v-1585a93c"]]),dp=(t={})=>{const n=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},o=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{o(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),o(i,"activeKey")&&delete i.activeKey,o(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:w,builtInCalcWay:m,formula:C,conditions:g,aggregate:x}=i;let B;return g&&(B=r(g)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:x,builtInFormula:h,builtInValueSource:w,builtInCalcWay:m,formula:C,conditions:B}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:w=[],seriesList:m=[],leftAxisList:C=[],rightAxisList:g=[],queryColumnList:x=[],indicators:B=[],dataSourceId:L,idxLibMode:E,preview:k=!1}=i||{};f==null&&(Ne(d,"table")?f="1":f="2");let O;if(Array.isArray(w)&&w.length>0){const T=w.length;for(let I=0;I<T;I++){const F=w[I]||{},{label:$="",name:M="",show:j=!1,sort:H,customGroup:z,conditions:_}=F;if(j||T===1){O={label:$.trim(),columnName:M,show:j,sort:H,customGroup:z,conditions:r(_)};break}}}let b;if(Array.isArray(m)&&m.length>0){const T=m.length;for(let I=0;I<T;I++){const F=m[I]||{},{label:$="",name:M="",show:j=!1,sort:H,customGroup:z,conditions:_}=F;if(j||T===1){b={label:$.trim(),columnName:M,show:j,sort:H,customGroup:z,conditions:r(_)};break}}}const y=[];x==null||x.forEach(T=>{y.push(n(T))});const S=[];if(C==null||C.forEach(T=>{T.location="LEFT",S.push(l(T))}),g==null||g.forEach(T=>{T.location="RIGHT",S.push(l(T))}),B==null||B.forEach(T=>{T.location="LEFT",S.push(l(T))}),!(f==="1"&&y.length===0)&&!(f==="2"&&S.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:O,series:b,indicatorList:S,queryColumns:y,pageFlag:!0,sqlConditions:[],dataSourceId:L,idxLibMode:E,preview:k})}catch(T){console.error(T)}}},ua=(t,n)=>{const o={dayjs:ae,...n};let a="";const r=[];for(const d in o)a+=`${d},`,r.push(o[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Rt=(t="",{textData:n,codeData:o}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...n},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],w=l[h];w!=null&&(c=c.replace(h,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=ua(c,o)),t=t.replace(s,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},Ct=(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 l=0;l<a;l++){const i=o[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,n);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=ua(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},pp=(t,n,o)=>{switch(t.type){case"bar":return up(t,n,o);case"line":return fp(t,n,o);case"pie":return mp(t,n,o);case"comboGraph":return hp(t,n,o);default:return{}}},up=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:m,name:C,value:g,data:x}=c[h]||{};h===0&&(u+=`${C}<br/>`),u+=Rt(f,{textData:{marker:w,name:C,value:g,a:m,b:C,c:g,...x}},{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(s),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 Ct(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l: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(c){return Ct(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},fp=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:o},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:m,name:C,value:g,data:x}=c[h]||{};h===0&&(u+=`${C}<br/>`),u+=Rt(f,{textData:{marker:w,name:C,value:g,a:m,b:C,c:g,...x}},{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 Ct(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:o,color:t.yAxisLabelColor,formatter(c){return Ct(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:o}},series:e.unref(s)}},mp=(t,n,o)=>{const{dataset:a=[]}=n;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return Rt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,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: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:Ei(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:{}}}]}},hp=(t,n,o)=>{const{dimensions:a=[],dataset:r=[]}=n,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:o}}:c={value:s,textStyle:{fontSize:o}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(p){return Ct(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:o}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const w=f[h],{tooltipFormatter:m}=w||{},{marker:C,seriesName:g,name:x,value:B,data:L}=s[h]||{};h===0&&(p+=`${x}<br/>`),p+=Rt(m||u,{textData:{marker:C,name:x,value:B,seriesName:g,a:g,b:x,c:B,...L}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),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(i)}},yp=(t=[],n)=>{let{name:o="name",types:a=[]}=n||{};o=(o==null?void 0:o.trim())||o;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:w,value:m}=h,C={...t[0],value:t[0][m]};r.add(w),p.push(C)}const u=t[0][o]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[o];r.add(f);for(let h=0;h<d;h++){const w=a[h],{label:m,value:C}=w,g={...u,value:u[C]};if(l.has(m)){const x=l.get(m);x.push(g),l.set(m,x)}else l.set(m,[g])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},gp=(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 l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[o]||"",h=u[a]||"",w=u[r]||"";if(l.add(f),i.has(w)){const m=i.get(w);m.push({name:f,value:h,...u}),i.set(w,m)}else i.set(w,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},bp=e.defineComponent({name:"ChartGraph",components:{ASpin:P.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:n}){const o=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Se);let l=null;const i=e.inject(Ae)||"",d=e.inject(de)||{},s=e.inject(wt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),w=e.computed(()=>h.value?Aa:12),m=e.ref({}),C=e.ref(),g=e.computed(()=>{const y=e.unref(o.value);if((y==null?void 0:y.type)==="customGraph")return C.value;const S=pp(y,e.unref(m),w.value);return{toolbox:{show:y.toolboxShow,left:y.toolboxLeft,top:y.toolboxTop,itemSize:y.toolboxItemSize,itemGap:y.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:y.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:y.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:y.titleText,subtext:y.titleSubtext,left:"center"},grid:{top:y.gridTop,bottom:y.gridBottom,left:y.gridLeft,right:y.gridRight,containLabel:y.gridContainLabel},color:y.colors,...S}}),x=(y=[],S,T=!1)=>{const I=T?S:null;m.value=yp(y,I)},B=(y=[],S)=>{m.value=gp(y,S)},L=async()=>{var y,S,T;try{const I=dp({graphicConfig:e.unref(a.value),type:(y=e.unref(o.value))==null?void 0:y.type,request:r,indicatorToken:i});f.value=!0;const F=await I(),{columns:$=[],rows:M=[]}=((S=F==null?void 0:F.data)==null?void 0:S.data)??{};if(((T=e.unref(o.value))==null?void 0:T.type)==="pie"){let j=[];if($.length>0){const H=$[0],z=$[1];j=M.map(_=>({name:_[H],value:_[z]}))}B(j)}else{let j;$.length>0&&(j={name:$[0],types:$.slice(1).map(H=>({label:H,value:H}))}),x(M,j,!0)}}catch(I){console.error(I)}finally{f.value=!1}},E={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},k=()=>{e.unref(m).dataset.length===0?u.value.setOption(E):u.value.setOption(g.value)},O=()=>{e.unref(o.value).type!=="customGraph"&&L()},b=()=>{var y;(y=u.value)==null||y.resize()};return e.watch(g,()=>{k()},{deep:!0}),e.watch(()=>e.unref(o.value).optionCode,y=>{try{const S=eval;C.value=S(y)}catch(S){console.error(S)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(b),l.observe(p.value)),u.value=Sa.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),n({refreshData:O}),{echartRef:c,loading:f}}}),gu="",Cp={class:"ecan-chart-graph",ref:"chartWrapRef"},wp={style:{width:"100%",height:"100%"},ref:"echartRef"};function xp(t,n,o,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",Cp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",wp,null,512)]),_:1},8,["spinning"])],512)}const fa=J(bp,[["render",xp],["__scopeId","data-v-8049fed2"]]),_p=e.defineComponent({name:"DataConfig",components:{DataGroup:Os,StyleGroup:Zd,ChartGraph:fa,ATabs:P.Tabs,ATabPane:P.TabPane,ControlGroup:cp},setup(){const t=e.ref("1"),n=e.ref([0,1,2]),o=e.ref(),a=e.inject(De),r=e.inject(Pn),l=e.inject(de),i=e.inject(Pe),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const m=te.cloneDeep(e.unref(a));c(m);const C=te.pick(m,te.without(Object.keys(m),"position","top","left","width","height"));Ne(m.type,d)?(C.height=m.height,C.width=m.width):C.height="290px";const g=te.cloneDeep(e.unref(l));return g.pageMode="design",g.preview=!0,{...C,graphicConfig:g,toolboxShow:!1}});function c(m){var C,g,x,B;["#ffffff","#fff"].includes((C=m==null?void 0:m.color)==null?void 0:C.toLowerCase())&&(m.color="#000"),["#ffffff","#fff"].includes((g=m==null?void 0:m.variableColor)==null?void 0:g.toLowerCase())&&(m.variableColor="#000"),["#ffffff","#fff"].includes((x=m==null?void 0:m.increaseColor)==null?void 0:x.toLowerCase())&&(m.increaseColor="#000"),["#ffffff","#fff"].includes((B=m==null?void 0:m.declineColor)==null?void 0:B.toLowerCase())&&(m.declineColor="#000")}const p=e.computed(()=>{let m=!0;return Ne(e.unref(s).type,d)&&(m=!1),m}),u=e.computed(()=>{var m;return(m=e.unref(s))==null?void 0:m.type}),f=e.computed(()=>{var m;return!!((m=e.unref(s))!=null&&m.isGroupTable)}),h=m=>{const C=m==="1";C&&u.value==="table"&&w(),window.changeShowTable&&window.changeShowTable(C)},w=()=>{var C;let m;r&&u.value==="table"?m=window.updateConfig:m=(C=e.unref(o))==null?void 0:C.refreshData,typeof m=="function"&&m()};return e.provide(Mn,w),e.watch(l,()=>{w()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:n,componentRef:o,type:u,isGroupTable:f,onChange:h,component:s,fullWidth:p,renderUsedComponents:i}}}),bu="",kp={class:"data-config"},Sp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Ap(t,n,o,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=f=>t.activeKey=f),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),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(s,{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"},null,512)]),_:1})):e.createCommentVNode("",!0)]),_: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",Sp,null,512)):e.withDirectives((e.openBlock(),e.createBlock(u,{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 Np=J(_p,[["render",Ap],["__scopeId","data-v-49a32221"]]),Lp=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Tl,DataConfig:Np},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:()=>{}}},setup(t,{expose:n,emit:o}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var k;return((k=e.unref(i))==null?void 0:k.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?te.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?te.cloneDeep(e.unref(i).chartsOptions):e.ref(te.cloneDeep(zn.line));p=e.ref(p);let u=e.unref(i).tableOptions?te.cloneDeep(e.unref(i).tableOptions):e.ref(te.cloneDeep(Na));u=e.ref(u);const f=e.ref([]),h=k=>{f.value=k},w=k=>{c.value={...e.unref(c),...e.unref(k)}},m=(k,O=!0)=>{O?p.value={...e.unref(p),...e.unref(k)}:p.value={...e.unref(k)}},C=k=>{u.value={...e.unref(u),...e.unref(k)}},g=()=>f,x=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=te.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=te.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},B=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=B,t.request&&e.provide(Se,t.request),e.provide(Dn,{setDataList:h,getDataList:g});const L=k=>{o("updateUsedComponent",k)},E=e.computed(()=>{const{renderUsedComponentList:k}=t;let O=null;return k!=null&&k.length&&(O=k.filter(b=>{var y;return b.id!==((y=e.unref(i))==null?void 0:y.id)})),O});return e.provide(De,i),e.provide(de,c),e.provide(wt,p),e.provide(jn,u),e.provide(zt,r),e.provide(Pn,s),e.provide(Ae,l),e.provide(Be,w),e.provide(Ut,m),e.provide(Gt,C),e.provide(Pe,E),e.provide(Ht,L),e.provide(Gn,t.mapAttributeProps),n({graphicConfig:c,chartsOptions:p,updateIndicatorData:x}),{isUpdate:a}}}),Cu="",Tp={key:0,class:"config-modal"},Ep={class:"config-modal-left"},Bp={class:"config-modal-right"};function Op(t,n,o,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tp,[e.createElementVNode("div",Ep,[e.createVNode(i)]),e.createElementVNode("div",Bp,[e.createVNode(d)])]))}const ma=Fn(J(Lp,[["render",Op],["__scopeId","data-v-9bdadbc5"]])),ha=Fn(fa),ya=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:ha,EcanIndicatorLibrary:ma},Symbol.toStringTag,{value:"Module"})),Vp={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(ya).forEach(a=>{const r=ya[a];r.install&&t.use(r)})}};se.EcanChartGraph=ha,se.EcanIndicatorLibrary=ma,se.default=Vp,Object.defineProperties(se,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|