@ecan-bi/datav 1.4.23 → 1.4.24
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/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.4.
|
|
1
|
+
/*! @ecan-bi/datav@1.4.24 */
|
|
2
2
|
(function(we,Oe){typeof exports=="object"&&typeof module<"u"?Oe(exports,require("vue"),require("echarts/core"),require("resize-detector"),require("ant-design-vue"),require("ant-design-vue/es/spin/style"),require("ant-design-vue/es/skeleton/style"),require("lodash-es"),require("dayjs"),require("axios"),require("mitt"),require("ant-design-vue/es/progress/style"),require("ant-design-vue/es/input/style"),require("ant-design-vue/es/date-picker/style"),require("ant-design-vue/es/date-picker/locale/zh_CN"),require("ant-design-vue/es/button/style"),require("ant-design-vue/es/checkbox/style"),require("ant-design-vue/es/select/style"),require("ant-design-vue/es/tree-select/style"),require("echarts/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/style"),require("echarts"),require("ant-design-vue/es/table/style"),require("ant-design-vue/es/notification/style"),require("xlsx"),require("big.js")):typeof define=="function"&&define.amd?define(["exports","vue","echarts/core","resize-detector","ant-design-vue","ant-design-vue/es/spin/style","ant-design-vue/es/skeleton/style","lodash-es","dayjs","axios","mitt","ant-design-vue/es/progress/style","ant-design-vue/es/input/style","ant-design-vue/es/date-picker/style","ant-design-vue/es/date-picker/locale/zh_CN","ant-design-vue/es/button/style","ant-design-vue/es/checkbox/style","ant-design-vue/es/select/style","ant-design-vue/es/tree-select/style","echarts/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","echarts","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],Oe):(we=typeof globalThis<"u"?globalThis:we||self,Oe(we["@ecan/bi-datav"]={},we.Vue,we["echarts/core"],we.ResizeDetector,we.AntDesignVue,null,null,we.LodashEs,we.Dayjs,we.Axios,we.Mitt,null,null,null,we["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,we["echarts/renderers"],we["echarts/charts"],we["echarts/components"],null,we.Echarts,null,null,we.Xlsx,we.big.js))})(this,function(exports,vue,core$1,resizeDetector,antDesignVue,style$1,style$2,lodashEs,dayjs,axios,mitt,style$3,style$4,style$5,locale,style$6,style$7,style$8,style$9,renderers,charts,components$1,style$a,echarts,style$b,style$c,xlsx,big_js){var we,Oe,Qe,et;"use strict";function _interopNamespaceDefault(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const echarts__namespace=_interopNamespaceDefault(echarts),METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(e,n){function r(a){return(...o)=>{if(e.value||n(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[a].apply(e.value,o)}}function i(){const a=Object.create(null);return METHOD_NAMES.forEach(o=>{a[o]=r(o)}),a}return i()}function useAutoresize(e,n,r){let i=null;vue.watch([r,e,n],([a,o,s],l,c)=>{a&&o&&s&&(i=core$1.throttle(()=>{o.resize()},100),resizeDetector.addListener(a,i)),c(()=>{i&&a&&resizeDetector.removeListener(a,i)})})}const autoresizeProps={autoresize:Boolean},LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(e,n,r){const i=vue.inject(LOADING_OPTIONS_KEY,{}),a=vue.computed(()=>({...vue.unref(i),...r==null?void 0:r.value}));vue.watchEffect(()=>{const o=e.value;o&&(n.value?o.showLoading(a.value):o.hideLoading())})}const loadingProps$1={loading:Boolean,loadingOptions:Object},style="",onRE=/^on[^a-z]/,isOn=e=>onRE.test(e);function omitOn(e){const n={};for(const r in e)isOn(r)||(n[r]=e[r]);return n}const TAG_NAME="x-vue-echarts",THEME_KEY="ecTheme",INIT_OPTIONS_KEY="ecInitOptions",UPDATE_OPTIONS_KEY="ecUpdateOptions",Echarts=vue.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...autoresizeProps,...loadingProps$1},inheritAttrs:!1,setup(e,{attrs:n,listeners:r}){const i=vue.shallowRef(),a=vue.shallowRef(),o=vue.shallowRef(),s=vue.inject(THEME_KEY,null),l=vue.inject(INIT_OPTIONS_KEY,null),c=vue.inject(UPDATE_OPTIONS_KEY,null),{autoresize:u,manualUpdate:f,loading:y,loadingOptions:h}=vue.toRefs(e),m=vue.computed(()=>o.value||e.option||Object.create(null)),v=vue.computed(()=>e.theme||vue.unref(s)||{}),p=vue.computed(()=>e.initOptions||vue.unref(l)||{}),S=vue.computed(()=>e.updateOptions||vue.unref(c)||{}),b=vue.computed(()=>omitOn(n));function d(_){if(a.value||!i.value)return;const T=a.value=core$1.init(i.value,v.value,p.value);e.group&&(T.group=e.group);let R=r;R||(R={},Object.keys(n).filter(B=>B.indexOf("on")===0&&B.length>2).forEach(B=>{const L=B.charAt(2).toLowerCase()+B.slice(3);R[L]=n[B]})),Object.keys(R).forEach(B=>{const L=R[B];L&&(B.indexOf("zr:")===0?T.getZr().on(B.slice(3).toLowerCase(),L):T.on(B.toLowerCase(),L))});function I(){if(T&&!T.isDisposed())try{T.resize()}catch(B){if(B.message==="Cannot read property 'get' of undefined")return;throw B}}function D(){T.setOption(_||m.value,S.value)}u.value?vue.nextTick(()=>{I(),D()}):D()}function g(_,T){e.manualUpdate&&(o.value=_),a.value?a.value.setOption(_,T||{}):d(_)}function x(){a.value&&(a.value.dispose(),a.value=void 0)}let C=null;vue.watch(f,_=>{typeof C=="function"&&(C(),C=null),_||(C=vue.watch(()=>e.option,T=>{T&&(a.value?a.value.setOption(T,S.value):d())},{deep:!0}))},{immediate:!0}),vue.watch([v,p],()=>{x(),d()},{deep:!0}),vue.watchEffect(()=>{e.group&&a.value&&(a.value.group=e.group)});const k=usePublicAPI(a,d);return useLoading(a,y,h),useAutoresize(a,u,i),vue.onMounted(()=>{e.option&&d()}),vue.onUnmounted(x),{chart:a,root:i,setOption:g,nonEventAttrs:b,...k}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",vue.h(TAG_NAME,e)}});function bound01(e,n){isOnePointZero(e)&&(e="100%");var r=isPercentage(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function isOnePointZero(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function isPercentage(e){return typeof e=="string"&&e.indexOf("%")!==-1}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function convertToPercentage(e){return e<=1?"".concat(Number(e)*100,"%"):e}function pad2(e){return e.length===1?"0"+e:String(e)}function rgbToRgb(e,n,r){return{r:bound01(e,255)*255,g:bound01(n,255)*255,b:bound01(r,255)*255}}function hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*(6*r):r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}function hslToRgb(e,n,r){var i,a,o;if(e=bound01(e,360),n=bound01(n,100),r=bound01(r,100),n===0)a=r,o=r,i=r;else{var s=r<.5?r*(1+n):r+n-r*n,l=2*r-s;i=hue2rgb(l,s,e+1/3),a=hue2rgb(l,s,e),o=hue2rgb(l,s,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function rgbToHsv(e,n,r){e=bound01(e,255),n=bound01(n,255),r=bound01(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o=0,s=i,l=i-a,c=i===0?0:l/i;if(i===a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s:c,v:s}}function hsvToRgb(e,n,r){e=bound01(e,360)*6,n=bound01(n,100),r=bound01(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),l=r*(1-(1-a)*n),c=i%6,u=[r,s,o,o,l,r][c],f=[l,r,r,s,o,o][c],y=[o,o,l,r,r,s][c];return{r:u*255,g:f*255,b:y*255}}function rgbToHex(e,n,r,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(n).toString(16)),pad2(Math.round(r).toString(16))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}var names={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 inputToRGB(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=stringInputToObject(e)),typeof e=="object"&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(n=rgbToRgb(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(i=convertToPercentage(e.s),a=convertToPercentage(e.v),n=hsvToRgb(e.h,i,a),s=!0,l="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(i=convertToPercentage(e.s),o=convertToPercentage(e.l),n=hslToRgb(e.h,i,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=boundAlpha(r),{ok:s,format:e.format||l,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:r}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),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 stringInputToObject(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(names[e])e=names[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=matchers.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=matchers.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=matchers.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=matchers.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=matchers.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=matchers.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=matchers.hex8.exec(e),r?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),a:convertHexToDecimal(r[4]),format:n?"name":"hex8"}:(r=matchers.hex6.exec(e),r?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),format:n?"name":"hex"}:(r=matchers.hex4.exec(e),r?{r:parseIntFromHex(r[1]+r[1]),g:parseIntFromHex(r[2]+r[2]),b:parseIntFromHex(r[3]+r[3]),a:convertHexToDecimal(r[4]+r[4]),format:n?"name":"hex8"}:(r=matchers.hex3.exec(e),r?{r:parseIntFromHex(r[1]+r[1]),g:parseIntFromHex(r[2]+r[2]),b:parseIntFromHex(r[3]+r[3]),format:n?"name":"hex"}:!1)))))))))}function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(String(e))}var hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{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 toHsv(e){var n=e.r,r=e.g,i=e.b,a=rgbToHsv(n,r,i);return{h:a.h*360,s:a.s,v:a.v}}function toHex(e){var n=e.r,r=e.g,i=e.b;return"#".concat(rgbToHex(n,r,i,!1))}function mix(e,n,r){var i=r/100,a={r:(n.r-e.r)*i+e.r,g:(n.g-e.g)*i+e.g,b:(n.b-e.b)*i+e.b};return a}function getHue(e,n,r){var i;return Math.round(e.h)>=60&&Math.round(e.h)<=240?i=r?Math.round(e.h)-hueStep*n:Math.round(e.h)+hueStep*n:i=r?Math.round(e.h)+hueStep*n:Math.round(e.h)-hueStep*n,i<0?i+=360:i>=360&&(i-=360),i}function getSaturation(e,n,r){if(e.h===0&&e.s===0)return e.s;var i;return r?i=e.s-saturationStep*n:n===darkColorCount?i=e.s+saturationStep:i=e.s+saturationStep2*n,i>1&&(i=1),r&&n===lightColorCount&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function getValue(e,n,r){var i;return r?i=e.v+brightnessStep1*n:i=e.v-brightnessStep2*n,i>1&&(i=1),Number(i.toFixed(2))}function generate$1(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],i=inputToRGB(e),a=lightColorCount;a>0;a-=1){var o=toHsv(i),s=toHex(inputToRGB({h:getHue(o,a,!0),s:getSaturation(o,a,!0),v:getValue(o,a,!0)}));r.push(s)}r.push(toHex(i));for(var l=1;l<=darkColorCount;l+=1){var c=toHsv(i),u=toHex(inputToRGB({h:getHue(c,l),s:getSaturation(c,l),v:getValue(c,l)}));r.push(u)}return n.theme==="dark"?darkColorMap.map(function(f){var y=f.index,h=f.opacity,m=toHex(mix(inputToRGB(n.backgroundColor||"#141414"),inputToRGB(r[y]),h*100));return m}):r}var presetPrimaryColors={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"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(e){presetPalettes[e]=generate$1(presetPrimaryColors[e]),presetPalettes[e].primary=presetPalettes[e][5],presetDarkPalettes[e]=generate$1(presetPrimaryColors[e],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[e].primary=presetDarkPalettes[e][5]});var containers=[],styleElements=[],usage="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function createStyleElement(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function insertCss(e,n){if(n=n||{},e===void 0)throw new Error(usage);var r=n.prepend===!0?"prepend":"append",i=n.container!==void 0?n.container:document.querySelector("head"),a=containers.indexOf(i);a===-1&&(a=containers.push(i)-1,styleElements[a]={});var o;return styleElements[a]!==void 0&&styleElements[a][r]!==void 0?o=styleElements[a][r]:(o=styleElements[a][r]=createStyleElement(),r==="prepend"?i.insertBefore(o,i.childNodes[0]):i.appendChild(o)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),o.styleSheet?o.styleSheet.cssText+=e:o.textContent+=e,o}function _objectSpread$8(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable}))),i.forEach(function(a){_defineProperty$8(e,a,r[a])})}return e}function _defineProperty$8(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function warn(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(n))}function warning(e,n){warn(e,"[@ant-design/icons-vue] ".concat(n))}function isIconDefinition(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function generate(e,n,r){return r?vue.h(e.tag,_objectSpread$8({key:n},r,e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(n,"-").concat(e.tag,"-").concat(a))})):vue.h(e.tag,_objectSpread$8({key:n},e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(n,"-").concat(e.tag,"-").concat(a))}))}function getSecondaryColor(e){return generate$1(e)[0]}function normalizeTwoToneColors(e){return e?Array.isArray(e)?e:[e]:[]}var iconStyles=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -99,7 +99,7 @@ version: 2.9.0
|
|
|
99
99
|
`,r+="-----END PUBLIC KEY-----",r},n.hasPublicKeyProperty=function(r){return r=r||{},r.hasOwnProperty("n")&&r.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(r){return r=r||{},r.hasOwnProperty("n")&&r.hasOwnProperty("e")&&r.hasOwnProperty("d")&&r.hasOwnProperty("p")&&r.hasOwnProperty("q")&&r.hasOwnProperty("dmp1")&&r.hasOwnProperty("dmq1")&&r.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(r){this.n=r.n,this.e=r.e,r.hasOwnProperty("d")&&(this.d=r.d,this.p=r.p,this.q=r.q,this.dmp1=r.dmp1,this.dmq1=r.dmq1,this.coeff=r.coeff)},n}(RSAKey),_a,version=typeof process<"u"?(_a=process.env)===null||_a===void 0?void 0:_a.npm_package_version:void 0,JSEncrypt=function(){function e(n){n===void 0&&(n={}),n=n||{},this.default_key_size=n.default_key_size?parseInt(n.default_key_size,10):1024,this.default_public_exponent=n.default_public_exponent||"010001",this.log=n.log||!1,this.key=null}return e.prototype.setKey=function(n){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(n)},e.prototype.setPrivateKey=function(n){this.setKey(n)},e.prototype.setPublicKey=function(n){this.setKey(n)},e.prototype.decrypt=function(n){try{return this.getKey().decrypt(b64tohex(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return hex2b64(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,r,i){try{return hex2b64(this.getKey().sign(n,r,i))}catch{return!1}},e.prototype.verify=function(n,r,i){try{return this.getKey().verify(n,b64tohex(r),i)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new JSEncryptRSAKey,n&&{}.toString.call(n)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,n);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version,e}();const encryptor=new JSEncrypt,aesKey=createAesKey();function createAesKey(){let n=Math.random().toString(36).substr(2);for(;n.length<16;)n+=Math.random().toString(36).substr(2);return n=n.substr(0,16),n}const iv=CryptoJS.enc.Utf8.parse("ABCDEF1234123412");function aesEncrypt(e,n){n=n||aesKey;const r=CryptoJS.enc.Utf8.parse(n);let i="";switch(typeof e){case"string":i=CryptoJS.enc.Utf8.parse(e);break;case"object":i=CryptoJS.enc.Utf8.parse(JSON.stringify(e));break;default:i=CryptoJS.enc.Utf8.parse(e.toString())}return CryptoJS.AES.encrypt(i,r,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding}).toString()}function aesDecrypt(e,n){n=n||aesKey;const r=CryptoJS.enc.Utf8.parse(n),i=CryptoJS.AES.decrypt(e,r,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding});return CryptoJS.enc.Utf8.stringify(i).toString()}function setPublicKey(e){encryptor.setPublicKey(e)}function rsaEncrypt(e){return encryptor.encrypt(e)}function hasEncryptUrl(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const r=["/diagram","/dataview"].map(i=>`^(.*?)${i}(/|$)`);for(const i of r)if(new RegExp(i).test(e))return!0;return!1}function EncryptConfigParam(e){const{paramType:n,data:r,params:i,method:a}=e;n==="form"?["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(r,"string"):["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(r)}function getEncryptParam(e,n){let r=e||{};if(n==="string"){r="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const c=e[l];r+=`${l}=${encodeURIComponent(c)}&`}}setPublicKey("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const a=rsaEncrypt(aesKey);return{c:aesEncrypt(r,aesKey),p:a}}window.getEncryptParam=getEncryptParam;function encryptData(e,n){var r;(r=window==null?void 0:window.config)!=null&&r.encryptFlag&&hasEncryptUrl(e.url)&&(e.data instanceof FormData?e.data=getEncryptFileParam(e.data):EncryptConfigParam(e))}function getEncryptFileParam(e){const n=e.entries(),r=new FormData,i={};for(const o of n){const s=o[0],l=o[1];l instanceof Blob?r.append(s,l):i[s]=l}const a=getEncryptParam(i,"json");return typeof a=="object"&&(r.append("c",a.c),r.append("p",a.p)),r}window.xhaesKey=aesKey,window.xhaesDecrypt=aesDecrypt;function decryptData(e,n){var r;if((r=window==null?void 0:window.config)!=null&&r.encryptFlag&&hasEncryptUrl(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const i=aesDecrypt(e.data.data.content,aesKey);e.data=JSON.parse(i)}}const requestErrorTip=window.config.requestErrorTip,request=axios.create({timeout:1e3*180});request.interceptors.request.use(e=>{const{requestParams:n={}}=window.config;return n!=null&&n.pltToken&&(e.headers["Plt-Token"]=n.pltToken),encryptData(e),e},e=>Promise.reject(e)),request.interceptors.response.use(e=>{var n,r,i;return requestErrorTip&&+((n=e==null?void 0:e.data)==null?void 0:n.code)==500&&antDesignVue.message.error({content:((r=e==null?void 0:e.data)==null?void 0:r.msg)||((i=e==null?void 0:e.data)==null?void 0:i.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),decryptData(e),e},e=>{if(decryptData(e==null?void 0:e.response),requestErrorTip)if(e.message.includes("timeout"))antDesignVue.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:n}=(e==null?void 0:e.response)||{};n>=400&&n<500&&antDesignVue.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),n>=500&&antDesignVue.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(e)});const runCode$1=(e,n)=>{const r={dayjs,...n};let i="";const a=[];for(const l in r)i+=`${l},`,a.push(r[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText$1=(e="",{textData:n,codeData:r}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const s={...window.config||{},...n},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let c=0;c<l.length;c++){const u=l[c];let f=u.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,h=f.match(y);for(let m=0;m<h.length;m++){const v=h[m],p=s[v];p!=null&&typeof p!="function"&&(f=f.replace(v,p))}(/\(.*\)/g.test(f)||/[+/\\*]/g.test(f))&&(f=runCode$1(f,r)),e=e.replace(u,f)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},useRequestData=(e,n,r=()=>{})=>{const{requestUrl:i,requestMethod:a,requestHeaders:o,requestParams:s,requestInterval:l,isOpenRequestTimer:c,openCustomRequestData:u,projectRequestUrl:f="",getModel:y,requestParamsMode:h,customRequestParams:m,dataSetParam:v,requestType:p,dataType:S}=e,{pageMode:b}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:d}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:g,touchEventId:x}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:C}=vue.inject(GLOBAL_MODEL,{getGlobalModel:I=>{}})||{},k=y||C,_=useVariablesInText$1(i),T=async(I={})=>{var A;if(S!=="request"&&R){clearInterval(R);return}if(!_||!a||!o)return;let D={};for(const w of s){const{key:$,value:E}=w;if((E==null?void 0:E.id)==="PARENT"&&(E!=null&&E.prop)){const V=(((A=window.config)==null?void 0:A.record)||{})[E.prop];if(V){const F=V[E.propKey||"value"];F&&(["date","range"].some(q=>lowerCaseIncludes$1(V==null?void 0:V.type,q))?D[$]=vue.unref(F).format(V.format||"YYYY-MM-DD"):D[$]=vue.unref(F))}continue}if(typeof E=="object"&&E!=null&&E.id){let N={};const{id:V,prop:F,propKey:H,operate:q}=E;let G=!1;try{JSON.parse(V),G=!0}catch{G=!1}V==="THIS"?N=k(vue.unref(x))||{}:N=k(V)||{};const U=vue.unref(N[F]);let O=null;if(["date","range"].some(J=>lowerCaseIncludes$1(N==null?void 0:N.type,J))){const{value:J,type:Q,mode:ee}=q||{};if(J&&Q&&ee)switch(Q){case"add":O=vue.unref(U).add(J,ee);break;case"minus":O=vue.unref(U).subtract(J,ee);break}O==null&&(O=vue.unref(U)),O=(O==null?void 0:O.format((H==null?void 0:H.trim())||N.format))||""}else if(Object.prototype.toString.call(U)==="[object Object]")H?O=U[H]:O=F?U[F]:U;else if(lowerCaseIncludes$1(N==null?void 0:N.type,"select")&&vue.unref(U)&&F&&Array.isArray(vue.unref(U)))O=vue.unref(U).map(J=>Object.prototype.hasOwnProperty.call(J,F)?J[F]:J);else if(G){const J=JSON.parse(V);console.log(J,"urlvalue"),O=J.value}else O=U;D[$]=O}else typeof E=="object"&&E.id===null&&p===1?(console.log(E.propKey,"value.propKey"),D[$]=E.propKey):typeof E=="string"&&(D[$]=useVariablesInText$1(E))}if(p===1){console.log(D,"_params");const w=Object.entries(D);v.param=v.param.map(($,E)=>({...$,paramKey:w[E][0],defaultValue:w[E][1]||""})),D=v}if(h==="2"&&m!=="{}"){const w=JSON.parse(m);B(w),w&&(D=w)}function B(w){const $={...D,...getPageUrlParams(d)};if(Array.isArray(w))w.forEach((E,N)=>{if(typeof E=="string"){const V=E.match(/\${(.+?)\}/g);if(V!=null&&V.length){const F=V[0].slice(2,-1);F&&$[F]?w[N]=$[F]:w[N]=""}}else B(E)});else if(Object.prototype.toString.call(w)==="[object Object]")for(const E in w)if(typeof w[E]=="string"){const N=w[E].match(/\${(.+?)\}/g);if(N!=null&&N.length){const V=N[0].slice(2,-1);V&&$[V]?w[E]=$[V]:w[E]=""}}else B(w[E])}D={...getPageUrlParams(d),...I,...D};let L="";const W=Object.keys(D),j=W.length-1,P=W.length;W.forEach((w,$)=>{let E=D[w];Object.prototype.toString.call(E)==="[object Object]"&&(E=JSON.stringify(E)),$===0?P!==1?L+=`?${w}=${E}&`:L+=`?${w}=${E}`:$===j?L+=`${w}=${E}`:L+=`${w}=${E}&`}),_.includes("?")&&(L=L.replace("?","&"));function M(w){var $;if(p===1)return{Authentication:($=window==null?void 0:window.config)==null?void 0:$.indicatorToken};if(typeof w=="string"){const E=JSON.parse(w),N=getPageUrlParams(d);if(Object.prototype.toString.call(E)==="[object Object]"){for(const V in E)if(typeof E[V]=="string"){const F=E[V].match(/\${(.+?)\}/g);if(F!=null&&F.length){const H=F[0].slice(2,-1);H&&N[H]?E[V]=N[H]:E[V]=""}}}return E}else return w}try{const w=["get","head"].includes(a),$={};let E=w?_+L:_;D.dataSqlId&&!E.includes("dataSqlId")&&(E+=`${E.includes("?")?"&":"?"}dataSqlId=${D.dataSqlId}`),Object.prototype.hasOwnProperty.call(D,"signal")?$.signal=D.signal:window.controller&&($.signal=window.controller.signal);const N=await request({baseURL:vue.unref(g)||f||"",url:E,method:a,headers:o?M(o):{},data:w?{}:D,...$});return r(N),N}catch(w){console.error(w)}},R=vue.unref(b)!=="design"&&c&&(u||u===void 0)&&setInterval(T,l*1e3);return vue.onUnmounted(()=>{clearInterval(R)}),T},useTransformChartDataByAttrKey$1=(e=[],n,r=!1)=>{let{name:i="name",types:a=[]}=n||{};i=(i==null?void 0:i.trim())||i;const o=new Set,s=new Map,l=e.length,c=a.length;if(l===1&&!r){const y=[];for(let m=0;m<c;m++){const v=a[m],{label:p,value:S}=v,b={...e[0],value:e[0][S]};o.add(p),y.push(b)}const h=e[0][i]||"";s.set(h,y)}else for(let y=0;y<l;y++){const h=e[y],m=h[i];o.add(m);for(let v=0;v<c;v++){const p=a[v],{label:S,value:b}=p,d={...h,value:h[b]||0};if(s.has(S)){const g=s.get(S);g.push(d),s.set(S,g)}else s.set(S,[d])}}const u=Array.from(o),f=[];for(const[y,h]of s)f.push({name:y,data:h});return{dimensions:u,dataset:f}},useImagePath=(e,n=!1)=>{var i;if(!e)return e;let r="";return e!=null&&e.includes("://")?r=e:r=((i=window==null?void 0:window.config)==null?void 0:i.uploadPath)+e,n&&(r=`url(${r})`),r},usePageUrl=(e,n)=>{const r=`${BASE_URL}/preview?pageId=${n}`,i=`${BASE_URL}/${n}`;return e==="preview"?r:i},useValueFormatter$1=(e,n)=>{var a;if(e==null)return n;const r=e.match(/\{.*\}/g);if(r==null||r.length===0)return n;const i=r.length;for(let o=0;o<i;o++){const s=r[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,n);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode$1(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e},runCode=(e,n)=>{const r={dayjs,...n};let i="";const a=[];for(const l in r)i+=`${l},`,a.push(r[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText=(e="",{textData:n,codeData:r}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const o={...n},s=(e||"").match(/\{(.+?)\}/g);if(s==null||s.length===0)return e;for(let l=0;l<s.length;l++){const c=s[l];let u=c.slice(1,-1).trim();const f=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,y=u.match(f);for(let h=0;h<y.length;h++){const m=y[h],v=o[m];v!=null&&(u=u.replace(m,v))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=runCode(u,r)),e=e.replace(c,u)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e=e.replace(/Qfw\((.*?)\)/,(l,c)=>n!=null&&n.Qfw?n==null?void 0:n.Qfw(c):c),e},lowerCaseIncludes=(e,n)=>{if(typeof e=="string"&&typeof n=="string")return e.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(n)){const r=n.length;for(let i=0;i<r;i++){const a=n[i];if(typeof a=="string"&&e.toLocaleLowerCase().includes(a.toLocaleLowerCase()))return!0}}return!1},hasOwn=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),getConditions=e=>{const n=[];for(const r of e)r.conditions?n.push(...getConditions(r.conditions)):(r==null?void 0:r.dataType)==="component"&&n.push(r);return n};function getFormatStep(e){const n=e.split("-");let r="";if(n!=null&&n.length)switch(n[n.length-1]){case"YYYY":r="year";break;case"MM":r="month";break;case"DD":r="day";break}return r}const handleFormatter=e=>e.replace(/\\n/g,`
|
|
100
100
|
`),getLegendFormat=(e="",n)=>{var s;const r=e.match(/\{(.+?)\}/g),i=((s=e.split(`
|
|
101
101
|
`))==null?void 0:s.length)-1;let a="";if(i)for(let l=0;l<i;l++)a+=`
|
|
102
|
-
`;let o=e;if(r!=null&&r.length){for(const l of r){const c=useVariablesInText(l,{textData:n},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e};function formatQfw(e){let n="",r="",i="",a="";e.indexOf(".")>-1?(r=e.split(".")[0],i=e.split(".")[1]):r=e;let o=0,s=0;for(s=r.length-1;s>=0;)o%3===0&&o!==0?r[s]==="-"?n+=r[s]:n+=","+r[s]:n+=r[s],s--,o++;return n=n.split("").reverse().join(""),e.indexOf(".")>-1?a=n+"."+i:a=n,a}async function getIndicatorParams({graphicConfig:e,request:n,INDICATOR_URL:r="",PAGE_ID:i,dataSourceId:a}){var o;try{const{leftAxisList:s=[],rightAxisList:l=[],queryColumnList:c=[],indicators:u=[]}=vue.unref(e),f=[...s,...l,...c,...u],y={};for(const h of f){const{indexCode:m="",parentId:v=""}=h;v&&!hasOwn(h,"calcType")&&!y[v]&&(y[v]=m)}if((o=Object.keys(y))!=null&&o.length){const h=[];for(const p in y)h.push(new Promise((S,b)=>{n.post(`${r}/diagram/hrpIndexWithComplex`,{pageId:i,indexGuid:p,indexCode:y[p],dataSourceId:a}).then(d=>{var C;const{success:g,data:x=[]}=d.data;g&&((C=x==null?void 0:x.dataViewColumns)!=null&&C.length)?S(x.dataViewColumns):b(x)}).catch(d=>{b(d)})}));return(await Promise.all(h)).reduce((p,S)=>p.filter(b=>S.find(d=>d.typeGuid===b.typeGuid))).filter(p=>p.typeGuid)}}catch{}return[]}const MODEL_KEY_LIST=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let modelValue=new Map;const excludeAttr=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],getGlobalModel=e=>modelValue.get(e),getCalcWays=(e,n={})=>{const{around:r,unit:i,id:a}=e;let o="";const{pageMode:s="",componentList:l=[]}=(n==null?void 0:n.graphicConfig)||{};let c=null,u=null;if(s==="design"){const f=l==null?void 0:l.find(b=>b.id===a);if(!f)return[];const{interval:y,intervalUnit:h,startTime:m,endTime:v,operate:p,useCurrentTime:S}=f||{};if(S&&(c=dayjs().subtract(y,h),u=dayjs()),m&&(c=dayjs(m)),v&&(u=dayjs(v)),p){const{type:b,value:d,mode:g}=p;switch(b){case"add":c=c&&c.add(d,g),u=u&&u.add(d,g);break;case"minus":c=c&&c.subtract(d,g),u=u&&u.subtract(d,g)}}}else{const f=getGlobalModel(a)||{};vue.unref(f.startTime)&&(c=dayjs(vue.unref(f.startTime))),vue.unref(f.endTime)&&(u=dayjs(vue.unref(f.endTime)))}if(c&&u){const f=u.diff(c,i.toLowerCase());o=`${r==="before"?"-":""}${f+1}`}return o?[o]:[]},handleParams=(e,n)=>{if(n)hasOwn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),hasOwn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),hasOwn(e,"dataType")&&delete e.dataType;else{const{calcWays:r=[],dateCalcTypes:i=[],activeKey:a,componentId:o=""}=e;if(a===5&&(r!=null&&r.length)&&(i!=null&&i.length)&&o){const s=r[0].split("-");(s==null?void 0:s.length)>1&&s[0]==="rangeValue"&&(e.calcWays=getCalcWays({around:s[1],unit:i[0],id:o})),delete e.radioValue}if(hasOwn(e,"dataType")){if(e.fieldType==="DATE"&&(e.label=e.fieldName),e.dataType==="component")if(e.fieldValue==="PARENT"){let s=e.modelKey;s&&e.prop&&(s+=`-${e.prop}`),e.fieldValue="${"+s+"}"}else e.fieldValue="${"+e.fieldValue+"}";delete e.dataType}hasOwn(e,"activeKey")&&delete e.activeKey,hasOwn(e,"radioValue")&&delete e.radioValue,hasOwn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),hasOwn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),e.dataType!=="component"&&e.useCurrentTime&&(e.fieldValue=dayjs().format(e.dateFormat)),hasOwn(e,"modelKey")&&delete e.modelKey,hasOwn(e,"prop")&&delete e.prop,delete e.useCurrentTime}},handleConditions=(e,n)=>{const r=[];return e!=null&&e.length&&lodashEs.cloneDeep(e).forEach(i=>{if(i.join&&i.conditions){const a=!i.conditions.some(o=>o.join&&o.conditions);i.conditions.forEach((o,s)=>{handleParams(o,n);const l={};if(s<i.conditions.length-1&&(l.join=i.join),a)r.push({...l,...o});else if(o.join&&o.conditions){const c=n?"sqlConditions":"conditions";r.push({[c]:handleConditions([o],n),...l})}else r.push({...l,...o})})}else handleParams(i,n),r.push(i)}),r},handleIndicator=(e={},n)=>{if(e!=null&&e.sortCpnts&&n){const x=getCpntSortData(e);x&&(n.sort=x)}const{label:r,name:i,location:a,show:o,indexCode:s,indexCodeNum:l,calcType:c="COLUMN",builtInFormula:u,builtInValueSource:f,builtInCalcWay:y,formula:h,conditions:m,aggregate:v,distinct:p,dimByCount:S,dataTo:b}=e;let d;if(m&&(d=handleConditions(m)),c==="COMPONENT"){const x={};return setFieldValue(x,f),{label:r.trim(),columnName:i,show:o,calcType:c,componentAlias:y,componentValue:x.fieldValue||null}}const g={label:r.trim(),columnName:i,location:a,show:o,calcType:b==="1"?"VIEW":c,hrpIndexCode:s,hrpIndexCodeNum:l,aggregate:v,builtInFormula:u,builtInValueSource:f,formula:h,conditions:d};if(u==="DATE_OFFSET"){const x=y.split("-");if((x==null?void 0:x.length)===3){let C=x[0];return x[2]==="before"&&x[0]!=="0"&&(C=`-${x[0]}`),{...g,calcWays:[C],dateCalcTypes:[x[1]]}}}else return i==="the_count"&&(g.calcType="AGGREGATE",g.distinct=!!p,g.typeGuid=S),{...g,builtInCalcWay:y}},handleSqlConditions=e=>{if(!e)return[];const n=lodashEs.cloneDeep((e==null?void 0:e.controlList)||[]).filter(v=>v.conditionKey!=="parentCode"),{classificationList:r=[],rowHeaderList:i=[],dimensionList:a=[],seriesList:o=[],leftAxisList:s=[],rightAxisList:l=[],queryColumnList:c=[],indicators:u=[]}=e;handleControlList(n);const f=[...r,...i,...a,...o,...s,...l,...c,...u],y=[];for(const v of f){const p=getConditions((v==null?void 0:v.conditions)||[]);if(p!=null&&p.length){const S=p.filter(b=>(b==null?void 0:b.dataType)==="component").map(b=>{const d={};return b!=null&&b.dateFormat&&(d.format=b.dateFormat),b.fieldValue==="PARENT"&&(d.id="PARENT",d.keyName=b.modelKey,d.modelKey=b.modelKey,d.prop=b.prop),{conditionKey:b.fieldName,conditionLabel:b.fieldName,conditionName:b.fieldName,conditionValueType:b.fieldType,id:b.componentId,keyName:b.fieldValue,rule:b.rule,notGlobal:!0,indexCode:b.indexCode,typeGuid:b.typeGuid,indexCodeNum:b.indexCodeNum,...d}});if(S!=null&&S.length)for(const b of S)y.find(d=>d.keyName===b.keyName)||y.push(b)}}const h=y.length,m=n;for(let v=0;v<h;v++){const p=y[v];if((p==null?void 0:p.conditionKey)==="parentCode")continue;const{id:S,keyName:b,prop:d,format:g,modelKey:x,dataType:C="component",customValue:k}=p,_=getConditionItem(p);setFieldValue(_,S,{prop:d,dateFormat:g,modelKey:x,keyName:b}),C===""&&(_.fieldValue=k||""),m.push(_)}for(let v=m.length-1;v>=0;v--){const p=m[v];p.globalCondition||getConditions(m).find(b=>b.alias===p.alias&&b.globalCondition)&&m.splice(v,1)}return m};function getConditionItem(e){const{id:n,keyName:r,conditionLabel:i,conditionKey:a,conditionValueType:o,prop:s,rule:l="NONE",notGlobal:c=!1,indexCode:u,typeGuid:f,indexCodeNum:y,dataType:h="component"}=e;let m=r||n;m&&s&&(m+=`-${s}`);let v=l;return v==="NONE"&&(["startTime","endTime"].includes(s)?v=s==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":r!=null&&r.includes("startTime")?v=s==="GREATER_EQUAL":r!=null&&r.includes("endTime")?v=s==="LESS_EQUAL":v="EQUAL"),n==="PARENT"&&(m=e.modelKey,m&&s&&(m+=`-${s}`),v=l),{rule:v,label:i,fieldName:a,fieldValue:"",valueType:o,alias:m,globalCondition:!c,indexCode:u,typeGuid:f,indexCodeNum:y,dataType:h}}function handleControlList(e){if(e!=null&&e.length)for(const n of e)if(n!=null&&n.conditions)handleControlList(n.conditions);else{const{id:r,keyName:i,prop:a,modelKey:o,format:s,dataType:l="component",customValue:c}=n,u=getConditionItem(n);setFieldValue(u,r,{prop:a,dateFormat:s,modelKey:o,keyName:i}),l===""&&(u.fieldValue=c||"");for(const f in u)n[f]=u[f];for(const f of excludeAttr)delete n[f]}}function handleVariableList(e){const n=[];if(e!=null&&e.length){for(const r of e)if(r.variableName){const i={variateName:r.variableName,globalCondition:!1,valueType:r.variableType,alias:r.keyName||""};setFieldValue(i,r.id,{dateFormat:r.format,prop:r.dateTypeValue,keyName:r.keyName,operateType:r.operateType,operateMode:r.operateMode,operateValue:r.operateValue}),r.dataType===""&&(i.fieldValue=r.variableValue),r.format&&(i.dateFormat=r.format),r.label&&(i.label=r.label),n.push(i)}}return n}function setFieldValue(e,n,r){const{prop:i="",dateFormat:a="",modelKey:o="",keyName:s="",operateValue:l,operateMode:c,operateType:u}=r||{},f=o||s;if(n==="PARENT"&&f&&i){const d=window.config.record;let g=i,x=a;const C=i.match(/\{(.+?)\}/g);if(C!=null&&C.length){const k=C[0].slice(1,-1).trim();g=i.replace(C[0],""),x=k,e.dateFormat=x}if(d&&d[f]){const k=vue.unref(d[f][g]);dayjs.isDayjs(k)?e.fieldValue=k.format(x||"YYYY-MM-DD"):e.fieldValue=k}return}const y=getGlobalModel(n)||{},{value:h,format:m="YYYY-MM-DD",type:v="",useCurrentTime:p,RECORD:S}=y||{},b=a||m;if(lowerCaseIncludes(y.type,"date")){let d;if(p?h?d=vue.unref(h):d=dayjs():d=vue.unref(h),l&&c&&u)switch(u){case"add":d=d.add(l,c);break;case"minus":d=d.subtract(l,c);break}e.fieldValue=d==null?void 0:d.format(b),e.dateFormat=b}else if(v==="ecanRangePicker"){let d=i;if(!i){const x=s&&s.split("-");x!=null&&x.length&&(d=x[x.length-1])}if(!d)return;let g=null;if(vue.unref(y[d])&&(g=dayjs(vue.unref(y[d]))),l&&c&&u){if(l==="rangeValue"){if(y.startTime&&y.endTime){const x=vue.unref(y.endTime).diff(vue.unref(y.startTime),c)+1;switch(u){case"add":g=g&&g.add(x,c);break;case"minus":g=g&&g.subtract(x,c)}}}else if(!isNaN(+l))switch(u){case"add":g=g&&g.add(l,c);break;case"minus":g=g&&g.subtract(l,c)}}if(g&&(e.fieldValue=g==null?void 0:g.format(b)),d==="rangeValue"&&y.startTime&&y.endTime){const x=getFormatStep(b);x&&(e.fieldValue=vue.unref(y.endTime).diff(vue.unref(y.startTime),x)+1)}e.dateFormat=b}else lowerCaseIncludes(v,MODEL_KEY_LIST)?o&&S?e.fieldValue=S[o]:!o&&S?e.fieldValue=S.value:e.fieldValue=vue.unref(h):e.fieldValue=vue.unref(h)}const handleSort=e=>{var n;if(e){const r=Array.isArray(e)?lodashEs.cloneDeep(e):[lodashEs.cloneDeep(e)];let i="",a=[];const o=[],s=[],l=[];for(const c of r){if(c.defaultCode&&(c.label=c.columnName,delete c.defaultCode),c.type==="CUSTOM"&&(a=c.customOrderColumns),i=c.type,o.push(c.label),(n=c.columnName)!=null&&n.includes("_ecanrepeat_")){const u=c.columnName.split("_ecanrepeat_");s.push(u[0])}else s.push(c.columnName);l.push(c.order)}return i!=="CUSTOM"&&(o==null?void 0:o.length)>1&&(i="COMBINATION"),i==="CUSTOM"?{label:o.join(","),columnName:s.join(","),type:i,customOrderColumns:a}:{label:o.join(","),columnName:s.join(","),order:l.join(","),type:i}}else return e},getCpntSortData=e=>{const{sortCpnts:n=[]}=e;let r,i="";for(const a of n){const o=getGlobalModel(a)||{},{type:s,RECORD:l}=o;if(lowerCaseIncludes(s,"image")&&lowerCaseIncludes(l==null?void 0:l.value,["asc","desc"])){i=l.value.toUpperCase();break}}return i&&(r={label:e.label,columnName:e.name,order:i,type:"NORMAL"}),r},formatIndicatorParams=(e,n={})=>{var H,q,G,U,O,Y,J,Q,ee;const{graphicConfig:r,type:i,globalModel:a,isGroupTable:o=!1}=e;a&&(modelValue=a);let s=e.pageId;const l=lowerCaseIncludes(i,"pivottable");let{source:c,dataViewId:u,plugin:f="1",layer:y,chartType:h,classificationList:m=[],rowHeaderList:v=[],dimensionList:p=[],seriesList:S=[],leftAxisList:b=[],rightAxisList:d=[],queryColumnList:g=[],indicators:x=[],controlList:C=[],formFields:k={},variableList:_=[],variableConditions:T=[],idxLibMode:R,preview:I=!1,edvDataSetId:D}=r||{},B=[];if((r==null?void 0:r.pageMode)==="design"?(B=(r.sqlConditions??[]).map(K=>{const Z={};if(!hasOwn(K,"globalCondition")&&!K.join&&(Z.globalCondition=!0),!K.join){const X=K.rule||"EQUAL";Z.rule=X==="NONE"?"EQUAL":X}return{...K,...Z}}),T!=null&&T.length&&(B=B.concat(T))):(B=handleSqlConditions(r),_!=null&&_.length&&(B=B.concat(handleVariableList(_)))),B!=null&&B.length){const K=B.filter(X=>X.globalCondition),Z=B.filter(X=>!X.globalCondition);(K==null?void 0:K.length)>1&&(B=[{join:"&&",conditions:K},...Z])}B!=null&&B.length&&(B=handleConditions(B,"1")),y==null&&(lowerCaseIncludes(i,["table","card"])||lowerCaseIncludes(i,["list","circulate"])&&(m==null?void 0:m.length)>1?y="1":lowerCaseIncludes(i,["select","checkbox","radio"])?y="3":y="2");let L;const W=[];let j="";if(Array.isArray(m)&&m.length>0&&(!["ecanList","ecanCirculate"].includes(i)||(m==null?void 0:m.length)===1)){const K=m.length;for(let Z=0;Z<K;Z++){const X=m[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,dateFormat:ve,typeGuid:ye="",truncations:ge=[]}=X;if(oe||K===1){j=ye,L={label:re.trim(),columnName:ae,show:oe,sort:getCpntSortData(X)||handleSort(le)||le,customGroup:ue,conditions:handleConditions(fe),typeGuid:ye},ve&&(L.dateFormat=ve),ae==="the_date"&&!L.dateFormat&&(L.dateFormat="YYYY-MM");const pe={};if(Array.isArray(ge)&&ge.length>0){const Se=ge.length;for(let Ee=0;Ee<Se;Ee++){const Ce=ge[Ee]||{},{rule:ke="",num:Te=0,name:Pe=""}=Ce;ke&&Te&&(pe.num=Te,pe.rule=ke,Pe&&(pe.otherGroupName=Pe))}}if((H=Object.keys(pe))!=null&&H.length&&(L.truncation=pe),lowerCaseIncludes(i,["scatter","valueline"]))W.push(L);else break}}}let P;if(Array.isArray(S)&&S.length>0){const K=S.length;for(let Z=0;Z<K;Z++){const X=S[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,typeGuid:ve}=X;if(oe||K===1){P={label:re.trim(),columnName:ae,show:oe,sort:handleSort(le),customGroup:ue,conditions:handleConditions(fe),typeGuid:ve};break}}}const M=[];b==null||b.forEach(K=>{K.location="LEFT",M.push(handleIndicator(K,L))}),d==null||d.forEach(K=>{K.location="RIGHT",M.push(handleIndicator(K,L))});let A=x;(G=(q=n==null?void 0:n.pivotTableCal)==null?void 0:q.indicators)!=null&&G.length&&(A=n.pivotTableCal.indicators),A==null||A.forEach(K=>{K.location="LEFT",M.push(handleIndicator(K,L))});const w=[];["ecanList","ecanCirculate"].includes(i)&&(m==null?void 0:m.length)>1&&(g=m),(O=(U=n==null?void 0:n.pivotTableCal)==null?void 0:U.dimensions)!=null&&O.length&&(g=n.pivotTableCal.dimensions),g==null||g.forEach(K=>{const{label:Z,name:X,location:re,show:ae,indexCode:oe,sort:le,typeGuid:ue,indexCodeNum:fe,dateFormat:ve,conditions:ye}=K;let ge=handleSort(le);if(n.sort){const{field:Se,order:Ee}=n.sort;let Ce=M.find(ke=>ke.label===Se);!Ce&&Z===Se&&(Ce=K),Ce&&(ge={columnName:Ce.columnName,label:n.sort.field,order:Ee.toUpperCase(),type:"NORMAL"})}const pe={label:Z,columnName:X,location:re,show:ae,sort:ge,calcType:"COLUMN",hrpIndexCode:oe,hrpIndexCodeNum:fe,conditions:handleConditions(ye),typeGuid:ue};ve&&(pe.dateFormat=ve),X==="the_date"&&!pe.dateFormat&&(pe.dateFormat="YYYY-MM"),w.push(pe)});let $=[],E=[];if(Array.isArray(v)&&v.length>0?E=v:Array.isArray(p)&&p.length>0&&(E=p),E!=null&&E.length){const K=E.length;for(let Z=0;Z<K;Z++){const X=E[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,truncations:ve,typeGuid:ye="",dateFormat:ge}=X;let pe=handleSort(le);if(n.sort){const{field:Ce,order:ke}=n.sort;let Te=M.find(Pe=>Pe.label===Ce);!Te&&X.label===Ce&&(Te=X),Te&&(pe={columnName:Te.columnName,label:n.sort.field,order:ke.toUpperCase(),type:"NORMAL"})}const Se={label:re.trim(),columnName:ae,show:oe,sort:pe,customGroup:ue,conditions:handleConditions(fe),typeGuid:ye};ge&&(Se.dateFormat=ge),ae==="the_date"&&!Se.dateFormat&&(Se.dateFormat="YYYY-MM");const Ee={};if(Array.isArray(ve)&&ve.length>0){const Ce=ve.length;for(let ke=0;ke<Ce;ke++){const Te=ve[ke]||{},{rule:Pe="",num:Ve=0,name:Le=""}=Te;Pe&&Ve&&(Ee.num=Ve,Ee.rule=Pe,Le&&(Ee.otherGroupName=Le))}}(Y=Object.keys(Ee))!=null&&Y.length&&(Se.truncation=Ee),$.push(Se)}}let N=[],V;if(n!=null&&n.pivotTableCal){let K=[];const{calc:Z=[],filter:X=[],truncations:re=[],sorts:ae=[],aggregateMethod:oe=[],rowDimensionKeys:le=[],colDimensionKeys:ue=[]}=n.pivotTableCal;if(M.push(...Z),X!=null&&X.length)for(const fe of X){const{type:ve,...ye}=fe;ve==="indicators"?K=M:ve==="dimension"&&(K=w);const ge=K.find(pe=>pe.columnName===fe.fieldName);ge&&(ge.conditions||(ge.conditions=[]),ge.conditions.push(ye))}if(re!=null&&re.length)for(const fe of re){const ve=w.find(ye=>ye.columnName===fe.key);ve&&(ve.truncation={num:fe.num,rule:fe.rule})}if(ae!=null&&ae.length)for(const fe of ae){const{fieldType:ve,columnData:ye,...ge}=fe;ve==="indicators"?(K=M,V=ye):ve==="dimension"&&(K=w);const pe=K.find(Se=>Se.label===ge.label);pe&&(pe.sort={...ge,columnName:pe.columnName})}if((J=Object.keys(oe))!=null&&J.length)for(const fe in oe){const ve=w.find(ye=>ye.label===fe);ve&&((Q=oe[fe])!=null&&Q.length)&&(ve.aggregateMethod=oe[fe])}$=[],N=[];for(const fe of w)le.includes(fe.columnName)?$.push(fe):ue.includes(fe.columnName)&&N.push(fe)}if(lowerCaseIncludes(i,["text","proportion","counter"])?h="zb":lowerCaseIncludes(i,["valueline"])&&(h="valueline"),o||i==="card"){if($.length===0||M.length===0)return;h="grouptable"}else{if(y==="1"&&w.length===0)return;if(y==="2"&&M.length===0)return;if(y==="3"&&(!j&&c!=="EDV_DATA_SET"||!k.labelField||!k.valueField))return;if(y==="3"&&i==="ecanDataSelect"&&M.length===0)return}if(p!=null&&p.length&&(y="1",h="grouptable"),!s){const{pathname:K}=window==null?void 0:window.location;if(K){const Z=K.split("/");Z!=null&&Z.length&&(s=Z[Z.length-1])}}let F;if(!lowerCaseIncludes(i,["scatter","valueline"])&&((ee=Object.keys(k))!=null&&ee.length)){const K=getConditions(C).find(X=>X.conditionKey==="parentCode"),Z={};if(K){const X=getGlobalModel(K.id)||{};if(X!=null&&X.itemCodes)Z.parentItemCodes=X.itemCodes;else return}i==="ecanDataSelect"&&(Z.indicatorList=M.filter(X=>X.show)),c==="EDV_DATA_SET"&&(Z.edvDataSetId=D),F={url:"/diagram/formData",source:c,dataViewId:u,plugin:"4",layer:y,chartType:"normalSelect",rangeIndexTypeGuid:j,type:i==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:k.labelField,valueField:k.valueField,pageId:s,sqlConditions:B,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...Z}}else{let K={};lowerCaseIncludes(i,["scatter","valueline"])?K={classifications:W}:K={classification:L},F={url:"/diagram",source:c,dataViewId:u,plugin:l?"5":f,layer:y,chartType:l?"pivot-table":h,series:P,indicatorList:M,queryColumns:o?[]:w,pageFlag:!0,pageId:s,edvDataSetId:D||"",sqlConditions:B.map(Z=>{const{fieldValue:X}=Z,re={};return X&&Array.isArray(X)&&(re.fieldValue=JSON.stringify(X)),{...Z,...re}}),idxLibMode:R,preview:I,rowHeaders:$,keyName:e.keyName,columnData:V,columnHeaders:N,...K}}return F},indicators={formatIndicatorParams},useTransformChartDataByAttrKey=(e=[],n)=>{let{name:r="name",types:i=[]}=n||{};r=(r==null?void 0:r.trim())||r;const a=new Set,o=new Map,s=e.length,l=i.length;if(s===1){const f=[];for(let h=0;h<l;h++){const m=i[h],{label:v,value:p}=m,S={...e[0],value:e[0][p]};a.add(v),f.push(S)}const y=e[0][r]||"";o.set(y,f)}else for(let f=0;f<s;f++){const y=e[f],h=y[r];a.add(h);for(let m=0;m<l;m++){const v=i[m],{label:p,value:S}=v,b={...y,value:y[S]};if(o.has(p)){const d=o.get(p);d.push(b),o.set(p,d)}else o.set(p,[b])}}const c=Array.from(a),u=[];for(const[f,y]of o)u.push({name:f,data:y});return{dimensions:c,dataset:u}},useTransformChartDataByAttrValue=(e,n)=>{let{name:r="name",value:i="value",type:a="type"}=n||{};r=r==null?void 0:r.trim(),i=i==null?void 0:i.trim(),a=a==null?void 0:a.trim();const o=new Set,s=new Map,l=e.length;for(let f=0;f<l;f++){const y=e[f],h=y[r]||"",m=y[i]||"",v=y[a]||"";if(o.add(h),s.has(v)){const p=s.get(v);p.push({name:h,value:m,...y}),s.set(v,p)}else s.set(v,[{name:h,value:m,...y}])}const c=Array.from(o),u=[];for(const[f,y]of s)u.push({name:f,data:y});return{dimensions:c,dataset:u}},useValueFormatter=(e,n)=>{var a;if(e==null)return n;const r=e.match(/\{.*\}/g);if(r==null||r.length===0)return n;const i=r.length;for(let o=0;o<i;o++){const s=r[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,n);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e};function getMarkLineData(e){return e.isShowMarkLine?{markLine:{data:[{type:e.markLineType}]}}:{}}const getTransformProps=(e,n,r)=>{switch(e.type){case"bar":return getBarTransformProps(e,n,r);case"line":return getLineTransformProps(e,n,r);case"pie":return getPieTransformProps(e,n,r);case"comboGraph":return getComboGraphTransformProps(e,n,r);default:return{}}},getBarTransformProps=(e,n,r)=>{const i=e.yAxisLabelFormatter,a=e.xAxisLabelFormatter,{dimensions:o=[],dataset:s=[]}=n,l=vue.computed(()=>{const{gradientShow:u,gradientColors:f,gradientOffset:y,barBorderRadius:h}=e,m=s,v=m.length,p=[];for(let S=0;S<v;S++){const b={...m[S],type:"bar",barWidth:e.barWidth,showBackground:e.showBarBackground},{isStack:d,stackColumns:g}=e;if(d&&g.includes(m[S].name||!g)&&(b.stack="stack"),b.label={show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:x=>{let C="",k=e.labelFormatter;k===""&&(k="{c}");const{seriesName:_,name:T,value:R,data:I}=x||{};return C+=useVariablesInText(k,{textData:{name:T,value:R,a:_,b:T,c:R||0,...I}},{useNewline:!0,useSpace:!0}),C}},b.itemStyle={},u&&(b.itemStyle={color:{x:e.isUseHorizontalAxis?1:0,y:0,x2:0,y2:e.isUseHorizontalAxis?0:1,colorStops:[{offset:0,color:e.colors[S]},{offset:y,color:f[S]},{offset:1,color:f[S]}]}}),h){const x=h.split(",");if(x!=null&&x.length){const C=[];for(const k of x){const _=parseFloat(k);isNaN(_)||C.push(_)}b.itemStyle.barBorderRadius=C}}e.isShowMarkLine&&(b.markLine={data:[{type:e.markLineType}]}),p.push(b)}return p}),c=vue.computed(()=>o.map(u=>{let f={};return u&&typeof u=="object"?f={...u,textStyle:{fontSize:r}}:f={value:u,textStyle:{fontSize:r}},f}));return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:u=>{const f=u.length;let y="",h=e.tooltipFormatter;h===""&&(h="{marker} {a} {c}");for(let m=0;m<f;m++){const{marker:v,seriesName:p,name:S,value:b,data:d}=u[m]||{};if(m===0){let g=S;typeof S=="string"&&S[0]==="0"&&!isNaN(+S)&&(g=(+S).toString()),y+=`${useValueFormatter(a,g)}<br/>`}y+=useVariablesInText(h,{textData:{marker:v,name:S,value:b,Qfw:formatQfw,a:p,b:S,c:b||0,...d}},{useNewline:!0,useSpace:!0}),y+="<br/>"}return y},textStyle:{color:e.tooltipTextStyleColor,fontSize:r},position:e.tooltipPosition||void 0,backgroundColor:e.tooltipBackgroundColor||"#fff"},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:s.map((u,f)=>({name:u.name,itemStyle:{color:e.colors[f]},icon:e.legendType})),formatter:u=>getLegendFormat(e.legendFormatter,{name:u})},xAxis:{type:e.isUseHorizontalAxis?"value":"category",data:e.isUseHorizontalAxis?null:vue.unref(c),inverse:e.isUseHorizontalAxis?e.xAxisInverse:e.axisInverse,minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor,type:e.xAxisSplitLineType},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter(u){return typeof u=="string"&&u[0]==="0"&&!isNaN(+u)&&(u=(+u).toString()),useValueFormatter(a,u)}},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:e.isUseHorizontalAxis?"category":"value",data:e.isUseHorizontalAxis?vue.unref(o):null,inverse:e.isUseHorizontalAxis?e.axisInverse:e.yAxisInverse,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,rotate:e.yAxisLabelRotate,width:e.yAxisLabelWidth,overflow:e.yAxisLabelOverflow,formatter(u){return useValueFormatter(i,u)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},series:vue.unref(l)}},getLineTransformProps=(e,n,r)=>{const i=e.yAxisLabelFormatter,a=e.xAxisLabelFormatter,{dimensions:o=[],dataset:s=[]}=n,l=vue.computed(()=>o.map(u=>{let f={};return u&&typeof u=="object"?f={...u,textStyle:{fontSize:r}}:f={value:u,textStyle:{fontSize:r}},f})),c=vue.computed(()=>{const u=[],f=s.length;for(let y=0;y<f;y++){const h={};e.shadowColor&&(h.shadowColor=e.shadowColor,h.shadowBlur=e.shadowBlur,h.shadowOffsetY=e.shadowOffsetY,h.shadowOffsetX=e.shadowOffsetX),u.push({type:"line",...s[y],symbolSize:e.symbolSize,smooth:e.smooth,areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:e.colors[y],opacity:e.areaStyleOpacity},lineStyle:{width:e.lineStyleWidth,...h},...getMarkLineData(e)})}return u});return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:u=>{const f=u.length;let y="",h=e.tooltipFormatter;h===""&&(h="{marker} {a} {c}");for(let m=0;m<f;m++){const{marker:v,seriesName:p,name:S,value:b,data:d}=u[m]||{};m===0&&(y+=`${S}<br/>`),y+=useVariablesInText(h,{textData:{marker:v,name:S,value:b,a:p,b:S,c:b,...d}},{useNewline:!0,useSpace:!0}),y+="<br/>"}return y},textStyle:{color:e.tooltipTextStyleColor,fontSize:r.value},position:e.tooltipPosition||void 0,backgroundColor:e.tooltipBackgroundColor||"#fff"},xAxis:{name:e.xAxisName,type:"category",data:vue.unref(l),minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor}},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,formatter(u){return useValueFormatter(a,u)}},axisLine:{lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow}},yAxis:{type:"value",name:e.yAxisName,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor}},axisLabel:{fontSize:r,color:e.yAxisLabelColor,formatter(u){return useValueFormatter(i,u)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}}},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{fontSize:r}},series:vue.unref(c)}},getPieTransformProps=(e,n,r)=>{const{dataset:i=[]}=n;let{data:a=[]}=i[0]||{};if(Array.isArray(e.colors)){const o=e.isUseLabelColors,s=e.colors;a=a.map((l,c)=>({label:o?{color:s[c]}:{},...l}))}return{title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign||"center"},tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter:o=>{const{marker:s,seriesName:l,name:c,value:u,percent:f,data:y}=o||{};return useVariablesInText(e.tooltipFormatter,{textData:{marker:s,name:c,value:u,percent:f,a:l,b:c,c:u,d:f,...y}},{useNewline:!0,useSpace:!0})},textStyle:{color:e.tooltipTextStyleColor||"#333"},backgroundColor:e.tooltipBackgroundColor||"#fff",borderColor:e.tooltipBorderColor||"#eee"},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:r===18?r:e.labelFontSize}},series:[{data:a,type:"pie",radius:[e.innerRadius,e.outerRadius],center:[e.centerLeft,e.centerTop],roseType:e.roseType,avoidLabelOverlap:!1,minAngle:e.minAngle,label:{show:e.labelPosition!=="center"&&e.labelShow,color:e.labelColor,fontSize:r===18?r:e.labelFontSize,position:e.labelPosition,formatter:handleFormatter(e.labelFormatter)},labelLine:{show:e.labelLineShow,length:e.labelLineLength,length2:e.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},getComboGraphTransformProps=(e,n,r)=>{const{dimensions:i=[],dataset:a=[]}=n,o=vue.computed(()=>i.map(c=>{let u={};return c&&typeof c=="object"?u={...c,textStyle:{fontSize:r}}:u={value:c,textStyle:{fontSize:r}},u})),s=vue.computed(()=>{const c=[],u=a.length,f=e.seriesTypes;for(let y=0;y<u;y++){const h=f[y],{type:m,axisIndex:v}=h||{};let p={type:m,yAxisIndex:v,...a[y]};if(m==="line"){const S={};e.shadowColor&&(S.shadowColor=e.shadowColor,S.shadowBlur=e.shadowBlur,S.shadowOffsetY=e.shadowOffsetY,S.shadowOffsetX=e.shadowOffsetX),p={...p,symbolSize:e.symbolSize,smooth:e.smooth,itemStyle:{color:e.colors[y]},areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:e.colors[y],opacity:e.areaStyleOpacity},lineStyle:{width:e.lineStyleWidth,...S}}}if(m==="bar"){const{gradientShow:S,gradientColors:b,gradientOffset:d}=e,g={};if(e.barBorderRadius){const x=e.barBorderRadius.split(",");if(x!=null&&x.length){const C=[];for(const k of x){const _=parseFloat(k);isNaN(_)||C.push(_)}g.borderRadius=C}}S&&(g.color={x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:d,color:b[y]},{offset:1,color:b[y]}]}),p={...p,barWidth:e.barWidth,itemStyle:g}}e.isShowMarkLine&&(p.markLine={data:[{type:e.markLineType}]}),c.push(p)}return c}),l=vue.computed(()=>{const c=e.yAxis;return c==null?void 0:c.map((u,f)=>({type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:f===0?e.yAxisLeftSplitLineShow:e.yAxisRightSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:f===0?e.yAxisLeftSplitLineType:e.yAxisRightSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{fontSize:r,show:e.yAxisLabelShow,color:e.yAxisLabelColor,formatter(y){return useValueFormatter(u.axisLabelFormatter,y)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:f===0?e.yAxisLeftName:e.yAxisRightName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:f===0?"right":"left"},max:e.yAxisMaxValue||null}))});return{legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:r}},tooltip:{trigger:"axis",show:e.tooltipShow,formatter:c=>{const u=c.length;let f="",y=e.tooltipFormatter;y===""&&(y="{marker} {a} {c}");const h=e.seriesTypes;for(let m=0;m<u;m++){const v=h[m],{tooltipFormatter:p}=v||{},{marker:S,seriesName:b,name:d,value:g,data:x}=c[m]||{};m===0&&(f+=`${d}<br/>`),f+=useVariablesInText(p||y,{textData:{marker:S,name:d,value:g,seriesName:b,a:b,b:d,c:g,...x}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:e.tooltipTextStyleColor||"#333",fontSize:r},backgroundColor:e.tooltipBackgroundColor||"#fff",borderColor:e.tooltipBorderColor||"#eee"},xAxis:{name:e.xAxisName,minInterval:e.xAxisMinInterval,type:"category",data:vue.unref(o),splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor}},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow},axisLine:{lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow}},yAxis:vue.unref(l),series:vue.unref(s)}},getCommonTransformProps=e=>({title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign||"center"},grid:{top:e.gridTop,bottom:e.gridBottom,left:e.gridLeft,right:e.gridRight,containLabel:e.gridContainLabel},color:e.colors}),transformProps=(e,n,r=12)=>({...getCommonTransformProps(e),...getTransformProps(e,n,r)}),generalTools={...indicators,runCode,useTransformChartDataByAttrKey,useTransformChartDataByAttrValue,useValueFormatter,useVariablesInText,transformProps,getIndicatorParams},useIndicatorData=(e={},n=()=>{})=>{var u;const{pageMode:r}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:i}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:a}=vue.inject(LOADED_DATA,{setLoadedData:(f,y)=>{}}),{getAllGlobalModel:o}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),{pageId:s}=vue.inject("templateOperate",{pageId:""})||{};e.dataType==="indicator"&&i();const l=async(f={})=>{var p,S,b;const y=o();a(e.id,!1);const h=generalTools.formatIndicatorParams({...e,pageId:s||((p=window==null?void 0:window.config)==null?void 0:p.pageId),globalModel:y},f),{url:m,...v}=h||{};if(m&&v)try{const d=await request({url:`${INDICATOR_URL}${m}`,method:"post",headers:{Authentication:(S=window==null?void 0:window.config)==null?void 0:S.indicatorToken,operateContext:CONTEXT},data:v,signal:((b=window.controller)==null?void 0:b.signal)||""});return f!=null&&f.isTimer&&n(d),d}catch(d){console.error(d)}},c=vue.unref(r)!=="design"&&((u=e==null?void 0:e.graphicConfig)==null?void 0:u.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{l({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(c)}),l},useHrefParamsToGlobalVariables=()=>{const n=window.location.search.slice(1).split("&"),r=n.length,i={};for(let a=0;a<r;a++){const o=n[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$u=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""}},setup(e){const{width:n,height:r}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=n.value,x.height=r.value),{...x,backgroundColor:e.pageId?"transparent":e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),f=vue.ref(!1),y=vue.ref();let h;const m=()=>new Promise(x=>{vue.nextTick(()=>{n.value&&r.value?(s.value=parseFloat(n.value),l.value=parseFloat(r.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),v=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${c.value}px`,y.value.style.height=`${u.value}px`)};vue.watch([n,r],async()=>{e.pageId||(await m(),v(),S(),window.addEventListener("resize",b),d()),f.value=!0},{immediate:!0});const p=vue.ref({});vue.provide("scaleValue",p);const S=()=>{if(a){y.value.style.width="100%",y.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,C=document.body.clientHeight,k=s.value||c.value,_=l.value||u.value,T=x/k;let R=C/_;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/_),p.value={widthScale:T,heightScale:R},y.value&&(y.value.style.transform=`scale(${T}, ${R})`),i(R)},b=lodashEs.debounce(async()=>{await m(),S()},100),d=()=>{const x=window.MutationObserver;h=new x(b),h.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},g=()=>{h&&(h.disconnect(),h.takeRecords(),h=null)};return vue.onMounted(()=>{f.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",b),g()}),{style:o,container:y,ready:f}}}),PageConfig_vue_vue_type_style_index_0_scoped_e1e149bf_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$z(e,n,r,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready||e.pageId?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-e1e149bf"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps,pageId:{type:String,default:""}},setup(e,{expose:n,emit:r}){e.pageId||useHrefParamsToGlobalVariables();const i=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=vue.ref(),o=()=>{a.value.setAttribute("datav-theme",e.theme)},s=vue.inject("usedComponentList",[]),l=vue.inject("componentList",[]),c=vue.computed(()=>{const Z=[];for(const X of vue.unref(s))X.type==="ecanModal"?Z.push(...X.componentList):Z.push(X);return Z});vue.watch(()=>e.theme,()=>{o()}),vue.onMounted(()=>{o()});const u=vue.computed(()=>useVariablesInText$1(e.contextRequestUrl)),f=vue.computed(()=>e.pageMode),y=vue.computed(()=>e.theme),h=vue.computed(()=>e.width),m=vue.computed(()=>e.height),v=vue.computed(()=>e.pageFontFamily),p=vue.computed(()=>{const Z=[],X=vue.unref(l).filter(re=>re.type==="ecanModal");for(const re of X)re!=null&&re.requestList&&Z.push(...re.requestList);return[...Z,...e.requestList]}),S=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:u,pageMode:f,theme:y,touchEventId:S,width:h,height:m,fontFamily:v,requestList:p});const b=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Z=>{let X=Z;i.value||(X=parseFloat(m.value)*Z+"px"),b.value.height=X}),vue.provide("isMobile",i.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap),vue.provide("templateOperate",{pageId:e.pageId,templateEmit:r,setTemplateData:Z=>{var X;if(Z!=null&&Z.pageId){const{componentId:re,...ae}=Z;(X=window.config)!=null&&X.urlParams||(window.config.urlParams={}),window.config.urlParams[Z.pageId]=ae,r("templateChange",Z)}}});const d=vue.ref(),g=new Map,x=()=>g,C=Z=>g.get(Z),k=(Z,X)=>{var re;if(d.value=X,g.set(Z,X),!e.pageId){const ae=vue.unref(s).find(oe=>oe.id===Z);ae&&((re=window.config)!=null&&re.record||(window.config.record={}),window.config.record[ae.keyName]=X)}},_=()=>{d.value=null},T=Z=>{let X=Z;if(X){const re=Z.match(/\{(.+?)\}/g);if(re!=null&&re.length){let ae=re[0].slice(1,-1).trim();const oe=ae.match(/\[(.+?)\]/g);let le="";oe!=null&&oe.length&&(ae=ae.replace(oe[0],""),le=oe[0].slice(1,-1).trim());const ue=vue.unref(c).find(fe=>fe.keyName===ae);if(ue){const fe=C(ue.id),{type:ve,value:ye,RECORD:ge,recordData:pe}=fe||{};lowerCaseIncludes$1(ve,MODEL_KEY_LIST$1)?X=ge[le]:lowerCaseIncludes$1(ve,"select")?X=pe[le]:lowerCaseIncludes$1(ve,["rangePicker","date"])?dayjs.isDayjs(vue.unref(fe[le]))?X=vue.unref(fe[le]).format(fe.format):X=vue.unref(fe[le]):X=ye}else X=(window.config.requestParams||{})[ae]||""}}return X},R=new Map,I={},D=async(Z,X)=>{var ue;const{requestName:re}=Z,ae=await useRequestData({...Z,projectRequestUrl:vue.unref(u),getModel:C})(),oe=((ue=ae==null?void 0:ae.data)==null?void 0:ue.data)||{},le=R.get(re);if(le!=null&&le.length&&(!X||I[re])){for(const fe of le)fe(oe);X||R.delete(re)}},B=(Z,X)=>{I[Z]&&(clearInterval(I[Z]),delete I[Z],R.delete(Z));const re=vue.unref(c).filter(oe=>!oe.openCustomRequestData&&oe.customRequestName===Z),ae=R.get(Z)||[];if((re==null?void 0:re.length)>ae.length&&(ae.push(X),R.set(Z,ae),(re==null?void 0:re.length)===ae.length)){const oe=vue.unref(p).find(le=>le.requestName===Z);oe&&(oe!=null&&oe.isOpenRequestTimer&&(oe!=null&&oe.requestInterval)?(D(oe,!0),I[Z]=setInterval(()=>{D(oe,!0)},oe.requestInterval*1e3)):D(oe))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:C,setGlobalModel:k,getAllGlobalModel:x,clearInteractiveData:_,getRecordValueByKeyName:T,hanldePageRequestData:B,interactiveData:d});const L=vue.ref({}),W=(Z,X)=>{L.value[Z]=X};vue.provide(LOADED_DATA,{loadedData:L,setLoadedData:W});const j=[],P=()=>{j.pop()},M=Z=>{j.push(Z)},A=new Map,w=Z=>A.get(Z),$=(Z,X)=>{A.set(Z,X)};vue.provide(MODAL_MODEL,{popUseModalIds:P,pushUseModalIds:M,getModalModel:w,setModalModel:$});const E=mitt(),N=new Set,V=(Z,X)=>{N.add(Z),E.on(Z,re=>{const{eventName:ae,params:oe}=re;return typeof X[ae]=="function"&&X[ae](oe)}),vue.onBeforeUnmount(()=>{F(Z)})},F=Z=>{N.delete(Z),E.off(Z)},H=(Z,X,re={})=>{if(Z==="PAGE"){const ae=j.length;let oe=[];if(ae===0)oe=[...N];else{const le=j[ae-1];oe=[...w(le)]}oe.forEach(le=>{E.emit(le,{eventName:X,params:re})})}else E.emit(Z,{eventName:X,params:re})};vue.provide(EVENT_BUS,{onEvent:V,offEvent:F,emitEvent:H});const q=vue.ref(0),G=()=>{q.value=vue.unref(q)+1};vue.provide(GLOBAL_TOKEN,{requestToken:G});const U=new Map,O=new Map,Y=({requestFn:Z=()=>{},sortNum:X=0,id:re=""})=>{if(U.has(X)){const ae=U.get(X);ae==null||ae.push(Z)}else U.set(X,[Z]);O.set(re,Z)},J=Z=>new Promise((X,re)=>{const ae=Z.map(oe=>oe());Promise.all(ae).then(oe=>{X(oe)}).catch(oe=>{re(oe)})}),Q=Z=>new Promise(async(X,re)=>{if(Z){if(typeof Z=="string"){const ae=O.get(Z);if(typeof ae=="function"){const oe=request.interceptors.response.use(le=>(X(le),le),le=>(re(le),Promise.reject(le)));ae(),request.interceptors.response.eject(oe)}}}else{const ae=Array.from(U);ae.sort((le,ue)=>ue[0]-le[0]);const oe=ae.length;try{e.pageMode!=="design"&&vue.unref(q)>0;for(let le=0;le<oe;le++){const ue=ae[le][1];await J(ue)}}catch(le){console.error(le)}finally{U.clear(),X(null)}}});vue.provide(REQUEST_MODEL,{setRequest:Y,touchRequest:Q});const ee=()=>{E.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:ee});const K=Z=>{E.on(REFRESH_PAGE,()=>Z()),vue.onMounted(()=>{E.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var Z;if((Z=vue.unref(s))!=null&&Z.length&&vue.unref(f)!=="design"){const{jumpType:X,jumpTime:re,jumpPage:ae,jumpLink:oe}=e;if(re!=null&&re.value){let le=0;switch(re==null?void 0:re.suffix){case"hours":le=re.value*60*60*1e3;break;case"minute":le=re.value*60*1e3;break;case"seconds":le=re.value*1e3;break}setTimeout(()=>{let ue="";X==="page"&&ae?ue=usePageUrl(vue.unref(f),ae):X==="link"&&oe&&(ue=oe),ue=useVariablesInText$1(ue),window.open(ue,"_self")},le)}}}),vue.onBeforeUnmount(()=>{U==null||U.clear(),O==null||O.clear()}),n({touchRequest:Q,getGlobalModel:C,onRefreshPage:K,emitEvent:H,getRecordValueByKeyName:T,props:e}),{providerConfig:a,configStyle:b}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_d2563ca9_lang="";function _sfc_render$y(e,n,r,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-d2563ca9"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:"",targetTemplate:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:n}){const r=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=E=>{var N,V;if(e.showAnimation){const F=e.text.match(/\{(.+?)\}/g)||[];if(F!=null&&F.length){const H=(N=F[0].slice(1,-1))==null?void 0:N.trim();if(vue.unref(a)[H]===E){a.value=E;return}const q=+E[H];let G=0;if(isNaN(q))a.value=E;else{String(q).includes(".")&&(G=((V=String(q).split(".")[1])==null?void 0:V.length)||0);const U=Math.abs(q)*Math.pow(10,G),O=String(U).length;let Y=[];for(let Q=0;Q<5;Q++){const ee=Math.ceil(Math.random()*(U+1)-1);Y.includes(ee)||Y.push(ee)}Y.sort((Q,ee)=>Q-ee),Y=Y.map(Q=>{const ee=String(Q).split("").reverse(),K=[];for(let Z=0;Z<O;Z++)ee&&ee[Z]?K.push(ee[Z]):K.push("0");return G&&K.splice(G,0,"."),(q<0?"-":"")+K.reverse().join("")}),Y.push(q);let J=0;for(const Q of Y)setTimeout(()=>{a.value={...vue.unref(a),[H]:Q}},J*1e3),J+=.1}}else a.value=E}else a.value=E};vue.watch(()=>[e.data,e.dataType],([E,N])=>{N==="static"&&l(E)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:f,hanldePageRequestData:y}=vue.inject(GLOBAL_MODEL,{getGlobalModel:E=>{},setGlobalModel:(E,N)=>{},getRecordValueByKeyName:E=>{},hanldePageRequestData:(E,N)=>{}}),{setLoadedData:h,loadedData:m}=vue.inject(LOADED_DATA,{setLoadedData:(E,N)=>{},loadedData:{}}),{setTemplateData:v}=vue.inject("templateOperate",{setTemplateData:E=>{}}),p=vue.computed(()=>{let E="";if(e.gradientShow){const{gradientColor:N,gradientOffset:V,gradientAngle:F,color:H}=e;E+=`background: linear-gradient(${F}, ${H}, ${N||"transparent"} ${V*100}%);-webkit-background-clip: text;color: transparent;`}return E}),S=vue.computed(()=>{const E={};if(e.gradientShow){const{gradientColor:N,gradientOffset:V,gradientAngle:F,color:H}=e,q=N||"transparent";E.background=`linear-gradient(${F}, ${H}, ${q} ${V*100}%)`,E["-webkit-background-clip"]="text",E.color="transparent"}return E}),b=vue.computed(()=>{const E={};return e.linkPage&&(E.cursor="pointer",E.userSelect="none"),E}),d=vue.ref(1),g=vue.computed(()=>{var U;if(vue.unref(r))return"NaN";if(!d.value)return;const E=vue.unref(a),N=e.increaseColor||e.color,V=e.declineColor||e.color;let F=e.text;F=F==null?void 0:F.replace(/\n|\\n/g,"<br/>"),F=F==null?void 0:F.replace(/\s(?!\{) | (?!\})\s/g," ");const H=F.match(/\{(.+?)\}/g)||[];let q="",G="";if(e.exceedConfig==="wrap"?G="show-wrap":e.exceedConfig==="ellipsis"&&(G="show-ellipsis"),H==null||H.length===0){if(F&&e.format==="percentage"&&!isNaN(+F)){const O=parseFloat(F),Y=O*100,J=x(Y.toFixed(2));O>=0?F=`<span class="${G}" style="color: ${J||N||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(p)}">
|
|
102
|
+
`;let o=e;if(r!=null&&r.length){for(const l of r){const c=useVariablesInText(l,{textData:n},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e};function formatQfw(e){let n="",r="",i="",a="";e.indexOf(".")>-1?(r=e.split(".")[0],i=e.split(".")[1]):r=e;let o=0,s=0;for(s=r.length-1;s>=0;)o%3===0&&o!==0?r[s]==="-"?n+=r[s]:n+=","+r[s]:n+=r[s],s--,o++;return n=n.split("").reverse().join(""),e.indexOf(".")>-1?a=n+"."+i:a=n,a}async function getIndicatorParams({graphicConfig:e,request:n,INDICATOR_URL:r="",PAGE_ID:i,dataSourceId:a}){var o;try{const{leftAxisList:s=[],rightAxisList:l=[],queryColumnList:c=[],indicators:u=[]}=vue.unref(e),f=[...s,...l,...c,...u],y={};for(const h of f){const{indexCode:m="",parentId:v=""}=h;v&&!hasOwn(h,"calcType")&&!y[v]&&(y[v]=m)}if((o=Object.keys(y))!=null&&o.length){const h=[];for(const p in y)h.push(new Promise((S,b)=>{n.post(`${r}/diagram/hrpIndexWithComplex`,{pageId:i,indexGuid:p,indexCode:y[p],dataSourceId:a}).then(d=>{var C;const{success:g,data:x=[]}=d.data;g&&((C=x==null?void 0:x.dataViewColumns)!=null&&C.length)?S(x.dataViewColumns):b(x)}).catch(d=>{b(d)})}));return(await Promise.all(h)).reduce((p,S)=>p.filter(b=>S.find(d=>d.typeGuid===b.typeGuid))).filter(p=>p.typeGuid)}}catch{}return[]}const MODEL_KEY_LIST=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let modelValue=new Map;const excludeAttr=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],getGlobalModel=e=>modelValue.get(e),getCalcWays=(e,n={})=>{const{around:r,unit:i,id:a}=e;let o="";const{pageMode:s="",componentList:l=[]}=(n==null?void 0:n.graphicConfig)||{};let c=null,u=null;if(s==="design"){const f=l==null?void 0:l.find(b=>b.id===a);if(!f)return[];const{interval:y,intervalUnit:h,startTime:m,endTime:v,operate:p,useCurrentTime:S}=f||{};if(S&&(c=dayjs().subtract(y,h),u=dayjs()),m&&(c=dayjs(m)),v&&(u=dayjs(v)),p){const{type:b,value:d,mode:g}=p;switch(b){case"add":c=c&&c.add(d,g),u=u&&u.add(d,g);break;case"minus":c=c&&c.subtract(d,g),u=u&&u.subtract(d,g)}}}else{const f=getGlobalModel(a)||{};vue.unref(f.startTime)&&(c=dayjs(vue.unref(f.startTime))),vue.unref(f.endTime)&&(u=dayjs(vue.unref(f.endTime)))}if(c&&u){const f=u.diff(c,i.toLowerCase());o=`${r==="before"?"-":""}${f+1}`}return o?[o]:[]},handleParams=(e,n)=>{if(n)hasOwn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),hasOwn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),hasOwn(e,"dataType")&&delete e.dataType;else{const{calcWays:r=[],dateCalcTypes:i=[],activeKey:a,componentId:o=""}=e;if(a===5&&(r!=null&&r.length)&&(i!=null&&i.length)&&o){const s=r[0].split("-");(s==null?void 0:s.length)>1&&s[0]==="rangeValue"&&(e.calcWays=getCalcWays({around:s[1],unit:i[0],id:o})),delete e.radioValue}if(hasOwn(e,"dataType")){if(e.fieldType==="DATE"&&(e.label=e.fieldName),e.dataType==="component")if(e.fieldValue==="PARENT"){let s=e.modelKey;s&&e.prop&&(s+=`-${e.prop}`),e.fieldValue="${"+s+"}"}else e.fieldValue="${"+e.fieldValue+"}";delete e.dataType}hasOwn(e,"activeKey")&&delete e.activeKey,hasOwn(e,"radioValue")&&delete e.radioValue,hasOwn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),hasOwn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),e.dataType!=="component"&&e.useCurrentTime&&(e.fieldValue=dayjs().format(e.dateFormat)),hasOwn(e,"modelKey")&&delete e.modelKey,hasOwn(e,"prop")&&delete e.prop,delete e.useCurrentTime}},handleConditions=(e,n)=>{const r=[];return e!=null&&e.length&&lodashEs.cloneDeep(e).forEach(i=>{if(i.join&&i.conditions){const a=!i.conditions.some(o=>o.join&&o.conditions);i.conditions.forEach((o,s)=>{handleParams(o,n);const l={};if(s<i.conditions.length-1&&(l.join=i.join),a)r.push({...l,...o});else if(o.join&&o.conditions){const c=n?"sqlConditions":"conditions";r.push({[c]:handleConditions([o],n),...l})}else r.push({...l,...o})})}else handleParams(i,n),r.push(i)}),r},handleIndicator=(e={},n)=>{if(e!=null&&e.sortCpnts&&n){const x=getCpntSortData(e);x&&(n.sort=x)}const{label:r,name:i,location:a,show:o,indexCode:s,indexCodeNum:l,calcType:c="COLUMN",builtInFormula:u,builtInValueSource:f,builtInCalcWay:y,formula:h,conditions:m,aggregate:v,distinct:p,dimByCount:S,dataTo:b}=e;let d;if(m&&(d=handleConditions(m)),c==="COMPONENT"){const x={};return setFieldValue(x,f),{label:r.trim(),columnName:i,show:o,calcType:c,componentAlias:y,componentValue:x.fieldValue||null}}const g={label:r.trim(),columnName:i,location:a,show:o,calcType:b==="1"?"VIEW":c,hrpIndexCode:s,hrpIndexCodeNum:l,aggregate:v,builtInFormula:u,builtInValueSource:f,formula:h,conditions:d};if(u==="DATE_OFFSET"){const x=y.split("-");if((x==null?void 0:x.length)===3){let C=x[0];return x[2]==="before"&&x[0]!=="0"&&(C=`-${x[0]}`),{...g,calcWays:[C],dateCalcTypes:[x[1]]}}}else return i==="the_count"&&(g.calcType="AGGREGATE",g.distinct=!!p,g.typeGuid=S),{...g,builtInCalcWay:y}},handleSqlConditions=e=>{if(!e)return[];const n=lodashEs.cloneDeep((e==null?void 0:e.controlList)||[]).filter(v=>v.conditionKey!=="parentCode"),{classificationList:r=[],rowHeaderList:i=[],dimensionList:a=[],seriesList:o=[],leftAxisList:s=[],rightAxisList:l=[],queryColumnList:c=[],indicators:u=[]}=e;handleControlList(n);const f=[...r,...i,...a,...o,...s,...l,...c,...u],y=[];for(const v of f){const p=getConditions((v==null?void 0:v.conditions)||[]);if(p!=null&&p.length){const S=p.filter(b=>(b==null?void 0:b.dataType)==="component").map(b=>{const d={};return b!=null&&b.dateFormat&&(d.format=b.dateFormat),b.fieldValue==="PARENT"&&(d.id="PARENT",d.keyName=b.modelKey,d.modelKey=b.modelKey,d.prop=b.prop),{conditionKey:b.fieldName,conditionLabel:b.fieldName,conditionName:b.fieldName,conditionValueType:b.fieldType,id:b.componentId,keyName:b.fieldValue,rule:b.rule,notGlobal:!0,indexCode:b.indexCode,typeGuid:b.typeGuid,indexCodeNum:b.indexCodeNum,...d}});if(S!=null&&S.length)for(const b of S)y.find(d=>d.keyName===b.keyName)||y.push(b)}}const h=y.length,m=n;for(let v=0;v<h;v++){const p=y[v];if((p==null?void 0:p.conditionKey)==="parentCode")continue;const{id:S,keyName:b,prop:d,format:g,modelKey:x,dataType:C="component",customValue:k}=p,_=getConditionItem(p);setFieldValue(_,S,{prop:d,dateFormat:g,modelKey:x,keyName:b}),C===""&&(_.fieldValue=k||""),m.push(_)}for(let v=m.length-1;v>=0;v--){const p=m[v];p.globalCondition||getConditions(m).find(b=>b.alias===p.alias&&b.globalCondition)&&m.splice(v,1)}return m};function getConditionItem(e){const{id:n,keyName:r,conditionLabel:i,conditionKey:a,conditionValueType:o,prop:s,rule:l="NONE",notGlobal:c=!1,indexCode:u,typeGuid:f,indexCodeNum:y,dataType:h="component"}=e;let m=r||n;m&&s&&(m+=`-${s}`);let v=l;return v==="NONE"&&(["startTime","endTime"].includes(s)?v=s==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":r!=null&&r.includes("startTime")?v=s==="GREATER_EQUAL":r!=null&&r.includes("endTime")?v=s==="LESS_EQUAL":v="EQUAL"),n==="PARENT"&&(m=e.modelKey,m&&s&&(m+=`-${s}`),v=l),{rule:v,label:i,fieldName:a,fieldValue:"",valueType:o,alias:m,globalCondition:!c,indexCode:u,typeGuid:f,indexCodeNum:y,dataType:h}}function handleControlList(e){if(e!=null&&e.length)for(const n of e)if(n!=null&&n.conditions)handleControlList(n.conditions);else{const{id:r,keyName:i,prop:a,modelKey:o,format:s,dataType:l="component",customValue:c}=n,u=getConditionItem(n);setFieldValue(u,r,{prop:a,dateFormat:s,modelKey:o,keyName:i}),l===""&&(u.fieldValue=c||"");for(const f in u)n[f]=u[f];for(const f of excludeAttr)delete n[f]}}function handleVariableList(e){const n=[];if(e!=null&&e.length){for(const r of e)if(r.variableName){const i={variateName:r.variableName,globalCondition:!1,valueType:r.variableType,alias:r.keyName||""};setFieldValue(i,r.id,{dateFormat:r.format,prop:r.dateTypeValue,keyName:r.keyName,operateType:r.operateType,operateMode:r.operateMode,operateValue:r.operateValue}),r.dataType===""&&(i.fieldValue=r.variableValue),r.format&&(i.dateFormat=r.format),r.label&&(i.label=r.label),n.push(i)}}return n}function setFieldValue(e,n,r){const{prop:i="",dateFormat:a="",modelKey:o="",keyName:s="",operateValue:l,operateMode:c,operateType:u}=r||{},f=o||s;if(n==="PARENT"&&f&&i){const d=window.config.record;let g=i,x=a;const C=i.match(/\{(.+?)\}/g);if(C!=null&&C.length){const k=C[0].slice(1,-1).trim();g=i.replace(C[0],""),x=k,e.dateFormat=x}if(d&&d[f]){const k=vue.unref(d[f][g]);dayjs.isDayjs(k)?e.fieldValue=k.format(x||"YYYY-MM-DD"):e.fieldValue=k}return}const y=getGlobalModel(n)||{},{value:h,format:m="YYYY-MM-DD",type:v="",useCurrentTime:p,RECORD:S}=y||{},b=a||m;if(lowerCaseIncludes(y.type,"date")){let d;if(p?h?d=vue.unref(h):d=dayjs():d=vue.unref(h),l&&c&&u)switch(u){case"add":d=d.add(l,c);break;case"minus":d=d.subtract(l,c);break}e.fieldValue=d==null?void 0:d.format(b),e.dateFormat=b}else if(v==="ecanRangePicker"){let d=i;if(!i){const x=s&&s.split("-");x!=null&&x.length&&(d=x[x.length-1])}if(!d)return;let g=null;if(vue.unref(y[d])&&(g=dayjs(vue.unref(y[d]))),l&&c&&u){if(l==="rangeValue"){if(y.startTime&&y.endTime){const x=vue.unref(y.endTime).diff(vue.unref(y.startTime),c)+1;switch(u){case"add":g=g&&g.add(x,c);break;case"minus":g=g&&g.subtract(x,c)}}}else if(!isNaN(+l))switch(u){case"add":g=g&&g.add(l,c);break;case"minus":g=g&&g.subtract(l,c)}}if(g&&(e.fieldValue=g==null?void 0:g.format(b)),d==="rangeValue"&&y.startTime&&y.endTime){const x=getFormatStep(b);x&&(e.fieldValue=vue.unref(y.endTime).diff(vue.unref(y.startTime),x)+1)}e.dateFormat=b}else lowerCaseIncludes(v,MODEL_KEY_LIST)?o&&S?e.fieldValue=S[o]:!o&&S?e.fieldValue=S.value:e.fieldValue=vue.unref(h):e.fieldValue=vue.unref(h)}const handleSort=e=>{var n;if(e){const r=Array.isArray(e)?lodashEs.cloneDeep(e):[lodashEs.cloneDeep(e)];let i="",a=[];const o=[],s=[],l=[];for(const c of r){if(c.defaultCode&&(c.label=c.columnName,delete c.defaultCode),c.type==="CUSTOM"&&(a=c.customOrderColumns),i=c.type,o.push(c.label),(n=c.columnName)!=null&&n.includes("_ecanrepeat_")){const u=c.columnName.split("_ecanrepeat_");s.push(u[0])}else s.push(c.columnName);l.push(c.order)}return i!=="CUSTOM"&&(o==null?void 0:o.length)>1&&(i="COMBINATION"),i==="CUSTOM"?{label:o.join(","),columnName:s.join(","),type:i,customOrderColumns:a}:{label:o.join(","),columnName:s.join(","),order:l.join(","),type:i}}else return e},getCpntSortData=e=>{const{sortCpnts:n=[]}=e;let r,i="";for(const a of n){const o=getGlobalModel(a)||{},{type:s,RECORD:l}=o;if(lowerCaseIncludes(s,"image")&&lowerCaseIncludes(l==null?void 0:l.value,["asc","desc"])){i=l.value.toUpperCase();break}}return i&&(r={label:e.label,columnName:e.name,order:i,type:"NORMAL"}),r},formatIndicatorParams=(e,n={})=>{var H,q,G,U,O,Y,J,Q,ee;const{graphicConfig:r,type:i,globalModel:a,isGroupTable:o=!1}=e;a&&(modelValue=a);let s=e.pageId;const l=lowerCaseIncludes(i,"pivottable");let{source:c,dataViewId:u,plugin:f="1",layer:y,chartType:h,classificationList:m=[],rowHeaderList:v=[],dimensionList:p=[],seriesList:S=[],leftAxisList:b=[],rightAxisList:d=[],queryColumnList:g=[],indicators:x=[],controlList:C=[],formFields:k={},variableList:_=[],variableConditions:T=[],idxLibMode:R,preview:I=!1,edvDataSetId:D}=r||{},B=[];if((r==null?void 0:r.pageMode)==="design"?(B=(r.sqlConditions??[]).map(K=>{const Z={};if(!hasOwn(K,"globalCondition")&&!K.join&&(Z.globalCondition=!0),!K.join){const X=K.rule||"EQUAL";Z.rule=X==="NONE"?"EQUAL":X}return{...K,...Z}}),T!=null&&T.length&&(B=B.concat(T))):(B=handleSqlConditions(r),_!=null&&_.length&&(B=B.concat(handleVariableList(_)))),B!=null&&B.length){const K=B.filter(X=>X.globalCondition),Z=B.filter(X=>!X.globalCondition);(K==null?void 0:K.length)>1&&(B=[{join:"&&",conditions:K},...Z])}B!=null&&B.length&&(B=handleConditions(B,"1")),y==null&&(lowerCaseIncludes(i,["table","card"])||lowerCaseIncludes(i,["list","circulate"])&&(m==null?void 0:m.length)>1?y="1":lowerCaseIncludes(i,["select","checkbox","radio"])?y="3":y="2");let L;const W=[];let j="";if(Array.isArray(m)&&m.length>0&&(!["ecanList","ecanCirculate"].includes(i)||(m==null?void 0:m.length)===1)){const K=m.length;for(let Z=0;Z<K;Z++){const X=m[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,dateFormat:ve,typeGuid:ye="",truncations:ge=[]}=X;if(oe||K===1){j=ye,L={label:re.trim(),columnName:ae,show:oe,sort:getCpntSortData(X)||handleSort(le)||le,customGroup:ue,conditions:handleConditions(fe),typeGuid:ye},ve&&(L.dateFormat=ve),ae==="the_date"&&!L.dateFormat&&(L.dateFormat="YYYY-MM");const pe={};if(Array.isArray(ge)&&ge.length>0){const Se=ge.length;for(let Ee=0;Ee<Se;Ee++){const Ce=ge[Ee]||{},{rule:ke="",num:Te=0,name:Pe=""}=Ce;ke&&Te&&(pe.num=Te,pe.rule=ke,Pe&&(pe.otherGroupName=Pe))}}if((H=Object.keys(pe))!=null&&H.length&&(L.truncation=pe),lowerCaseIncludes(i,["scatter","valueline"]))W.push(L);else break}}}let P;if(Array.isArray(S)&&S.length>0){const K=S.length;for(let Z=0;Z<K;Z++){const X=S[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,typeGuid:ve}=X;if(oe||K===1){P={label:re.trim(),columnName:ae,show:oe,sort:handleSort(le),customGroup:ue,conditions:handleConditions(fe),typeGuid:ve};break}}}const M=[];b==null||b.forEach(K=>{K.location="LEFT",M.push(handleIndicator(K,L))}),d==null||d.forEach(K=>{K.location="RIGHT",M.push(handleIndicator(K,L))});let A=x;(G=(q=n==null?void 0:n.pivotTableCal)==null?void 0:q.indicators)!=null&&G.length&&(A=n.pivotTableCal.indicators),A==null||A.forEach(K=>{K.location="LEFT",M.push(handleIndicator(K,L))});const w=[];["ecanList","ecanCirculate"].includes(i)&&(m==null?void 0:m.length)>1&&(g=m),(O=(U=n==null?void 0:n.pivotTableCal)==null?void 0:U.dimensions)!=null&&O.length&&(g=n.pivotTableCal.dimensions),g==null||g.forEach(K=>{const{label:Z,name:X,location:re,show:ae,indexCode:oe,sort:le,typeGuid:ue,indexCodeNum:fe,dateFormat:ve,conditions:ye}=K;let ge=handleSort(le);if(n.sort){const{field:Se,order:Ee}=n.sort;let Ce=M.find(ke=>ke.label===Se);!Ce&&Z===Se&&(Ce=K),Ce&&(ge={columnName:Ce.columnName,label:n.sort.field,order:Ee.toUpperCase(),type:"NORMAL"})}const pe={label:Z,columnName:X,location:re,show:ae,sort:ge,calcType:"COLUMN",hrpIndexCode:oe,hrpIndexCodeNum:fe,conditions:handleConditions(ye),typeGuid:ue};ve&&(pe.dateFormat=ve),X==="the_date"&&!pe.dateFormat&&(pe.dateFormat="YYYY-MM"),w.push(pe)});let $=[],E=[];if(Array.isArray(v)&&v.length>0?E=v:Array.isArray(p)&&p.length>0&&(E=p),E!=null&&E.length){const K=E.length;for(let Z=0;Z<K;Z++){const X=E[Z]||{},{label:re="",name:ae="",show:oe=!1,sort:le,customGroup:ue,conditions:fe,truncations:ve,typeGuid:ye="",dateFormat:ge}=X;let pe=handleSort(le);if(n.sort){const{field:Ce,order:ke}=n.sort;let Te=M.find(Pe=>Pe.label===Ce);!Te&&X.label===Ce&&(Te=X),Te&&(pe={columnName:Te.columnName,label:n.sort.field,order:ke.toUpperCase(),type:"NORMAL"})}const Se={label:re.trim(),columnName:ae,show:oe,sort:pe,customGroup:ue,conditions:handleConditions(fe),typeGuid:ye};ge&&(Se.dateFormat=ge),ae==="the_date"&&!Se.dateFormat&&(Se.dateFormat="YYYY-MM");const Ee={};if(Array.isArray(ve)&&ve.length>0){const Ce=ve.length;for(let ke=0;ke<Ce;ke++){const Te=ve[ke]||{},{rule:Pe="",num:Ve=0,name:Le=""}=Te;Pe&&Ve&&(Ee.num=Ve,Ee.rule=Pe,Le&&(Ee.otherGroupName=Le))}}(Y=Object.keys(Ee))!=null&&Y.length&&(Se.truncation=Ee),$.push(Se)}}let N=[],V;if(n!=null&&n.pivotTableCal){let K=[];const{calc:Z=[],filter:X=[],truncations:re=[],sorts:ae=[],aggregateMethod:oe=[],rowDimensionKeys:le=[],colDimensionKeys:ue=[]}=n.pivotTableCal;if(M.push(...Z),X!=null&&X.length)for(const fe of X){const{type:ve,...ye}=fe;ve==="indicators"?K=M:ve==="dimension"&&(K=w);const ge=K.find(pe=>pe.columnName===fe.fieldName);ge&&(ge.conditions||(ge.conditions=[]),ge.conditions.push(ye))}if(re!=null&&re.length)for(const fe of re){const ve=w.find(ye=>ye.columnName===fe.key);ve&&(ve.truncation={num:fe.num,rule:fe.rule})}if(ae!=null&&ae.length)for(const fe of ae){const{fieldType:ve,columnData:ye,...ge}=fe;ve==="indicators"?(K=M,V=ye):ve==="dimension"&&(K=w);const pe=K.find(Se=>Se.label===ge.label);pe&&(pe.sort={...ge,columnName:pe.columnName})}if((J=Object.keys(oe))!=null&&J.length)for(const fe in oe){const ve=w.find(ye=>ye.label===fe);ve&&((Q=oe[fe])!=null&&Q.length)&&(ve.aggregateMethod=oe[fe])}$=[],N=[];for(const fe of w)le.includes(fe.columnName)?$.push(fe):ue.includes(fe.columnName)&&N.push(fe)}if(lowerCaseIncludes(i,["text","proportion","counter"])?h="zb":lowerCaseIncludes(i,["valueline"])&&(h="valueline"),o||i==="card"){if($.length===0||M.length===0)return;h="grouptable"}else{if(y==="1"&&w.length===0)return;if(y==="2"&&M.length===0)return;if(y==="3"&&(!j&&c!=="EDV_DATA_SET"||!k.labelField||!k.valueField))return;if(y==="3"&&i==="ecanDataSelect"&&M.length===0)return}if(p!=null&&p.length&&(y="1",h="grouptable"),!s){const{pathname:K}=window==null?void 0:window.location;if(K){const Z=K.split("/");Z!=null&&Z.length&&(s=Z[Z.length-1])}}let F;if(!lowerCaseIncludes(i,["scatter","valueline"])&&((ee=Object.keys(k))!=null&&ee.length)){const K=getConditions(C).find(X=>X.conditionKey==="parentCode"),Z={};if(K){const X=getGlobalModel(K.id)||{};if(X!=null&&X.itemCodes)Z.parentItemCodes=X.itemCodes;else return}i==="ecanDataSelect"&&(Z.indicatorList=M.filter(X=>X.show)),c==="EDV_DATA_SET"&&(Z.edvDataSetId=D),F={url:"/diagram/formData",source:c,dataViewId:u,plugin:"4",layer:y,chartType:"normalSelect",rangeIndexTypeGuid:j,type:i==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:k.labelField,valueField:k.valueField,pageId:s,sqlConditions:B,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...Z}}else{let K={};lowerCaseIncludes(i,["scatter","valueline"])?K={classifications:W}:K={classification:L},F={url:"/diagram",source:c,dataViewId:u,plugin:l?"5":f,layer:y,chartType:l?"pivot-table":h,series:P,indicatorList:M,queryColumns:o?[]:w,pageFlag:!0,pageId:s,edvDataSetId:D||"",sqlConditions:B.map(Z=>{const{fieldValue:X}=Z,re={};return X&&Array.isArray(X)&&(re.fieldValue=JSON.stringify(X)),{...Z,...re}}),idxLibMode:R,preview:I,rowHeaders:$,keyName:e.keyName,columnData:V,columnHeaders:N,...K}}return F},indicators={formatIndicatorParams},useTransformChartDataByAttrKey=(e=[],n)=>{let{name:r="name",types:i=[]}=n||{};r=(r==null?void 0:r.trim())||r;const a=new Set,o=new Map,s=e.length,l=i.length;if(s===1){const f=[];for(let h=0;h<l;h++){const m=i[h],{label:v,value:p}=m,S={...e[0],value:e[0][p]};a.add(v),f.push(S)}const y=e[0][r]||"";o.set(y,f)}else for(let f=0;f<s;f++){const y=e[f],h=y[r];a.add(h);for(let m=0;m<l;m++){const v=i[m],{label:p,value:S}=v,b={...y,value:y[S]};if(o.has(p)){const d=o.get(p);d.push(b),o.set(p,d)}else o.set(p,[b])}}const c=Array.from(a),u=[];for(const[f,y]of o)u.push({name:f,data:y});return{dimensions:c,dataset:u}},useTransformChartDataByAttrValue=(e,n)=>{let{name:r="name",value:i="value",type:a="type"}=n||{};r=r==null?void 0:r.trim(),i=i==null?void 0:i.trim(),a=a==null?void 0:a.trim();const o=new Set,s=new Map,l=e.length;for(let f=0;f<l;f++){const y=e[f],h=y[r]||"",m=y[i]||"",v=y[a]||"";if(o.add(h),s.has(v)){const p=s.get(v);p.push({name:h,value:m,...y}),s.set(v,p)}else s.set(v,[{name:h,value:m,...y}])}const c=Array.from(o),u=[];for(const[f,y]of s)u.push({name:f,data:y});return{dimensions:c,dataset:u}},useValueFormatter=(e,n)=>{var a;if(e==null)return n;const r=e.match(/\{.*\}/g);if(r==null||r.length===0)return n;const i=r.length;for(let o=0;o<i;o++){const s=r[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,n);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e};function getMarkLineData(e){return e.isShowMarkLine?{markLine:{data:[{type:e.markLineType}]}}:{}}const getTransformProps=(e,n,r)=>{switch(e.type){case"bar":return getBarTransformProps(e,n,r);case"line":return getLineTransformProps(e,n,r);case"pie":return getPieTransformProps(e,n,r);case"comboGraph":return getComboGraphTransformProps(e,n,r);default:return{}}},getBarTransformProps=(e,n,r)=>{const i=e.yAxisLabelFormatter,a=e.xAxisLabelFormatter,{dimensions:o=[],dataset:s=[]}=n,l=vue.computed(()=>{const{gradientShow:u,gradientColors:f,gradientOffset:y,barBorderRadius:h}=e,m=s,v=m.length,p=[];for(let S=0;S<v;S++){const b={...m[S],type:"bar",barWidth:e.barWidth,showBackground:e.showBarBackground},{isStack:d,stackColumns:g}=e;if(d&&g.includes(m[S].name||!g)&&(b.stack="stack"),b.label={show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:x=>{let C="",k=e.labelFormatter;k===""&&(k="{c}");const{seriesName:_,name:T,value:R,data:I}=x||{};return C+=useVariablesInText(k,{textData:{name:T,value:R,a:_,b:T,c:R||0,...I}},{useNewline:!0,useSpace:!0}),C}},b.itemStyle={},u&&(b.itemStyle={color:{x:e.isUseHorizontalAxis?1:0,y:0,x2:0,y2:e.isUseHorizontalAxis?0:1,colorStops:[{offset:0,color:e.colors[S]},{offset:y,color:f[S]},{offset:1,color:f[S]}]}}),h){const x=h.split(",");if(x!=null&&x.length){const C=[];for(const k of x){const _=parseFloat(k);isNaN(_)||C.push(_)}b.itemStyle.barBorderRadius=C}}e.isShowMarkLine&&(b.markLine={data:[{type:e.markLineType}]}),p.push(b)}return p}),c=vue.computed(()=>o.map(u=>{let f={};return u&&typeof u=="object"?f={...u,textStyle:{fontSize:r}}:f={value:u,textStyle:{fontSize:r}},f}));return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:u=>{const f=u.length;let y="",h=e.tooltipFormatter;h===""&&(h="{marker} {a} {c}");for(let m=0;m<f;m++){const{marker:v,seriesName:p,name:S,value:b,data:d}=u[m]||{};if(m===0){let g=S;typeof S=="string"&&S[0]==="0"&&!isNaN(+S)&&(g=(+S).toString()),y+=`${useValueFormatter(a,g)}<br/>`}y+=useVariablesInText(h,{textData:{marker:v,name:S,value:b,Qfw:formatQfw,a:p,b:S,c:b||0,...d}},{useNewline:!0,useSpace:!0}),y+="<br/>"}return y},textStyle:{color:e.tooltipTextStyleColor,fontSize:r},position:e.tooltipPosition||void 0,backgroundColor:e.tooltipBackgroundColor||"#fff"},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:s.map((u,f)=>({name:u.name,itemStyle:{color:e.colors[f]},icon:e.legendType})),formatter:u=>getLegendFormat(e.legendFormatter,{name:u})},xAxis:{type:e.isUseHorizontalAxis?"value":"category",data:e.isUseHorizontalAxis?null:vue.unref(c),inverse:e.isUseHorizontalAxis?e.xAxisInverse:e.axisInverse,minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor,type:e.xAxisSplitLineType},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter(u){return typeof u=="string"&&u[0]==="0"&&!isNaN(+u)&&(u=(+u).toString()),useValueFormatter(a,u)}},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:e.isUseHorizontalAxis?"category":"value",data:e.isUseHorizontalAxis?vue.unref(o):null,inverse:e.isUseHorizontalAxis?e.axisInverse:e.yAxisInverse,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,rotate:e.yAxisLabelRotate,width:e.yAxisLabelWidth,overflow:e.yAxisLabelOverflow,formatter(u){return useValueFormatter(i,u)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},series:vue.unref(l)}},getLineTransformProps=(e,n,r)=>{const i=e.yAxisLabelFormatter,a=e.xAxisLabelFormatter,{dimensions:o=[],dataset:s=[]}=n,l=vue.computed(()=>o.map(u=>{let f={};return u&&typeof u=="object"?f={...u,textStyle:{fontSize:r}}:f={value:u,textStyle:{fontSize:r}},f})),c=vue.computed(()=>{const u=[],f=s.length;for(let y=0;y<f;y++){const h={};e.shadowColor&&(h.shadowColor=e.shadowColor,h.shadowBlur=e.shadowBlur,h.shadowOffsetY=e.shadowOffsetY,h.shadowOffsetX=e.shadowOffsetX),u.push({type:"line",...s[y],symbolSize:e.symbolSize,smooth:e.smooth,areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:e.colors[y],opacity:e.areaStyleOpacity},lineStyle:{width:e.lineStyleWidth,...h},...getMarkLineData(e)})}return u});return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:u=>{const f=u.length;let y="",h=e.tooltipFormatter;h===""&&(h="{marker} {a} {c}");for(let m=0;m<f;m++){const{marker:v,seriesName:p,name:S,value:b,data:d}=u[m]||{};m===0&&(y+=`${S}<br/>`),y+=useVariablesInText(h,{textData:{marker:v,name:S,value:b,a:p,b:S,c:b,...d}},{useNewline:!0,useSpace:!0}),y+="<br/>"}return y},textStyle:{color:e.tooltipTextStyleColor,fontSize:r.value},position:e.tooltipPosition||void 0,backgroundColor:e.tooltipBackgroundColor||"#fff"},xAxis:{name:e.xAxisName,type:"category",data:vue.unref(l),minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor}},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,formatter(u){return useValueFormatter(a,u)}},axisLine:{lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow}},yAxis:{type:"value",name:e.yAxisName,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor}},axisLabel:{fontSize:r,color:e.yAxisLabelColor,formatter(u){return useValueFormatter(i,u)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}}},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{fontSize:r}},series:vue.unref(c)}},getPieTransformProps=(e,n,r)=>{const{dataset:i=[]}=n;let{data:a=[]}=i[0]||{};if(Array.isArray(e.colors)){const o=e.isUseLabelColors,s=e.colors;a=a.map((l,c)=>({label:o?{color:s[c]}:{},...l}))}return{title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign||"center"},tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter:o=>{const{marker:s,seriesName:l,name:c,value:u,percent:f,data:y}=o||{};return useVariablesInText(e.tooltipFormatter,{textData:{marker:s,name:c,value:u,percent:f,a:l,b:c,c:u,d:f,...y}},{useNewline:!0,useSpace:!0})},textStyle:{color:e.tooltipTextStyleColor||"#333"},backgroundColor:e.tooltipBackgroundColor||"#fff",borderColor:e.tooltipBorderColor||"#eee"},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:r===18?r:e.labelFontSize}},series:[{data:a,type:"pie",radius:[e.innerRadius,e.outerRadius],center:[e.centerLeft,e.centerTop],roseType:e.roseType,avoidLabelOverlap:!1,minAngle:e.minAngle,label:{show:e.labelPosition!=="center"&&e.labelShow,color:e.labelColor,fontSize:r===18?r:e.labelFontSize,position:e.labelPosition,formatter:handleFormatter(e.labelFormatter)},labelLine:{show:e.labelLineShow,length:e.labelLineLength,length2:e.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},getComboGraphTransformProps=(e,n,r)=>{const{dimensions:i=[],dataset:a=[]}=n,o=vue.computed(()=>i.map(c=>{let u={};return c&&typeof c=="object"?u={...c,textStyle:{fontSize:r}}:u={value:c,textStyle:{fontSize:r}},u})),s=vue.computed(()=>{const c=[],u=a.length,f=e.seriesTypes;for(let y=0;y<u;y++){const h=f[y],{type:m,axisIndex:v}=h||{};let p={type:m,yAxisIndex:v,...a[y]};if(m==="line"){const S={};e.shadowColor&&(S.shadowColor=e.shadowColor,S.shadowBlur=e.shadowBlur,S.shadowOffsetY=e.shadowOffsetY,S.shadowOffsetX=e.shadowOffsetX),p={...p,symbolSize:e.symbolSize,smooth:e.smooth,itemStyle:{color:e.colors[y]},areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:e.colors[y],opacity:e.areaStyleOpacity},lineStyle:{width:e.lineStyleWidth,...S}}}if(m==="bar"){const{gradientShow:S,gradientColors:b,gradientOffset:d}=e,g={};if(e.barBorderRadius){const x=e.barBorderRadius.split(",");if(x!=null&&x.length){const C=[];for(const k of x){const _=parseFloat(k);isNaN(_)||C.push(_)}g.borderRadius=C}}S&&(g.color={x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e.colors[y]},{offset:d,color:b[y]},{offset:1,color:b[y]}]}),p={...p,barWidth:e.barWidth,itemStyle:g}}e.isShowMarkLine&&(p.markLine={data:[{type:e.markLineType}]}),c.push(p)}return c}),l=vue.computed(()=>{const c=e.yAxis;return c==null?void 0:c.map((u,f)=>({type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:f===0?e.yAxisLeftSplitLineShow:e.yAxisRightSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:f===0?e.yAxisLeftSplitLineType:e.yAxisRightSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{fontSize:r,show:e.yAxisLabelShow,color:e.yAxisLabelColor,formatter(y){return useValueFormatter(u.axisLabelFormatter,y)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:f===0?e.yAxisLeftName:e.yAxisRightName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:f===0?"right":"left"},max:e.yAxisMaxValue||null}))});return{legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:r}},tooltip:{trigger:"axis",show:e.tooltipShow,formatter:c=>{const u=c.length;let f="",y=e.tooltipFormatter;y===""&&(y="{marker} {a} {c}");const h=e.seriesTypes;for(let m=0;m<u;m++){const v=h[m],{tooltipFormatter:p}=v||{},{marker:S,seriesName:b,name:d,value:g,data:x}=c[m]||{};m===0&&(f+=`${d}<br/>`),f+=useVariablesInText(p||y,{textData:{marker:S,name:d,value:g,seriesName:b,a:b,b:d,c:g,...x}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:e.tooltipTextStyleColor||"#333",fontSize:r},backgroundColor:e.tooltipBackgroundColor||"#fff",borderColor:e.tooltipBorderColor||"#eee"},xAxis:{name:e.xAxisName,minInterval:e.xAxisMinInterval,type:"category",data:vue.unref(o),splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor}},axisLabel:{color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow},axisLine:{lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow}},yAxis:vue.unref(l),series:vue.unref(s)}},getCommonTransformProps=e=>({title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign||"center"},grid:{top:e.gridTop,bottom:e.gridBottom,left:e.gridLeft,right:e.gridRight,containLabel:e.gridContainLabel},color:e.colors}),transformProps=(e,n,r=12)=>({...getCommonTransformProps(e),...getTransformProps(e,n,r)}),generalTools={...indicators,runCode,useTransformChartDataByAttrKey,useTransformChartDataByAttrValue,useValueFormatter,useVariablesInText,transformProps,getIndicatorParams},useIndicatorData=(e={},n=()=>{})=>{var u;const{pageMode:r}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:i}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:a}=vue.inject(LOADED_DATA,{setLoadedData:(f,y)=>{}}),{getAllGlobalModel:o}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),{pageId:s}=vue.inject("templateOperate",{pageId:""})||{};e.dataType==="indicator"&&i();const l=async(f={})=>{var p,S,b;const y=o();a(e.id,!1);const h=generalTools.formatIndicatorParams({...e,pageId:s||((p=window==null?void 0:window.config)==null?void 0:p.pageId),globalModel:y},f),{url:m,...v}=h||{};if(console.log("formatParams",h),m&&v)try{const d=await request({url:`${INDICATOR_URL}${m}`,method:"post",headers:{Authentication:(S=window==null?void 0:window.config)==null?void 0:S.indicatorToken,operateContext:CONTEXT},data:v,signal:((b=window.controller)==null?void 0:b.signal)||""});return f!=null&&f.isTimer&&n(d),d}catch(d){console.error(d)}},c=vue.unref(r)!=="design"&&((u=e==null?void 0:e.graphicConfig)==null?void 0:u.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{l({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(c)}),l},useHrefParamsToGlobalVariables=()=>{const n=window.location.search.slice(1).split("&"),r=n.length,i={};for(let a=0;a<r;a++){const o=n[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$u=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""}},setup(e){const{width:n,height:r}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=n.value,x.height=r.value),{...x,backgroundColor:e.pageId?"transparent":e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),f=vue.ref(!1),y=vue.ref();let h;const m=()=>new Promise(x=>{vue.nextTick(()=>{n.value&&r.value?(s.value=parseFloat(n.value),l.value=parseFloat(r.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),v=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${c.value}px`,y.value.style.height=`${u.value}px`)};vue.watch([n,r],async()=>{e.pageId||(await m(),v(),S(),window.addEventListener("resize",b),d()),f.value=!0},{immediate:!0});const p=vue.ref({});vue.provide("scaleValue",p);const S=()=>{if(a){y.value.style.width="100%",y.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,C=document.body.clientHeight,k=s.value||c.value,_=l.value||u.value,T=x/k;let R=C/_;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/_),p.value={widthScale:T,heightScale:R},y.value&&(y.value.style.transform=`scale(${T}, ${R})`),i(R)},b=lodashEs.debounce(async()=>{await m(),S()},100),d=()=>{const x=window.MutationObserver;h=new x(b),h.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},g=()=>{h&&(h.disconnect(),h.takeRecords(),h=null)};return vue.onMounted(()=>{f.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",b),g()}),{style:o,container:y,ready:f}}}),PageConfig_vue_vue_type_style_index_0_scoped_e1e149bf_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$z(e,n,r,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready||e.pageId?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-e1e149bf"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps,pageId:{type:String,default:""}},setup(e,{expose:n,emit:r}){e.pageId||useHrefParamsToGlobalVariables();const i=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=vue.ref(),o=()=>{a.value.setAttribute("datav-theme",e.theme)},s=vue.inject("usedComponentList",[]),l=vue.inject("componentList",[]),c=vue.computed(()=>{const Z=[];for(const X of vue.unref(s))X.type==="ecanModal"?Z.push(...X.componentList):Z.push(X);return Z});vue.watch(()=>e.theme,()=>{o()}),vue.onMounted(()=>{o()});const u=vue.computed(()=>useVariablesInText$1(e.contextRequestUrl)),f=vue.computed(()=>e.pageMode),y=vue.computed(()=>e.theme),h=vue.computed(()=>e.width),m=vue.computed(()=>e.height),v=vue.computed(()=>e.pageFontFamily),p=vue.computed(()=>{const Z=[],X=vue.unref(l).filter(re=>re.type==="ecanModal");for(const re of X)re!=null&&re.requestList&&Z.push(...re.requestList);return[...Z,...e.requestList]}),S=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:u,pageMode:f,theme:y,touchEventId:S,width:h,height:m,fontFamily:v,requestList:p});const b=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Z=>{let X=Z;i.value||(X=parseFloat(m.value)*Z+"px"),b.value.height=X}),vue.provide("isMobile",i.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap),vue.provide("templateOperate",{pageId:e.pageId,templateEmit:r,setTemplateData:Z=>{var X;if(Z!=null&&Z.pageId){const{componentId:re,...ae}=Z;(X=window.config)!=null&&X.urlParams||(window.config.urlParams={}),window.config.urlParams[Z.pageId]=ae,r("templateChange",Z)}}});const d=vue.ref(),g=new Map,x=()=>g,C=Z=>g.get(Z),k=(Z,X)=>{var re;if(d.value=X,g.set(Z,X),!e.pageId){const ae=vue.unref(s).find(oe=>oe.id===Z);ae&&((re=window.config)!=null&&re.record||(window.config.record={}),window.config.record[ae.keyName]=X)}},_=()=>{d.value=null},T=Z=>{let X=Z;if(X){const re=Z.match(/\{(.+?)\}/g);if(re!=null&&re.length){let ae=re[0].slice(1,-1).trim();const oe=ae.match(/\[(.+?)\]/g);let le="";oe!=null&&oe.length&&(ae=ae.replace(oe[0],""),le=oe[0].slice(1,-1).trim());const ue=vue.unref(c).find(fe=>fe.keyName===ae);if(ue){const fe=C(ue.id),{type:ve,value:ye,RECORD:ge,recordData:pe}=fe||{};lowerCaseIncludes$1(ve,MODEL_KEY_LIST$1)?X=ge[le]:lowerCaseIncludes$1(ve,"select")?X=pe[le]:lowerCaseIncludes$1(ve,["rangePicker","date"])?dayjs.isDayjs(vue.unref(fe[le]))?X=vue.unref(fe[le]).format(fe.format):X=vue.unref(fe[le]):X=ye}else X=(window.config.requestParams||{})[ae]||""}}return X},R=new Map,I={},D=async(Z,X)=>{var ue;const{requestName:re}=Z,ae=await useRequestData({...Z,projectRequestUrl:vue.unref(u),getModel:C})(),oe=((ue=ae==null?void 0:ae.data)==null?void 0:ue.data)||{},le=R.get(re);if(le!=null&&le.length&&(!X||I[re])){for(const fe of le)fe(oe);X||R.delete(re)}},B=(Z,X)=>{I[Z]&&(clearInterval(I[Z]),delete I[Z],R.delete(Z));const re=vue.unref(c).filter(oe=>!oe.openCustomRequestData&&oe.customRequestName===Z),ae=R.get(Z)||[];if((re==null?void 0:re.length)>ae.length&&(ae.push(X),R.set(Z,ae),(re==null?void 0:re.length)===ae.length)){const oe=vue.unref(p).find(le=>le.requestName===Z);oe&&(oe!=null&&oe.isOpenRequestTimer&&(oe!=null&&oe.requestInterval)?(D(oe,!0),I[Z]=setInterval(()=>{D(oe,!0)},oe.requestInterval*1e3)):D(oe))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:C,setGlobalModel:k,getAllGlobalModel:x,clearInteractiveData:_,getRecordValueByKeyName:T,hanldePageRequestData:B,interactiveData:d});const L=vue.ref({}),W=(Z,X)=>{L.value[Z]=X};vue.provide(LOADED_DATA,{loadedData:L,setLoadedData:W});const j=[],P=()=>{j.pop()},M=Z=>{j.push(Z)},A=new Map,w=Z=>A.get(Z),$=(Z,X)=>{A.set(Z,X)};vue.provide(MODAL_MODEL,{popUseModalIds:P,pushUseModalIds:M,getModalModel:w,setModalModel:$});const E=mitt(),N=new Set,V=(Z,X)=>{N.add(Z),E.on(Z,re=>{const{eventName:ae,params:oe}=re;return typeof X[ae]=="function"&&X[ae](oe)}),vue.onBeforeUnmount(()=>{F(Z)})},F=Z=>{N.delete(Z),E.off(Z)},H=(Z,X,re={})=>{if(Z==="PAGE"){const ae=j.length;let oe=[];if(ae===0)oe=[...N];else{const le=j[ae-1];oe=[...w(le)]}oe.forEach(le=>{E.emit(le,{eventName:X,params:re})})}else E.emit(Z,{eventName:X,params:re})};vue.provide(EVENT_BUS,{onEvent:V,offEvent:F,emitEvent:H});const q=vue.ref(0),G=()=>{q.value=vue.unref(q)+1};vue.provide(GLOBAL_TOKEN,{requestToken:G});const U=new Map,O=new Map,Y=({requestFn:Z=()=>{},sortNum:X=0,id:re=""})=>{if(U.has(X)){const ae=U.get(X);ae==null||ae.push(Z)}else U.set(X,[Z]);O.set(re,Z)},J=Z=>new Promise((X,re)=>{const ae=Z.map(oe=>oe());Promise.all(ae).then(oe=>{X(oe)}).catch(oe=>{re(oe)})}),Q=Z=>new Promise(async(X,re)=>{if(Z){if(typeof Z=="string"){const ae=O.get(Z);if(typeof ae=="function"){const oe=request.interceptors.response.use(le=>(X(le),le),le=>(re(le),Promise.reject(le)));ae(),request.interceptors.response.eject(oe)}}}else{const ae=Array.from(U);ae.sort((le,ue)=>ue[0]-le[0]);const oe=ae.length;try{e.pageMode!=="design"&&vue.unref(q)>0;for(let le=0;le<oe;le++){const ue=ae[le][1];await J(ue)}}catch(le){console.error(le)}finally{U.clear(),X(null)}}});vue.provide(REQUEST_MODEL,{setRequest:Y,touchRequest:Q});const ee=()=>{E.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:ee});const K=Z=>{E.on(REFRESH_PAGE,()=>Z()),vue.onMounted(()=>{E.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var Z;if((Z=vue.unref(s))!=null&&Z.length&&vue.unref(f)!=="design"){const{jumpType:X,jumpTime:re,jumpPage:ae,jumpLink:oe}=e;if(re!=null&&re.value){let le=0;switch(re==null?void 0:re.suffix){case"hours":le=re.value*60*60*1e3;break;case"minute":le=re.value*60*1e3;break;case"seconds":le=re.value*1e3;break}setTimeout(()=>{let ue="";X==="page"&&ae?ue=usePageUrl(vue.unref(f),ae):X==="link"&&oe&&(ue=oe),ue=useVariablesInText$1(ue),window.open(ue,"_self")},le)}}}),vue.onBeforeUnmount(()=>{U==null||U.clear(),O==null||O.clear()}),n({touchRequest:Q,getGlobalModel:C,onRefreshPage:K,emitEvent:H,getRecordValueByKeyName:T,props:e}),{providerConfig:a,configStyle:b}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_d2563ca9_lang="";function _sfc_render$y(e,n,r,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-d2563ca9"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:"",targetTemplate:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:n}){const r=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=E=>{var N,V;if(e.showAnimation){const F=e.text.match(/\{(.+?)\}/g)||[];if(F!=null&&F.length){const H=(N=F[0].slice(1,-1))==null?void 0:N.trim();if(vue.unref(a)[H]===E){a.value=E;return}const q=+E[H];let G=0;if(isNaN(q))a.value=E;else{String(q).includes(".")&&(G=((V=String(q).split(".")[1])==null?void 0:V.length)||0);const U=Math.abs(q)*Math.pow(10,G),O=String(U).length;let Y=[];for(let Q=0;Q<5;Q++){const ee=Math.ceil(Math.random()*(U+1)-1);Y.includes(ee)||Y.push(ee)}Y.sort((Q,ee)=>Q-ee),Y=Y.map(Q=>{const ee=String(Q).split("").reverse(),K=[];for(let Z=0;Z<O;Z++)ee&&ee[Z]?K.push(ee[Z]):K.push("0");return G&&K.splice(G,0,"."),(q<0?"-":"")+K.reverse().join("")}),Y.push(q);let J=0;for(const Q of Y)setTimeout(()=>{a.value={...vue.unref(a),[H]:Q}},J*1e3),J+=.1}}else a.value=E}else a.value=E};vue.watch(()=>[e.data,e.dataType],([E,N])=>{N==="static"&&l(E)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:f,hanldePageRequestData:y}=vue.inject(GLOBAL_MODEL,{getGlobalModel:E=>{},setGlobalModel:(E,N)=>{},getRecordValueByKeyName:E=>{},hanldePageRequestData:(E,N)=>{}}),{setLoadedData:h,loadedData:m}=vue.inject(LOADED_DATA,{setLoadedData:(E,N)=>{},loadedData:{}}),{setTemplateData:v}=vue.inject("templateOperate",{setTemplateData:E=>{}}),p=vue.computed(()=>{let E="";if(e.gradientShow){const{gradientColor:N,gradientOffset:V,gradientAngle:F,color:H}=e;E+=`background: linear-gradient(${F}, ${H}, ${N||"transparent"} ${V*100}%);-webkit-background-clip: text;color: transparent;`}return E}),S=vue.computed(()=>{const E={};if(e.gradientShow){const{gradientColor:N,gradientOffset:V,gradientAngle:F,color:H}=e,q=N||"transparent";E.background=`linear-gradient(${F}, ${H}, ${q} ${V*100}%)`,E["-webkit-background-clip"]="text",E.color="transparent"}return E}),b=vue.computed(()=>{const E={};return e.linkPage&&(E.cursor="pointer",E.userSelect="none"),E}),d=vue.ref(1),g=vue.computed(()=>{var U;if(vue.unref(r))return"NaN";if(!d.value)return;const E=vue.unref(a),N=e.increaseColor||e.color,V=e.declineColor||e.color;let F=e.text;F=F==null?void 0:F.replace(/\n|\\n/g,"<br/>"),F=F==null?void 0:F.replace(/\s(?!\{) | (?!\})\s/g," ");const H=F.match(/\{(.+?)\}/g)||[];let q="",G="";if(e.exceedConfig==="wrap"?G="show-wrap":e.exceedConfig==="ellipsis"&&(G="show-ellipsis"),H==null||H.length===0){if(F&&e.format==="percentage"&&!isNaN(+F)){const O=parseFloat(F),Y=O*100,J=x(Y.toFixed(2));O>=0?F=`<span class="${G}" style="color: ${J||N||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(p)}">
|
|
103
103
|
<div class="percentage-img-box">
|
|
104
104
|
<img style="width: ${vue.unref(o)};filter: ${`drop-shadow(${J||N||"#ED6643"} ${vue.unref(o)} 0px)`};" src="${goUp}"/>
|
|
105
105
|
</div>
|