@ecan-bi/datav 1.2.98 → 1.3.0
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 -4
- 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.
|
|
1
|
+
/*! @ecan-bi/datav@1.3.0 */
|
|
2
2
|
(function(H,n){typeof exports=="object"&&typeof module<"u"?n(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"],n):(H=typeof globalThis<"u"?globalThis:H||self,n(H["@ecan/bi-datav"]={},H.Vue,H["echarts/core"],H.ResizeDetector,H.AntDesignVue,null,null,H.LodashEs,H.Dayjs,H.Axios,H.Mitt,null,null,null,H["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,H["echarts/renderers"],H["echarts/charts"],H["echarts/components"],null,H.Echarts,null,null,H.Xlsx,H.big.js))})(this,function(H,n,$e,Ra,se,au,ru,Pe,ke,I0,R0,iu,lu,su,_a,cu,fu,du,uu,kt,ct,ye,hu,_0,gu,mu,jt,O0){var w0,A0,k0,T0;"use strict";function L0(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const N0=L0(_0),M0=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function z0(e,o){function t(r){return(...i)=>{if(e.value||o(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[r].apply(e.value,i)}}function a(){const r=Object.create(null);return M0.forEach(i=>{r[i]=t(i)}),r}return a()}function F0(e,o,t){let a=null;n.watch([t,e,o],([r,i,s],l,d)=>{r&&i&&s&&(a=$e.throttle(()=>{i.resize()},100),Ra.addListener(r,a)),d(()=>{a&&r&&Ra.removeListener(r,a)})})}const P0={autoresize:Boolean},q0="ecLoadingOptions";function H0(e,o,t){const a=n.inject(q0,{}),r=n.computed(()=>({...n.unref(a),...t==null?void 0:t.value}));n.watchEffect(()=>{const i=e.value;i&&(o.value?i.showLoading(r.value):i.hideLoading())})}const V0={loading:Boolean,loadingOptions:Object},yu="",j0=/^on[^a-z]/,U0=e=>j0.test(e);function G0(e){const o={};for(const t in e)U0(t)||(o[t]=e[t]);return o}const W0="x-vue-echarts",$0="ecTheme",Z0="ecInitOptions",Y0="ecUpdateOptions",ht=n.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...P0,...V0},inheritAttrs:!1,setup(e,{attrs:o,listeners:t}){const a=n.shallowRef(),r=n.shallowRef(),i=n.shallowRef(),s=n.inject($0,null),l=n.inject(Z0,null),d=n.inject(Y0,null),{autoresize:c,manualUpdate:u,loading:h,loadingOptions:f}=n.toRefs(e),g=n.computed(()=>i.value||e.option||Object.create(null)),y=n.computed(()=>e.theme||n.unref(s)||{}),m=n.computed(()=>e.initOptions||n.unref(l)||{}),v=n.computed(()=>e.updateOptions||n.unref(d)||{}),E=n.computed(()=>G0(o));function p(B){if(r.value||!a.value)return;const L=r.value=$e.init(a.value,y.value,m.value);e.group&&(L.group=e.group);let R=t;R||(R={},Object.keys(o).filter(T=>T.indexOf("on")===0&&T.length>2).forEach(T=>{const w=T.charAt(2).toLowerCase()+T.slice(3);R[w]=o[T]})),Object.keys(R).forEach(T=>{const w=R[T];w&&(T.indexOf("zr:")===0?L.getZr().on(T.slice(3).toLowerCase(),w):L.on(T.toLowerCase(),w))});function C(){if(L&&!L.isDisposed())try{L.resize()}catch(T){if(T.message==="Cannot read property 'get' of undefined")return;throw T}}function S(){L.setOption(B||g.value,v.value)}c.value?n.nextTick(()=>{C(),S()}):S()}function b(B,L){e.manualUpdate&&(i.value=B),r.value?r.value.setOption(B,L||{}):p(B)}function x(){r.value&&(r.value.dispose(),r.value=void 0)}let A=null;n.watch(u,B=>{typeof A=="function"&&(A(),A=null),B||(A=n.watch(()=>e.option,L=>{L&&(r.value?r.value.setOption(L,v.value):p())},{deep:!0}))},{immediate:!0}),n.watch([y,m],()=>{x(),p()},{deep:!0}),n.watchEffect(()=>{e.group&&r.value&&(r.value.group=e.group)});const k=z0(r,p);return H0(r,h,f),F0(r,c,a),n.onMounted(()=>{e.option&&p()}),n.onUnmounted(x),{chart:r,root:a,setOption:b,nonEventAttrs:E,...k}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",n.h(W0,e)}});function Je(e,o){K0(e)&&(e="100%");var t=Q0(e);return e=o===360?e:Math.min(o,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*o),10)/100),Math.abs(e-o)<1e-6?1:(o===360?e=(e<0?e%o+o:e%o)/parseFloat(String(o)):e=e%o/parseFloat(String(o)),e)}function K0(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Q0(e){return typeof e=="string"&&e.indexOf("%")!==-1}function J0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Qt(e){return e<=1?"".concat(Number(e)*100,"%"):e}function bn(e){return e.length===1?"0"+e:String(e)}function X0(e,o,t){return{r:Je(e,255)*255,g:Je(o,255)*255,b:Je(t,255)*255}}function vn(e,o,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(o-e)*(6*t):t<1/2?o:t<2/3?e+(o-e)*(2/3-t)*6:e}function el(e,o,t){var a,r,i;if(e=Je(e,360),o=Je(o,100),t=Je(t,100),o===0)r=t,i=t,a=t;else{var s=t<.5?t*(1+o):t+o-t*o,l=2*t-s;a=vn(l,s,e+1/3),r=vn(l,s,e),i=vn(l,s,e-1/3)}return{r:a*255,g:r*255,b:i*255}}function tl(e,o,t){e=Je(e,255),o=Je(o,255),t=Je(t,255);var a=Math.max(e,o,t),r=Math.min(e,o,t),i=0,s=a,l=a-r,d=a===0?0:l/a;if(a===r)i=0;else{switch(a){case e:i=(o-t)/l+(o<t?6:0);break;case o:i=(t-e)/l+2;break;case t:i=(e-o)/l+4;break}i/=6}return{h:i,s:d,v:s}}function nl(e,o,t){e=Je(e,360)*6,o=Je(o,100),t=Je(t,100);var a=Math.floor(e),r=e-a,i=t*(1-o),s=t*(1-r*o),l=t*(1-(1-r)*o),d=a%6,c=[t,s,i,i,l,t][d],u=[l,t,t,s,i,i][d],h=[i,i,l,t,t,s][d];return{r:c*255,g:u*255,b:h*255}}function ol(e,o,t,a){var r=[bn(Math.round(e).toString(16)),bn(Math.round(o).toString(16)),bn(Math.round(t).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Oa(e){return Ze(e)/255}function Ze(e){return parseInt(e,16)}var La={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 Ut(e){var o={r:0,g:0,b:0},t=1,a=null,r=null,i=null,s=!1,l=!1;return typeof e=="string"&&(e=il(e)),typeof e=="object"&&(ft(e.r)&&ft(e.g)&&ft(e.b)?(o=X0(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ft(e.h)&&ft(e.s)&&ft(e.v)?(a=Qt(e.s),r=Qt(e.v),o=nl(e.h,a,r),s=!0,l="hsv"):ft(e.h)&&ft(e.s)&&ft(e.l)&&(a=Qt(e.s),i=Qt(e.l),o=el(e.h,a,i),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=J0(t),{ok:s,format:e.format||l,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:t}}var al="[-\\+]?\\d+%?",rl="[-\\+]?\\d*\\.\\d+%?",gt="(?:".concat(rl,")|(?:").concat(al,")"),Sn="[\\s|\\(]+(".concat(gt,")[,|\\s]+(").concat(gt,")[,|\\s]+(").concat(gt,")\\s*\\)?"),Cn="[\\s|\\(]+(".concat(gt,")[,|\\s]+(").concat(gt,")[,|\\s]+(").concat(gt,")[,|\\s]+(").concat(gt,")\\s*\\)?"),at={CSS_UNIT:new RegExp(gt),rgb:new RegExp("rgb"+Sn),rgba:new RegExp("rgba"+Cn),hsl:new RegExp("hsl"+Sn),hsla:new RegExp("hsla"+Cn),hsv:new RegExp("hsv"+Sn),hsva:new RegExp("hsva"+Cn),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 il(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var o=!1;if(La[e])e=La[e],o=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=at.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=at.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=at.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=at.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=at.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=at.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=at.hex8.exec(e),t?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),a:Oa(t[4]),format:o?"name":"hex8"}:(t=at.hex6.exec(e),t?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),format:o?"name":"hex"}:(t=at.hex4.exec(e),t?{r:Ze(t[1]+t[1]),g:Ze(t[2]+t[2]),b:Ze(t[3]+t[3]),a:Oa(t[4]+t[4]),format:o?"name":"hex8"}:(t=at.hex3.exec(e),t?{r:Ze(t[1]+t[1]),g:Ze(t[2]+t[2]),b:Ze(t[3]+t[3]),format:o?"name":"hex"}:!1)))))))))}function ft(e){return!!at.CSS_UNIT.exec(String(e))}var Jt=2,Na=.16,ll=.05,sl=.05,cl=.15,Ma=5,za=4,fl=[{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 Fa(e){var o=e.r,t=e.g,a=e.b,r=tl(o,t,a);return{h:r.h*360,s:r.s,v:r.v}}function Xt(e){var o=e.r,t=e.g,a=e.b;return"#".concat(ol(o,t,a,!1))}function dl(e,o,t){var a=t/100,r={r:(o.r-e.r)*a+e.r,g:(o.g-e.g)*a+e.g,b:(o.b-e.b)*a+e.b};return r}function Pa(e,o,t){var a;return Math.round(e.h)>=60&&Math.round(e.h)<=240?a=t?Math.round(e.h)-Jt*o:Math.round(e.h)+Jt*o:a=t?Math.round(e.h)+Jt*o:Math.round(e.h)-Jt*o,a<0?a+=360:a>=360&&(a-=360),a}function qa(e,o,t){if(e.h===0&&e.s===0)return e.s;var a;return t?a=e.s-Na*o:o===za?a=e.s+Na:a=e.s+ll*o,a>1&&(a=1),t&&o===Ma&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Ha(e,o,t){var a;return t?a=e.v+sl*o:a=e.v-cl*o,a>1&&(a=1),Number(a.toFixed(2))}function wn(e){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],a=Ut(e),r=Ma;r>0;r-=1){var i=Fa(a),s=Xt(Ut({h:Pa(i,r,!0),s:qa(i,r,!0),v:Ha(i,r,!0)}));t.push(s)}t.push(Xt(a));for(var l=1;l<=za;l+=1){var d=Fa(a),c=Xt(Ut({h:Pa(d,l),s:qa(d,l),v:Ha(d,l)}));t.push(c)}return o.theme==="dark"?fl.map(function(u){var h=u.index,f=u.opacity,g=Xt(dl(Ut(o.backgroundColor||"#141414"),Ut(t[h]),f*100));return g}):t}var An={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"},kn={},Tn={};Object.keys(An).forEach(function(e){kn[e]=wn(An[e]),kn[e].primary=kn[e][5],Tn[e]=wn(An[e],{theme:"dark",backgroundColor:"#141414"}),Tn[e].primary=Tn[e][5]});var Va=[],Gt=[],ul="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function hl(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function gl(e,o){if(o=o||{},e===void 0)throw new Error(ul);var t=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Va.indexOf(a);r===-1&&(r=Va.push(a)-1,Gt[r]={});var i;return Gt[r]!==void 0&&Gt[r][t]!==void 0?i=Gt[r][t]:(i=Gt[r][t]=hl(),t==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),i.styleSheet?i.styleSheet.cssText+=e:i.textContent+=e,i}function ja(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.forEach(function(r){ml(e,r,t[r])})}return e}function ml(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function yl(e,o){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(o))}function xl(e,o){yl(e,"[@ant-design/icons-vue] ".concat(o))}function Ua(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function Bn(e,o,t){return t?n.h(e.tag,ja({key:o},t,e.attrs),(e.children||[]).map(function(a,r){return Bn(a,"".concat(o,"-").concat(e.tag,"-").concat(r))})):n.h(e.tag,ja({key:o},e.attrs),(e.children||[]).map(function(a,r){return Bn(a,"".concat(o,"-").concat(e.tag,"-").concat(r))}))}function Ga(e){return wn(e)[0]}function Wa(e){return e?Array.isArray(e)?e:[e]:[]}var pl=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -94,7 +94,7 @@ version: 2.9.0
|
|
|
94
94
|
`,t+="-----END RSA PRIVATE KEY-----",t},o.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
|
|
95
95
|
`;return t+=o.wordwrap(this.getPublicBaseKeyB64())+`
|
|
96
96
|
`,t+="-----END PUBLIC KEY-----",t},o.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},o.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},o.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},o}(Ws),wo,Qs=typeof process<"u"?(wo=process.env)===null||wo===void 0?void 0:wo.npm_package_version:void 0,Js=function(){function e(o){o===void 0&&(o={}),o=o||{},this.default_key_size=o.default_key_size?parseInt(o.default_key_size,10):1024,this.default_public_exponent=o.default_public_exponent||"010001",this.log=o.log||!1,this.key=null}return e.prototype.setKey=function(o){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ni(o)},e.prototype.setPrivateKey=function(o){this.setKey(o)},e.prototype.setPublicKey=function(o){this.setKey(o)},e.prototype.decrypt=function(o){try{return this.getKey().decrypt($r(o))}catch{return!1}},e.prototype.encrypt=function(o){try{return an(this.getKey().encrypt(o))}catch{return!1}},e.prototype.sign=function(o,t,a){try{return an(this.getKey().sign(o,t,a))}catch{return!1}},e.prototype.verify=function(o,t,a){try{return this.getKey().verify(o,$r(t),a)}catch{return!1}},e.prototype.getKey=function(o){if(!this.key){if(this.key=new ni,o&&{}.toString.call(o)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,o);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=Qs,e}();const oi=new Js,qt=Xs();function Xs(){let o=Math.random().toString(36).substr(2);for(;o.length<16;)o+=Math.random().toString(36).substr(2);return o=o.substr(0,16),o}const ai=Ye.enc.Utf8.parse("ABCDEF1234123412");function ec(e,o){o=o||qt;const t=Ye.enc.Utf8.parse(o);let a="";switch(typeof e){case"string":a=Ye.enc.Utf8.parse(e);break;case"object":a=Ye.enc.Utf8.parse(JSON.stringify(e));break;default:a=Ye.enc.Utf8.parse(e.toString())}return Ye.AES.encrypt(a,t,{iv:ai,mode:Ye.mode.CBC,padding:Ye.pad.ZeroPadding}).toString()}function ri(e,o){o=o||qt;const t=Ye.enc.Utf8.parse(o),a=Ye.AES.decrypt(e,t,{iv:ai,mode:Ye.mode.CBC,padding:Ye.pad.ZeroPadding});return Ye.enc.Utf8.stringify(a).toString()}function tc(e){oi.setPublicKey(e)}function nc(e){return oi.encrypt(e)}function ii(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const t=["/diagram","/dataview"].map(a=>`^(.*?)${a}(/|$)`);for(const a of t)if(new RegExp(a).test(e))return!0;return!1}function oc(e){const{paramType:o,data:t,params:a,method:r}=e;o==="form"?["get","delete"].includes(r)?e.params=Ht(a,"string"):e.data=Ht(t,"string"):["get","delete"].includes(r)?e.params=Ht(a,"string"):e.data=Ht(t)}function Ht(e,o){let t=e||{};if(o==="string"){t="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const d=e[l];t+=`${l}=${encodeURIComponent(d)}&`}}tc("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const r=nc(qt);return{c:ec(t,qt),p:r}}window.getEncryptParam=Ht;function ac(e,o){var t;(t=window==null?void 0:window.config)!=null&&t.encryptFlag&&ii(e.url)&&(e.data instanceof FormData?e.data=rc(e.data):oc(e))}function rc(e){const o=e.entries(),t=new FormData,a={};for(const i of o){const s=i[0],l=i[1];l instanceof Blob?t.append(s,l):a[s]=l}const r=Ht(a,"json");return typeof r=="object"&&(t.append("c",r.c),t.append("p",r.p)),t}window.xhaesKey=qt,window.xhaesDecrypt=ri;function li(e,o){var t;if((t=window==null?void 0:window.config)!=null&&t.encryptFlag&&ii(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const a=ri(e.data.data.content,qt);e.data=JSON.parse(a)}}const si=window.config.requestErrorTip,lt=I0.create({timeout:1e3*180});lt.interceptors.request.use(e=>{const{requestParams:o={}}=window.config;return o!=null&&o.pltToken&&(e.headers["Plt-Token"]=o.pltToken),ac(e),e},e=>Promise.reject(e)),lt.interceptors.response.use(e=>{var o,t,a;return si&&+((o=e==null?void 0:e.data)==null?void 0:o.code)==500&&se.message.error({content:((t=e==null?void 0:e.data)==null?void 0:t.msg)||((a=e==null?void 0:e.data)==null?void 0:a.message)||"服务器异常",key:"SERVER_ERROR"}),li(e),e},e=>{if(li(e==null?void 0:e.response),si)if(e.message.includes("timeout"))se.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:o}=(e==null?void 0:e.response)||{};o>=400&&o<500&&se.message.error({content:"请求异常",key:"REQUEST_ERROR"}),o>=500&&se.message.error({content:"服务器异常",key:"REQUEST_ERROR"})}return Promise.reject(e)});const ic=e=>e.replace(/\\n/g,`
|
|
97
|
-
`),Ao=(e,o=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(o).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},lc=e=>{const o=parseFloat(e+"");return isNaN(o)?e:(o+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},hn=(e,o=2)=>{const t=e+"";if(t.includes("%"))return e;const a=parseFloat(t);return isNaN(a)?e:`${(a*100).toFixed(o)}%`},sc=(e,o=2)=>{const t=e+"",a=parseFloat(t);return isNaN(a)?e:a.toFixed(o)},ci=(e,o)=>tt(o,e),bt=(e,o)=>{if(typeof e=="string"&&typeof o=="string")return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(o)){const t=o.length;for(let a=0;a<t;a++){const r=o[a];if(typeof r=="string"&&e.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},gn=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),Yt=e=>{const{leftAxisList:o=[],rightAxisList:t=[],queryColumnList:a=[],indicators:r=[]}=e;return[...o,...t,...a,...r].filter(i=>(i==null?void 0:i.calcType)==="COMPONENT").map(i=>({keyName:i.builtInCalcWay,id:i.builtInValueSource}))},et=(e,o)=>{let t=!0;const a=Yt(e);return a!=null&&a.length&&(t=a.map(r=>o[r.id]).every(r=>r)),t},mn=(e,o)=>{const t={dayjs:ke,...o};let a="";const r=[];for(const l in t)a+=`${l},`,r.push(t[l]);a=a.replace(/,$/,"");const i=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return s},Be=(e="",{textData:o,codeData:t}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const h=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(h);for(let g=0;g<f.length;g++){const y=f[g],m=s[y];m!=null&&typeof m!="function"&&(u=u.replace(y,m))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=mn(u,t)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),r&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},qe=(e,o=()=>{})=>{const{requestUrl:t,requestMethod:a,requestHeaders:r,requestParams:i,requestInterval:s,isOpenRequestTimer:l}=e,{contextRequestUrl:d,touchEventId:c}=n.inject(Me,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:u}=n.inject(we,{getGlobalModel:y=>{}}),h=Be(t),f=async(y={})=>{if(!h||!a||!r)return;let m={};i.forEach(x=>{const{key:A,value:k}=x;if(typeof k=="object"&&k!=null&&k.id){let B={};const{id:L,prop:R,propKey:C,operate:S}=k;L==="THIS"?B=u(n.unref(c))||{}:B=u(L)||{};const T=n.unref(B[R]);let w=null;if(["date","range"].some(N=>bt(B==null?void 0:B.type,N))){const{value:N,type:O,mode:M}=S||{};if(N&&O&&M)switch(O){case"add":w=n.unref(T).add(N,M);break;case"minus":w=n.unref(T).subtract(N,M);break}w==null&&(w=n.unref(T)),w=(w==null?void 0:w.format((C==null?void 0:C.trim())||B.format))||""}else Object.prototype.toString.call(T)==="[object Object]"?C?w=T[C]:w=R?T[R]:T:bt(B==null?void 0:B.type,"select")&&n.unref(T)&&R&&Array.isArray(n.unref(T))?w=n.unref(T).map(N=>Object.prototype.hasOwnProperty.call(N,R)?N[R]:N):w=T;m[A]=w}else typeof k=="string"&&(m[A]=Be(k))}),m={...window.config.requestParams,...y,...m};let v="";const E=Object.keys(m),p=E.length-1,b=E.length;E.forEach((x,A)=>{let k=m[x];Object.prototype.toString.call(k)==="[object Object]"&&(k=JSON.stringify(k)),A===0?b!==1?v+=`?${x}=${k}&`:v+=`?${x}=${k}`:A===p?v+=`${x}=${k}`:v+=`${x}=${k}&`});try{const x=["get","head"].includes(a),A={};let k=x?h+v:h;m.dataSqlId&&!k.includes("dataSqlId")&&(k+=`${k.includes("?")?"&":"?"}dataSqlId=${m.dataSqlId}`),Object.prototype.hasOwnProperty.call(m,"signal")&&(A.signal=m.signal);const B=await lt({baseURL:n.unref(d)||"",url:k,method:a,headers:r,data:x?{}:m,...A});return o(B),B}catch(x){console.error(x)}},g=l&&setInterval(f,s*1e3);return n.onUnmounted(()=>{clearInterval(g)}),f},vt=(e=[],o,t=!1)=>{let{name:a="name",types:r=[]}=o||{};a=(a==null?void 0:a.trim())||a;const i=new Set,s=new Map,l=e.length,d=r.length;if(l===1&&!t){const h=[];for(let g=0;g<d;g++){const y=r[g],{label:m,value:v}=y,E={...e[0],value:e[0][v]};i.add(m),h.push(E)}const f=e[0][a]||"";s.set(f,h)}else for(let h=0;h<l;h++){const f=e[h],g=f[a];i.add(g);for(let y=0;y<d;y++){const m=r[y],{label:v,value:E}=m,p={...f,value:f[E]};if(s.has(v)){const b=s.get(v);b.push(p),s.set(v,b)}else s.set(v,[p])}}const c=Array.from(i),u=[];for(const[h,f]of s)u.push({name:h,data:f});return{dimensions:c,dataset:u}},St=(e,o=!1)=>{var a;if(!e)return e;let t="";return e!=null&&e.includes("://")?t=e:t=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(t=`url(${t})`),t},fi=(e,o)=>{const t=`${rr}/preview?pageId=${o}`,a=`${rr}/${o}`;return e==="preview"?t:a},tt=(e,o)=>{var r;if(e==null)return o;const t=e.match(/\{.*\}/g);if(t==null||t.length===0)return o;const a=t.length;for(let i=0;i<a;i++){const s=t[i];if(s==null||s==="")break;let l=(r=s.slice(1,-1))==null?void 0:r.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=mn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},nt=(e={})=>{const{requestToken:o}=n.inject(tr,{requestToken:()=>{}}),{setLoadedData:t}=n.inject(mt,{setLoadedData:(f,g)=>{}});e.dataType==="indicator"&&o();const a=(f={})=>{const{label:g,name:y,location:m,show:v,indexCode:E}=f;return{label:g,columnName:y,location:m,show:v,calcType:"COLUMN",hrpIndexCode:E}},r=(f,g)=>Object.prototype.hasOwnProperty.call(f,g),i=f=>{r(f,"dataType")&&(f.fieldType==="DATE"&&(f.label=f.fieldName),f.dataType==="component"&&(f.fieldValue="${"+f.fieldValue+"}"),delete f.dataType),r(f,"activeKey")&&delete f.activeKey,r(f,"radioValue")&&delete f.radioValue},s=f=>{const g=[];return f!=null&&f.length&&Pe.cloneDeep(f).forEach(y=>{if(y.join&&y.conditions){const m=!y.conditions.some(v=>v.join&&v.conditions);y.conditions.forEach((v,E)=>{i(v),m?E<y.conditions.length-1?g.push({join:y.join,...v}):g.push(v):v.join&&v.conditions?g.push({conditions:s([v]),join:y.join}):g.push(v)})}else i(y),g.push(y)}),g},l=(f={})=>{const{label:g,name:y,location:m,show:v,indexCode:E,calcType:p="COLUMN",builtInFormula:b,builtInValueSource:x,builtInCalcWay:A,formula:k,conditions:B,aggregate:L}=f;let R;if(B&&(R=s(B)),p==="COMPONENT"){const C={};return h(C,x),{label:g.trim(),columnName:y,show:v,calcType:p,componentAlias:A,componentValue:C.fieldValue||null}}else return{label:g.trim(),columnName:y,location:m,show:v,calcType:p,hrpIndexCode:E,aggregate:L,builtInFormula:b,builtInValueSource:x,builtInCalcWay:A,formula:k,conditions:R}},d=f=>{const g=[];for(const y of f)y.conditions?g.push(...d(y.conditions)):(y==null?void 0:y.dataType)==="component"&&g.push(y);return g},{getGlobalModel:c}=n.inject(we,{getGlobalModel:f=>{}}),u=f=>{if(!f)return[];const{controlList:g=[],classificationList:y=[],rowHeaderList:m=[],seriesList:v=[],leftAxisList:E=[],rightAxisList:p=[],queryColumnList:b=[],indicators:x=[]}=f,A=[...y,...m,...v,...E,...p,...b,...x],k=[];for(const C of A){const S=d((C==null?void 0:C.conditions)||[]);if(S!=null&&S.length){const T=S.filter(w=>(w==null?void 0:w.dataType)==="component").map(w=>{const I={};return w!=null&&w.dateFormat&&(I.format=w.dateFormat),{conditionKey:w.fieldName,conditionLabel:w.fieldName,conditionName:w.fieldName,conditionValueType:w.fieldType,id:w.componentId,keyName:w.fieldValue,rule:w.rule,notGlobal:!0,...I}});if(T!=null&&T.length)for(const w of T)k.find(I=>I.keyName===w.keyName)||k.push(w)}}const B=g.concat(k),L=B.length,R=[];for(let C=0;C<L;C++){const S=B[C];if((S==null?void 0:S.conditionKey)==="parentCode")continue;const{id:T,keyName:w,conditionLabel:I,conditionKey:N,conditionValueType:O,prop:M,rule:q="NONE",notGlobal:j=!1,format:G,modelKey:F}=S;let P=w||T;P&&M&&(P+=`-${M}`);let _=q;_==="NONE"&&(["startTime","endTime"].includes(M)?_=M==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":w!=null&&w.includes("startTime")?_=M==="GREATER_EQUAL":w!=null&&w.includes("endTime")?_=M==="LESS_EQUAL":_="EQUAL");const D={rule:_,label:I,fieldName:N,fieldValue:"",valueType:O,alias:P,globalCondition:!j};h(D,T,{prop:M,dateFormat:G,modelKey:F,keyName:w}),R.push(D)}for(let C=R.length-1;C>=0;C--){const S=R[C];S.globalCondition||R.find(w=>w.alias===S.alias&&w.globalCondition)&&R.splice(C,1)}return R};function h(f,g,y){var C,S;const m=c(g)||{};console.log("model",m);const{prop:v="",dateFormat:E="",modelKey:p="",keyName:b=""}=y||{},{value:x,format:A="YYYY-MM-DD",type:k="",useCurrentTime:B,RECORD:L}=m||{},R=E||A;if(bt(m.type,"date"))B?x?f.fieldValue=(C=n.unref(x))==null?void 0:C.format(R):f.fieldValue=ke().format(R):f.fieldValue=(S=n.unref(x))==null?void 0:S.format(R),f.dateFormat=R;else if(k==="ecanRangePicker"){const{interval:T,intervalUnit:w,operate:I}=m||{};let N=v;if(!v){const M=b&&b.split("-");M!=null&&M.length&&(N=M[M.length-1])}if(!N)return;let O=null;if(B&&(N==="startTime"?O=ke().subtract(T,w):N==="endTime"&&(O=ke())),n.unref(m[N])&&(O=ke(n.unref(m[N]))),I){const{type:M,value:q,mode:j}=I;switch(M){case"add":O=O&&O.add(q,j);break;case"minus":O=O&&O.subtract(q,j)}}O&&(f.fieldValue=O==null?void 0:O.format(R)),f.dateFormat=R}else bt(k,["table","bar","combograph","line","pie","radar","scatter","list"])?p&&L?f.fieldValue=L[p]:!p&&L?f.fieldValue=L.value:f.fieldValue=n.unref(x):f.fieldValue=n.unref(x)}return async(f={})=>{var D,z,U,J,$,Q;t(e.id,!1);const{graphicConfig:g,type:y,isGroupTable:m=!1}=e;let{source:v,dataViewId:E,plugin:p="1",layer:b,chartType:x,classificationList:A=[],rowHeaderList:k=[],seriesList:B=[],leftAxisList:L=[],rightAxisList:R=[],queryColumnList:C=[],indicators:S=[],controlList:T=[],formFields:w={},idxLibMode:I,preview:N=!1}=g||{},O=[];(g==null?void 0:g.pageMode)==="design"?O=g.sqlConditions??[]:O=u(g),b==null&&(bt(y,["table"])?b="1":bt(y,["select","checkbox","radio"])?b="3":b="2");let M,q="";if(Array.isArray(A)&&A.length>0){const Z=A.length;for(let ee=0;ee<Z;ee++){const ne=A[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re,dateFormat:je,typeGuid:Ue="",truncations:_e=[]}=ne;if(de||Z===1){q=Ue,M={label:ae.trim(),columnName:re,show:de,sort:Se,customGroup:De,conditions:s(Re),typeGuid:Ue},je&&(M.dateFormat=je),re==="the_date"&&!M.dateFormat&&(M.dateFormat="YYYY-MM");const Ae={};if(Array.isArray(_e)&&_e.length>0){const Ne=_e.length;for(let We=0;We<Ne;We++){const ot=_e[We]||{},{rule:He="",num:Ge=0,name:ut=""}=ot;He&&Ge&&(Ae.num=Ge,Ae.rule=He,ut&&(Ae.otherGroupName=ut))}}(D=Object.keys(Ae))!=null&&D.length&&(M.truncation=Ae);break}}}let j;if(Array.isArray(B)&&B.length>0){const Z=B.length;for(let ee=0;ee<Z;ee++){const ne=B[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re}=ne;if(de||Z===1){j={label:ae.trim(),columnName:re,show:de,sort:Se,customGroup:De,conditions:s(Re)};break}}}const G=[];C==null||C.forEach(Z=>{G.push(a(Z))});const F=[];L==null||L.forEach(Z=>{Z.location="LEFT",F.push(l(Z))}),R==null||R.forEach(Z=>{Z.location="RIGHT",F.push(l(Z))}),S==null||S.forEach(Z=>{Z.location="LEFT",F.push(l(Z))});const P=[];if(Array.isArray(k)&&k.length>0){const Z=k.length;for(let ee=0;ee<Z;ee++){const ne=k[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re,truncations:je,typeGuid:Ue=""}=ne;let _e=Se;if(f.sort){const{field:We,order:ot}=f.sort,He=F.find(Ge=>Ge.label===We);He&&(_e={columnName:He.columnName,label:f.sort.field,order:ot.toUpperCase(),type:"NORMAL"})}const Ae={label:ae.trim(),columnName:re,show:de,sort:_e,customGroup:De,conditions:s(Re),typeGuid:Ue},Ne={};if(Array.isArray(je)&&je.length>0){const We=je.length;for(let ot=0;ot<We;ot++){const He=je[ot]||{},{rule:Ge="",num:ut=0,name:V=""}=He;Ge&&ut&&(Ne.num=ut,Ne.rule=Ge,V&&(Ne.otherGroupName=V))}}(z=Object.keys(Ne))!=null&&z.length&&(Ae.truncation=Ne),P.push(Ae)}}if(bt(y,["text","proportion"])&&(x="zb"),m){if(P.length===0||F.length===0)return;x="grouptable"}else{if(b==="1"&&G.length===0)return;if(b==="2"&&F.length===0)return;if(b==="3"&&(!q||!w.labelField||!w.valueField))return}let _=(U=window==null?void 0:window.config)==null?void 0:U.pageId;if(!_){const{pathname:Z}=window==null?void 0:window.location;if(Z){const ee=Z.split("/");ee!=null&&ee.length&&(_=ee[ee.length-1])}}if((J=Object.keys(w))!=null&&J.length){const Z=T.find(ne=>ne.conditionKey==="parentCode"),ee={};if(Z){const ne=c(Z.id)||{};if(ne!=null&&ne.itemCodes)ee.parentItemCodes=ne.itemCodes;else return}try{return await lt.post(`${ar}/diagram/formData`,{source:v,dataViewId:E,plugin:"4",layer:b,chartType:"normalSelect",rangeIndexTypeGuid:q,type:"normalSelect",labelField:w.labelField,valueField:w.valueField,pageId:_,sqlConditions:O,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ee},{headers:{Authentication:($=window==null?void 0:window.config)==null?void 0:$.indicatorToken,operateContext:or}})}catch(ne){console.error(ne)}finally{}}else try{return await lt.post(`${ar}/diagram`,{source:v,dataViewId:E,plugin:p,layer:b,chartType:x,classification:M,series:j,indicatorList:F,queryColumns:m?[]:G,pageFlag:!0,pageId:_,sqlConditions:O.map(ee=>{const{fieldValue:ne}=ee,ae={};return ne&&Array.isArray(ne)&&(ae.fieldValue=JSON.stringify(ne)),{...ee,...ae}}),idxLibMode:I,preview:N,rowHeaders:P,keyName:e.keyName},{headers:{Authentication:(Q=window==null?void 0:window.config)==null?void 0:Q.indicatorToken,operateContext:or}})}catch(Z){console.error(Z)}finally{}}},cc=()=>{const o=window.location.search.slice(1).split("&"),t=o.length,a={};for(let r=0;r<t;r++){const i=o[r];if(i==null||i==="")continue;const s=i.split("=");if(Array.isArray(s)){const l=s[0];a[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},fc=n.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...On},setup(e){const{width:o,height:t}=n.inject(Me,{width:null,height:null}),a=n.inject("setPageHeight",x=>{}),r=n.inject("isMobile",!1),i=n.computed(()=>{const x={};return r||(x.width=o.value,x.height=t.value),{...x,backgroundColor:e.backgroundColor,backgroundImage:St(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=n.ref(0),l=n.ref(0),d=n.ref(0),c=n.ref(0),u=n.ref(!1),h=n.ref();let f;const g=()=>new Promise(x=>{n.nextTick(()=>{o.value&&t.value?(s.value=parseFloat(o.value),l.value=parseFloat(t.value)):(s.value=h.value.clientWidth,l.value=h.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),x()})}),y=()=>{s.value&&l.value?(h.value.style.width=`${s.value}px`,h.value.style.height=`${l.value}px`):(h.value.style.width=`${d.value}px`,h.value.style.height=`${c.value}px`)};n.watch([o,t],async()=>{await g(),y(),v(),window.addEventListener("resize",E),p(),u.value=!0},{immediate:!0});const m=n.ref({});n.provide("scaleValue",m);const v=()=>{if(r){h.value.style.width="100%",h.value.style.height="auto",a("auto");return}const x=document.body.clientWidth,A=document.body.clientHeight,k=s.value||d.value,B=l.value||c.value,L=x/k;let R=A/B;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/B),m.value={widthScale:L,heightScale:R},h.value&&(h.value.style.transform=`scale(${L}, ${R})`),a(R)},E=Pe.debounce(async()=>{await g(),v()},100),p=()=>{const x=window.MutationObserver;f=new x(E),f.observe(h.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},b=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return n.onMounted(()=>{u.value=!1}),n.onUnmounted(()=>{window.removeEventListener("resize",E),b()}),{style:i,container:h,ready:u}}}),vu="",dc={id:"container",ref:"container"};function uc(e,o,t,a,r,i){return n.openBlock(),n.createElementBlock("div",dc,[e.ready?(n.openBlock(),n.createElementBlock("div",{key:0,class:"page-config",style:n.normalizeStyle(e.style)},[n.renderSlot(e.$slots,"default",{},void 0,!0)],4)):n.createCommentVNode("",!0)],512)}const di=me(he(fc,[["render",uc],["__scopeId","data-v-b496b36e"]])),ko={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px"},To=pe(ko),hc=n.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...To},setup(e,{expose:o}){cc();const t=n.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=n.ref(),r=()=>{a.value.setAttribute("datav-theme",e.theme)},i=n.inject("usedComponentList",[]);n.watch(()=>e.theme,()=>{r()}),n.onMounted(()=>{r()});const s=n.computed(()=>Be(e.contextRequestUrl)),l=n.computed(()=>e.pageMode),d=n.computed(()=>e.theme),c=n.computed(()=>e.width),u=n.computed(()=>e.height),h=n.ref("");n.provide(Me,{contextRequestUrl:s,pageMode:l,theme:d,touchEventId:h,width:c,height:u});const f=n.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});n.provide("setPageHeight",z=>{let U=z;t.value||(U=parseFloat(u.value)*z+"px"),f.value.height=U}),n.provide("isMobile",t.value),n.provide("getContainerMap",()=>e.containerMap),n.provide("getCombinationMap",()=>e.combinationMap);const g=n.ref(),y=new Map;console.log("globalModel",y);const m=z=>y.get(z),v=(z,U)=>{g.value=U,y.set(z,U)},E=()=>{g.value=null},p=z=>{let U=z;if(U){const J=z.match(/\{(.+?)\}/g);if(J!=null&&J.length){let $=J[0].slice(1,-1).trim();const Q=$.match(/\[(.+?)\]/g);let Z="";Q!=null&&Q.length&&($=$.replace(Q[0],""),Z=Q[0].slice(1,-1).trim());const ee=n.unref(i).find(ne=>ne.keyName===$);if(ee){const ne=m(ee.id),{type:ae,value:re,RECORD:de}=ne||{};bt(ae,["table","bar","combograph","line","pie","radar","scatter","list"])?U=de[Z]:U=re}}}return U};n.provide(we,{getGlobalModel:m,setGlobalModel:v,clearInteractiveData:E,getRecordValueByKeyName:p,interactiveData:g});const b=n.ref({}),x=(z,U)=>{b.value[z]=U};n.provide(mt,{loadedData:b,setLoadedData:x});const A=[],k=()=>{A.pop()},B=z=>{A.push(z)},L=new Map,R=z=>L.get(z),C=(z,U)=>{L.set(z,U)};n.provide(nr,{popUseModalIds:k,pushUseModalIds:B,getModalModel:R,setModalModel:C});const S=R0(),T=new Set,w=(z,U)=>{T.add(z),S.on(z,J=>typeof U[J]=="function"&&U[J]()),n.onBeforeUnmount(()=>{I(z)})},I=z=>{T.delete(z),S.off(z)},N=(z,U)=>{if(z==="PAGE"){const J=A.length;let $=[];if(J===0)$=[...T];else{const Q=A[J-1];$=[...R(Q)]}$.forEach(Q=>{S.emit(Q,U)})}else S.emit(z,U)};n.provide(Ln,{onEvent:w,offEvent:I,emitEvent:N});const O=n.ref(0),M=()=>{O.value=n.unref(O)+1};n.provide(tr,{requestToken:M});const q=new Map,j=new Map,G=({requestFn:z=()=>{},sortNum:U=0,id:J=""})=>{if(q.has(U)){const $=q.get(U);$==null||$.push(z)}else q.set(U,[z]);j.set(J,z)},F=z=>new Promise((U,J)=>{const $=z.map(Q=>Q());Promise.all($).then(Q=>{U(Q)}).catch(Q=>{J(Q)})}),P=z=>new Promise(async(U,J)=>{if(z){if(typeof z=="string"){const $=j.get(z);if(typeof $=="function"){const Q=lt.interceptors.response.use(Z=>(U(Z),Z),Z=>(J(Z),Promise.reject(Z)));$(),lt.interceptors.response.eject(Q)}}}else{const $=Array.from(q);$.sort((Z,ee)=>ee[0]-Z[0]);const Q=$.length;try{e.pageMode!=="design"&&n.unref(O)>0;for(let Z=0;Z<Q;Z++){const ee=$[Z][1];await F(ee)}}catch(Z){console.error(Z)}finally{q.clear(),U(null)}}});n.provide(ze,{setRequest:G,touchRequest:P});const _=()=>{S.emit($t)};n.provide($t,{emitRefreshPage:_});const D=z=>{S.on($t,()=>z()),n.onMounted(()=>{S.off($t)})};return n.onBeforeUnmount(()=>{q==null||q.clear(),j==null||j.clear()}),o({touchRequest:P,getGlobalModel:m,onRefreshPage:D}),{providerConfig:a,configStyle:f}}}),Cu="";function gc(e,o,t,a,r,i){return n.openBlock(),n.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:n.normalizeStyle(e.configStyle)},[n.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ui=me(he(hc,[["render",gc],["__scopeId","data-v-1ab62961"]])),Bo={...Ce,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"},Eo=pe(Bo),hi=["refreshData","click","valueChange"],Do="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=",Io="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==",Ro=n.defineComponent({name:"EcanText",components:{Skeleton:tn},props:{...Eo},setup(e,{expose:o}){const t=n.ref(!1),a=ve(e),r=n.ref({}),i=n.computed(()=>e.variableFontSize||"14px"),s=n.computed(()=>"-"+n.unref(i));n.watch(()=>[e.data,e.dataType],([S,T])=>{T==="static"&&(r.value=S)},{immediate:!0});const{getGlobalModel:l,setGlobalModel:d}=n.inject(we,{getGlobalModel:S=>{},setGlobalModel:(S,T)=>{}}),{setLoadedData:c}=n.inject(mt,{setLoadedData:(S,T)=>{}}),u=n.computed(()=>{let S="";if(e.gradientShow){const{gradientColor:T,gradientOffset:w,gradientAngle:I,color:N}=e;S+=`background: linear-gradient(${I}, ${N}, ${T||"transparent"} ${w*100}%);-webkit-background-clip: text;color: transparent;`}return S}),h=n.computed(()=>{const S={};if(e.gradientShow){const{gradientColor:T,gradientOffset:w,gradientAngle:I,color:N}=e,O=T||"transparent";S.background=`linear-gradient(${I}, ${N}, ${O} ${w*100}%)`,S["-webkit-background-clip"]="text",S.color="transparent"}return S}),f=n.computed(()=>{var M;if(n.unref(t))return"NaN";const S=n.unref(r),T=e.increaseColor||e.color,w=e.declineColor||e.color;let I=e.text;I=I==null?void 0:I.replace(/\n|\\n/g,"<br/>"),I=I==null?void 0:I.replace(/\s(?!\{) | (?!\})\s/g," ");const N=I.match(/\{(.+?)\}/g)||[];let O="";if(N==null||N.length===0){if(I&&e.format==="percentage"&&!isNaN(+I)){const q=parseFloat(I),j=q*100,G=g(j.toFixed(2));q>=0?I=`<span style="color: ${G||T||"#ED6643"};font-size:${n.unref(i)};display: inline-block;${n.unref(u)}">
|
|
97
|
+
`),Ao=(e,o=2)=>{const t=parseFloat(e+"");return isNaN(t)?e:t.toFixed(o).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},lc=e=>{const o=parseFloat(e+"");return isNaN(o)?e:(o+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},hn=(e,o=2)=>{const t=e+"";if(t.includes("%"))return e;const a=parseFloat(t);return isNaN(a)?e:`${(a*100).toFixed(o)}%`},sc=(e,o=2)=>{const t=e+"",a=parseFloat(t);return isNaN(a)?e:a.toFixed(o)},ci=(e,o)=>tt(o,e),bt=(e,o)=>{if(typeof e=="string"&&typeof o=="string")return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(o)){const t=o.length;for(let a=0;a<t;a++){const r=o[a];if(typeof r=="string"&&e.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},gn=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),Yt=e=>{const{leftAxisList:o=[],rightAxisList:t=[],queryColumnList:a=[],indicators:r=[]}=e;return[...o,...t,...a,...r].filter(i=>(i==null?void 0:i.calcType)==="COMPONENT").map(i=>({keyName:i.builtInCalcWay,id:i.builtInValueSource}))},et=(e,o)=>{let t=!0;const a=Yt(e);return a!=null&&a.length&&(t=a.map(r=>o[r.id]).every(r=>r)),t},mn=(e,o)=>{const t={dayjs:ke,...o};let a="";const r=[];for(const l in t)a+=`${l},`,r.push(t[l]);a=a.replace(/,$/,"");const i=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return e}return s},Be=(e="",{textData:o,codeData:t}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const h=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(h);for(let g=0;g<f.length;g++){const y=f[g],m=s[y];m!=null&&typeof m!="function"&&(u=u.replace(y,m))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=mn(u,t)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),r&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},qe=(e,o=()=>{})=>{const{requestUrl:t,requestMethod:a,requestHeaders:r,requestParams:i,requestInterval:s,isOpenRequestTimer:l}=e,{contextRequestUrl:d,touchEventId:c}=n.inject(Me,{contextRequestUrl:"",touchEventId:""}),{getGlobalModel:u}=n.inject(we,{getGlobalModel:y=>{}}),h=Be(t),f=async(y={})=>{if(!h||!a||!r)return;let m={};i.forEach(x=>{const{key:A,value:k}=x;if(typeof k=="object"&&k!=null&&k.id){let B={};const{id:L,prop:R,propKey:C,operate:S}=k;L==="THIS"?B=u(n.unref(c))||{}:B=u(L)||{};const T=n.unref(B[R]);let w=null;if(["date","range"].some(N=>bt(B==null?void 0:B.type,N))){const{value:N,type:O,mode:M}=S||{};if(N&&O&&M)switch(O){case"add":w=n.unref(T).add(N,M);break;case"minus":w=n.unref(T).subtract(N,M);break}w==null&&(w=n.unref(T)),w=(w==null?void 0:w.format((C==null?void 0:C.trim())||B.format))||""}else Object.prototype.toString.call(T)==="[object Object]"?C?w=T[C]:w=R?T[R]:T:bt(B==null?void 0:B.type,"select")&&n.unref(T)&&R&&Array.isArray(n.unref(T))?w=n.unref(T).map(N=>Object.prototype.hasOwnProperty.call(N,R)?N[R]:N):w=T;m[A]=w}else typeof k=="string"&&(m[A]=Be(k))}),m={...window.config.requestParams,...y,...m};let v="";const E=Object.keys(m),p=E.length-1,b=E.length;E.forEach((x,A)=>{let k=m[x];Object.prototype.toString.call(k)==="[object Object]"&&(k=JSON.stringify(k)),A===0?b!==1?v+=`?${x}=${k}&`:v+=`?${x}=${k}`:A===p?v+=`${x}=${k}`:v+=`${x}=${k}&`});try{const x=["get","head"].includes(a),A={};let k=x?h+v:h;m.dataSqlId&&!k.includes("dataSqlId")&&(k+=`${k.includes("?")?"&":"?"}dataSqlId=${m.dataSqlId}`),Object.prototype.hasOwnProperty.call(m,"signal")&&(A.signal=m.signal);const B=await lt({baseURL:n.unref(d)||"",url:k,method:a,headers:r,data:x?{}:m,...A});return o(B),B}catch(x){console.error(x)}},g=l&&setInterval(f,s*1e3);return n.onUnmounted(()=>{clearInterval(g)}),f},vt=(e=[],o,t=!1)=>{let{name:a="name",types:r=[]}=o||{};a=(a==null?void 0:a.trim())||a;const i=new Set,s=new Map,l=e.length,d=r.length;if(l===1&&!t){const h=[];for(let g=0;g<d;g++){const y=r[g],{label:m,value:v}=y,E={...e[0],value:e[0][v]};i.add(m),h.push(E)}const f=e[0][a]||"";s.set(f,h)}else for(let h=0;h<l;h++){const f=e[h],g=f[a];i.add(g);for(let y=0;y<d;y++){const m=r[y],{label:v,value:E}=m,p={...f,value:f[E]};if(s.has(v)){const b=s.get(v);b.push(p),s.set(v,b)}else s.set(v,[p])}}const c=Array.from(i),u=[];for(const[h,f]of s)u.push({name:h,data:f});return{dimensions:c,dataset:u}},St=(e,o=!1)=>{var a;if(!e)return e;let t="";return e!=null&&e.includes("://")?t=e:t=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(t=`url(${t})`),t},fi=(e,o)=>{const t=`${rr}/preview?pageId=${o}`,a=`${rr}/${o}`;return e==="preview"?t:a},tt=(e,o)=>{var r;if(e==null)return o;const t=e.match(/\{.*\}/g);if(t==null||t.length===0)return o;const a=t.length;for(let i=0;i<a;i++){const s=t[i];if(s==null||s==="")break;let l=(r=s.slice(1,-1))==null?void 0:r.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=mn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},nt=(e={})=>{const{requestToken:o}=n.inject(tr,{requestToken:()=>{}}),{setLoadedData:t}=n.inject(mt,{setLoadedData:(f,g)=>{}});e.dataType==="indicator"&&o();const a=(f={})=>{const{label:g,name:y,location:m,show:v,indexCode:E}=f;return{label:g,columnName:y,location:m,show:v,calcType:"COLUMN",hrpIndexCode:E}},r=(f,g)=>Object.prototype.hasOwnProperty.call(f,g),i=f=>{r(f,"dataType")&&(f.fieldType==="DATE"&&(f.label=f.fieldName),f.dataType==="component"&&(f.fieldValue="${"+f.fieldValue+"}"),delete f.dataType),r(f,"activeKey")&&delete f.activeKey,r(f,"radioValue")&&delete f.radioValue},s=f=>{const g=[];return f!=null&&f.length&&Pe.cloneDeep(f).forEach(y=>{if(y.join&&y.conditions){const m=!y.conditions.some(v=>v.join&&v.conditions);y.conditions.forEach((v,E)=>{i(v),m?E<y.conditions.length-1?g.push({join:y.join,...v}):g.push(v):v.join&&v.conditions?g.push({conditions:s([v]),join:y.join}):g.push(v)})}else i(y),g.push(y)}),g},l=(f={})=>{const{label:g,name:y,location:m,show:v,indexCode:E,calcType:p="COLUMN",builtInFormula:b,builtInValueSource:x,builtInCalcWay:A,formula:k,conditions:B,aggregate:L}=f;let R;if(B&&(R=s(B)),p==="COMPONENT"){const C={};return h(C,x),{label:g.trim(),columnName:y,show:v,calcType:p,componentAlias:A,componentValue:C.fieldValue||null}}else return{label:g.trim(),columnName:y,location:m,show:v,calcType:p,hrpIndexCode:E,aggregate:L,builtInFormula:b,builtInValueSource:x,builtInCalcWay:A,formula:k,conditions:R}},d=f=>{const g=[];for(const y of f)y.conditions?g.push(...d(y.conditions)):(y==null?void 0:y.dataType)==="component"&&g.push(y);return g},{getGlobalModel:c}=n.inject(we,{getGlobalModel:f=>{}}),u=f=>{if(!f)return[];const{controlList:g=[],classificationList:y=[],rowHeaderList:m=[],seriesList:v=[],leftAxisList:E=[],rightAxisList:p=[],queryColumnList:b=[],indicators:x=[]}=f,A=[...y,...m,...v,...E,...p,...b,...x],k=[];for(const C of A){const S=d((C==null?void 0:C.conditions)||[]);if(S!=null&&S.length){const T=S.filter(w=>(w==null?void 0:w.dataType)==="component").map(w=>{const I={};return w!=null&&w.dateFormat&&(I.format=w.dateFormat),{conditionKey:w.fieldName,conditionLabel:w.fieldName,conditionName:w.fieldName,conditionValueType:w.fieldType,id:w.componentId,keyName:w.fieldValue,rule:w.rule,notGlobal:!0,...I}});if(T!=null&&T.length)for(const w of T)k.find(I=>I.keyName===w.keyName)||k.push(w)}}const B=g.concat(k),L=B.length,R=[];for(let C=0;C<L;C++){const S=B[C];if((S==null?void 0:S.conditionKey)==="parentCode")continue;const{id:T,keyName:w,conditionLabel:I,conditionKey:N,conditionValueType:O,prop:M,rule:q="NONE",notGlobal:j=!1,format:G,modelKey:F}=S;let P=w||T;P&&M&&(P+=`-${M}`);let _=q;_==="NONE"&&(["startTime","endTime"].includes(M)?_=M==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":w!=null&&w.includes("startTime")?_=M==="GREATER_EQUAL":w!=null&&w.includes("endTime")?_=M==="LESS_EQUAL":_="EQUAL");const D={rule:_,label:I,fieldName:N,fieldValue:"",valueType:O,alias:P,globalCondition:!j};h(D,T,{prop:M,dateFormat:G,modelKey:F,keyName:w}),R.push(D)}for(let C=R.length-1;C>=0;C--){const S=R[C];S.globalCondition||R.find(w=>w.alias===S.alias&&w.globalCondition)&&R.splice(C,1)}return R};function h(f,g,y){var C,S;const m=c(g)||{},{prop:v="",dateFormat:E="",modelKey:p="",keyName:b=""}=y||{},{value:x,format:A="YYYY-MM-DD",type:k="",useCurrentTime:B,RECORD:L}=m||{},R=E||A;if(bt(m.type,"date"))B?x?f.fieldValue=(C=n.unref(x))==null?void 0:C.format(R):f.fieldValue=ke().format(R):f.fieldValue=(S=n.unref(x))==null?void 0:S.format(R),f.dateFormat=R;else if(k==="ecanRangePicker"){const{interval:T,intervalUnit:w,operate:I}=m||{};let N=v;if(!v){const M=b&&b.split("-");M!=null&&M.length&&(N=M[M.length-1])}if(!N)return;let O=null;if(B&&(N==="startTime"?O=ke().subtract(T,w):N==="endTime"&&(O=ke())),n.unref(m[N])&&(O=ke(n.unref(m[N]))),I){const{type:M,value:q,mode:j}=I;switch(M){case"add":O=O&&O.add(q,j);break;case"minus":O=O&&O.subtract(q,j)}}O&&(f.fieldValue=O==null?void 0:O.format(R)),f.dateFormat=R}else bt(k,["table","bar","combograph","line","pie","radar","scatter","list"])?p&&L?f.fieldValue=L[p]:!p&&L?f.fieldValue=L.value:f.fieldValue=n.unref(x):f.fieldValue=n.unref(x)}return async(f={})=>{var D,z,U,J,$,Q;t(e.id,!1);const{graphicConfig:g,type:y,isGroupTable:m=!1}=e;let{source:v,dataViewId:E,plugin:p="1",layer:b,chartType:x,classificationList:A=[],rowHeaderList:k=[],seriesList:B=[],leftAxisList:L=[],rightAxisList:R=[],queryColumnList:C=[],indicators:S=[],controlList:T=[],formFields:w={},idxLibMode:I,preview:N=!1}=g||{},O=[];(g==null?void 0:g.pageMode)==="design"?O=g.sqlConditions??[]:O=u(g),b==null&&(bt(y,["table"])?b="1":bt(y,["select","checkbox","radio"])?b="3":b="2");let M,q="";if(Array.isArray(A)&&A.length>0){const Z=A.length;for(let ee=0;ee<Z;ee++){const ne=A[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re,dateFormat:je,typeGuid:Ue="",truncations:_e=[]}=ne;if(de||Z===1){q=Ue,M={label:ae.trim(),columnName:re,show:de,sort:Se,customGroup:De,conditions:s(Re),typeGuid:Ue},je&&(M.dateFormat=je),re==="the_date"&&!M.dateFormat&&(M.dateFormat="YYYY-MM");const Ae={};if(Array.isArray(_e)&&_e.length>0){const Ne=_e.length;for(let We=0;We<Ne;We++){const ot=_e[We]||{},{rule:He="",num:Ge=0,name:ut=""}=ot;He&&Ge&&(Ae.num=Ge,Ae.rule=He,ut&&(Ae.otherGroupName=ut))}}(D=Object.keys(Ae))!=null&&D.length&&(M.truncation=Ae);break}}}let j;if(Array.isArray(B)&&B.length>0){const Z=B.length;for(let ee=0;ee<Z;ee++){const ne=B[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re}=ne;if(de||Z===1){j={label:ae.trim(),columnName:re,show:de,sort:Se,customGroup:De,conditions:s(Re)};break}}}const G=[];C==null||C.forEach(Z=>{G.push(a(Z))});const F=[];L==null||L.forEach(Z=>{Z.location="LEFT",F.push(l(Z))}),R==null||R.forEach(Z=>{Z.location="RIGHT",F.push(l(Z))}),S==null||S.forEach(Z=>{Z.location="LEFT",F.push(l(Z))});const P=[];if(Array.isArray(k)&&k.length>0){const Z=k.length;for(let ee=0;ee<Z;ee++){const ne=k[ee]||{},{label:ae="",name:re="",show:de=!1,sort:Se,customGroup:De,conditions:Re,truncations:je,typeGuid:Ue=""}=ne;let _e=Se;if(f.sort){const{field:We,order:ot}=f.sort,He=F.find(Ge=>Ge.label===We);He&&(_e={columnName:He.columnName,label:f.sort.field,order:ot.toUpperCase(),type:"NORMAL"})}const Ae={label:ae.trim(),columnName:re,show:de,sort:_e,customGroup:De,conditions:s(Re),typeGuid:Ue},Ne={};if(Array.isArray(je)&&je.length>0){const We=je.length;for(let ot=0;ot<We;ot++){const He=je[ot]||{},{rule:Ge="",num:ut=0,name:V=""}=He;Ge&&ut&&(Ne.num=ut,Ne.rule=Ge,V&&(Ne.otherGroupName=V))}}(z=Object.keys(Ne))!=null&&z.length&&(Ae.truncation=Ne),P.push(Ae)}}if(bt(y,["text","proportion"])&&(x="zb"),m){if(P.length===0||F.length===0)return;x="grouptable"}else{if(b==="1"&&G.length===0)return;if(b==="2"&&F.length===0)return;if(b==="3"&&(!q||!w.labelField||!w.valueField))return}let _=(U=window==null?void 0:window.config)==null?void 0:U.pageId;if(!_){const{pathname:Z}=window==null?void 0:window.location;if(Z){const ee=Z.split("/");ee!=null&&ee.length&&(_=ee[ee.length-1])}}if((J=Object.keys(w))!=null&&J.length){const Z=T.find(ne=>ne.conditionKey==="parentCode"),ee={};if(Z){const ne=c(Z.id)||{};if(ne!=null&&ne.itemCodes)ee.parentItemCodes=ne.itemCodes;else return}try{return await lt.post(`${ar}/diagram/formData`,{source:v,dataViewId:E,plugin:"4",layer:b,chartType:"normalSelect",rangeIndexTypeGuid:q,type:"normalSelect",labelField:w.labelField,valueField:w.valueField,pageId:_,sqlConditions:O,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ee},{headers:{Authentication:($=window==null?void 0:window.config)==null?void 0:$.indicatorToken,operateContext:or}})}catch(ne){console.error(ne)}finally{}}else try{return await lt.post(`${ar}/diagram`,{source:v,dataViewId:E,plugin:p,layer:b,chartType:x,classification:M,series:j,indicatorList:F,queryColumns:m?[]:G,pageFlag:!0,pageId:_,sqlConditions:O.map(ee=>{const{fieldValue:ne}=ee,ae={};return ne&&Array.isArray(ne)&&(ae.fieldValue=JSON.stringify(ne)),{...ee,...ae}}),idxLibMode:I,preview:N,rowHeaders:P,keyName:e.keyName},{headers:{Authentication:(Q=window==null?void 0:window.config)==null?void 0:Q.indicatorToken,operateContext:or}})}catch(Z){console.error(Z)}finally{}}},cc=()=>{const o=window.location.search.slice(1).split("&"),t=o.length,a={};for(let r=0;r<t;r++){const i=o[r];if(i==null||i==="")continue;const s=i.split("=");if(Array.isArray(s)){const l=s[0];a[l]=s[1]}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},fc=n.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...On},setup(e){const{width:o,height:t}=n.inject(Me,{width:null,height:null}),a=n.inject("setPageHeight",x=>{}),r=n.inject("isMobile",!1),i=n.computed(()=>{const x={};return r||(x.width=o.value,x.height=t.value),{...x,backgroundColor:e.backgroundColor,backgroundImage:St(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=n.ref(0),l=n.ref(0),d=n.ref(0),c=n.ref(0),u=n.ref(!1),h=n.ref();let f;const g=()=>new Promise(x=>{n.nextTick(()=>{o.value&&t.value?(s.value=parseFloat(o.value),l.value=parseFloat(t.value)):(s.value=h.value.clientWidth,l.value=h.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),x()})}),y=()=>{s.value&&l.value?(h.value.style.width=`${s.value}px`,h.value.style.height=`${l.value}px`):(h.value.style.width=`${d.value}px`,h.value.style.height=`${c.value}px`)};n.watch([o,t],async()=>{await g(),y(),v(),window.addEventListener("resize",E),p(),u.value=!0},{immediate:!0});const m=n.ref({});n.provide("scaleValue",m);const v=()=>{if(r){h.value.style.width="100%",h.value.style.height="auto",a("auto");return}const x=document.body.clientWidth,A=document.body.clientHeight,k=s.value||d.value,B=l.value||c.value,L=x/k;let R=A/B;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/B),m.value={widthScale:L,heightScale:R},h.value&&(h.value.style.transform=`scale(${L}, ${R})`),a(R)},E=Pe.debounce(async()=>{await g(),v()},100),p=()=>{const x=window.MutationObserver;f=new x(E),f.observe(h.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},b=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return n.onMounted(()=>{u.value=!1}),n.onUnmounted(()=>{window.removeEventListener("resize",E),b()}),{style:i,container:h,ready:u}}}),vu="",dc={id:"container",ref:"container"};function uc(e,o,t,a,r,i){return n.openBlock(),n.createElementBlock("div",dc,[e.ready?(n.openBlock(),n.createElementBlock("div",{key:0,class:"page-config",style:n.normalizeStyle(e.style)},[n.renderSlot(e.$slots,"default",{},void 0,!0)],4)):n.createCommentVNode("",!0)],512)}const di=me(he(fc,[["render",uc],["__scopeId","data-v-b496b36e"]])),ko={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px"},To=pe(ko),hc=n.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...To},setup(e,{expose:o}){cc();const t=n.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=n.ref(),r=()=>{a.value.setAttribute("datav-theme",e.theme)},i=n.inject("usedComponentList",[]);n.watch(()=>e.theme,()=>{r()}),n.onMounted(()=>{r()});const s=n.computed(()=>Be(e.contextRequestUrl)),l=n.computed(()=>e.pageMode),d=n.computed(()=>e.theme),c=n.computed(()=>e.width),u=n.computed(()=>e.height),h=n.ref("");n.provide(Me,{contextRequestUrl:s,pageMode:l,theme:d,touchEventId:h,width:c,height:u});const f=n.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});n.provide("setPageHeight",z=>{let U=z;t.value||(U=parseFloat(u.value)*z+"px"),f.value.height=U}),n.provide("isMobile",t.value),n.provide("getContainerMap",()=>e.containerMap),n.provide("getCombinationMap",()=>e.combinationMap);const g=n.ref(),y=new Map;console.log("globalModel",y);const m=z=>y.get(z),v=(z,U)=>{g.value=U,y.set(z,U)},E=()=>{g.value=null},p=z=>{let U=z;if(U){const J=z.match(/\{(.+?)\}/g);if(J!=null&&J.length){let $=J[0].slice(1,-1).trim();const Q=$.match(/\[(.+?)\]/g);let Z="";Q!=null&&Q.length&&($=$.replace(Q[0],""),Z=Q[0].slice(1,-1).trim());const ee=n.unref(i).find(ne=>ne.keyName===$);if(ee){const ne=m(ee.id),{type:ae,value:re,RECORD:de}=ne||{};bt(ae,["table","bar","combograph","line","pie","radar","scatter","list"])?U=de[Z]:U=re}}}return U};n.provide(we,{getGlobalModel:m,setGlobalModel:v,clearInteractiveData:E,getRecordValueByKeyName:p,interactiveData:g});const b=n.ref({}),x=(z,U)=>{b.value[z]=U};n.provide(mt,{loadedData:b,setLoadedData:x});const A=[],k=()=>{A.pop()},B=z=>{A.push(z)},L=new Map,R=z=>L.get(z),C=(z,U)=>{L.set(z,U)};n.provide(nr,{popUseModalIds:k,pushUseModalIds:B,getModalModel:R,setModalModel:C});const S=R0(),T=new Set,w=(z,U)=>{T.add(z),S.on(z,J=>typeof U[J]=="function"&&U[J]()),n.onBeforeUnmount(()=>{I(z)})},I=z=>{T.delete(z),S.off(z)},N=(z,U)=>{if(z==="PAGE"){const J=A.length;let $=[];if(J===0)$=[...T];else{const Q=A[J-1];$=[...R(Q)]}$.forEach(Q=>{S.emit(Q,U)})}else S.emit(z,U)};n.provide(Ln,{onEvent:w,offEvent:I,emitEvent:N});const O=n.ref(0),M=()=>{O.value=n.unref(O)+1};n.provide(tr,{requestToken:M});const q=new Map,j=new Map,G=({requestFn:z=()=>{},sortNum:U=0,id:J=""})=>{if(q.has(U)){const $=q.get(U);$==null||$.push(z)}else q.set(U,[z]);j.set(J,z)},F=z=>new Promise((U,J)=>{const $=z.map(Q=>Q());Promise.all($).then(Q=>{U(Q)}).catch(Q=>{J(Q)})}),P=z=>new Promise(async(U,J)=>{if(z){if(typeof z=="string"){const $=j.get(z);if(typeof $=="function"){const Q=lt.interceptors.response.use(Z=>(U(Z),Z),Z=>(J(Z),Promise.reject(Z)));$(),lt.interceptors.response.eject(Q)}}}else{const $=Array.from(q);$.sort((Z,ee)=>ee[0]-Z[0]);const Q=$.length;try{e.pageMode!=="design"&&n.unref(O)>0;for(let Z=0;Z<Q;Z++){const ee=$[Z][1];await F(ee)}}catch(Z){console.error(Z)}finally{q.clear(),U(null)}}});n.provide(ze,{setRequest:G,touchRequest:P});const _=()=>{S.emit($t)};n.provide($t,{emitRefreshPage:_});const D=z=>{S.on($t,()=>z()),n.onMounted(()=>{S.off($t)})};return n.onBeforeUnmount(()=>{q==null||q.clear(),j==null||j.clear()}),o({touchRequest:P,getGlobalModel:m,onRefreshPage:D}),{providerConfig:a,configStyle:f}}}),Cu="";function gc(e,o,t,a,r,i){return n.openBlock(),n.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:n.normalizeStyle(e.configStyle)},[n.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ui=me(he(hc,[["render",gc],["__scopeId","data-v-1ab62961"]])),Bo={...Ce,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"},Eo=pe(Bo),hi=["refreshData","click","valueChange"],Do="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=",Io="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==",Ro=n.defineComponent({name:"EcanText",components:{Skeleton:tn},props:{...Eo},setup(e,{expose:o}){const t=n.ref(!1),a=ve(e),r=n.ref({}),i=n.computed(()=>e.variableFontSize||"14px"),s=n.computed(()=>"-"+n.unref(i));n.watch(()=>[e.data,e.dataType],([S,T])=>{T==="static"&&(r.value=S)},{immediate:!0});const{getGlobalModel:l,setGlobalModel:d}=n.inject(we,{getGlobalModel:S=>{},setGlobalModel:(S,T)=>{}}),{setLoadedData:c}=n.inject(mt,{setLoadedData:(S,T)=>{}}),u=n.computed(()=>{let S="";if(e.gradientShow){const{gradientColor:T,gradientOffset:w,gradientAngle:I,color:N}=e;S+=`background: linear-gradient(${I}, ${N}, ${T||"transparent"} ${w*100}%);-webkit-background-clip: text;color: transparent;`}return S}),h=n.computed(()=>{const S={};if(e.gradientShow){const{gradientColor:T,gradientOffset:w,gradientAngle:I,color:N}=e,O=T||"transparent";S.background=`linear-gradient(${I}, ${N}, ${O} ${w*100}%)`,S["-webkit-background-clip"]="text",S.color="transparent"}return S}),f=n.computed(()=>{var M;if(n.unref(t))return"NaN";const S=n.unref(r),T=e.increaseColor||e.color,w=e.declineColor||e.color;let I=e.text;I=I==null?void 0:I.replace(/\n|\\n/g,"<br/>"),I=I==null?void 0:I.replace(/\s(?!\{) | (?!\})\s/g," ");const N=I.match(/\{(.+?)\}/g)||[];let O="";if(N==null||N.length===0){if(I&&e.format==="percentage"&&!isNaN(+I)){const q=parseFloat(I),j=q*100,G=g(j.toFixed(2));q>=0?I=`<span style="color: ${G||T||"#ED6643"};font-size:${n.unref(i)};display: inline-block;${n.unref(u)}">
|
|
98
98
|
<div class="percentage-img-box">
|
|
99
99
|
<img style="width: ${n.unref(i)};filter: ${`drop-shadow(${G||T||"#ED6643"} ${n.unref(i)} 0px)`};" src="${Do}"/>
|
|
100
100
|
</div>
|